Interface RecognizeSpeechInFile

Recognizes speech in an audio file and returns the recognized text; can be used only if getOption("can_recognize_speech") or speech recognition trial is available; must not be used in secret chats. The file must be in OGG format with the Opus codec and must have a size of up to 1 MB. Request type for Tdjson#recognizeSpeechInFile.

interface RecognizeSpeechInFile {
    @type: "recognizeSpeechInFile";
    audio_file: InputFile;
    recognition_id: string;
}

Properties

@type: "recognizeSpeechInFile"
audio_file: InputFile

The audio file.

recognition_id: string

Unique identifier of the speech recognition, which will be used in updateSpeechRecognitionInFile to send partially recognized text; pass 0 if partial results aren't needed.