// Generated by dts-bundle-generator v8.1.2

import { EventEmitter } from 'eventemitter3';

declare enum StreamIndex {
	STREAM_INDEX_MAIN = 0,
	STREAM_INDEX_SCREEN = 1
}
export declare class IRTCAIAnsExtension extends EventEmitter<EventDict> {
	constructor(options?: Partial<IRTCAIAnsExtensionConfig>);
	
	/** 
	 * @brief Enables AI noise cancellation.
	 * @notes The AI noise cancellation is applicable to internal captured audio.
	 */
	enable: (constraint?: StreamSelectConstraint) => void;
	
	/** 
	 * @brief Disables AI noise cancellation.
	 */
	disable: (constraint?: StreamSelectConstraint) => void;
	isSupported: () => Promise<boolean>;
	setAnsMode: (ansMode: AnsMode) => Promise<void>;
	resume: () => Promise<void>;
	dump: <I extends StreamIndex>(streamIndex: I) => Promise<DumpFile<I>>;
}
export declare enum AnsMode {
	LOW = "low",
	MEDIUM = "medium",
	HIGH = "high",
	AUTO = "auto"
}
export declare enum AudioSourceType {
	
	/** 
	 * @brief Custom audio source
	 */
	AUDIO_SOURCE_TYPE_EXTERNAL = 0,
	
	/** 
	 * @brief Internal audio capture, referring to capture audio using the built-in module (the default)
	 */
	AUDIO_SOURCE_TYPE_INTERNAL = 1
}
/**
 * @hidden
 */
export declare enum DumpType {
	BEFORE_PROCESS = "before",
	AFTER_PROCESS = "after"
}
export declare enum EventTypes {
	onOverload = "onOverload",
	onUnsupported = "onUnsupported",
	onError = "onError"
}
export interface EventDict {
	[EventTypes.onOverload]: (data: {
		elapsedTime: number;
	}) => void;
	[EventTypes.onUnsupported]: (data: {
		message: string;
	}) => void;
	[EventTypes.onError]: (data: {
		message: string;
	}) => void;
}
export interface IRTCAIAnsExtensionConfig {
	url?: string;
	resample?: boolean;
}
/**
 * @hidden
 */
export type DumpFile<I extends StreamIndex> = {
	[D in DumpType]: {
		file: File;
		name: DumpFileName<I, D>;
	};
};
/**
 * @hidden
 */
export type DumpFileName<Index extends StreamIndex, Type extends DumpType> = `${Type}_${Index}_${number}.wav`;
export type StreamSelectConstraint = {
	streamIndex: StreamIndex;
	sourceType: AudioSourceType;
};

export {
	IRTCAIAnsExtension as default,
};

export {};
