Add Telegram sendVoice

The idea is:

There currently exists the ability to receive a voice message in n8n, but can only respond with sendAudio method, which sends the clip like a ‘music file’ rather than a voice reply. In particular, with how telegram handles media files, it will try and play and replay all received messages in a queue, every time (like adding files to a media player, and hitting restart). It would be nice to have the sendVoice method available to give n8n the ability to respond as a voice in a conversation, rather than the response sent as an attached media file.

My use case:

I use telegram as the interface, with with whisper handling inbound voice transcription, which is sent on to be acted upon by my workflow. When it is complete, the text response is converted to speech via openedai-speech and sent back via telegram message, currently using sendAudio. I would like to use sendVoice instead, so it presents in telegram as two users sending voice clips back and forth.

I think it would be beneficial to add this because:

Allows for audio responses to be sent as a voice message instead of like a media file attached to the chat.

Any resources to support this?

The method appears very similar to the existing sendAudio method, main difference being the required parameter ‘audio’ vs ‘voice’.
https://core.telegram.org/bots/api#sendvoice

Are you willing to work on this?

I don’t know that I could, directly.

Not my PR, but looks like someone’s giving this an attempt: