MAGIC VOICE Software Extern
CBM Home Allgemeines
General
Einführung
Introduction
Anschluss
Connection
Vokabular
Vocabulary
Tips & Tricks
Tips & Tricks
Lexikon
Lexicon
Hard- und Software
Hard- and Software
Versionen
Versions
Hardware
Hardware
Software Extern
Software Extern
Software Intern
Software Intern
-
Sprachdaten
Speech Data
LPC
LPC
Sprachtabelle
Speechtable
Bit-Format
Bit allocation
De-/Codierung
De-/Coding
Sprach Downloads
Speech Downloads
Magic-Talkie WAV zu MVM
WAV to MVM
. . . .


Das Magic Voice Modul kann in BASIC und Assembler programmiert werden.


BASIC


Das Magic Voice Modul stellt vier zusätzliche BASIC-Befehle zur Verfügung: SAY, RATE, VOC und RDY.

Befehlsbeschreibung:

 SAY

Dieser Befehl veranlasst das Magic Voice Modul, ein Wort zu sprechen. Dem SAY-Befehl muss entweder das zu sprechende Wort in Anführungszeichen folgen, oder die Wortnummer.

Beispiel:

SAY "HI"   Das Modul sagt "HI"
SAY 154    Die Wortnummer 154 entspricht dem Wort "HI"


 RATE

Mit diesem Befehl wird die Sprechgeschwindigkeit (Verzögerung zwischen den Worten) eingestellt. Dem RATE-Befehl muss eine Zahl zwischen 1 (schnell) und 10 (langsam) folgen. Der Standardwert ist 4. Die folgende Tabelle zeigt die 10 verfügbaren Geschwindigkeiten, bzw. den Faktor um den sich die Standardgeschwindigkeit ändert.

RATE 1 2 3 4 5 6 7 8 9 10
Faktor
(laut Sprachchip Spezifikation)
0,7 0,8 0,9 1,0 1,1 1,2 1,3 1,4 1,5 1,55
Faktor
(laut Handbuch)
0,65 1,0 1,4

Beispiel:

RATE 1
SAY "COMMAND"
RATE 4
SAY "ER"
SAY "OF"
RATE 1
SAY "COMPUTER"
SAY "SSSS"
RATE 4


 VOC

Mit diesem Befehl wird dem Sprachmodul die Verfügbarkeit eines erweiterten Vokabulars mitgeteilt. Das Vokabular kann von einer Diskette oder Kassette geladen werden.

Beispiel:

LOAD"VOCABULARY",8,1  Nachladen eines Vokabulars, zum Beispiel nach Adresse 24576
VOC(24576)            Mitteilung an das Sprachmodul und Übergabe der Startadresse

SAY 256           Spricht das erste Wort (0+256) des neuen Vokabulars


 RDY

Dies ist eine logische Funktion und dient zur Rückmeldung wenn die Sprache vollständig ausgegeben wurde. RDY ist "TRUE" (wahr), wenn die Sprache vollständig ausgegeben wurde, und "FALSE" (falsch), wenn das Modul noch spricht.


Beispiel:

x
x
x

Hinweis:

Im Handbuch wird angegeben, dass RDY auch dazu verwendet werden kann, das vorhanden sein des Moduls festzustellen. RDY = 0 wenn Modul nicht vorhanden und RDY = -1 wenn das Modul vorhanden ist. Diese Abfrage funktioniert nicht! Stattdessen kann man folgende Abfrage durchführen:

10 REM TEST OB DAS MODUL VORHANDEN IST
20 IF PEEK(49176) <> 234 THEN GOTO 100:REM $C018 $EA NOP
30 IF PEEK(49177) <> 234 THEN GOTO 100:REM $C019 $EA NOP
40 IF PEEK(49178) <> 96 THEN GOTO 100:REM  $C01A $60 RTS
50 REM AB HIER PROGRAMMCODE DER DAS MODUL BENUTZT
60 SAY 1:SAY 2:SAY 3
80 GOTO 200
100 REM PROGRAMMCODE FALLS KEIN MODUL VORHANDEN IST
110 PRINT"DAS MAGIC VOICE MODUL IST NICHT VORHANDEN"
200 END


 DATA

Neben SAY, RATE, VOC und RDY ist im Magic Voice Modul auch der DATA Befehl definiert, inwieweit dieser tatsächlich ausgewertet oder eine andere/erweiterte Funktion hat, ist noch unerforscht.


Fehlermeldungen:

Das Magic Voice Modul erkennt und informiert den Anwender mit folgenden BASIC-Fehlermeldungen.

ILLEGAL QUANTITY ERROR : wenn man den SAY Befehl mit einem Wort verwendet, das nicht im Wortschatz enthalten ist.

? TYPE MISMATCH ERROR  : wenn man den Befehlen RATE oder VOC kein numerisches Argument (also eine Zahl) folgen lässt.


Assembler


Bla Bla,

There is a seperate subroutine for each of the following functions:

- Reset speech module
- Get speech module status
- Say a word


The assembly language interface consists of subroutine calls with the argument passed in the A and X registers

Where possible, the calling procedures have been designed with ease of use in mind. Functions requiring a single byte except that byte in the processor's A-register. Where two bytes are needed the A-register and the X-register are both used. Only when a count is needed is the Y-register used. Registers are preserved only as indicated in the detailed descriptions below. The conventional uses of the registers are as follows:
A-register: complete operand or low byte if an adress is passed.
X-register: upper byte if an adress is passed
Y-register: count (0 implies 256).


Assembler Routinen:


