@sam17896/ngx-speech-recognition
Version:
Angular 5+ speech recognition service (based on browser implementation such as Chrome).
16 lines (15 loc) • 898 B
TypeScript
import { Observable, UnaryFunction } from 'rxjs';
import { ApplicationRef } from '@angular/core';
import { SpeechGrammarListType, SpeechRecognitionServiceEvent } from '../adapter';
import { SpeechRecognitionCommon } from './speech-recognition.common';
export declare const resultList: UnaryFunction<Observable<SpeechRecognitionEvent>, Observable<SpeechRecognitionResultList>>;
export declare class RxSpeechRecognitionService extends SpeechRecognitionCommon {
private ref;
private proxy$;
private _started$;
readonly $: Observable<SpeechRecognitionServiceEvent>;
readonly started$: Observable<boolean>;
constructor(ref: ApplicationRef, grammars: SpeechGrammarListType, lang: string, continuous: boolean, interimResults: boolean, maxAlternatives: number, serviceURI: string);
private initInternal;
listen(): Observable<SpeechRecognitionServiceEvent>;
}