ZX Forum #04
19 ноября 1997

world of sound Spectrum - chapter 4.8: Synthesis of speech.

<b>world of sound Spectrum</b> - chapter 4.8: Synthesis of speech.
         4.8. Speech synthesis


   Synthesized speech can be just a recording and reproducing 
it as any other sound by using routines from Chapter 4.6,

but usually act differently. First introduced into the computer 
all the phonemes specified language, then the user is prompted

phrase, and finally, the computer consistently reproduces its 
constituent phonemes. This method allows to save memory and 
play absolutely any phrase. Here's a program that allows 
Cpektrumu talk: 


   10 CLEAR 25343: LET L = 3

   20 PRINT "Wait please ..."

   30 FOR A = 25344 TO 25433: READ D: POKE A, D: NEXT A

   40 FOR A = 0 TO 25: POKE 25437, A * L +100

   50 CLS: PRINT "Press any key, then say '"; CHR $ (A +65 
);"'": 

      PAUSE 0

   60 RANDOMIZE USR 25344: NEXT A

   70 CLS: INPUT "Enter phrase:"; LINE A $: PRINT A $

   80 FOR A = 1 TO LEN A $

   90 IF A $ (A) = "" THEN POKE 25433 + A, 32: NEXT A

  100 IF A $ (A)> = "a" THEN LET A $ (A) = CHR $ (CODE A $ (A) 
-32) 

  110 POKE 25433 + A, (CODE A $ (A) -65) * L +100: NEXT A: POKE 
25433 + A, 0 

  120 RANDOMIZE USR 25406: GOTO 1970

  130 DATA 243,33,0,0,17,0, L, 6,8,203,38,219,254,203,119,40,

           2,203,198,16,244,35,27,122,179,32,236,251,201

  140 DATA 243,33,0,0,17,0, L, 62,7,6,8,230,239,203,6,48,2,246,

           16,211,254,16,244,35,27,79,122,179,121,32,234,251,201

  150 DATA 33,90,99,126,183,200,254,32,32,7,6,5,118,16,

           253,24,8,50,32,99,229,205,29,99,225,35,24,231


   Let me explain some of the lines:

 30 - read into the program memory in which
      DAH;
 40 ... 60 - recorded phonemes with microphones
      on;
 70 - input phrases;
 80 ... 110 - the phrase is memorized in

      special format;
 120 - routine is called reproduction
      Denia;
 130 ... 150 - routines in the codes.


   After starting the program asks to wait a bit, reading the 
code part, then you will need to consistently pronounce the 
microphone 26 phonemes. After this You can enter any phrase and 
enjoy their sounds. When you enter these phrases permissible 
upper and lower case Latin letters and spaces. How will sound 
all the other characters, no one knows. Neither no case should 
enter the @ sign, otherwise the program just hangs.


   This program was written as an example, so no additional 
service features (such as changing a single phoneme), but you 
can add them. 

   To change the length of individual
phoneme change in the tenth row value
variable L (in this case it may
be from 1 to 6).

   If you can not right the first time
pronounce all the phonemes with a satisfactory
quality, you can try again
stop the program by pressing
BREAK and use the command GOTO 40. When
phonemes are written, you can save
them on the tape by typing SAVE "name"
CODE 25600,6656 * L (number 6656 turned out
by multiplying the number of phonemes (26) on
256). Best of all, if before the block
will be written to the above program
with the following line:


   35 LOAD "name" CODE 25600: GOTO 1970

Write this program you can use the command SAVE "SPEAKER" LINE 
10. 

   Unfortunately, 26 phonemes - this is not enough
even for the English language, not to mention
about the Russian. Their number can, of course,
increase, but it will increase and the volume
they occupy memory. There's nothing
do.

   If you want your ZX-Spectrum
spoke in Russian, then you need to connect the Russian font 
(for details see [1]); increase the number of phonemes. And 
also replace all messages that appear on the screen.


   Number of Russian phonemes can be greatly reduced, if not 
used soft consonants (in the computer version of their soft 
almost inaudible) and vowels "E", "E", "S" and "I" (instead of 
them enter the "J" and, accordingly, "E", "O", "Y" and "A"). 
Hard sign and replaced by the letters "J".


   Finally, one piece of advice. Much nicer to hear a normal 