SRESET - Reset The Speech System / Stop Talking
Einsprung - Entry Beschreibung - Description
Adresse - Address $C003 Diese Anweisung ...
This command resets the synthesizer hardware. It should be included in applications programs for initialization purposes and may be used to stop speech output in mid-utterance.
Bedingung - Condition Keine - None
Rückgabe - Returned Information
Akkumulator (A-Reg) ist zerstört
Accumulator (A-reg) is destroyed


SPSTAT - Get Status Of Speech Module
Einsprung - Entry Beschreibung - Description
Adresse - Address $C006 Diese Anweisung ...
This command may be used to determine whether the speech module has completed previous "sayit" requests and whether a new "sayit" request can be handled immediately.
Bedingung - Condition Keine - None
Rückgabe - Returned Information
A-Reg = 0 wenn bereit (Z-Flag = 1)
A-Reg = -1 wenn mit Sprechen beschäftigt (N-Flag = 1)
A-reg = 0 if ready
A-reg = -1 if busy talking

The N and Z bits of the processor status word are set accordingly.


SAYIT - Say A Word
Einsprung - Entry Beschreibung - Description
Adresse - Address $C009 Diese Anweisung ...
This command initiated the synthesis of a word or phrase. Control is returned to the calling program almost immediately if the module is not already talking, then control is not already talking. If the module is talking, then control will not be returned until the current request can be initiated. Words number 0 through 255 are words which are in the speech module. Words number 256 through 4095 are interpreted as located in the user's program space.
Bedingung - Condition A-Reg = niederwertiger Teil der Wortnummer
X-Reg = höherwertiger Teil der Wortnummer
A-reg = least significant portion of the word number
X-reg = most significant portion of the word number
Rückgabe - Returned Information
Alle Register zerstört
All registers destroyed

CAUTION: Special care should be taken to ensure that no other process in the system that generates NMI's is active when the calls to the speech synthsizer are made. This includes the RS-232 channel and the serial bus devices. The RS-232 channel is the only channel which must be actually be CLOSED. The serial bus channels may be open and may be left opened, but must not actively transmit data. It is recommended that programs which wish to perform series use I/O check, via SPSTAT to ensure that speech output is complete before initiating the operations.


SAYRAM - Say A Word From RAM
Einsprung - Entry Beschreibung - Description
Adresse - Address $C00C Diese Anweisung ...
This command is similar to the "SAYIT" except that the structure permitting access through the memory mapping system is bypassed. This entry point is intented to permit generation of speech from RAM based speech data. This may also be useful if RAM versions of words are modified under program control.
Bedingung - Condition A-Reg = niederwertiger Teil der Wortnummer
X-Reg = höherwertiger Teil der Wortnummer
A-reg = least significant portion of the word number
X-reg = most significant portion of the word number
Rückgabe - Returned Information
Alle Register zerstört
All registers destroyed

Speech is generated as in the SAYIT command above. Utterances 0...255 are taken from the on-board vocabulary and utterances 256..4095 are taken from memory as established by the SETTAB routine. No mapping is performed. Speech data is taken directly from the program's address space.

Note: See caution under SAYIT above.


SPEED - Set Speaking Speed Of Synthesizer
Einsprung - Entry Beschreibung - Description
Adresse - Address $C00F Die SPEED-Fähigkeit (Geschwindigkeit) wird benutzt, um ...
The SPEED capability is used to speed up or slow down the speaking rate of the synthesizer. The range of speed variations is from .64X decrease in the speed (speed code = 1) to a 1.4X increase (speed code = 10). Normal speed is code 4.
Bedingung - Condition A-Reg = gewünschter Geschwindigkeitscode von 1..10
A-reg = desired speed code from 1...10
Rückgabe - Returned Information
Kein Register beeinflusst
No register affected


SETTAB - Set Utterance Look Up Table Address
Einsprung - Entry Beschreibung - Description
Adresse - Address $C012 Die SETTAB-Funktion (setze Tabelle) wird benutzt, um ...
The SETTAB function is used to tell the speech module the starting memory address of user supplied speech data. It is identical to the BASIC VOC command. This command MUST be employed prior to any attempts to generate speech with utterance numbers greater than 255.
Bedingung - Condition A-Reg = niederwertiges Byte der Adresse
X-Reg = höherwertiges Byte der Adresse
A-reg = lower byte of adress
X-reg = upper byte of adress
Rückgabe - Returned Information
Keine - None


SIGNAL - Enable Vectoring To Completion Code
Einsprung - Entry Beschreibung - Description
Adresse - Address $C015 Diese Funktion ist für ...
This function is for support of advanced applications which implement asynchronous event driven programming techniques. The effect of the SIGNAL call is to increment a counting semaphore maintained by the talking process. This semaphore is waited on by the speech completion, which when signalled, will jump to the completion code vector address ($C018). Users should plant a JMP intruction in the three bytes of memory starting at this address. ONLY $C018-$C01A SHOULD BE CHANGED.
Bedingung - Condition JMP Befehl ...
JMP instruction to completion code handling routine MUST be planted in memory locations $C018-$C01A
Rückgabe - Returned Information
Keine - None

This JMP instuction should point into user code which handles the completion of the speeech output event. The user completion routine MUST terminate with and RTS instruction. Completion code handlers may be used for a variety of purposes but, in general, should be kept short since IRQ's are disabled and NMI's are ignored during this time.

NOTE: This facility also provides a means for user programs to detect the presence or absence of a speech module: a power-up footprint. The completor code vector area ($C018-$C01A) is initialized on power-up to the instruction sequence:
$C018 NOP
$C019 NOP
$C01A RTS

These instructions correspond to the values $EA, $EA, $60. User programs may detect the presence of a module by verifying that these locations contain the given values.


Nach oben zum Menü - Go top to menu
Copyright © 2006-2007 Stefan Uhlmann - Aktualisiert: 2. Oktober 2007 - Valid HTML 4.01!