import { CognigyClient } from "./cognigyClient/index"; import { ISpeechOptions } from "./interfaces/speechOptions"; /** * Class that extends the cognigy clients functionalities. Allows to use the * browsers build-in html5-apis to record audio and create transcripts of voice * streams. */ export declare class CognigyWebClient extends CognigyClient { private voices; currentVoice: SpeechSynthesisVoice; private recognizer; private recognizing; private finalTranscript; private language; private onRecEnd; private onInterim; options: ISpeechOptions; constructor(options: ISpeechOptions); private initSpeechSynthesis(language, voiceName?); private initSpeechRecognigition(); /** * Uses the browsers build-in html5-api to speak the given input * string using speech synthesis. Some browsers do not support that. * This method will not do anything on these older browsers. */ say(message: string): void; /** * Allows to register a handler method which will be called when the * audio-recording finished. This can be e.g. used to send the transcript * of the audo-stream to the brain-server. */ registerOnRecEnd(onRecEnd: (transcript: string) => void): void; /** * Allows to register a handler method which will be called when the * audio-recording sends an interim result. */ registerOnInterim(onInterim: (transcript: string) => void): void; /** * Toggles the audio-recording. * * @param lang Optional language parameter */ toggleRec(lang?: string): void; }