import { CancellationToken } from "../../../../base/common/cancellation.js"; import { Event } from "../../../../base/common/event.js"; import { IDisposable } from "../../../../base/common/lifecycle.js"; import { ISpeechProvider, ISpeechToTextSession, ITextToSpeechSession, KeywordRecognitionStatus } from "./speechService.js"; export declare const ISpeechService: import("../../../../platform/instantiation/common/instantiation.js").ServiceIdentifier; export interface ISpeechService { readonly _serviceBrand: undefined; readonly onDidChangeHasSpeechProvider: Event; readonly hasSpeechProvider: boolean; registerSpeechProvider(identifier: string, provider: ISpeechProvider): IDisposable; readonly onDidStartSpeechToTextSession: Event; readonly onDidEndSpeechToTextSession: Event; readonly hasActiveSpeechToTextSession: boolean; /** * Starts to transcribe speech from the default microphone. The returned * session object provides an event to subscribe for transcribed text. */ createSpeechToTextSession(token: CancellationToken, context?: string): Promise; readonly onDidStartTextToSpeechSession: Event; readonly onDidEndTextToSpeechSession: Event; readonly hasActiveTextToSpeechSession: boolean; /** * Creates a synthesizer to synthesize speech from text. The returned * session object provides a method to synthesize text and listen for * events. */ createTextToSpeechSession(token: CancellationToken, context?: string): Promise; readonly onDidStartKeywordRecognition: Event; readonly onDidEndKeywordRecognition: Event; readonly hasActiveKeywordRecognition: boolean; /** * Starts to recognize a keyword from the default microphone. The returned * status indicates if the keyword was recognized or if the session was * stopped. */ recognizeKeyword(token: CancellationToken): Promise; }