human speech than words, pronouncing according to the rules of 
grammar. Therefore, enter the words as you hear: sinclair - 
sinkler, PC - kampyuter. 







Other articles:

Help - Description of the shell of an electronic book "ZX-FORUM 4.

Secrets of Successful Design - Head for the book "Design your Programs

screen effects - Running a string of R-Type.

screen effects - clearing the screen of Zynaps.

screen effects - "minimize" the screen from Comando Tracer.

screen effects - smooth "decay" of the screen Sommando Tracer.

screen effects - changed the character set for the original stylized font from the game Rockstar.

screen effects - "running out the string" out of the game Rockstar.

screen effects - "pouring" the screen of the game Rockstar.

screen effects - a complex multi-effects from the game Bubbler.

New top 40 procedures - scrolling display, a fusion of two images, inverting screen, rotate characters, replacement of attributes, fill a closed loop, the calculation of addresses in the screen, copy of the screen, etc.

Technology sprites - Part 1: Introduction.

Technology sprites - Part 2: The hunt for sprites (search and pulling).

Technology sprites - Part 3: Format of sprites.

Technology sprites - Part 4: Format of sprites with a mask.

Technology sprites - Part 5: Structure sprite blocks (both co-exist in memory sprite and mask, what data to help us quickly find the address of the sprite in memory, and much more.)

Technology sprites - Part 6: preparation of data for publication.

Technology sprites - Part 8: Printing sprites (coordinates are given in familiarity).

Technology sprites - Part 9: Printing sprites (coordinates given in pixels).

Technology sprites - Part 10: a review of programs to work with sprites and graphics.

world of sound Spectrum - Chapter 1: The Physics of Sound.

world of sound Spectrum - Chapter 2: Operator BEEP, Creating effects on BEEPe, Making Music on BEEPe.

world of sound Spectrum - Chapter 3: How is the sound device (BEEP'ra and methods of sound production).

world of sound Spectrum - Chapter 4: Programming sound in assembler.

world of sound Spectrum - Chapter 4.1: Programming sound effects - Tone, Noise, Complexes effects.

world of sound Spectrum - Chapter 4.2: Programming Sound Effects - Volume Control.

world of sound Spectrum - chapter 4.3: Sound Effects - Management timbre.

world of sound Spectrum - Chapter 4.4: Programming sound effects - music programming.

world of sound Spectrum - Chapter 4.5: Programming sound effects - Polyphonic ringtones (polyphonic).

world of sound Spectrum - chapter 4.6: Treatment of external signals - digitization.

world of sound Spectrum - Chapter 4.7: Handling of external signals - Reverberation.

world of sound Spectrum - chapter 4.8: Synthesis of speech.

world of sound Spectrum - Chapter 4.9: audio playback interrupt.

world of sound Spectrum - Chapter 5: The operator PLAY for music coprocessor AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 5.1: Creating effects operator PLAY.

world of sound Spectrum - Chapter 5.2: Making Music on PLAYe.

world of sound Spectrum - Chapter 6.1: Description of the coprocessor registers of the musical AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 6.2: Programming effects and music under the musical coprocessor AY- 3-8910 (AY-3-8912).

world of sound Spectrum - Chapter 7: Software Review ZX-Spectrum to create sounds and music.

world of sound Spectrum - chapter 7.1: Editor, Sound Effects SUPER SOUND.

world of sound Spectrum - Chapter 7.2: Music Editor Wham the Music Box.

world of sound Spectrum - Annex 1, 2: Listings sound effects SUPER SOUND'a, tips assembler.


Темы: Игры, Программное обеспечение, Пресса, Аппаратное обеспечение, Сеть, Демосцена, Люди, Программирование

Similar articles:
UNIT-5 - Team UNIT-5 returns to the Speccy.
drop of solder - More RAM: the cache.
From the world of bat - an overview of mail. Answers questions from readers of the magazine.
Thoughts on stage - waiting times better than the awareness of the reality of life.
Spectrum - the Duma about the prospects of the platform Spectrum.

В этот день...   21 November