Jump to content





The $42+$10+$7 Voice Synthesizer

Posted by Pack007, 02 January 2017 · 430 views

voice synthesizer
The $42+$10+$7 Voice Synthesizer

Warning: This entry is about the hardware of an ongoing project. It may create more questions then answers.  Please post any answers, along with the question, in the comment section.
 
Be careful what you put on your Amazon Wish list. You just might get it. Before the holidays  I loaded mine up with Arduino shields,  breakout boards, servo motors and 2n2222 transistors.  The speech synthesis shield for Arduino from DFROBOT was put on list without doing much research.  No ratings or reviews should have made me think twice.
 
The product information, Arduino library, example code and Wiki Doc links can be found here. 
From <https://www.dfrobot....product_id=1086>
 
Watch the video.  Twice in the review section, the response to a couple of customer questions was, "We make a video, you can take a look."  The chip was made in China so it shouldn't be surprising that the voices have a Chinese accent.  The cheep speaker didn't do much to improve the sound.  I found the speech to be understandable. I have recorded an audio file using the sound recorder on the PC, that should give you a better feel for the quality that can be achieved.
 
Audio: Attached File  voice recording.zip (488.44KB)
downloads: 26

 
 
Phase 1.   Experimentation
 
Armed with the Arduino Library, sample program and Wiki doc, the first order of business was to get the demo program to work. Thus revealing my first problem.
 
The example had three sections of speech but seemed to hang after the first section.  The Arduino was waiting for the shield to send it a couple of bytes that it never got.  This doesn't seem like a unique problem, there are questions being asked in the Arduino forum but I haven't found a definitive answer.  Someone translated part of the chip manual from Chinese but couldn't find a solution.
 
Several iterations of the STATUS command listed in the Wiki Doc was tried without success.
 
The shield was removed and jumper wires were used for the connections to view the TX and RX LED on the Arduino.   The schematic was used to make the connections but when powered up, the power LED was quite dim.  (What's that all about?)
 
When the Serial read commands are removed from the program, the only thing you hear is the third speech section.  This kind of leads one to believe that the last eSpeaking command will override a previous speech, even in the middle of a sentence.
 
I still don't know if I am working with a bad board, faulty design or a program problem.  So I moved on to playing with some of the speech options.  Different voices, speeds, and interpretations of data can be achieved.   Lots to consider if you want access to these options from the Atari computer.
 
During all this I'm watching the shields green LED BUSY light turn on and off while the chip is working. On when its speaking, off when its not speaking.  The voltage drop across the LED  was measure to be about 2.7V when speaking and 0.0 when not speaking.
 
(this next part could void the warranty)
 
I soldered a jumper wire to the BUSY LED solder pad closest to the center of the board and plugged it into A5.   There is a bit of lag time before the LED gets turn on and the chip gets busy, so a couple of delays were used to make timing adjustments before and after checking the LED status. All three segments of speech in the example could now be heard. 
 
Attached Image
Attached Image
 
Modified example program listing(changes in Bold)
 
#include <SpeechSynthesis.h>
int busyPin = 5;
 
void setup()
{
  Serial.begin(9600);
}
 byte ssr[500];//define a character string
void loop()
{
SpeechSynthesis.buf_init(ssr);//initialize the buff
SpeechSynthesis.English(ssr,4,"5");//volume in grade 5
SpeechSynthesis.English(ssr,6,"cooki");//"6" means synthesis in English; "cooki"is the content
SpeechSynthesis.English(ssr,4,"5");
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
SpeechSynthesis.English(ssr,2,"10");
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
SpeechSynthesis.English(ssr,2,"5");//speed of speaking: grade 5
SpeechSynthesis.English(ssr,5," ");//speed,volume,intomation are all set into default
SpeechSynthesis.English(ssr,6,"cooki Clock, reset and supply management");
SpeechSynthesis.Espeaking(0,19,4,ssr);//Executive commands above, "0" is synthesis command; "19" select speaker; "4" speech function 
 
delay(500);
 while(analogRead(busyPin) > 100)//waiting synthesis complete
  {delay(500);}
   
SpeechSynthesis.buf_init(ssr);
SpeechSynthesis.English(ssr,6,"hello cooki 123");
SpeechSynthesis.Espeaking(0,19,4,ssr);
 
delay(500);
 while(analogRead(busyPin) > 100)//waiting synthesis complete
  {delay(500);}
   
SpeechSynthesis.buf_init(ssr);
SpeechSynthesis.English(ssr,6,"hello cooki 123");
SpeechSynthesis.Espeaking(0,19,7,ssr);
 
while(1);
 
}
 
Phase 2. Decide how to interface it to the computer and test.
 
Phase 2 is still a work in progress. I kind of like the idea of using the RS232 port on the 850.  This would allow the Arduino and Speech Shield to be accessed by any computer with the port.  But then, preprograming the speeches on the Arduino and picking which one to say using the joystick port seems like an easy thing to do.  But then, would the Arduino need to be reprogramed for each computer program you want to use. But then, what if the serial data from the speech chip can be received by some boards and not others. But then………………






Question: Why didn't the power light come on when I used the jumper wires to connect the speech shield and Arduino?

 

Answer:  The schematic for the speech shield is for Version 1.1 and I have version 2.  The speech chip is powered by the 3.5Volt pin on the Arduino.  There is still something that is drawing power off the 5V pin.  Maybe someday the Version 2 schematic will be posted.

 

I should have noticed this sooner.

  • Report

Recent Comments

Latest Visitors