Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

completeSilenceLength on Android #113

Open
ghost opened this issue Jun 16, 2020 · 2 comments
Open

completeSilenceLength on Android #113

ghost opened this issue Jun 16, 2020 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 16, 2020

Hi,

This isn't in the documentation, but in the code. I see that you're using a parameter (completeSilenceLength) to set the Android EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS
(see: cordova-plugin-speechrecognition/src/android/com/pbakondy/SpeechRecognition.java line 180)

My use case includes speech with several seconds of silence (8-10s), so I've added completeSilenceLength as a parameter in my javascript call (completeSilenceLength: 10000).

speechRecognition.startListening(successCallback, errorCallback, {
    language: language, matches: matches, 
    prompt: prompt, showPopup: showPopup,
    showPartial: showPartial, completeSilenceLength: 10000
});

Unfortunately, the app just ignores the value and stops recording after 2-3s of silence.

Am I doing something wrong or does completeSilenceLength just not work/is not implemented?

Any help in getting me to record speech with 8-10s of silence would be appreciated.

@dmuinc
Copy link

dmuinc commented Sep 3, 2020

Hello,

Unfortunatelly I don't have the solution but do you have find the issue ? I'm interesseting to do the same and I don't find any solution on Internet.

Thanks for your help

@reyco1
Copy link

reyco1 commented Apr 21, 2021

intent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS, 1000);
intent.putExtra(RecognizerIntent.EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS, 1000);

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants