Voice Commands Recognition

304 views
Skip to first unread message

Fayyaz ul Amir Afsar Minhas

unread,
Jun 16, 2016, 10:55:04 PM6/16/16
to DroidScript
Hello,
I have just started using this awesome app for speech recognition in a project. Is it possible to issue voice commands through it? For this the app would need to be in a continuous listening mode. Is this supported? How to do this?
Thanks,
-Fayyaz

Steve Garman

unread,
Jun 16, 2016, 11:28:00 PM6/16/16
to DroidScript
In the Samples that come with DroidScript, there is one called "Voice Command"

You may find that a good starting point.

Manuel Lopes

unread,
Jun 17, 2016, 7:50:45 AM6/17/16
to DroidScript
steve is this been fixed?in my phone not work the commands by voice

Fayyaz ul Amir Afsar Minhas

unread,
Jun 17, 2016, 8:57:52 AM6/17/16
to DroidScript
Thank you for the response. I found that both the speech recognition and voice command demos work. However, I noticed that the speech recognition demo works much better than the voice commands demo in terms of accuracy. The voice command demo seemed to be unresponsive at times. Can you tell me why this might be so?
Thanks in advance,
-Fayyaz

Steve Garman

unread,
Jun 17, 2016, 9:34:26 AM6/17/16
to DroidScript
Dave is looking into a possible problem with some devices. https://groups.google.com/d/msg/androidscript/uU5Nm0VqBzQ/viAlw31pAQAJ

I am not aware that he has found a fix yet.

Syed Munawer Hassan

unread,
Jun 17, 2016, 9:47:46 AM6/17/16
to DroidScript

Fayyaz you can do this by controlling listening time if your device is not providing any output after listening it means it is unable to recognize your words I can help you if you let me know what exactly you wana do

Munawer

Fayyaz ul Amir Afsar Minhas

unread,
Jun 17, 2016, 12:38:04 PM6/17/16
to DroidScript
Thank you for the response.
I am trying to make the demo work for a small project in which I am giving voice commands to the phone such as "phone: make bold" and then dictate some text to it and it gets written in a formatted manner.
However, the voice command does not always work on a Nexus 7 tablet or a samsung core 2 phone. The demo does accept a few commands and then just becomes idle. May be it is just a phone issue as Steve pointed out.
While we are on the topic: Is there a way to run the speech recognition run completely offline?
-Fayyaz

Manuel Lopes

unread,
Jun 17, 2016, 4:18:35 PM6/17/16
to DroidScript
steve in lg d290 ;android 4.4.2 not work

Fayyaz ul Amir Afsar Minhas

unread,
Jun 18, 2016, 7:27:41 PM6/18/16
to DroidScript
I did some more experiments and I feel that Syed Munawer Hassan is right -- it is an issue of listening time. How do we fix that?
Thanks,
-Fayyaz

Syed Munawer Hassan

unread,
Aug 4, 2016, 5:59:26 AM8/4/16
to DroidScript
What do you mean by offline ?

Manuel Lopes

unread,
Aug 5, 2016, 8:37:49 AM8/5/16
to DroidScript
without net connection

World Star

unread,
Jun 25, 2018, 6:13:08 PM6/25/18
to DroidScript
hello all, i have problem whit voice recogntion.
it not work anymore!
som people have the same problem?

can somone help me out?

BareK

unread,
Jun 26, 2018, 7:54:12 AM6/26/18
to DroidScript
Thanks for pointing this out, but you should be more precise about what you tried/get.
I tested both "Speech Recognition" and "Voice Command" samples on my OnePlus One CM 13.1 Android 5.1 and speech_OnResult is never fired.
The speech.SetOnReady( callback ) never fires either, even if I use app.TextToSpeech( "some words" ) before to get speech engine ready.

Here are some logcats infos, it could be useful (and a bit long):

