Voice: Continuously listening to user input

Created on 14 Aug 2017  路  8Comments  路  Source: react-native-voice/voice

It seems that the voice detecting function will terminate after starting detection a few seconds. Is there exist a way to keep listening to user input?

Thanks!

Most helpful comment

@dgurns @henrych4
This has been a suggestion in the past, so I started implementing this with Android (first). In 0.2.x you now have (limited) access to the RecognizerIntent EXTRA_* options such as EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS
EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS
EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS are now customizable.

For example, to force the intent to recognize for 10 seconds without stopping,

Voice.start('en-US', {
  EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS: 10000
});

All 8 comments

Would love to know this as well.

@dgurns @henrych4
This has been a suggestion in the past, so I started implementing this with Android (first). In 0.2.x you now have (limited) access to the RecognizerIntent EXTRA_* options such as EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS
EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS
EXTRA_SPEECH_INPUT_POSSIBLY_COMPLETE_SILENCE_LENGTH_MILLIS are now customizable.

For example, to force the intent to recognize for 10 seconds without stopping,

Voice.start('en-US', {
  EXTRA_SPEECH_INPUT_MINIMUM_LENGTH_MILLIS: 10000
});

Awesome news! I had played around with setting these as hardcoded values in the component java files, but they didn't seem to have any effect. Have you been able to get them working?

This isn't working for me on android - is there an alternative to getting this running continuously? or at least increasing the time for silence?

Editing the hardcoded values in the java files don't work for me either.

not working to me as well :(

Hi, are there any updates on this issue? We have the same problem using target api 28. Would be happy to contribute to a fix of this issue.

Any updates on this? It is not working for me either.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Fistynuts picture Fistynuts  路  7Comments

B4ckes picture B4ckes  路  5Comments

blackcoudpm picture blackcoudpm  路  8Comments

Anandks1993 picture Anandks1993  路  5Comments

MrHazimAli picture MrHazimAli  路  7Comments