-
-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE REQUEST] Send audio #17
Comments
Thank you for your request. Sending audio using go-whatsapp in itself seems easy to do. There are, however, other obstacles to overcome:
The second is the audio itself. From my experience with davidgf's whatsapp-purple I know the original WhatsApp is (and that is okay) quite picky about the audio format. That is a problem as it represents a Pandoran box of end-user error: People do not even know what a codec or a container is these days. They cannot tell MOV from MPEG4 as they seem similar enough. They see no difference in a raw AAC, MP3 or WAV stream. I do not really want to cope with myriads of invalid bug reports. I would need to make this a very hidden feature for experts at which point I ask myself whether it is a good idea to include it altogether.
Both options seem viable, but adding an additional dependency would make maintaining the code and compiling on other platforms more tedious. I myself do not really make use of audio messages. As a result, there is no real personal gain for what looks like a decent amount of work. As with any feature, I gladly accept pull requests. Apart from that, an implementation done by me is a very vague "maybe some day". Sorry. |
Thank you Herman for so complete answer! I will try your ideas!
El mar., 2 jul. 2019 a las 2:42, Hermann Höhne (<[email protected]>)
escribió:
… Thank you for your request. Sending audio using go-whatsapp in itself
seems easy to do. There are, however, other obstacles to overcome:
The first is about getting the audio into purple. Purple is designed for
text-messengers, sending media is only a gimmick. I see these possibilities:
1. Pidgin drag-and-drop audio file into a conversation window.
I like this most. It feels convenient.
2. Have Pidgin ask for a file.
Seems quite clean. I have no idea hot to do this, though. It's
probably the purple request API which I am not aquainted with. Yet.
3. Intercept file links to audio files.
This feels ugly, but it is probably most compatible with i.e. Spectrum
or bitlbee applications.
The second is the audio itself. From my experience with davidgf's
whatsapp-purple I know the original WhatsApp is (and that is okay) quite
picky about the audio format. That is a problem as it represents a *pandorean
box of end-user error*: People do not even know what a codec or a
container is these days. They cannot tell MOV from MPEG4 as they seem
similar enough. They see no difference in a raw AAC, MP3 or WAV stream. I
do not really want to cope with myriads of invalid bug reports. I would
need to make this a very hidden feature for experts at which point I ask
myself whether it is a good idea to include it altogether.
I could mitigate this problem by depending on a media library (libav
probably) to
- check the audio format and optionally re-encode as necessary.
- record directly from a microphone and create the compressed audio
file in the plug-in.
Both options seem viable, but adding an additional dependency would make
maintaining the code and compiling on other platforms more tedious.
I myself do not really make use of audio messages. As a result, there is
no real personal gain for what looks like a decent amount of work. As with
any feature, I gladly accept pull requests. Apart from that, an
implementation done by me is a very vague "maybe". Sorry.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17?email_source=notifications&email_token=AK2LPBH6JIGX37J5IVYAKXTP5LTEPA5CNFSM4H4UDRJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZAD5EA#issuecomment-507526800>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK2LPBBBNDZI5WYEZUDBX7DP5LTEPANCNFSM4H4UDRJQ>
.
|
After I gave some love to the guy from #5, I decided I should give some to you, too. There now is a new branch. I also uploaded a binary for your convenience. You can now send an audio file by entering
(Finish your recording by pressing |
Thank you Hermann! Thank you very much!!
El jue., 4 jul. 2019 a las 18:30, Hermann Höhne (<[email protected]>)
escribió:
… After I gave some love to the guy from #5
<#5>, I decided I
should give some to you, too. There now is a new branch
<https://github.com/hoehermann/purple-gowhatsapp/tree/media>. I also
uploaded a binary
<https://ssl.hehoe.de/temp/libgowhatsapp-media_x86_64.so> for your
convenience. You can now send an audio file by entering /sendmedia audio
instead of a message. The plug-in will then read
~/.purple/gowhatsapp/outgoing (hardcoded path) and send it as an audio
message. It needs to be in a very specific format. I had success with
ffmpeg:
ffmpeg -f pulse -i default -ac 1 -ar 48000 -ab 17k -f opus -y ~/.purple/gowhatsapp/outgoing
(Finish your recording by pressing q.) It is very wonky and reports a
timeout. It looks like the messages are still sent, though. I cannot really
test it since I do not have a second phone at hand. Expect this to be wonky
and unreliable. It may not work, get you banned and/or eat your dog.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#17?email_source=notifications&email_token=AK2LPBDAKJ4LJJP6LXOMZODP5ZTV3A5CNFSM4H4UDRJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZIE6IA#issuecomment-508579616>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AK2LPBH4HDWSR2DM53AQ653P5ZTV3ANCNFSM4H4UDRJQ>
.
|
Hello, how are you? Thank you very much for your work. I would like to send audio, it would be possible? Thanks in advance
Regards
The text was updated successfully, but these errors were encountered: