Linux TTS Voices

Christopher Lemire christopher.lemire at gmail.com
Sat Mar 20 15:59:23 UTC 2010


On Fri, Mar 19, 2010 at 6:15 PM, Fred Roller <fred at fwrgallery.com> wrote:
> Christopher Lemire wrote:
>> On Wed, Mar 10, 2010 at 9:24 AM, Fred Roller <froller at tnclimited.com>
>> wrote:
>>> Christopher Lemire wrote:
>>>> On Fri, Feb 26, 2010 at 11:41 PM, Kyle <kyle4jesus at gmail.com> wrote:
>>>>
>>>> Could someone show me through the command line how espeak and mbrola
>>>> works together. I've tried this many times and different ways. The
>>>> examples I find online have paths to files that are not on an Ubuntu
>>>> computer unless they compiled them, but not from the packages.
>>>> I can't further my project until I can see how this is working through
>>>> the command line.
>>>>
>>>> Christopher Lemire <christopher.lemire at gmail.com>
>>>> Ubuntu 64 bit Linux Raid Level 0
>>> Sure, this was my last adjusted command from my notes:
>>>
>>> # Final espeak w. mbrola
>>>
>>>    espeak -s 200 -k 20 -v mb-en1 -m -f test_prose |mbrola -e en1/en1 -
>>> testprose.wav
>>>
>>> Broken down:
>>>
>>>    espeak (the first command)
>>>       -s 200 (speed of speaker)
>>>       -k 20 (pitch of capital letters, this is the recommended 20)
>>>       -v mb-en1 (the mbrola voice to let espeak know you are using
>>> mbrola)
>>>       -m (helps ignore html type code and allows usage of SSML)
>>>       -f test_prose (my test text, found it easier to work from text
>>> files.  Also you may need to edit see the copy below)
>>>       | (pipe to mbrola)
>>>       mbrola (second command)
>>>       -e en1/en1 (location of the language file, this is relative to my
>>> working directory [dir/file] or you can put an absolute path in as
>>> well.)
>>>       - testprose.wav (output file)
>>>
>>> Here is the test_prose file content, it's not much but does show some
>>> editing tweeks:
>>>
>>> http://paste2.org/p/710564
>>>
>>>
>>>
>>> --
>>> Fred
>>> www.fwrgallery.com
>>>
>>> "Life is like linux, simple.  If you are fighting it you are doing
>>> something wrong."
>>>
>>>
>>>
>>> --
>>> ubuntu-users mailing list
>>> ubuntu-users at lists.ubuntu.com
>>> Modify settings or unsubscribe at:
>>> https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>>>
>>
>> Thank you for that information. Unfortunately, it didn't work on my
>> machine. Do you have some packages installed I do not? Here is the
>> error I got and the packages with espeak or mbrola in their names.
>>
>> chris at ubuntu910:~$ espeak -s 200 -k 20 -v mb-en1 -m "this is a test
>> using mbrola with espeak" |mbrola -e en1/en1 - test.wav
>> FATAL ERROR : cannot find file en1/en1 !
>> chris at ubuntu910:~$ dpkg -l | grep espeak\|mbrola
>> chris at ubuntu910:~$ dpkg -l | grep "espeak\|mbrolaC"
>> ii  espeak
>> 1.41.01-0ubuntu1                           A multi-lingual software
>> speech synthesizer
>> ii  espeak-data
>> 1.41.01-0ubuntu1                           A multi-lingual software
>> speech synthesizer:
>> ii  gespeaker
>> 0.7-1                                      GTK+ front-end for eSpeak
>> and mbrola
>> ii  libespeak1
>> 1.41.01-0ubuntu1                           A multi-lingual software
>> speech synthesizer:
>> ii  stardict-plugin-espeak
>> 3.0.1-5                                    International dictionary -
>> eSpeak TTS plugin
>> chris at ubuntu910:~$
>> Christopher Lemire <christopher.lemire at gmail.com>
>> Ubuntu 64 bit Linux Raid Level 0
> When you downloaded mbrola did you get /their/ language package?  In
> this case "en1".  I placed my language package relative to my working
> directory.  The full path for *my* system was:
>
>    /Crypt/Software/mbrola/en1/
>
> If I were to run the command with absolute paths then it would look
> something like:
>
>
>        espeak -s 200 -k 20 -v mb-en1 -m "this is a test using mbrola
> with espeak" |mbrola -e /Crypt/Software/mbrola/en1/en1 - test.wav
>
> hope this helps.
>
> --
> Fred
> www.fwrgallery.com
>
> "Life is like linux, simple.  If you are fighting it you are doing something wrong."
>
>
> --
> ubuntu-users mailing list
> ubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
>

