Telegram sendVoice formats: OGG/Opus, MP3 or M4A up to 50 MB

Telegram sendVoice accepts OGG/Opus, MP3 or M4A up to 50 MB. Pull an MP3 track from a generated video with Sume audio-detach and send it as a voice note.

4 min readSume
All posts

To send a voice note from a bot, give sendVoice an OGG file encoded with Opus, an MP3 or an M4A, up to 50 MB. If your source is a generated video, the quickest route is Sume's audio-detach, which writes the soundtrack as a new MP3 or WAV artifact. Choose mp3, because it is on Telegram's accepted list, and send the resulting audio_url content through the bot.

Which audio formats does sendVoice take?

Telegram's sendVoice description names three: OGG encoded with OPUS, MP3 and M4A. It sets the upload ceiling at 50 MB for files sent this way. WAV is not on that list, which matters because it is one of the two output formats Sume's audio-detach can produce.

Telegram sendVoice against Sume audio-detach (read 2026-10-02)
ItemTelegram sendVoiceSume audio-detach
Accepted or produced formatsOGG/Opus, MP3, M4Awav or mp3
Size ceiling50 MBnone stated; output capped by duration
Match for a voice notemp3mp3 (128 kbps)
Price per jobnot applicable$0.01

How do I pull the MP3 with Sume?

Call POST /v1/audio-detach with a Sume-hosted video_url and format set to mp3. The call needs an Idempotency-Key header. It returns a job; poll GET /v1/jobs/:id/result and read audio_url, duration_seconds, format, channels and sample_rate. Optional range, channels and sample_rate fields let you take only the part you need, which also keeps the file small.

Videos from elsewhere must be imported first with POST /v1/media-imports, because Sume does not fetch arbitrary internet URLs.

import json, os, urllib.request

body = {
    "video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
    "format": "mp3",
    "channels": 1
}
req = urllib.request.Request(
    "https://api.sume.com/v1/audio-detach",
    data=json.dumps(body).encode(),
    headers={
        "Authorization": "Bearer " + os.environ["SUME_API_KEY"],
        "Content-Type": "application/json",
        "Idempotency-Key": "voice-note-001",
    },
    method="POST",
)
print(urllib.request.urlopen(req).read().decode())

What about the 50 MB limit and length?

The size ceiling is rarely the issue for speech: Sume encodes MP3 at 128 kbps, which is about 16 KB per second, so a 50 MB cap sits far beyond a chat clip. What can bite is duration, because Sume's audio-detach caps the output length, so trim a long video first with video trim when you only want a section.

What should I verify before shipping?

Confirm the file plays in a test chat on the clients you care about. Telegram's page lists MP3 as accepted, so the method should take it, but only a real send proves how each client shows it. The audio-detach guide lists every field and refusal code.

Sources

Related posts

More in Integrations

All Integrations posts

Written by Sume