Rockbox Technical Forums

Support and General Use => User Interface and Voice => Topic started by: rna023 on June 07, 2012, 03:48:35 AM

Title: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: rna023 on June 07, 2012, 03:48:35 AM
I hope RB can voice menus, directory names, and filenames with internal TTS.
Making talk files manually on RockboxUtility is very inconvenient and use much disk space.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: evilnick on June 07, 2012, 05:20:02 AM
There has been talk about having a TTS engine in Rockbox before, but it appears that it's not an easy thing to add.

We'd definitely welcome a patch to add that functionality in, so let us know when you're done coding it.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: rna023 on June 10, 2012, 11:19:10 AM
I'm not a programmer, many cheap players from China have the internal TTS capabilities, I thought it was easy to add it to RB.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: Llorean on June 10, 2012, 12:29:25 PM
It probably wouldn't be too hard to add it to one specific player, if you were okay A) Changing Rockbox's license (probably to GPLv3) and B) not caring about supporting it for all players.

TTS becomes a lot more of an issue when you want features to work across all the players, because then it needs to be efficient to run on even very slow players, and able to deal with very limited RAM (especially while playback has a lot of data buffered).

As it stands, there has been work done in this direction at times, but the license of eSpeak interferes with the ability to integrate it as well, at least last time I checked (Rockbox is still GPLv2 right? I didn't miss that change?)

Pre-recorded voice files are also always going to offer much better quality than on-player TTS just because of most of the more polished PC voices simply won't be available on the player.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: bluebrother on June 10, 2012, 03:08:27 PM
I'm not a programmer, many cheap players from China have the internal TTS capabilities, I thought it was easy to add it to RB.

I haven't seen any audio player that has such features -- except the "bigger" devices like Android phones, but those aren't DAPs in that sense anymore. Can you point me to some of the "many cheap players" you've seen?

Pre-recorded voice files are also always going to offer much better quality than on-player TTS just because of most of the more polished PC voices simply won't be available on the player.

It's not only the voices, an important issue is also size -- just check the download sizes for commercial voices. For example, a simple Cepstral voice I just tried the demo earlier is almost 90MB for the voice only. There are commercial voices that need a few hundred megabytes just for the voices. We don't have any target that could even load this amount of data to memory.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: saratoga on June 10, 2012, 04:59:25 PM
I think Google has an open source tts engine now. No idea if many of our devices could run it though.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: rna023 on June 11, 2012, 02:04:34 AM
Quote
Can you point me to some of the "many cheap players" you've seen?

 teclast x19+ , teclast x19hd,  cube c30 ,
their price is about 20$ , offical firmware is about 10M, sigmatel 3770 inside.
I have used their TTS function.

And many 4.3 inch ,5 inch vedio players from China have internal TTS capabilities too.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: bertrik on June 11, 2012, 06:59:38 AM
Ok, I'm curious now.
As already said before, we have explored the possibility to add a TTS, but it's possible we've overlooked some opportunities.
Can you post a few examples of the TTS output (an audio clip) of these players?
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: saratoga on June 11, 2012, 10:06:25 AM
So basically, a few Sigmatel STMP3770 players.  I guess they started including some TTS engine in their SDK. 
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: rna023 on June 12, 2012, 02:40:27 AM
Ok, I'm curious now.
As already said before, we have explored the possibility to add a TTS, but it's possible we've overlooked some opportunities.
Can you post a few examples of the TTS output (an audio clip) of these players?

I connected CUBE c30 directly to my computer line in to record this audio clip.
It speeches fast, with no feelings of latency.
http://freakshare.com/files/se8zb5p1/sample.mp3.html (http://freakshare.com/files/se8zb5p1/sample.mp3.html)
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: wodz on June 13, 2012, 02:03:32 AM
The quality is more or less comparable to flite with kal diphone voice.
Concerning flite: voice data alone are ~2MB, lexicon is ~ 600kB. Runtime memory demand is ~4MB for various resources + ~1MB for voice building (varies with utterance length). This means that such engine could in theory run on our mid spec hardware (at least 8MB of memory). I didn't try if the cpu power is enough in our case.

eSpeak is MUCH less memory demanding but still it needs ~500kB of runtime buffers + at least 1MB for various resources. It is also considerably faster. The speech produced is very robotic like.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: jiriholz on June 13, 2012, 02:13:18 AM
Espeak has multilanguage support. I know Flite only in English. Czech and other voices of  Festival has not been converted to Flite.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: wodz on June 13, 2012, 07:56:42 AM
That is mostly true. There is flite version which can speak Italian (http://visilab.unime.it/~filippo/MLFLite/MLFLite.htm) however.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: saratoga on June 13, 2012, 03:55:40 PM
The quality is more or less comparable to flite with kal diphone voice.
Concerning flite: voice data alone are ~2MB, lexicon is ~ 600kB. Runtime memory demand is ~4MB for various resources + ~1MB for voice building (varies with utterance length). This means that such engine could in theory run on our mid spec hardware (at least 8MB of memory). I didn't try if the cpu power is enough in our case.

eSpeak is MUCH less memory demanding but still it needs ~500kB of runtime buffers + at least 1MB for various resources. It is also considerably faster. The speech produced is very robotic like.

5MB of memory for speech would make it difficult to run the text to speech engine during playback on a lot of devices.  eSpeak might be a better choice then, since we probably don't want to force users to stop playback in order to get the voice UI.
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: rna023 on June 15, 2012, 01:30:51 AM
the cube c30 have no external RAM.
below is details about stmp3770 and disassembly of cube c30

http://www.soomal.com/doc/20100001901.htm
Title: Re: why dose Rockbox do not have internal TTS(text-to-speech) capabilities ?
Post by: wodz on June 15, 2012, 02:56:27 AM
At least in case of flite most of the data are const so can be put on flash instead of ram (if the platform permits this).