///
import { User } from "discord.js";
import { resolveSpeechWithGoogleSpeechV2 } from "../speechRecognition/googleV2";
/**
* Speech recognition function, you can create your own and specify it in addSpeechEvent
*
* All options that you pass to addSpeechEvent function, will be later passed to this function.
*/
export interface SpeechRecognition {
(audioBuffer: Buffer, options?: Record): Promise;
}
export interface CommonSpeechOptions {
/**
* Group identifier
* https://discordjs.github.io/voice/interfaces/joinvoicechanneloptions.html#group
*/
group?: string;
/**
* Custom handler to decide whether to recognize speech
* @param user The user who spoke
* @returns
*/
shouldProcessSpeech?: (user: User) => boolean;
/**
* Defaults to true
*/
ignoreBots?: boolean;
/**
* Minimal length of voice message that will be processed
*/
minimalVoiceMessageDuration?: number;
}
/**
* Options that will be passed to SpeechRecognition function
*
* Usage: `SpeechOptions`
*/
export declare type SpeechOptions = CommonSpeechOptions & {
speechRecognition?: T;
} & Parameters[1];