View Single Post
Old 01-26-2013, 08:50 PM   #1
Lupines
Member
Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.Lupines never is beset by a damp, drizzly November in his or her soul.
 
Posts: 21
Karma: 59588
Join Date: Jan 2013
Device: Kindle Keyboard 3G+Wifi
Lightbulb How to use a speech synthesizer on Kindle 3 (text-to-speech development)

I've been working on the last couple of days to get text-to-speech working for other languages other than English. So far I got this.

Using the gstreamer framework I was able to play MP3 and WAV files, I didn't try with other formats, but I believe it is doable. The Kindle uses the ALSA sound system.

-How to play mp3 files

# gst-launch filesrc location=your_sound_file.mp3 ! decodebin ! audioconvert ! audioresample ! alsasink

-How to play wav files

# gst-launch filesrc location=your_sound_file.wav ! wavparse ! alsasink


--------------------
For the text to speech part.

I used a software called mbrola. This is a speech synthesizer with support for many languages. They only provide the software in binary form. But an ARM binary is available here:

http://tcts.fpms.ac.be/synthesis/mbr...nux/mbrola.rar

In order to get mbrola working, a voice needs to be downloaded. There are several available here:

http://tcts.fpms.ac.be/synthesis/

I picked the one for Spanish called "es2"

[URL="http://tcts.fpms.ac.be/synthesis/mbrola/dba/es2/es2-989825.zip[/URL]

Inside the es2-989825.zip file you will find that there is the actual voice file called "es2"
and there is a TEST directory. To execute an example you must do:

# ./mbrola es2 TEST/example1.pho test.wav

This will execute the mbrola synthesizer, using the es2 spanish voice, using the phonetic example1 file,
and creating a test.wav file as output.

Now lets say that we want all these together, using mbrola for reading our example1.pho file and listening the output on the kindle speakers.
For this, you must combine both things, mbrola+gst-launch.

# ./mbrola es2 example1.pho test.wav | gst-launch filesrc location=test.wav ! wavparse ! alsasink

I am still working on getting a regular text file to its phonetic form. So please don't post questions asking how to configure this on the kindle to get it to read in other languages. I don't know yet. This is just a first step towards that. Everybody is welcome to help out on the effort.

Thanks,
Lupines.

Last edited by Lupines; 01-27-2013 at 12:12 AM.
Lupines is offline   Reply With Quote