Open marcusmolchany opened 7 years ago
Hello! Don't you know if this issue is solved in some way?
Hey @alialeksandr, it looks like the sendVoice
command still only works with ogg opus. I think your best bet is to use node-ogg
to decode the ogg vorbis file and encode that as an ogg opus file.
Currently the call to aws polly returns an mp3 and is sent to telegram as an audio file
sendAudio
. Ideally we would use thesendVoice
command so that the audio file would appear as a voice message. Polly can only returnmp3
,ogg vorbis
orraw pcm
audio files. Telegram can only sendogg opus
files as voice messages.We need a way to convert the polly synthesized file into an
ogg opus
file.https://core.telegram.org/bots/api/#sendvoice http://docs.aws.amazon.com/AWSJavaScriptSDK/latest/AWS/Polly.html#synthesizeSpeech-property