import { Observable } from 'rxjs';
import type { INoiseCancellation } from '@stream-io/audio-filters-web';
import { Call } from '../Call';
import { AudioDeviceManager } from './AudioDeviceManager';
import { MicrophoneManagerState } from './MicrophoneManagerState';
import { TrackDisableMode } from './DeviceManagerState';
import { AudioBitrateProfile } from '../gen/video/sfu/models/models';
import { AudioSettingsResponse } from '../gen/coordinator';
import { DevicePersistenceOptions } from './devicePersistence';
export declare class MicrophoneManager extends AudioDeviceManager<MicrophoneManagerState> {
    private speakingWhileMutedNotificationEnabled;
    private soundDetectorConcurrencyTag;
    private soundDetectorCleanup?;
    private soundDetectorDeviceId?;
    private noAudioDetectorCleanup?;
    private noiseCancellation;
    private noiseCancellationChangeUnsubscribe;
    private noiseCancellationRegistration?;
    private unregisterNoiseCancellation?;
    private silenceThresholdMs;
    constructor(call: Call, devicePersistence: Required<DevicePersistenceOptions>, disableMode?: TrackDisableMode);
    setup(): void;
    /**
     * Enables noise cancellation for the microphone.
     *
     * @param noiseCancellation - a noise cancellation instance to use.
     */
    enableNoiseCancellation(noiseCancellation: INoiseCancellation): Promise<void>;
    /**
     * Disables noise cancellation for the microphone.
     */
    disableNoiseCancellation(): Promise<void>;
    /**
     * Enables speaking while muted notification.
     */
    enableSpeakingWhileMutedNotification(): Promise<void>;
    /**
     * Disables speaking while muted notification.
     */
    disableSpeakingWhileMutedNotification(): Promise<void>;
    /**
     * Sets the silence threshold in milliseconds for no-audio detection.
     * When the microphone is enabled but produces no audio for this duration,
     * a 'mic.capture_report' event will be emitted.
     *
     * @param thresholdMs the threshold in milliseconds (default: 5000).
     *   Set to 0 or a negative value to disable no-audio detection.
     */
    setSilenceThreshold(thresholdMs: number): void;
    /**
     * Performs audio capture test on a specific microphone.
     *
     * This method is only available in browser environments (not React Native).
     *
     * @param deviceId The device ID to test.
     * @param options Optional test configuration.
     * @returns Promise that resolves with the test result (true or false).
     */
    performTest(deviceId: string, options?: {
        testDurationMs?: number;
    }): Promise<boolean>;
    /**
     * Applies the audio settings to the microphone.
     * @param settings the audio settings to apply.
     * @param publish whether to publish the stream after applying the settings.
     */
    apply(settings: AudioSettingsResponse, publish: boolean): Promise<void>;
    protected getDevices(): Observable<MediaDeviceInfo[]>;
    protected getStream(constraints: MediaTrackConstraints): Promise<MediaStream>;
    protected doSetAudioBitrateProfile(profile: AudioBitrateProfile): void;
    private startSpeakingWhileMutedDetection;
    private stopSpeakingWhileMutedDetection;
    private teardownSpeakingWhileMutedDetection;
    private hasPermission;
}