> When you downloaded mbrola did you get /their/ language package?  In
> this case "en1".  I placed my language package relative to my working
> directory.  The full path for *my* system was:

Ok, I thought these mbrola voices were included in ubuntu packages.

chris at ubuntu910:~/Desktop$ dpkg -L espeak-data | grep mb
/usr/share/espeak-data/mbrola_ph
/usr/share/espeak-data/mbrola_ph/us_phtrans
/usr/share/espeak-data/mbrola_ph/la1_phtrans
/usr/share/espeak-data/mbrola_ph/id1_phtrans
/usr/share/espeak-data/mbrola_ph/cr1_phtrans
/usr/share/espeak-data/mbrola_ph/us3_phtrans
/usr/share/espeak-data/mbrola_ph/it3_phtrans
/usr/share/espeak-data/mbrola_ph/hu1_phtrans
/usr/share/espeak-data/mbrola_ph/nl_phtrans
/usr/share/espeak-data/mbrola_ph/pt1_phtrans
/usr/share/espeak-data/mbrola_ph/in1_phtrans
/usr/share/espeak-data/mbrola_ph/pt_phtrans
/usr/share/espeak-data/mbrola_ph/ca1_phtrans
/usr/share/espeak-data/mbrola_ph/es_phtrans
/usr/share/espeak-data/mbrola_ph/sv_phtrans
/usr/share/espeak-data/mbrola_ph/de4_phtrans
/usr/share/espeak-data/mbrola_ph/ro1_phtrans
/usr/share/espeak-data/mbrola_ph/af1_phtrans
/usr/share/espeak-data/mbrola_ph/gr2_phtrans
/usr/share/espeak-data/mbrola_ph/cs_phtrans
/usr/share/espeak-data/mbrola_ph/pl1_phtrans
/usr/share/espeak-data/mbrola_ph/de6_phtrans
/usr/share/espeak-data/mbrola_ph/en1_phtrans
/usr/share/espeak-data/mbrola_ph/ptbr_phtrans
/usr/share/espeak-data/mbrola_ph/grc-de6_phtrans
/usr/share/espeak-data/mbrola_ph/de2_phtrans
/usr/share/espeak-data/mbrola_ph/sv2_phtrans
/usr/share/espeak-data/mbrola_ph/ptbr4_phtrans
/usr/share/espeak-data/mbrola_ph/fr1_phtrans
/usr/share/espeak-data/voices/mb
/usr/share/espeak-data/voices/mb/mb-sw1-en
/usr/share/espeak-data/voices/mb/mb-de5
/usr/share/espeak-data/voices/mb/mb-it3
/usr/share/espeak-data/voices/mb/mb-hu1
/usr/share/espeak-data/voices/mb/mb-de2
/usr/share/espeak-data/voices/mb/mb-de4
/usr/share/espeak-data/voices/mb/mb-af1
/usr/share/espeak-data/voices/mb/mb-cz2
/usr/share/espeak-data/voices/mb/mb-gr2-en
/usr/share/espeak-data/voices/mb/mb-fr4
/usr/share/espeak-data/voices/mb/mb-de4-en
/usr/share/espeak-data/voices/mb/mb-gr2
/usr/share/espeak-data/voices/mb/mb-de7
/usr/share/espeak-data/voices/mb/mb-br4
/usr/share/espeak-data/voices/mb/mb-nl2
/usr/share/espeak-data/voices/mb/mb-us2
/usr/share/espeak-data/voices/mb/mb-af1-en
/usr/share/espeak-data/voices/mb/mb-en1
/usr/share/espeak-data/voices/mb/mb-es2
/usr/share/espeak-data/voices/mb/mb-de5-en
/usr/share/espeak-data/voices/mb/mb-la1
/usr/share/espeak-data/voices/mb/mb-hu1-en
/usr/share/espeak-data/voices/mb/mb-sw1
/usr/share/espeak-data/voices/mb/mb-us3
/usr/share/espeak-data/voices/mb/mb-fr1-en
/usr/share/espeak-data/voices/mb/mb-id1
/usr/share/espeak-data/voices/mb/mb-us1
/usr/share/espeak-data/voices/mb/mb-it4
/usr/share/espeak-data/voices/mb/mb-fr1
/usr/share/espeak-data/voices/mb/mb-es1
/usr/share/espeak-data/voices/mb/mb-ro1-en
/usr/share/espeak-data/voices/mb/mb-de6
/usr/share/espeak-data/voices/mb/mb-br3
/usr/share/espeak-data/voices/mb/mb-pt1
/usr/share/espeak-data/voices/mb/mb-sw2-en
/usr/share/espeak-data/voices/mb/mb-nl2-en
/usr/share/espeak-data/voices/mb/mb-sw2
/usr/share/espeak-data/voices/mb/mb-de6-grc
/usr/share/espeak-data/voices/mb/mb-ro1
/usr/share/espeak-data/voices/mb/mb-br1
/usr/share/espeak-data/voices/mb/mb-cr1
/usr/share/espeak-data/voices/mb/mb-pl1-en
/usr/share/espeak-data/voices/mb/mb-pl1
/usr/share/espeak-data/voices/mb/mb-fr4-en
/usr/share/espeak-data/mbrola
chris at ubuntu910:~/Desktop$

