/**
 * Native Voice Control System
 *
 * Advanced voice control features:
 * - Voice commands (explain, fix, refactor, search, etc.)
 * - Wake word detection ("Hey Grok", "OK Grok")
 * - Continuous listening mode
 * - Real-time voice activity detection (VAD)
 * - Multi-language support
 * - Command shortcuts and macros
 *
 * Inspired by voice assistants and Cursor 2.0's voice features.
 */
import { EventEmitter } from 'events';
export interface VoiceControlConfig {
    enabled: boolean;
    wakeWord: string;
    wakeWordEnabled: boolean;
    continuousListening: boolean;
    language: string;
    vadThreshold: number;
    vadSilenceDuration: number;
    provider: 'whisper-local' | 'whisper-api' | 'vosk' | 'system';
    apiKey?: string;
    model?: string;
    commandTimeout: number;
    feedbackSound: boolean;
    confirmActions: boolean;
}
export interface VoiceCommand {
    name: string;
    aliases: string[];
    description: string;
    pattern: RegExp;
    handler: (args: string[], context: VoiceCommandContext) => Promise<VoiceCommandResult>;
}
export interface VoiceCommandContext {
    transcription: string;
    confidence: number;
    language: string;
    currentFile?: string;
    selectedText?: string;
    workspaceRoot?: string;
}
export interface VoiceCommandResult {
    success: boolean;
    action?: string;
    response?: string;
    data?: Record<string, unknown>;
    error?: string;
}
export interface VoiceControlState {
    isListening: boolean;
    isProcessing: boolean;
    isWakeWordActive: boolean;
    lastCommand?: string;
    lastResult?: VoiceCommandResult;
    sessionCommands: number;
    errorCount: number;
}
export interface TranscriptionResult {
    success: boolean;
    text?: string;
    confidence?: number;
    language?: string;
    duration?: number;
    error?: string;
}
/**
 * Native Voice Control System
 */
export declare class VoiceControl extends EventEmitter {
    private config;
    private state;
    private commands;
    private recordingProcess;
    private vadProcess;
    private wakeWordDetector;
    private tempDir;
    private audioBuffer;
    constructor(config?: Partial<VoiceControlConfig>);
    /**
     * Initialize voice control system
     */
    private initialize;
    /**
     * Load configuration from file
     */
    private loadConfig;
    /**
     * Save configuration
     */
    saveConfig(): void;
    /**
     * Register built-in voice commands
     */
    private registerBuiltinCommands;
    /**
     * Register a custom voice command
     */
    registerCommand(command: VoiceCommand): void;
    /**
     * Check system availability
     */
    isAvailable(): Promise<{
        available: boolean;
        reason?: string;
        capabilities: string[];
    }>;
    /**
     * Check if a command exists
     */
    private checkCommand;
    /**
     * Check if a Python module is available
     */
    private checkPythonModule;
    /**
     * Start listening for voice input
     */
    startListening(): Promise<void>;
    /**
     * Start continuous listening mode with VAD
     */
    private startContinuousListening;
    /**
     * Start single recording session
     */
    private startSingleRecording;
    /**
     * Process audio buffer from continuous listening
     */
    private processAudioBuffer;
    /**
     * Write raw audio data to WAV file
     */
    private writeWavFile;
    /**
     * Process audio file for transcription
     */
    private processAudioFile;
    /**
     * Transcribe audio file
     */
    private transcribe;
    /**
     * Transcribe with local Whisper
     */
    private transcribeWithWhisperLocal;
    /**
     * Transcribe with Whisper API
     */
    private transcribeWithWhisperAPI;
    /**
     * Transcribe with Vosk (offline)
     */
    private transcribeWithVosk;
    /**
     * Fallback system transcription
     */
    private transcribeWithSystem;
    /**
     * Detect wake word in transcription
     */
    private detectWakeWord;
    /**
     * Process transcribed text as command
     */
    private processCommand;
    /**
     * Play feedback sound
     */
    private playFeedbackSound;
    /**
     * Stop listening
     */
    stopListening(): void;
    /**
     * Toggle listening
     */
    toggleListening(): void;
    /**
     * Get current state
     */
    getState(): VoiceControlState;
    /**
     * Get configuration
     */
    getConfig(): VoiceControlConfig;
    /**
     * Update configuration
     */
    updateConfig(config: Partial<VoiceControlConfig>): void;
    /**
     * Get available commands
     */
    getCommands(): VoiceCommand[];
    /**
     * Format status for display
     */
    formatStatus(): string;
    /**
     * Format commands help
     */
    formatCommandsHelp(): string;
    /**
     * Clean up resources
     */
    dispose(): void;
}
export declare function getVoiceControl(config?: Partial<VoiceControlConfig>): VoiceControl;
export declare function resetVoiceControl(): void;
