@developertown/use-speech-recognition
v0.1.3
Published
A react hook to easily use the WebSpeech Recognition API
Downloads
8
Keywords
Readme
use-speech-recognition
A react hook to easily use the WebSpeech Recognition API
Usage
// options
const defaultOptions = {
autoStart: false,
continuous: false,
interimResults: true,
onResult: (e: Event) => {},
onDisconnect: (e: Event) => {},
onStart: (e: Event) => {},
};
const {
transcript,
interimTranscript,
finalTranscript,
status,
listening,
resetTranscript,
startListening,
stopListening,
} = useSpeechRecognition(options);