More TextToSpeech problem

222 views
Skip to first unread message

Francesco I.

unread,
May 26, 2016, 9:18:36 AM5/26/16
to DroidScript
Hi! I have a problem with app.TextToSpeech function...
If I launch Voice Command sample, when first command is recognized, app tell me, but from second, the command is recognized but I have no audio feedback... There is a way to restart TTS? There are some problem with app.TextToSpeech and speech.Recognize when used both... I have no problem with TextToSpeech sample... But I have to realize something like Voice Command sample... So this is the question...

I use droidscript 1.34, android 5.1, kernel 3.10.49, device LG G4, Italian language for android and speech/recognition, google default voice engine, and offline db for offline recognition.

Recognition works great, and TTS also... But it stops after first talk after recognition...

Idea?

Thanks

Steve Garman

unread,
May 26, 2016, 11:18:12 AM5/26/16
to DroidScript
The Voice Command sample seems to be written so it stops recognising once it has found one of its stock commands.

Can you post some code that demonstrates the problem you are seeing?

Francesco I.

unread,
May 26, 2016, 11:35:14 AM5/26/16
to DroidScript
the code is "exactly" the Voice Command sample! after recognize command, the code stop listening, so execute app.TextToSpeech, then (into TextToSpeech call) restart recognizing (call Listen routine at the end of speech)...

testing sample app:

1. device tell me first intro sentence (ok)
2. I tell "Computer" or "What time is it" or "How are you" or ...
3. device say me right response - and restart recognizing (ok)
[loop]
4. I tell "Computer" or "What time is it" or "How are you" or ...
5. device say me nothing (wrong!) - but recognizing restart  (ok! so problem is into TextToSpeech?)
(I added a app.ShowPopup into every case to show me if command is recognized... and every of it is!)
6. I tell "Computer" or "What time is it" or "How are you" or ...
7. device say me nothing (wrong!) - but recognizing restart  (ok! so problem is into TextToSpeech?)
[/loop]
8. I tell "exit"
9. app terminate correctly (ok)

I go blind...
 

BareK

unread,
May 26, 2016, 2:59:50 PM5/26/16
to DroidScript
That's weird.

I just tested the sample with my phone and no problem, the app "reponds" me all the time, TTS is audible.

I use droidscript 1.34, android 6.0.1, kernel 3.4.110 (cyanogenmod), device OnePlus One, French language for android and speech/recognition, google default voice engine.
I don't know about offline mode.

BareK

unread,
May 26, 2016, 3:13:36 PM5/26/16
to DroidScript
My mistake.
Further tests showed that it sometimes stop responding (no recognition at all).
It's a bit random.

Dave Smart

unread,
May 26, 2016, 4:50:00 PM5/26/16
to DroidScript
Are you using the offline speech engine?  It will be a lot more reliable if you do... or else it will depend heavily on your internet connection.

Manuel Lopes

unread,
May 26, 2016, 5:46:04 PM5/26/16
to DroidScript
one question can i change the language of talk?example my phone language portuguese and change the language to english?(without change the language of course) or only not have this option on speech?(sorry of topic);thanks

Francesco I.

unread,
May 26, 2016, 10:21:01 PM5/26/16
to DroidScript
Hi Dave, yes I'm using offline speech engine in my android system (there is a option of TextToSpeech function to force it?)

Idea?

Thanks

Dave Smart

unread,
May 28, 2016, 8:23:31 AM5/28/16
to DroidScript
With TextToSpeech you can set the locale parameter to a code such as 'en_GB'

See this article for locale strings:-


(The required speech engine for that language/locale must be installed on your device)

Manuel Lopes

unread,
May 28, 2016, 5:23:30 PM5/28/16
to DroidScript
thanks dave;i have other question is the phone lg d290 work with sample "voice command"? i try talk to make the commands example exit and the command not work;the question is need i activate in phone to work this commands or need to download anything? or not supported in lg d290 with android 4.4.2?;thanks and sorry ask

Dave Smart

unread,
May 30, 2016, 6:49:43 AM5/30/16
to DroidScript
Hi Guys,

There seems to be a problem that on some phones the Voice Comand sample does not perform very well.  I'm not sure what is causing this and will have to investigate further.  It might be related to the Android version and/or the performance of the device.

Regards
David

Manuel Lopes

unread,
May 30, 2016, 8:45:24 AM5/30/16
to DroidScript
thanks dave; now i understand why the sample not work;anyone please if the sample not work please tel what the phone and android version to help understand the problem;thanks
Reply all
Reply to author
Forward
0 new messages