How can we extend the speech recognition listening time in React-Native-voice to accommodate users who need more time to think before verbalizing their thoughts, preventing premature stopping of speech recognition when they pause but haven't completed their intended message?
React-Native-voice for speech recognition, how can users be provided with additional pause time?
693 Views Asked by Tao At
1
There are 1 best solutions below
Related Questions in REACT-NATIVE
- React Native: detect if UIVisualEffectView is supported
- Prevent Chrome debugger from stealing focus in React Native
- React-native upload image to amazons s3
- react-native update NavigatorIOS component's props
- promise – can't find variable process
- Using React Native within existing iOS app for some views only
- What is a good approach to building and distributing a React Native iOS component that extends iOS functionality?
- error in xcode 6 "is not registered as a URL scheme. Please add it in your Info.plist"
- DeviceEventEmitter stops emitting events to application when screen locked
- How to rename react-native entry file (index.ios.js)
- react-native component lifecycle methods not firing on navigation
- How to use comments in React
- react-native propagate changes in props through ListView and Navigator
- How do i use the iOS shake gesture with react native?
- TouchableHighlight won't accept press events while keyboard is open
Related Questions in SPEECH-RECOGNITION
- Sphinx4 fails to find resources
- How to config grammar for StreamSpeechRecognizer in CMUSphinx
- Offline Speech Recognition on Android Wear
- Is Speech-to-Text-to-Translation an Impossible Dream?
- Recognition listener android studio, it doesn't work
- Android speech recognizer works fine on 5.0.1 but doesn't work on 5.1
- How do I reconfigure MS' CLI for full dictation via speech recognition?
- Can't get Mac dictation custom commands to work
- How to working with multiple button recognizer at HTML5 web speech API
- Offline voice recognition android taking unwanted voice
- How can i make the python to wait till i complete speaking?
- Voice Interaction App [Android]
- webkitSpeechRecognition does not show interim results
- Why is my Sphinx4 Recognition poor?
- Launching a program with Voce
Related Questions in REACT-NATIVE-VOICE
- Sip call library options for react native app developer?
- Getting error while using react native community voice feature to convert speech to text
- Not able to check accurately if the value in state matches a certain string
- Speech to text with react-native-community/voice is not giving proper result in iOS
- @react-native-community/voice or react-native-voice / voice gives exception java.lang.NullPointerException at com.wenkesj.voice.VoiceModule.onResults
- react-native-voice package for react-native app giving an error
- How to make average value in onSpeechVolumeChanged react native
- React Native record video and capture Speech to Text
- React-Native-voice for speech recognition, how can users be provided with additional pause time?
- React-Native-Voice, How to concatenate new speech result with the previous speech recognition result?
- @react-native-voice/voice doesn't detect speech services
- `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` and `removeListeners` method
- How to make react-native-voice work in background mode?
- `new NativeEventEmitter()` was called with a non-null argument without the required `addListener` method
- Reack-native-voice pick up the voice from react-native-tts
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
If your app is on the Android platform, you can adjust the following constant:
EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLISto increase the time it takes for the recognizer to consider the input complete and end the recognition session after stopping hearing speech RecognizerIntent.To make this change in React Native (RN), follow these steps:
Locate the file
react-native-voice/src/index.js.In this file, find the following code snippet:
} else { Voice.startSpeech(locale, callback); }
In the
Object.assign()function, you can add the parameter ofEXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLISand set the value to the desired time in milliseconds. For example, if you want to set it to 5000 milliseconds, the updated code would look like this:EXTRA_SPEECH_INPUT_COMPLETE_SILENCE_LENGTH_MILLIS: 5000,By making this adjustment, you can control how long the speech recognition should wait for silence before considering the input complete, allowing users more time to pause and think before ending the recognition session.
While attempting to extend the listening duration for speech recognition, you may encounter an issue where the app continues to listen for an additional 5 seconds after silence but eventually crashes. If this problem occurs, you may notice that the
_onSpeechResults()function returns a null matches object, resulting in a null speech result, which is likely the cause of the app crash:Interestingly, even with the null matches in
_onSpeechResults(), the_onSpeechPartialResults()function still receives multiple messages containing partial results.For example, the following is a screenshot of the results captured in the
In the
_onSpeechPartialResults, we can see that the end of speaking has been reached, even if the response from the_onSpeechResultsis null. Also, I noticed that the most complete chunk of the speech is always after theonSpeechEndevent. Therefore, instead of relying solely on the null result provided byonSpeechResults, we can now gather and join all the collected chunks of partial results received after eachonSpeechEndevent.Therefore, as shown below, I wrapped the
onSpeechResults()function in a null check, and concatenated partial results from_onSpeechPartialResultstogether in a list to form a more complete transcript of the speech, ensuring that the final result is more accurate and reliable.