windkh / node-red-contrib-telegrambot

Telegram bot nodes for node-red.
Other
262 stars 116 forks source link

sendVoice sends as file #12

Closed psyntium closed 7 years ago

psyntium commented 7 years ago

When sending buffered OGG to telegram, it sends as file, instead of voice.

msg.payload.type = "voice"; msg.payload.content = bufferredOgg;

bufferredOgg obtained from Watson Text to Speech. When the file sent by telegram is downloaded, the audio play normally on VLC.

windkh commented 7 years ago

Sorry for delay. What do you suggest? Downloading the file and converting it via watson text to speech to a bufferedOgg?

dvv commented 7 years ago

@psyntium https://core.telegram.org/bots/api#sending-files "Sending by URL"

"To use sendVoice, the file must have the type audio/ogg and be no more than 1MB in size. 1–20MB voice notes will be sent as files."

Not your case?

windkh commented 7 years ago

@dvv I asume that he wanted to point out an error when sending voice files, but I don't know how to reproduce this.

dvv commented 7 years ago

Mmm. I just see that "1–20MB voice notes will be sent as files" and ask whether it is his case.

psyntium commented 7 years ago

hi.. sorry for the late reply as well.. The voice file is short.. 3-5 seconds max. So I dont think it will be more than 1MB (which I may be mistaken). Previously it was working fine. So I'm not sure what changed. I will try it again and let u know the result.

psyntium commented 7 years ago

Ok it seems to be working now. I'll close this then. Maybe it was telegram issue, or the TTS formatting that went wrong. anyway, thanks for all your support! appreciate it