import { Unsubscribe } from "../../../types";
export declare namespace SpeechSynthesisAdapter {
    type Status = {
        type: "starting" | "running";
    } | {
        type: "ended";
        reason: "finished" | "cancelled" | "error";
        error?: unknown;
    };
    type Utterance = {
        status: Status;
        cancel: () => void;
        subscribe: (callback: () => void) => Unsubscribe;
    };
}
export type SpeechSynthesisAdapter = {
    speak: (text: string) => SpeechSynthesisAdapter.Utterance;
};
export declare namespace SpeechRecognitionAdapter {
    type Status = {
        type: "starting" | "running";
    } | {
        type: "ended";
        reason: "stopped" | "cancelled" | "error";
    };
    type Result = {
        transcript: string;
    };
    type Session = {
        status: Status;
        stop: () => Promise<void>;
        cancel: () => void;
        onSpeechStart: (callback: () => void) => Unsubscribe;
        onSpeechEnd: (callback: (result: Result) => void) => Unsubscribe;
        onSpeech: (callback: (result: Result) => void) => Unsubscribe;
    };
}
export type SpeechRecognitionAdapter = {
    listen: () => SpeechRecognitionAdapter.Session;
};
//# sourceMappingURL=SpeechAdapterTypes.d.ts.map