Pages: [1]   Go Down
Author Topic: Text To Speech Library  (Read 1761 times)
0 Members and 1 Guest are viewing this topic.
Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hey! I'm new to arduino and I'm trying to read out tweets... Except for the TTS library that was mentioned in a previous post (http://arduino.cc/forum/index.php/topic,49654.msg354746.html#msg354746), i can't seem to find any... The only problem with this library is that is was programmed to work on pin10, wich i don't have on my Arduino Ethernet.

Has anybody else tried to change the library so it works with a another PWN pin (3,5,6 or 9)? Or does anybody else know what i should change so it works?
I've tried modifying it, but i can't seem to get anything comprehensive out of it.


This is what I have now... http://cl.ly/3X1M2T1j0o1Y

I don't mind using another Text To Speech library for Arduino but I just can't find any.
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Doing TTS is something that uses the AVR processors at their max.
It is almost impossible, and the result would be a very robotic voice.

Using TIMER1 is hardcoded in the library.
Changing it for example to TIMER2 requires good knowledge of the AVR processor.
Everywhere in the code you see registers like "TCCR1A" is should be changed to the register of TIMER2, and TIMER2 is not exactly the same as TIMER1, so care must be taken to have working just like TIMER1.

Changing to pin9 is perhaps possible. If I read the code, the comments indicate sometimes that pin 9 is used, but in the code the control register for 'B' (pin 10) is used.

So it is possible to change the library to use pin 9.
I could give it a try, but right now I don't have the time.

But you mention Arduino Ethernet:
Do you want to combine it with ethernet ? In the same 32kbyte code size of the Arduino ?
The code might not fit, and while using speech, the Arduino cannot react to the ethernet.
So you could use a second Arduino for the speech, or use a voice shield.

Added: Major problem. The original TextToSpeech is made by Clive Webster (Webbot). The source code is made available to individual hobbyists for their own use, but are forbidden from publishing any versions of the software.
So I can't modify the software and place it here. And modifying the software just for myself is not worth the effort.
« Last Edit: December 10, 2012, 01:05:16 pm by Krodal » Logged

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

The point is to be able to command a Furby by using tweets, so if you just tweet a string it will read it out, but if you use a # or something else you can make the Furby move it's eyes / ears and mouth...
It's going to be far from perfect, since i've never used an arduino or programmed in C++ in my life...  smiley-red but i'm planning on making it better once all my exams are done, just for the fun it
« Last Edit: December 10, 2012, 01:34:12 pm by YaHe » Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I have permission from Clive Webster (Webbot) to update the code and place it in the Playground section.
I also have it running on pin 9 (the code uses actually pin 9 and not pin 10).
But I have to do some tests with an RC-filter, because the sound is not recognizable as english words.
If someone has an example (for example on youtube) how this library should sound, please post it here.
Logged

Belgium
Offline Offline
Newbie
*
Karma: 0
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Well I tested it a few weeks ago on an ArduinoUno on pin10 without an RC-filter, there was a lot of noise but you could understand the speech if you listened well... So maybe there's still something wrong with the code?
Logged

Offline Offline
Edison Member
*
Karma: 9
Posts: 1016
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I could recognize the sentence by the sound.

Clive Webster seems to have updated his library.
http://webbot.org.uk/iPoint/45.page
Click on "What is your name". I can understand that.

Now I'm trying to take his updated Text2Speech part out of the library and make it run on the Arduino. But that's not easy, since everything seems to depend on each other.

Perhaps I could try to use the old working code, and check what is updated.
Logged

Pages: [1]   Go Up
Jump to: