Voice message to be sent

interface InputMediaVoice {
    caption?: InputText;
    duration?: number;
    file: InputFileLike;
    fileMime?: string;
    fileName?: string;
    fileSize?: number;
    ttlSeconds?: number;
    type: "voice";
    waveform?: number[];
}

Hierarchy (view full)

Properties

caption?: InputText

Caption of the media

duration?: number

Duration of the voice message in seconds

Only applicable to newly uploaded files.

File to be sent

fileMime?: string

Override MIME type for the file

Only applicable to newly uploaded files.

fileName?: string

Override file name for the file.

Only applicable to newly uploaded files.

fileSize?: number

Override file size for the file

Only applicable to newly uploaded files.

ttlSeconds?: number

TTL for the media in seconds.

Only applicable to some media types

type: "voice"
waveform?: number[]

Waveform of the voice message.

Represented with integers in range [0, 31], usually has length of 100. Generated by the server if omitted.

Only applicable to newly uploaded files.