An audio file or voice message to be sent

interface InputMediaAudio {
    caption?: InputText;
    duration?: number;
    file: InputFileLike;
    fileMime?: string;
    fileName?: string;
    fileSize?: number;
    performer?: string;
    thumb?: InputFileLike;
    title?: string;
    ttlSeconds?: number;
    type: "audio";
}

Hierarchy (view full)

Properties

caption?: InputText

Caption of the media

duration?: number

Duration of the audio 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.

performer?: string

Performer of the audio

Only applicable to newly uploaded files.

Thumbnail of the audio file album cover.

The thumbnail should be in JPEG format and less than 200 KB in size. A thumbnail's width and height should not exceed 320 pixels. Thumbnails can't be reused and can be only uploaded as a new file.

Only applicable to newly uploaded files.

title?: string

Title of the audio

Only applicable to newly uploaded files.

ttlSeconds?: number

TTL for the media in seconds.

Only applicable to some media types

type: "audio"