So if using mbrola voices requires downloading from their website rather than using what's in espeak-data, maybe I should remove that package from my system. I just thought that it would be easier for other users using my software to only have to install an ubuntu package to make it work.


    If I were to run the command with absolute paths then it would look
    something like:


          espeak -s 200 -k 20 -v mb-en1 -m "this is a test using mbrola
    with espeak" |mbrola -e /Crypt/Software/mbrola/en1/en1 - test.wav


How does mbrola know that is the absolute path you downloaded the voices to when you use mbrola -e en1/en1 instead?


                 -v mb-en1 (the mbrola voice to let espeak know you are using
            mbrola)


Does this change depending on the mbrola voice you are using? If so, how do you know what to change it to?

Here's the software I've created so far for anybody wanting to try it. 

http://nanomachine.byethost22.com/files/

It may not work with the gnu java included by default with Ubuntu. If it doesn't, you will need to install sun-java6-jre so that java points to this.

chris at ubuntu910:~/Desktop$ ls -l `which java`
lrwxrwxrwx 1 root root 22 2010-02-13 01:34 /usr/bin/java -> /etc/alternatives/java
chris at ubuntu910:~/Desktop$ ls -l /etc/alternatives/java
lrwxrwxrwx 1 root root 36 2010-02-13 01:34 /etc/alternatives/java -> /usr/lib/jvm/java-6-sun/jre/bin/java
chris at ubuntu910:~/Desktop$

That change should happen automatically when you install the sun-java6-jre package. If it doesn't, use the update-alternatives command.

To run the program, use this command

java -jar TTSReader.jar

Once it's running, highlight any text and push control c, pdfs, firefox, any text you can highlight, and it should be read automatically. I'll make a nice gui for it later, but right now I am concentrating on the functionality of it. I want the speed to be able to be changed, ability to use other voices than the default espeak one that I can't stand, etc.

Christopher Lemire <christopher.lemire at gmail.com>
Ubuntu 64 bit Linux Raid Level 0
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 271 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20100320/ea52300a/attachment.sig>


More information about the ubuntu-users mailing list