Send Audio π½
Send TTS and audio straight to Telegram β voice notes included
- bot
- audio
- trigger
- message
- message_id
- trigger
If you're generating audio in ComfyUI - TTS, music, sound effects - this is the node that gets it to your phone. It takes an AUDIO tensor and posts it to a Telegram chat as a voice note, a playable audio file, or a raw file. That "sent a voice message" mechanic is genuinely nice for TTS workflows: you end up with a chat history of every line the model read.
It's part of the ComfyUI Telegram Suite pack, and it's the sibling of Send Image(s) - same Telegram Bot wiring, same message/message_id outputs, one extra moving part: ffmpeg.
How it works
The AUDIO input follows ComfyUI's standard audio dict format (waveform + sample_rate, the kind of thing you get out of an audio-loading pack or a TTS node). The node renders it to WAV bytes with torchaudio, then branches on the send_as dropdown:
- Voice β converted to OGG (Opus) via ffmpeg and sent with
sendVoice. This is the "voice message" style - the little bubble with the play button. - Audio β converted to MP3 via ffmpeg and sent with
sendAudio(the "music file" style with title/artist metadata). - File β sent as-is with
sendDocument(WAV, no conversion).
The quiet gotcha is in that middle column: converting to OGG or MP3 shells out to ffmpeg, which must be on your PATH. The README flags ffmpeg as a requirement up front, and it's the one dependency pip can't install for you. If you only ever use File mode you can skip it - but Voice and Audio will fail with a runtime error the moment they hit a machine without ffmpeg.
Inputs and outputs that matter
bot,chat_id- from a Telegram Bot π½ node (your configured token + target chat).audio- the AUDIO tensor.send_as- Voice / Audio / File, described above.caption,parse_mode- text under the audio;parse_modeisNone/HTML/Markdown/MarkdownV2.file_name(default"audio") - base name for the uploaded file.disable_notification(default True) - silent delivery, flip to False for an actual ping.protect_content- blocks forwarding/saving.message_thread_id- forum topic targeting;-1means the main chat.
Outputs are message (raw API response DICT), message_id (INT - keep it if you want to edit this message later), and the trigger passthrough.
Installation
Same as every node in this pack - it all ships together:
cd ComfyUI/custom_nodes
git clone https://github.com/SwissCore92/comfyui-telegram-suite.git
cd comfyui-telegram-suite
pip install -r requirements.txt
or install "ComfyUI Telegram Suite" via ComfyUI Manager and restart. Then put your bot tokens and chat IDs in ComfyUI/user/default/telegram-suite/config.json and restart again. No model downloads; the pip deps are light (httpx, colorama, plus torchaudio). The one system-level requirement is ffmpeg.
Troubleshooting
ffmpeg audio conversion failed- ffmpeg isn't on PATH. Install it system-wide (or drop an ffmpeg binary on PATH) and restart. Test withffmpeg -version.- "Telegram bot token ... was not found" - the config file was auto-created with placeholders on first run; fill in real values and restart.
- Voice/Audio send works, File doesn't, or vice versa - different code paths. File mode skips ffmpeg entirely; the other two require it.
- Your bot token lives in plaintext in
config.json. Don't share that file.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| bot | TELEGRAM_BOT | Telegram bot instance | |
| chat_id | INT | Unique identifier for the target chat | |
| audio | AUDIO | the audio to send | |
| caption | STRING | Media caption, 0-1024 characters after entities parsing | |
| parse_mode | COMBO | Mode for parsing entities in the photo caption. See https://core.telegram.org/bots/api#formatting-options for more details. | |
| show_caption_above_media | BOOLEAN | false | Pass True, if the caption must be shown above the message media |
| disable_notification | BOOLEAN | true | Sends the message silently. Users will receive a notification with no sound. |
| protect_content | BOOLEAN | false | Protects the contents of the sent message from forwarding and saving |
| send_as | COMBO | How to send the audio | |
| file_name | STRING | audio | the file name for this media |
| message_thread_id | INT | -1-1β9223372036854776000 | Unique identifier for the target message thread of the forum topic (-1 = None) |
| triggeropt | * | Optional trigger to enforce execution order |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| message | DICT | β |
| message_id | INT | β |
| trigger | * | β |