@kemis/kemis-speech
v1.1.0
Published
A tool for speech recognition and speech synthesis
Downloads
135
Readme
The Hook
This hook have as objective create a layer of abstraction to simplify the use with Speech and Synthese API
Usage
The way to use is very simple, just import the hook and as all hook, call her on your component
Did, the hook will expose a lot of states and functions, each state will change folliwing the calls of functions, e.g. if your call the handlerOnSetVoiceToPrompt, the states below will change on life cicle
- OnSpeechTranscriptionData (The voice to text)
- onSpeechOnSound (The voice was listen)
- OnSpeech (The voice are recording)
See the life circle of states
- onAudioStart - Fired when the user agent has started to capture audio.
- onEnd - Fired when the speech recognition service has disconnected.
- onError - Fired when a speech recognition error occurs.
- onSpeechNoMatch - Fired when the speech recognition service returns a final result with no significant recognition.
- onSpeechSound - Fired when any sound — recognizable speech or not — has been detected.
- onSpeech - Fired when sound that is recognized by the speech recognition service as speech has been detected.
- onSpeechError - Will indict that having some error
- onSpeechErrorMessage - The error message, also will be empty when the speech start
- onSpeechTranscriptionData - The text from sinthesy, will be empty when the speech start
See the JSDocs on the function's to learn how to use