The goal of this PR is to give the user more control over the Web Speech API. Previously, the recognition object was not aborting speech recognition detection correctly, and was failing on re-renders. The use of a singleton recognition object and improved controls should alleviate this issue.
listening bool prop: if true, the Web Speech API is listening to speech from the microphone.
startListening func prop: causes the Web Speech API to start listening to speech from the microphone.
stopListening func prop: causes the Web Speech API to stop listening to speech from the microphone, but will finish processing any remaining speech.
abortListening func prop: causes the Web Speech API to stop listening to speech from the microphone, and also stop processing the current speech. Initially, the Web Speech API is turned on, so you may want to call this in componentWillMount if you don't want speech to be collected when your component is first mounted.
The goal of this PR is to give the user more control over the Web Speech API. Previously, the recognition object was not aborting speech recognition detection correctly, and was failing on re-renders. The use of a singleton recognition object and improved controls should alleviate this issue.
listening
bool prop: if true, the Web Speech API is listening to speech from the microphone.startListening
func prop: causes the Web Speech API to start listening to speech from the microphone.stopListening
func prop: causes the Web Speech API to stop listening to speech from the microphone, but will finish processing any remaining speech.abortListening
func prop: causes the Web Speech API to stop listening to speech from the microphone, and also stop processing the current speech. Initially, the Web Speech API is turned on, so you may want to call this incomponentWillMount
if you don't want speech to be collected when your component is first mounted.