The Voice Synthesizer - before I move on
Voice Synthesizer RS232 DFROBOT
Getting the DFRobot voice synthesis shield working was an interim project until I could justify the procurement of a Wizztronics MidiMax unit. Now that it is here I want to get the last experiments documented, in case I ever want to turn the shield into a MIDI device.
The last modification to the type and talk program added the ability to re-transmit the last words typed, if just hit the return. The program is still 3 lines of BASIC.
100 DIM A$(200),B$(200):CLOSE #1:OPEN #1,8,0,"R2:":XIO 36,#1,14,0,"R2:":XIO 38,#1,64,0,"R2:"
110 INPUT A$:IF LEN(A$)>0 THEN B$=A$
120 PRINT #1,B$:XIO 32,#1,0,0,"R2:":GOTO 110
I got the Arduino and TTL to RS232 converter mounted onto a display plaque. Now the shield can be removed so the rest can be repurposed for another setup. They do get used a lot for my Atari8 projects.
The next problem showed up when I wanted to record the voice. The headphones were unplugged and the computer aux. input was hooked up. A 60 cycle hum was now present where it wasn't before. I went back and listened to some old recordings and it was there, just not as loud.
Turns out that that the shield uses a 4 connector 1/8" audio plug and the computer has a 3 connector plug. I opened up the drawer with the capacitors, closed my eyes, and picked out a 33 micro Farad, 50V capacitor and soldered the "+" side to ground on the plug and inserted the "-" into the ground pin of the Arduino.
I'm not to sure of my method but the hum went away. The voice does seemed to be a little less harsh to the my ears (to me that's a good thing).
Soldering the wire to the busy light probably voided the warranty so making this connection can't make it any more voided.
Just before the MIDIMAX arrived I started working on adding speech to the old BASIC text "Adventure" game. There were at least 50 lines with PRINT statements and each one had to be examined to determine if the text should go to the screen or the RS-233 port.
I got it to the point where it would speak the intro and then half way through the place description, it would cut to the next packet of information. There was a timing problem that needed to be solved. I think maybe using the block mode of transmission may not have been the best choice. The 32bit buffer may have been getting overwritten or maybe something needed to be changed on the Arduino side. Then the MIDIMAX arrived.
Here are some sound samples from the "type and talk" program. The Arduino had to be reprogramed to get the different voices. They claim 19 different voices but most of them sound much the same to me.
Voice examples.zip (3.56MB)
Like I have said, I didn't do any research on hardware alternatives. I can't say this is the best or most cost effective Text-to-speech hardware available. Would I go out and buy it again? Probably not, but I've had some fun playing with this one.
I wish I hadn't thought of turning this Voice Shield into a MIDI device. I have the hardware; an Arduino, MIDI input (and a through port would be nice), switches to change parameters(and you can do this through midi commands) and a text display to view parameter settings.
Maybe designing the MIDI Implementation Chart would be the best place to start. Channel #, using note numbers for predefined phrases, program changes for voice types, change speed with the pitch bender..
Whatever it would become, it would be playable using MIDI port hooked up to the Atari8.
(or other MIDI equipped computer)