SPEECH SYNTH CREATING PHONEMES NOTES - 19FEB07

TO WORD WRAP THIS TEXT:

Click Edit on this screen's above toolbar and then click on Word Wrap.

CREATING YOUR OWN PHONEMES - GENERAL

You can only make use of the facility to create your own phonemes if you have PIC Assembly and Programming software and hardware.

When creating your own phonemes, files by the name of "UserPhonemeAddresses.inc"  and "UserAllphons.txt" are created. These will be used when the PIC program is reassembled to a hex file and the Serial EEPROM contents changed.

In the PIC ASM file SPEECHPLAYxx.ASM (where xx is the current version number) are the two lines:

; PHONEME ADDRESSES

        include "AuthorPhonemeAddresses.inc"

Amend the second line to become "UserPhonemeAddresses.inc" (your phoneme addresses file, as opposed to that supplied with the published code, and which is in relation to pre-recorded phonemes supplied.

The supplied phonemes are in the file "AuthorAllphons.txt" held within the same folder as the rest of the Speech Synth files.

RECORDING THE PHONEMES

Ensure that the Recording PCB is connected to the PC and that a suitable method of providing it with sound is provided. See the published text on this point.

With power applied to the PCB, enter the PC Edit Screen. Click on the first phoneme button (ignoring the Gap [Pause] buttons), named ANC with an ID of 44.

Then click on the Get Data button. This primes the PIC to expect an audio input. Speak the phoneme "NG" into the microphone when you see the red LED come on (NG being the phoneme used for "N" when speaking such a word as "Anchor", as described if you hover the mouse over that button.

The PIC creates a set of analogue to digital values from the sounds being input, sending each to the PC. The PIC has been told by its program that the PC is expecting 3000 values. In fact it sends 3072 values, but the last 72 are ignored by the PC.

Having completed the ADC for that phoneme, the PIC then waits for the next record-phoneme command from the PC.

The PC, having received the required 3000 values, stores them to disk with a file name and number appropriate to the phoneme button selected. In this first instance, the file name is "RecordOrig44.TXT", 44 being the allocated number for that phoneme. Each subsequent phoneme file will have the same prefix of "RecordOrig" together with the phoneme number.

Having saved the file, the PC diplays its contents as the full 3000 byte waveform. This is for information only at this stage, to check the the signal amplitude covers most of the available screen vertical aspect. If it looks too small, re-record that phoneme having increased the PIC unit's input gain setting a bit. Click once more on the Get Data button, priming the PIC as before, and re-speaking the phoneme into the microphone.

Precede to record the phonemes for each Edit screen button. You will end up with a set of "RecordOrig" files numbered from 05 to 63. Switch off the PIC unit when finished.

EDITING THE PHONEMES

Each of the "RecordOrig" files is 3000 bytes long and contains a lot of "silent" data after the phoneme itself, and perhaps in front of it. This extra data is not actually totally silect as it includes any background sound in the room where it was recorded. But most of it needs removing so that ultimately when the final data file is compiled and sent to the Serial EEPROM chip, the byte quantity is less than the maximum 64K (65536) bytes that the EEPROM can hold.

In turn, click on the Edit screen phoneme buttons and then click the Show Orig Waveform button. The full length of the original phoneme file waveforms will be displayed.

On the edit screen, click on the lower slider that controls the vertical green line position. Move the slider until the green line disappears off the far right of the display area. Release the slider, and select the upper slider that controls the red vertical line. Move the red line until it is a short distance beyond the active end of the phoneme waveform and into its "silent" region.

Release the slider when ready and click on the "Delete" button. The waveform between the red and green lines is deleted, leaving that area immediatly blank. The PIC automatically saves the new waveform with the file title of "RecordEdit" followed by the same ID number as on the Orig file.

This file is then loaded to the screen across its full width and you can see more clearly what remains of the recording. To further edit the file, once again move the red and green lines appropriatly, and click Delete to resave the waveform as it now stands, still with the same new name.

Alternatively, you could reload the "RecordOrig" file and edit that in the same way. This file is never over-written except when the same phoneme is re-recorded by choice.

If you wish to remove some of the starting blank region, position the red line to the beginning of the display screen, and move the green line to the point at which you wish to retain the data. The click Delete again to remove the data between the red and green lines. Again the waveform is saved and the screen is refreshed with the new data file.

Do the same for each Orig file to create an equivalent Edit file.

COMBINING FILES

Having edited the phoneme files, click on the CONC (concatenate) button to create a single file containing all the Edit files in numerical order. This file is automatically saved as "UserAllphons.txt", overwriting any previous file of that name. Check via the label provided at the top right of the screen that the file is less than the 64K bytes permitted. If necessary, re-redit the Edit files to shorten them, and recompile using the CONC button again.

Now copy the "UserPhonemeAddresses.inc" file into the folder in which your PIC Programmer expects to find it, overwriting any existing file of the same name. TK3 requires that .INC files are in the TK3 folder.

Leave the new "UserAllphons.txt" file where it is.

Having amended the PIC ASM file "SPEECHPLAYxx.ASM" as stated above, now reassemble that SPPECHPLAxx.ASM code to a hex file, in which it uses the contents of the new "UserPhonemeAddresses.inc" file. Program the PIC with the new hex file.

Then, having done so, send the new Allphons.txt file to the Serial EEPROM through this Edit screen's Send EEPROM facility and the Speech Record PCB, with the serial EEPROM installed. When done transfer the serial EEPROM back to the Speech Generator PCB.

Job now complete!

TEST FILES

There are two test files which can be used with the "SPEECHPLAYxx.ASM", called at the end of the ASM by the commands

         include "TESTALLMSG.INC"
and
         include "TESTMSG.inc"

"TESTMSG.inc" simply says "Today is Tuesday", repeating indefintely

"TESTALLMSG.INC" speaks phonemes 6 to 35 from the list of 63, indefinitely repeating.

The one required should be chosen prior to assembling the ASM. The files may be chosen for use with either of the "Author" or "User" ASMs.

They maybe used to judge the quality of the phonemes held in the "Author" and your "User" phomneme files. With the latter, if you don't like a particular phoneme, it can be re-recorded and the phonemes files reassembled. A certain amount of practise may be needed for this. Also keep in mind that different regional dialects may have different ways of pronouncing phonemes.







ADDING YOUR OWN NOTES

These notes are displayed via an "Active" text editor and you may add your own notes to them, saving them to disk in the usual way.

