Telegram API SendVoice method sends voice as file
telegram-bot
Solution
I finally made this work, with the help of Telegram support. This is an example with all the flags needed:
ffmpeg -i test.mp3 -ac 1 -map 0:a -codec:a opus -b:a 128k -vbr off -ar 24000 test.ogg
Tested on both Android and Telegram web.
Problem
I'm trying to send voice message thorough SendVoice method but it sends the voice as a simple ogg file ( not playable ). ``` https://api.telegram.org/bot<token>/sendVoice?chat_id=x&voice=http://majidamiri.com/up/5.ogg ``` In the Telegram API SendVoice it points that the file should be in .ogg opus format , so I converted a mp3 file to opus ogg by ffmpeg with this code : `<?php $myConvert = exec('ffmpeg.exe -i 1.mp3 -acodec libopus -b:a 64k -vbr off -compression_level 10 5.ogg'); ?>` And again like before it sends it as file. My ogg Link : https://majidamiri.com/up/5.ogg Can you help me with this issue ? Thank you all .