06-26 13:47:50.519 16113 16113 D Nxt     : App.CreateSpeechRec( undefined)
06-26 13:47:50.522 16113 16113 D Nxt     : Object Count = 3
06-26 13:47:50.522 16113 16113 D Nxt     :  -> #2
06-26 13:47:50.526 16113 16113 D Nxt     : Spr.SetOnResult( speech_OnResult)
06-26 13:47:50.529 16113 16113 D Nxt     : Spr.SetOnError( speech_OnError)
06-26 13:47:50.531 16113 16113 D Nxt     : Spr.SetOnReady( Listen)
06-26 13:47:50.533 16113 16113 D Nxt     : App.TextToSpeech( Your wish is my command 1 1.5 null undefined undefined undefined)
06-26 13:47:50.534 16113 16113 D Nxt     : Checking for Text-To-Speech engine...
06-26 13:47:50.534 16113 16113 D Nxt     : Creating Text-To-Speech engine
06-26 13:47:50.573 16113 16113 I TextToSpeech: Sucessfully bound to com.google.android.tts
06-26 13:47:50.574 31941 31941 I TTS     : Creating Google TTS service, version 3.15.18.200023596
06-26 13:47:50.575 16113 16113 D Nxt     : App.ShowProgress( undefined undefined)
06-26 13:47:50.577 31941 31970 I TTS     : Initializing fr-fr-x-vlf-lstm-embedded from disk
06-26 13:47:50.571  3967  3967 W Binder_D: type=1400 audit(0.0:30292): avc: denied { ioctl } for path="socket:[4829850]" dev="sockfs" ino=4829850 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
06-26 13:47:50.571  3967  3967 W Binder_D: type=1400 audit(0.0:30293): avc: denied { ioctl } for path="socket:[4829850]" dev="sockfs" ino=4829850 ioctlcmd=7704 scontext=u:r:system_server:s0 tcontext=u:r:system_server:s0 tclass=unix_stream_socket permissive=0
06-26 13:47:50.597 16113 16113 I TextToSpeech: Connected to ComponentInfo{com.google.android.tts/com.google.android.tts.service.GoogleTTSService}
06-26 13:47:50.601 31941 31972 I TTS     : For default lang fr-fr is name fr-FR-language (fr-fr-x-vlf-server)
06-26 13:47:50.601 16113 16181 I TextToSpeech: Set up connection to ComponentInfo{com.google.android.tts/com.google.android.tts.service.GoogleTTSService}
06-26 13:47:50.606 16113 16113 D Nxt     : SUPPORTED
06-26 13:47:50.610 31941  8315 I TTS     : For default lang fr-fr is name fr-FR-language (fr-fr-x-vlf-server)
06-26 13:47:50.724 16113 16113 D Nxt     : Doing Text-To-Speech...
06-26 13:47:52.266 31941 31970 I TTS     : Done initializing fr-fr-x-vlf-lstm-embedded
06-26 13:47:52.266 31941 16178 I TTS     : Synthesis request for locale fra-FRA and name fr-FR-language
06-26 13:47:52.268 31941 16178 I TTS     : TTS dispatch: fr-fr-x-vlf-lstm-embedded
06-26 13:47:52.411   258  2211 D audio_hw_primary: out_set_parameters: enter: usecase(4: audio-ull-playback) kvpairs: routing=2
06-26 13:47:52.422   258  2211 D audio_hw_primary: start_output_stream: enter: stream(0xb5f76fc0)usecase(4: audio-ull-playback) devices(0x2)
06-26 13:47:52.422   258  2211 D audio_hw_primary: start_output_stream: enter: usecase(4: audio-ull-playback) devices(0x2)
06-26 13:47:52.422   258  2211 E audio_hw_primary: voice_extn_compress_voip_is_active: COMPRESS_VOIP_ENABLED is not defined
06-26 13:47:52.422   258  2211 E msm8974_platform: voice_extn_compress_voip_is_active: COMPRESS_VOIP_ENABLED is not defined
06-26 13:47:52.422   258  2211 D audio_hw_primary: select_devices: out_snd_device(2: speaker) in_snd_device(0: )
06-26 13:47:52.422   258  2211 W msm8974_platform: Codec backend bitwidth 16, samplerate 48000
06-26 13:47:52.422   258  2211 D hardware_info: hw_info_append_hw_type : device_name = speaker
06-26 13:47:52.422   258  2211 I msm8974_platform: platform_send_audio_calibration: sending audio calibration for snd_device(2) acdb_id(15)
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> send_audio_cal, acdb_id = 15, path =  0
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> send_adm_topology
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TOPOLOGY_ID
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> send_asm_topology
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_STREAM_TOPOLOGY_ID
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> send_audtable
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_COMMON_TABLE
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_CAL
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> send_audvoltable
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AUDPROC_GAIN_DEP_STEP_TABLE
06-26 13:47:52.422   258  2211 D         : Failed to fetch the lookup information of the device 0000000F
06-26 13:47:52.422   258  2211 E ACDB-LOADER: Error: ACDB AudProc vol returned = -19
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> AUDIO_SET_AUDPROC_VOL_CAL
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> send_afe_cal
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> ACDB_CMD_GET_AFE_COMMON_TABLE
06-26 13:47:52.422   258  2211 D         : Failed to fetch the lookup information of the device 0000000F
06-26 13:47:52.422   258  2211 E ACDB-LOADER: Error: ACDB AFE returned = -19
06-26 13:47:52.422   258  2211 D ACDB-LOADER: ACDB -> AUDIO_SET_AFE_CAL
06-26 13:47:52.427   258  2211 D audio_hw_primary: select_devices: done
06-26 13:47:54.212 16113 16124 D Nxt     : TTS: done
06-26 13:47:55.615   796  2649 D WifiStateMachine: starting scan for "OrMic_WAN"-WPA_PSK with 2462
06-26 13:47:57.198   258  2211 D audio_hw_primary: out_standby: enter: stream (0xb5f76fc0) usecase(4: audio-ull-playback)
06-26 13:47:57.245   258  2211 D hardware_info: hw_info_append_hw_type : device_name = speaker
06-26 13:48:00.049  4778 16234 D EventNotificationJob: Running EventNotificationJob, isDetail=true
06-26 13:48:00.052  4778 16234 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
06-26 13:48:00.052  4778 16234 E MediaPlayer-JNI: JNIMediaPlayerFactory: bIsQCMediaPlayerPresent 0
06-26 13:48:00.087   258 16237 D NuPlayerDriver: notifyListener_l(0xad8789c0), (1, 0, 0)
06-26 13:48:00.087  4778  4778 D MediaPlayer: setSubtitleAnchor in MediaPlayer
06-26 13:48:00.087  4778 16234 D MediaPlayer: setSubtitleAnchor in MediaPlayer
06-26 13:48:00.089  4778 16234 D Ringtone: Successfully created local player
06-26 13:48:00.095   258 32115 D NuPlayerDriver: reset(0xad8789c0)
06-26 13:48:00.095   258 32115 D NuPlayerDriver: notifyListener_l(0xad8789c0), (8, 0, 0)
06-26 13:48:00.095   258 16237 W AMessage: failed to post message as target looper for handler 0 is gone.
06-26 13:48:00.095   258 16237 D NuPlayerDriver: notifyResetComplete(0xad8789c0)
06-26 13:48:00.095   258  2659 D NuPlayerDriver: reset(0xad8789c0)
06-26 13:48:00.097  4778 16234 D EventNotificationJob:   finished processing events.
06-26 13:48:03.566 10060 10304 D Nxt     : IDE command: stop
06-26 13:48:03.566 10060 10304 D Nxt     : IDE client IP: 127.0.0.1
06-26 13:48:03.566 10060 10304 D Nxt     : Broadcasting message:Action Back
06-26 13:48:03.568 16113 16113 D Nxt     : AppBroadcastReceiver:  Action=DroidScript_AppCmd Type=Action Msg=Back
06-26 13:48:03.568 16113 16113 D Nxt     : Releasing all objects
06-26 13:48:03.570 16113 16113 W cr_AwContents: WebView.destroy() called while WebView is still attached to window.
06-26 13:48:03.574 16113 16113 D Nxt     : SaveText: file=spremote name=_SharedFiles value=null
06-26 13:48:03.574 16113 16113 D Nxt     : SaveText: file=spremote name=_SharedText value=null
06-26 13:48:03.575 16113 16113 D Nxt     : Releasing speech recognizer
06-26 13:48:03.575 16113 16113 D Nxt     : Releasing mute
06-26 13:48:03.595   796  2651 D ConnectivityService: releasing NetworkRequest NetworkRequest [ id=2744, legacyType=-1, [ Capabilities: INTERNET&NOT_RESTRICTED&TRUSTED] ]

Syed Munawer Hassan

unread,
Jul 7, 2018, 3:32:38 AM7/7/18
to DroidScript
It will be better if you use it while connected with internet

BareK

unread,
Jul 7, 2018, 7:01:08 AM7/7/18
to DroidScript
I tested both with no luck.

BareK

unread,
Sep 6, 2018, 2:22:53 AM9/6/18
to DroidScript
My bad: I deactivated the Google app which blocked the speech recognition and gived a SpeechRecognizer: no selected voice recognition service.
Reply all
Reply to author
Forward
0 new messages