Closed DSchndr closed 5 years ago
Have you tried an ogg audio file?
You are right Whalesong can not send audio files like voice recordings, I mean, it can not send PushToTalk messages. But, I've tested minibot with this message:
/download https://sample-videos.com/audio/mp3/crowd-cheering.mp3
And it works like a PushToTalk message. Examples are just examples, they don't try to be perfect, so it is possible you are using a url which responses with a composed content-type
(audio/ogg; codecs=opus
) header and whatsappweb fails. Could you post your url?
i think mine was also https://sample-videos.com/audio/mp3/crowd-cheering.mp3 wierd that it crashed in my case.
Does it still happen to you? I will need more info.
Any news here?
Minibot and my own bot still fail to send the file as ptt message. Trying to send an mp3 over waweb also fails in my case ("unsupported file"), so maybe there is something in waweb code that is being retarded?
Traceback (most recent call last):
File "examples/minibot.py", line 133, in make_download
message.id)))
whalesong.errors.UnknownError
Well, if WhatsApp Web fails there is nothing we can do. But is strange, it works in my case. Which OS do you use? And browser?
Firefox 64.0 (64-bit), Ubuntu 18.04 LTS
MP4 upload doesn't work in selenium window, but in normal window it works which is kinda wierd. In normal chrome window everything works, so i think maybe firefox version is a little bit too old and waweb code detects this or firefox interferes with it somehow?
Edit: Ok, i've tried chromium backend -> mp4 send fails because of "unsupported file type" Error is a little bit more informative this time ;) (whalesong.errors.UnknownError: InvalidMediaFileType: ExtendableError)
At least sending mp3 as ptt message works in chromium.
Finally, I've found the problem, at least in Firefox. Default Firefox profile template disabled all codecs. Now it should work for all codecs supported by ffmpeg.
On the other hand, I guess we can not solve problem with h.264 codec on Chronium: https://www.chromium.org/audio-video
I didn't find way to enable ffmpeg at runtime.
Could you test it?
Maybe, best option would be transcode files before to send them...
Thanks, with enabled codecs everything works on firefox!
Hey, running into the same issue with Safari on Desktop at the moment. I can send MP3 but not OGG. Is there anything I can do about it or is there a list of supported audio codecs?
Use ffmpeg to transcode the files into mp3 format or use firefox.
When you send any file with audio mime type sending fails. (Seems like the download function in the minibot example also cannot handle mp3 send.)
How about an send_audio function where the file gets sent like an voice recording?