import type { ConsentManager } from "../security/consent-manager.js";
export interface VoiceState {
    sessionId: string;
    wakeWordEnabled: boolean;
    talkModeEnabled: boolean;
    listening: boolean;
    lastTranscriptAt?: string;
    lastSpokenAt?: string;
}
export interface TranscriptionResult {
    text: string;
    wakeWordDetected: boolean;
    sentToAgent: boolean;
}
export declare class VoiceService {
    private readonly bySession;
    getState(sessionId: string): VoiceState;
    updateState(sessionId: string, patch: Partial<Omit<VoiceState, "sessionId">>): VoiceState;
    transcribe(input: {
        transcript?: string;
        audioBase64?: string;
        sessionId: string;
    }): TranscriptionResult;
    speak(input: {
        sessionId: string;
        text: string;
    }): {
        ok: true;
        audioBase64: string;
        mimeType: string;
    };
    resolveConsentFromUtterance(consentManager: ConsentManager, input: {
        text: string;
        sessionId?: string;
    }): {
        handled: boolean;
        approved?: boolean;
        requestId?: string;
    };
    /**
     * Transcribe audio via a local Faster Whisper HTTP server.
     * The server exposes POST /transcribe accepting raw WAV body.
     * Returns the transcribed text or null on failure.
     */
    transcribeViaWhisper(input: {
        audioBase64: string;
        whisperUrl: string;
    }): Promise<string | null>;
    /**
     * Forward audio to a Home Assistant Wyoming/Whisper STT endpoint.
     * Returns the transcribed text or null on failure.
     */
    transcribeViaWyoming(input: {
        audioBase64: string;
        haUrl: string;
        haToken: string;
        sttEntity?: string;
    }): Promise<string | null>;
    private decodeAudioAsText;
}
//# sourceMappingURL=service.d.ts.map