@ngx-lcp/speech-recognition
v0.2.0
Published
Simple service to listen to the person using the microphone.
Downloads
3
Readme
@ngx-lcp/speech-recognition
Simple service to listen to the person using the microphone.
Security Notice
This lib is still in development.
Install
npm i @ngx-lcp/speech-recognition
Usage
import { NgxSpeechRecognitionService, SpeechRecognitionResponse, SpeechRecognitionError } from '@ngx-lcp/ngx-speech-recognition';
...
constructor(private speechRecognitionService: NgxSpeechRecognitionService) {}
start(): void {
this.speechRecognitionService.start(
(speechRecognition: SpeechRecognitionResponse) => {
console.log(speechRecognition);
},
(error: SpeechRecognitionError) => {
console.error(error);
}
);
}
stop(): void {
this.speechRecognitionService.stop();
}