New TTS Lib update issue

50 views
Skip to first unread message

blues

unread,
Oct 15, 2009, 12:41:18 AM10/15/09
to TTS-for-Android
Hi,
Today I got email from users of my app about the new TTS lib update
issue.
They claim the app doesn't read the text anymore since the new
update.

After I tested it, I found these issues:
1. There is no more TTS lib on the market for Android 1.5 device.
2. For Android 1.6 device, the new update has these issues:
* There is no engine selected by default. So the API doesn't work
without users going to the setting page.
* Looks like synthesizeToFile doesn't work anymore for both engines.
For the eSpeak engine, the wav file is generated, but media player on
Android is not able to play it. (can be played with desktop player,
but with very slow speed.)
For the Pico engine, the wav file is only 44 bytes.

I submitted my app to ADC2. And ADC2 is still going on.

So the only way to fix it is to make the lib work again. Thanks.

ack

unread,
Oct 15, 2009, 1:26:16 AM10/15/09
to TTS-for-Android
On Oct 15, 6:41 am, blues <bluescapt...@gmail.com> wrote:
> 1. There is no more TTS lib on the market for Android 1.5 device.

Seems to me that the old (Cupcake) version of the library wass pulled
off the Market way to soon.
The Donut OTA roll-out has only just begun on T-Mobile networks and
Vodafone (UK) is scheduled to go October 17 at the *earliest*.
OTA updates may take weeks to reach a significant percentage of
devices, so there will still be thousands of users running Cupcake for
quite some time to come.

in short: Please bring back TTS library 1.4 !!

Cheers,

Alain

ack

unread,
Oct 15, 2009, 1:29:35 AM10/15/09
to TTS-for-Android


On Oct 15, 7:26 am, ack <a.c.kal...@gmail.com> wrote:
> Vodafone (UK) is scheduled to go October 17 at the *earliest*.
Oops, make that October 19.

Cheers,

Alain

CLC

unread,
Oct 15, 2009, 1:59:59 PM10/15/09
to TTS-for-Android

> After I tested it, I found these issues:
> 1. There is no more TTS lib on the market for Android 1.5 device.
Please see my note about "missing" tts. The summary is that Market
only allows one version of an app at a time, so uploading the Donut
version automatically caused the Cupcake version to disappear from
Market.

For anyone on Cupcake who has installed the older version, they won't
get any update notifications, so it's not like they will lose what
they had installed. The only issue is for those who are on Cupcake and
have not installed TTS before; the workaround is to get the older
version from the eyes-free page.

Unfortunately, this update had to require Donut as it integrates with
the PicoTTS in Donut.

> 2. For Android 1.6 device, the new update has these issues:
>  * There is no engine selected by default. So the API doesn't work
> without users going to the setting page.
I can't reproduce this. If the user has never gone to the settings
page, the API will still work through the default engine (PicoTTS). I
believe this is a minor UI issue (not showing that the default engine
is Pico if the user has never selected anything) but not a bug in
terms of functionality. Please let me know if this is really
preventing speech from working.

>  * Looks like synthesizeToFile doesn't work anymore for both engines.
>  For the eSpeak engine, the wav file is generated, but media player on
> Android is not able to play it. (can be played with desktop player,
> but with very slow speed.)
>  For the Pico engine, the wav file is only 44 bytes.
This sounds serious; I will investigate it immediately.

To help speed up the process, can you give me exact strings that fail?
Also, do these strings fail to produce spoken output if you try to
just do a speak call rather than synthesize to file?

FWIW, the engines just produce a buffer of audio; the TTS framework
then sends it out to either the audio layer for direct speech, or
writes it to file for a synthesizeToFile request. Getting only 44
bytes basically means the engine returned nothing, so my gut feeling
is that direct synthesis would not have worked in that case either.

-Charles

blues

unread,
Oct 15, 2009, 4:51:54 PM10/15/09
to TTS-for-Android
Hi Charles,
Would you please drop me an email at bluesc...@gmail.com.

I have sent your an email from my yahoo account with my app apk file.
But I got no response.

Blues

blues

unread,
Oct 15, 2009, 5:05:01 PM10/15/09
to TTS-for-Android
I will give more detailed log later.
For eSpeak engine, it does generated the wav file. But the it sounds
weird (slow and in low quality). And the problem is: I can only play
it with windows media player. The android player is not able to play
it. I will use a wave file tool to get the PCM format it uses later
on.



On Oct 15, 1:51 pm, blues <bluescapt...@gmail.com> wrote:
> Hi Charles,
> Would you please drop me an email at bluescapt...@gmail.com.
> > -Charles- Hide quoted text -
>
> - Show quoted text -

