Interface InputMessageVoiceNote

A voice note message. Subtype of InputMessageContent.

interface InputMessageVoiceNote {
    @type: "inputMessageVoiceNote";
    caption: FormattedText;
    duration: number;
    self_destruct_type: MessageSelfDestructType;
    voice_note: InputFile;
    waveform: string;
}

Properties

@type: "inputMessageVoiceNote"
caption: FormattedText

Voice note caption; may be null if empty; pass null to use an empty caption; 0-getOption("message_caption_length_max") characters.

duration: number

Duration of the voice note, in seconds.

self_destruct_type: MessageSelfDestructType

Voice note self-destruct type; may be null if none; pass null if none; private chats only.

voice_note: InputFile

Voice note to be sent. The voice note must be encoded with the Opus codec and stored inside an OGG container with a single audio channel, or be in MP3 or M4A format as regular audio.

waveform: string

Waveform representation of the voice note in 5-bit format.