/**
 * Wake Word Detector
 *
 * Detects wake words in audio stream using Porcupine (Picovoice) engine
 * with fallback to text-match mode when no access key is available.
 */
import { EventEmitter } from 'events';
import type { WakeWordConfig, WakeWordDetection } from './types.js';
/**
 * Wake word detector interface
 */
export interface IWakeWordDetector {
    /** Start detection */
    start(): Promise<void>;
    /** Stop detection */
    stop(): Promise<void>;
    /** Process audio frame (Int16Array for Porcupine, Buffer for text-match) */
    processFrame(frame: Buffer | Int16Array): WakeWordDetection | null;
    /** Check if running */
    isRunning(): boolean;
    /** Get configuration */
    getConfig(): WakeWordConfig;
    /** Update configuration */
    updateConfig(config: Partial<WakeWordConfig>): void;
}
/**
 * Wake word detector with Porcupine engine and text-match fallback
 */
export declare class WakeWordDetector extends EventEmitter implements IWakeWordDetector {
    private config;
    private running;
    private porcupine;
    private engine;
    private lastDetection;
    private cooldownMs;
    private keywordLabels;
    constructor(config?: Partial<WakeWordConfig>);
    start(): Promise<void>;
    private initPorcupine;
    stop(): Promise<void>;
    processFrame(frame: Buffer | Int16Array): WakeWordDetection | null;
    private processPorcupineFrame;
    /**
     * Text-based wake word detection (fallback for when Porcupine is not available).
     * Call this with transcribed text instead of raw audio frames.
     */
    detectWakeWordText(text: string): WakeWordDetection | null;
    /**
     * Get the active detection engine
     */
    getEngine(): 'porcupine' | 'text-match';
    /**
     * Get Porcupine frame length (samples per frame required)
     */
    get frameLength(): number;
    /**
     * Get Porcupine sample rate
     */
    get sampleRate(): number;
    isRunning(): boolean;
    getConfig(): WakeWordConfig;
    updateConfig(config: Partial<WakeWordConfig>): void;
    /**
     * Add a custom wake word
     */
    addWakeWord(wakeWord: string): void;
    /**
     * Remove a wake word
     */
    removeWakeWord(wakeWord: string): void;
    /**
     * Get current wake words
     */
    getWakeWords(): string[];
    /**
     * Set sensitivity
     */
    setSensitivity(sensitivity: number): void;
    /**
     * Clear audio buffer (no-op, kept for API compatibility)
     */
    clearBuffer(): void;
}
/**
 * Factory function for creating wake word detector
 */
export declare function createWakeWordDetector(config?: Partial<WakeWordConfig>): WakeWordDetector;
export default WakeWordDetector;
