Live data from Hacker News

Audio Modem Communication Library in Python

github.com

31–40 of 41 posts

Re: Audio Modem Communication Library in Python

#31

Earlier quoted context omitted.

I don't have first hand experience but I believe a big problem with sound channels is multipath propagation/challenging frequency response. FSK naturally deals quite well with those; it's similar to OFDM but more robust due to single carried symbols. You can extend the symbol period as long as you like while using an adequate number. Finally in challenging environments it'd a good idea to use error correction, not ju…

I have experimented with FSK modulation myself and was able to achieve quite reliable transmission across the room [1]. Although the bandwidth is quite low (8-16 B/s), it works most of the time. [1] https://ggerganov.github.io/jekyll/update/2018/05/31/data-ov...

Neat library!

Your post mentions not finding any reliable modem libraries. I'm curious what issues you had with mine, if you tried it?

https://quiet.github.io/quiet-js

Re: Audio Modem Communication Library in Python

#32

Earlier quoted context omitted.

Was this inspired by any of the dialup modem protocols?

Indeed, I am using OFDM [1], which uses several carriers, each modulated via QAM [2]. [1] https://en.wikipedia.org/wiki/Orthogonal_frequency-division_... [2] https://en.wikipedia.org/wiki/Quadrature_amplitude_modulatio...

I'm a bit confused. How does QAM work with audio if you have only one channel rather than I/Q? Are you using multiple frequencies for that?

Re: Audio Modem Communication Library in Python

#33
post #11

Btw, is there already a handshake and data protocol for the AI calls via voice to a business phone which happens to be received by another AI? So instead of voice call they try to negotiate using data packets and save some time and clarity.

This doesn't seem very useful. If you already have some agreement between between companies over how AIs communicate, you can create a registry for them and skip the handshake. Use http or something.

Re: Audio Modem Communication Library in Python

#34

Author here, thanks for posting this :) Would be happy to answer any question.

Do you have ideas or plans on how to increase the transmit speed?

The original goal was transmitting ~10kB in a few seconds over an audio cable, so I didn't try to improve the transmission speed much further. I guess that adding error correction coding will allow increasing the highest possible bit-rate (currently I'm using only CRC-32 for error detection).

Re: Audio Modem Communication Library in Python

#35

Earlier quoted context omitted.

Indeed, I am using OFDM [1], which uses several carriers, each modulated via QAM [2]. [1] https://en.wikipedia.org/wiki/Orthogonal_frequency-division_... [2] https://en.wikipedia.org/wiki/Quadrature_amplitude_modulatio...

I'm a bit confused. How does QAM work with audio if you have only one channel rather than I/Q? Are you using multiple frequencies for that?

QAM is using both carrier's amplitude and phase to encode information, so I/Q can be thought as [1]:

  I = amplitude*cos(phase)
  Q = amplitude*sin(phase)
[1] http://whiteboard.ping.se/SDR/IQ

Re: Audio Modem Communication Library in Python

#37

Earlier quoted context omitted.

I'm a bit confused. How does QAM work with audio if you have only one channel rather than I/Q? Are you using multiple frequencies for that?

QAM is using both carrier's amplitude and phase to encode information, so I/Q can be thought as [1]: I = amplitude*cos(phase) Q = amplitude*sin(phase) [1] http://whiteboard.ping.se/SDR/IQ

I'm just sitting here and staring at this sentence: "The modulated signal rides on a carrier of a given frequency, but the base band signal got no fixed frequency at all. Because of this, we have the possibility to encode the two-dimensional I/Q signal onto the one-dimensional RF signal without losing anything." I may need to sleep on it...

Re: Audio Modem Communication Library in Python

#38

Author here, thanks for posting this :) Would be happy to answer any question.

How reliably does this work over FM transmission or VoIP? (If it doesn't I would guess and say that you'd have to add some mechanism to detect reliable frequency bands like in existing modems)

Re: Audio Modem Communication Library in Python

#39

Earlier quoted context omitted.

I have experimented with FSK modulation myself and was able to achieve quite reliable transmission across the room [1]. Although the bandwidth is quite low (8-16 B/s), it works most of the time. [1] https://ggerganov.github.io/jekyll/update/2018/05/31/data-ov...

Neat library! Your post mentions not finding any reliable modem libraries. I'm curious what issues you had with mine, if you tried it? https://quiet.github.io/quiet-js

Hi, I did try it and it was working quite good when the devices (phone and laptop) were within ~30 cm. After increasing the distance and putting on the TV in the background it wasn't working that well any longer. I tried only the default protocol with audible frequencies (the ultrasound option didn't work, but my phone does not support the ultrasound option with my application too. guess it's hardware limitation).

I am willing to sacrifice bandwidth to achieve better reliability of the communication and I believe I was able to achieve it. Although, I haven't done tests with many other devices/conditions than my own, so my result might be biased.

Re: Audio Modem Communication Library in Python

#40
post #38

Author here, thanks for posting this :) Would be happy to answer any question.

How reliably does this work over FM transmission or VoIP? (If it doesn't I would guess and say that you'd have to add some mechanism to detect reliable frequency bands like in existing modems)

Unfortunately, VoIP doesn't allow reliable OFDM communication... It's preferable to transmit and receive the audio as-is (without any compression).
Post reply on HN