CLC

unread,
Oct 15, 2009, 6:35:18 PM10/15/09
to TTS-for-Android
Sending me just an apk is not that helpful, especially without source
as there is no way for me to debug it. If you know of strings that
always fail, then those are useful because I can run those through and
see where it breaks.

-Charles

blues

unread,
Oct 15, 2009, 10:59:32 PM10/15/09
to TTS-for-Android
Hi Charles,

My app reads all different kinds of English text (all failed). So I
don't think it is a particular sentence breaks the code.
I had a chance to look at the generated wave file by the eSpeak
engine. The rate is 16000hz, but the working version was 22050hz
before.

And here is the logcat. TTS lib prints the string it processes. That's
why I wanted to send you my app apk file, so you can see every thing
and reproduce the bug while debugging your code.

10-15 18:13:34.061: VERBOSE/TtsService(2316): TtsService.onCreate()
10-15 18:13:34.341: DEBUG/dalvikvm(2316): Trying to load lib /data/
data/com.google.tts/lib/libttssynthproxybeta.so 0x437439d8
10-15 18:13:34.991: DEBUG/dalvikvm(2316): Added shared lib /data/data/
com.google.tts/lib/libttssynthproxybeta.so 0x437439d8
10-15 18:13:34.991: ERROR/TTS is loading(2316): /data/data/
com.google.tts/lib/libttsespeak.so
10-15 18:13:35.001: VERBOSE/SynthProxy(2316): AudioTrack started
10-15 18:13:35.041: ERROR/eSpeak Engine(2316): getTtsEngine called
10-15 18:13:35.381: VERBOSE/TtsService(2316): TtsService.setLanguage
(eng, USA, )
10-15 18:13:35.381: ERROR/eSpeak Engine(2316): lang input param: eng
country input param: USA
10-15 18:13:35.381: ERROR/eSpeak Engine(2316): Language: en-rUS
10-15 18:13:35.401: INFO/SynthProxy(2316): setting speech rate to 100
10-15 18:13:35.401: ERROR/eSpeak Engine(2316): setProperty called for
rate and value 100
10-15 18:13:35.661: ERROR/TtsService(2316): onCreate completed.
10-15 18:13:35.721: INFO/SynthProxy(2316): setting speech rate to 140
10-15 18:13:35.721: ERROR/eSpeak Engine(2316): setProperty called for
rate and value 140
10-15 18:13:36.091: ERROR/TtsService(2316): Error: en-us not
supported.
10-15 18:13:36.101: VERBOSE/TtsService(2316): TTS service received
Loading.
10-15 18:13:36.101: INFO/TtsService(2316): Stopping
10-15 18:13:36.101: INFO/TtsService(2316): Stopped
10-15 18:13:36.101: VERBOSE/TtsService(2316): TTS processing: Loading.
10-15 18:13:36.261: ERROR/MediaPlayer(2309): stop called in state 1
10-15 18:13:36.451: WARN/AudioFlinger(51): write blocked for 91 msecs
10-15 18:13:36.521: DEBUG/dalvikvm(2309): GC freed 5141 objects /
365608 bytes in 158ms
10-15 18:13:36.641: INFO/eSpeak Engine(2316): eSpeak callback
received! Sample count: 13003
10-15 18:13:36.661: VERBOSE/SynthProxy(2316): AudioTrack started
10-15 18:13:37.191: VERBOSE/SynthProxy(2316): Speech synthesis done.
10-15 18:13:37.191: INFO/eSpeak Engine(2316): eSpeak callback
processed!
10-15 18:13:37.191: INFO/SynthProxy(2316): setting speech rate to 140
10-15 18:13:37.191: ERROR/eSpeak Engine(2316): setProperty called for
rate and value 140
10-15 18:13:37.391: DEBUG/dalvikvm(2309): GC freed 723 objects / 54352
bytes in 127ms
10-15 18:13:42.381: DEBUG/dalvikvm(222): GC freed 574 objects / 29520
bytes in 150ms
10-15 18:13:42.821: INFO/global(2309): Default buffer size used in
BufferedReader constructor. It would be better to be explicit if an 8k-
char buffer is required.
10-15 18:13:42.961: ERROR/TtsService(2316): Error: en-us not
supported.
10-15 18:13:42.961: VERBOSE/TtsService(2316): TTS processing: NASDAQ.
Price: 2173.29, up 0.05 percent.
10-15 18:13:42.971: INFO/TtsService(2316): Synthesizing to /sdcard/
com.blabs.anyvoice/0-1255655622955.wav
10-15 18:13:42.991: INFO/TtsService(2316): Stopped all
10-15 18:13:43.121: INFO/eSpeak Engine(2316): eSpeak callback
received! Sample count: 21781
10-15 18:13:43.271: VERBOSE/SynthProxy(2316): Speech synthesis done.
10-15 18:13:43.271: INFO/eSpeak Engine(2316): eSpeak callback
processed!
10-15 18:13:43.421: INFO/eSpeak Engine(2316): eSpeak callback
received! Sample count: 19145
10-15 18:13:43.591: VERBOSE/SynthProxy(2316): Speech synthesis done.
10-15 18:13:43.591: INFO/eSpeak Engine(2316): eSpeak callback
processed!
10-15 18:13:43.831: ERROR/PlayerDriver(51): Command
PLAYER_SET_DATA_SOURCE completed with an error or info
PVMFErrNotSupported
10-15 18:13:43.831: ERROR/MediaPlayer(2309): error (1, -4)
10-15 18:13:43.831: WARN/PlayerDriver(51):
PVMFInfoErrorHandlingComplete
10-15 18:13:43.841: WARN/System.err(2309): java.io.IOException:
Prepare failed.: status=0x1
10-15 18:13:43.851: WARN/System.err(2309): at
android.media.MediaPlayer.prepare(Native Method)

