| MAGIC VOICE | Bit Format, der Aufbau der Rahmen |
![]() |
Allgemeines General |
Einführung Introduction |
Anschluss Connection |
Anwenden des Moduls Using the Module |
Vokabular Vocabulary |
Tips & Tricks Tips & Tricks |
| Ergänzendes Additional stuff |
Demos Demos |
Spiele Games |
Zeitschriften Magazines |
Sprach Downloads Speech Downloads |
Lexikon Lexicon |
|
| Internes Internal |
Hardware Hardware |
Firmware Firmware |
Sprachdaten Speechdata |
Bit-Format Bit allocation |
De-/Codierung De-/Coding |
|
| Nützliches und mehr Utilities and more |
Speech Playtool | Magic Game Cart | Magic Talkie | Magic Voice NT | Ersatzteile & Reparatur Spares & Repair |
|
Der Sprachchip T6721 im Magic Voice basiert auf einem Sprachsyntheseverfahren namens Linear Predictive Coding (LPC).
Hierbei werden 10 Parameter (K1-K10 = Filter-Koeffizienten) für stimmhafte (voiced) Laute zum Beispiel "e"),
und vier Paramter für stimmlose (unvoiced) Laute (zum Beispiel "s") verwendet. Neben der Anzahl der Parameter wird die Qualität der Sprache auch von der Auflösung, also der Anzahl der verwendeten Bits
für die einzelnen Parameter bestimmt. Die Summe der Bits für Amplitude (Energy), Frequenz (Pitch) und der Parameter (K) ergibt dann die Rahmenlänge (Framelength). Neben der Unterscheidung zwischen stimmhaften (voiced) und stimmlosen (unvoiced) Rahmen können auch noch Wiederholungsrahmen (repeat) verwendet werden. Hierbei wird nur der Wert für Energy und Pitch neu übertragen, die Koeffizienten gelten dann als unverändert. Einen Sonderfall stellen Rahmen dar, die einfach nur Stille (silence) erzeugen oder das Ende der Sprachausgabe (end of speech) markieren. In den folgenden Tabellen ist der Aufbau dieser Rahmen ersichtlich. |
The voice chip T6721 within the Magic Voice is based on a Linear Predictive Coding (LPC) speech synthesis method. Here, 10 parameters (K1-K10 = filter coefficients) are used for voiced sounds (for example, "e"),
and four parameters for unvoiced sounds (for example, "s"). In addition to the number of parameters, the quality of the speech is also determined by the resolution, i.e., the number of bits used
for the individual parameters. The sum of the bits for amplitude (energy), frequency (pitch), and the parameters (K) then results in the frame length. In addition to the distinction between voiced and unvoiced frames, repeat frames can also be used. In this case, only the values for energy and pitch are retransmitted, the coefficients are then considered unchanged. Frames that simply generate silence or mark the end of speech output are a special case. The following tables show the structure of these frames. |
| Rahmen Bit Format - Frame Bit allocation |
| Zunächst als Beispiel der Aufbau beim Sprachchip TMS 5100 von Texas Instruments. | First, let's look at the structure of the voice chip TMS 5100 from Texas Instruments as an example. |
| LPC 10 - Speak & Spell (Texas Instruments, TMS 5100, 5200 and 5220) | |||||||||||||
| MSB | LSB | ||||||||||||
| Energy | Repeat Bit | Pitch | K1 | K2 | K3 | K4 | K5 | K6 | K7 | K8 | K9 | K10 | |
| FRAME | 4 Bit | 1 Bit | 5 Bit | 5 Bit | 5 Bit | 4 Bit | 4 Bit | 4 Bit | 4 Bit | 4 Bit | 3 Bit | 3 Bit | 3 Bit |
| Voiced | xxxx | 0 | x xxxx | x xxxx | x xxxx | xxxx | xxxx | xxxx | xxxx | xxxx | xxx | xxx | xxx |
| Unvoiced | xxxx | 0 | 0 0000 | x xxxx | x xxxx | xxxx | xxxx | ||||||
| Repeat | xxxx | 1 | x xxxx | ||||||||||
| Silent | 0000 | ||||||||||||
| End of Speech | 1111 | ||||||||||||
| Hier der Aufbau der Rahmen beim T6721A von Toshiba, ohne Garantie, dass das alles richtig ist. | Here is the frame structure of the Toshiba T6721A, without any guarantee that everything is correct. |
| LPC 10 - Magic Voice Speech Module (Toshiba, T6721A) | ||||||||||||
| MSB | LSB | |||||||||||
| Energy | Pitch | K1 | K2 | K3 | K4 | K5 | K6 | K7 | K8 | K9 | K10 | |
| FRAME | 4 Bit | 4 Bit | 5 Bit | 5 Bit | 5 Bit | 4 Bit | 4 Bit | 4 Bit | 3 Bit | 3 Bit | 3 Bit | 3 Bit |
| Voiced | xxxx | xxxx | x xxxx | x xxxx | x xxxx | xxxx | xxxx | xxxx | xxx | xxx | xxx | xxx |
| Unvoiced | xxxx | 0000 | x xxxx | x xxxx | x xxxx | xxxx | ||||||
| Repeat | ? | ? | ||||||||||
| Silent | 0001 | |||||||||||
| End of Speech | 0000 | |||||||||||
| LPC 10 - Magic Voice Speech Module (Toshiba, T6721A) | ||||||||||||
| MSB | LSB | |||||||||||
| Energy | Pitch | K1 | K2 | K3 | K4 | K5 | K6 | K7 | K8 | K9 | K10 | |
| FRAME | 7 Bit | 7 Bit | 10 Bit | 10 Bit | 10 Bit | 8 Bit | 8 Bit | 8 Bit | 7 Bit | 7 Bit | 7 Bit | 7 Bit |
| Voiced | xxx xxxx | xxx xxxx | xx xxxx xxxx | xx xxxx xxxx | xx xxxx xxxx | xxxx xxxx | xxxx xxxx | xxxx xxxx | xxx xxxx | xxx xxxx | xxx xxxx | xxx xxxx |
| Unvoiced | xxx xxxx | 000 0000 | xx xxxx xxxx | xx xxxx xxxx | xx xxxx xxxx | xxxx xxxx | ||||||
| Repeat | xxx xxxx | xxx xxxx | ||||||||||
| Silent | 000 0001 | |||||||||||
| End of Speech | 000 0000 | |||||||||||
| Sprachdaten vom C64-Speicher zum Sprachchip - Speech data from C64 memory to the voice chip |
|
Im folgenden wird erklärt, in welcher Form die Sprachdaten vom Speicher zum Synthesizer T6721 übertragen werden.
Diese Kenntnis ist wichtig, wenn man den umgekehrten Weg gehen will, und selbst erzeugte Sprachdaten im Speicher des C64 ablegen möchte. Beispiel: Sprachdaten des Wortes ZERO Im Speicher des C64 ist das Wort ZERO so abgelegt (96 Bit/Frame): |
The following explains how the speech data is transferred from the memory to the T6721 synthesizer.
This knowledge is important if you want to go the other way and store self-generated language data in the C64's memory. Example: Speech data for the word ZERO In the C64's memory, the word ZERO is stored as follows (96 Bit/Frame): |
| Diese Daten (52 Bytes = 416 Bit) werden dann dekomprimiert und Nibbleweise (4-Bit) zum Sprachsynthesizer, bzw. zunächst zum 4-Bit FIFO (CD40105), in folgender Form übertragen. | This data (52 bytes = 416 bit) is then decompressed and sent nibble by nibble (4 bit) to the speech synthesizer, or initially to the 4-bit FIFO (CD40105), in the following form. |
|
Zuerst sendet die Firmware 0x000, das stoppt den Synthesizer und resetet ihn, indirekt über den Ausgang APD (Pin 8) auch die Hardware (CD40105 und LA05-124).
Genauso findet man auch am Ende wieder 0x000. Nun eine genauere Betrachtung am Beispiel der ersten Zeile. Wir stellen die Nibble entsprechend des Rahmenformats von 96 Bit/Frame als einzelne Bits (Parameter) dar. |
First, the firmware sends 0x000, this stops the synthesizer and resets it, indirectly via the APD output (pin 8) also the hardware (CD40105 and LA05-124).
In the same way, at the end you will find again 0x000. Now let's take a closer look at the first line as an example. We represent the nibble as individual bits (parameters) in accordance with the frame format of 96 bits/frame. |
|
Der Sprachsynthesizer hat ein internes Register von 10-Bit, deshalb werden für jeden Parameter immer 3 Nibble übertragen. Parameter die kleiner als 10 Bit sind, werden also mit führenden Nullen aufgefüllt.
Für die Speicherung im C64 wird allerdings nur die nötige Anzahl an Bits gespeichert, also dort liegen die Daten entsprechend komprimiert vor. Die 12 Parameter (Energy, Pitch, K1 - K10) nochmal als Bit-Reihenfolge hintereinander dargestellt: |
xyz |
| Wie werden nun aus 416 Bit Sprachdaten 2784 Bit Daten für den Synthesizer? Im Programmcode des Magic Voice Moduls findet man häufiger den Aufruf des Unterprogramms FETCH_UNPACKED_PARAMETER gefolgt von Dekodier-Tabellen. ... | How does 416 bits of voice data become 2784 bits of data for the synthesizer? In the Magic Voice module's program code, you'll often find a call to the subroutine FETCH_UNPACKED_PARAMETER followed by decoding tables. ... |