Text to Speech Block on Activity WX board
Should the Text to Speech block work with the Activity WX Board? The block shows up and appears to set code up properly. The docs say it will not work with it.
Here is the C code generated.
It looks like it should work, it sets the audio output pins to 26 and 27 which go to the audio jack on the activity wx board.
When I run the program the led's for pin 26 and 27 glow slightly.
Here is the C code generated.
// ------ Libraries and Definitions ------ #include "simpletools.h" #include "text2speech.h" // ------ Global Variables and Objects ------ talk * tts_talk; // ------ Main Program ------ int main() { tts_talk = talk_run(26, 27); talk_set_speaker(tts_talk, 1, 100); while (1) { talk_say(tts_talk, "heloa"); } }
It looks like it should work, it sets the audio output pins to 26 and 27 which go to the audio jack on the activity wx board.
When I run the program the led's for pin 26 and 27 glow slightly.
Comments
The speaker I/O pin is shared with the LED.
Ken Gracey
I have a veho360 speaker plugged into the jack and I hear nothing. I have used the "wave play file" block so I know the jack works.
But now I know it should work, I will dig deeper.
Thanks
Does the Text to Speech block start a new cog, the reference page does not indicate it does?
The reason I ask is because of this code I tried below.
Pin 26 and 27 are lit constantly, however I think that they should be off for about 4 seconds as the code goes through the pause statements.
We seem to have a problem in the BlocklyProp generated code. Andy and I are looking through it at the moment. For now, you can use BlocklyProp to generate the code, and change it to have the correct talk_run parameters of 0,27. While this works, we need to do further work on the C library so P0 is not used.
Ken Gracey
I will try it!
Thanks
That's right - you should hear the "Hi" right away. But this word needs to be spelled out as phonemes and we've not posted any documentation on how to do that. The Learn folder which has the source code likely includes Phil Pilgrim's original Spin code, which has the correct phonemes to use.
Since you posted this thread, Andy and I went spent yesterday evening sorting out the issue. He made a new C library which works correctly - with volume control. I have to test it on Monday morning and then we'll push it all to Blockly and you can try it out. We will need to document the TTS blocks, too.
As soon as we've got it posted on demo.blockly.parallax.com I'll let you know.
Ken Gracey
Thanks Again
:-)
I want to play with it also. Phil Pilgrim has been way ahead of so many of us with this project. It should be a lot of fun to do more TTS with such minimal hardware. Andy and I will get the code, reference and examples straight over the coming weeks so we can all build talking robots.
Ken Gracey
I did notice a couple of issues. The documentation says the third parameter in talk_set_speaker() should change pitch. I didn't notice any change using values from 50 to 2000.
Also, "l", "al", "el" don't sound like L, AL, or EL, but sound like the L was replaced with M. To get the L sound, I had to use M (parallax = paramaks). I did try the original spin demos & "l", "al", "el" sounded correct.
It is a fun library to use.
Tom
Cool!
This worked for me... for "Parallax"
I ended up buying this from the parallax shop.
It works good also.
Emic 2 Text-to-Speech Module
https://parallax.com/product/30016
Also, although I can get it to work with SimpleIDE (after updating library), I am getting a lot of static...
Appears that the WX WiFi module introduces static on the audio output...