10-15 18:13:44.341: ERROR/TtsService(2316): Error: en-us not
supported.
10-15 18:13:44.351: VERBOSE/TtsService(2316): TTS service received
Repeat, next or previous.
10-15 18:13:44.351: INFO/TtsService(2316): Stopping
10-15 18:13:44.351: INFO/TtsService(2316): Stopped
> > > - Show quoted text -- Hide quoted text -

blues

unread,
Oct 15, 2009, 11:27:30 PM10/15/09
to TTS-for-Android
Hi Charles,

I have something new now.

Actually the media player can play the 16khz wave file generated by
the eSpeak engine. And I can make my code work by puting a 2 seconds
sleep between the TTS.synthesizeToFile() and MediaPlayer.prepare(). So
I guess somehow the new eSpeak TTS engine still hold the wave file for
a while?

And for the Pico engine, the problem is the TTS.synthesizeToFile()
method does not block the thread any more. And I always call TTS.stop
() after TTS.synthesizeToFile(). That's why it only produces 44 bytes.
So if I put a dirty fix like 5 seconds sleep before TTS.stop(), it
will fix the problem in most of the cases.

So if the new design is to make TTS.synthesizeToFile() as a none-
blocking call, could you please instead create another method like
TTS.synthesizeToFileAsync() for this purpose?

And here is my original code working with the previous TTS lib (runing
in an additional thead):

mTts.synthesizeToFile(mLanguage, text, file);

mPlayer.stop();
mTts.stop();

mPlayer.reset();
mPlayer.setDataSource(file);
mLastPlayingFile = file;
mPlayer.setVolume(1, 1);
mPlayer.prepare();
mPlayer.start();

Thanks,
Blues


On Oct 15, 3:35 pm, CLC <clchen+...@google.com> wrote:
> > > - Show quoted text -- Hide quoted text -

blues

unread,
Oct 15, 2009, 11:39:58 PM10/15/09
to TTS-for-Android
Hi Charles,
Do you think it will be helpful if I send you my app apk file for
testing? I am not sure how the release process goes on your side. I
really hope my app can run with the next release. So we won't have to
wait for the next release again if there is long testing/release
process. Or you can send me the fixed TTS lib apk, so I can test it
before it goes to release.

Thanks,
Blues



On Oct 15, 3:35 pm, CLC <clchen+...@google.com> wrote:
> > > - Show quoted text -- Hide quoted text -

blues

unread,
Oct 16, 2009, 3:32:25 AM10/16/09
to TTS-for-Android
By reading the TTS lib source code, I realized the new TTS lib was
changed to use a thread to synthesize to file.
The reason I saw different results between eSpeak and Pico could be
that eSpeak runs quicker, so it still generates part of the wave file
before my code hits TTS.stop() and MediaPlayer.start().

I can change my code to adapt to this new async way.

But for ADC2, I am not able to do anything here. Any possiblity to
back to the old synchronized way? Or add a new method like
synthesizeToFileAsync()?

And the synchronized way of synthesizing is easier to use with my own
thread. For example to process a queued text list in order. It is
easier than using the asynchronized way which requires to listening to
the callback.

Thanks,
Blues


On Oct 15, 3:35 pm, CLC <clchen+...@google.com> wrote:
> > > - Show quoted text -- Hide quoted text -
Reply all
Reply to author
Forward
0 new messages