Basic Frequency Shift Keying using Web Audio API on its own, or with Portaudio. This is a way to map characters to frequencies, which can be audible or not (these are audible), which can then be used to transmit short sentences between devices.
Audio is one way of out of band token-passing instead of QR codes or pin numbers, or for example for connecting devices to a network. The second of these is the application we're currently thinking of, for our Radiodan work.
Many thanks to Richard Sewell for hints and the loan of Sklar which I've not read yet :-)
Thanks to Richard and Danbri for doing a bunch of thinking about this stuff in 2010 where they were looking at Digital Voices.
- clone the repo
cd beep
- run a server, e.g.
python -m SimpleHTTPServer
- open beep and listen page in separate windows; allow it access to microphone
- type something in the box in beep.html to transmit it to listen.html
or
On a Pi,
Install portaudio bits:
sudo apt-get install portaudio19-dev
Install wiring pi for fun
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
compile:
gcc listen.c -o listen -lportaudio -lwiringPi -lm
then:
./beep Hello
to play a the text.
- Subaudible python implementation (This is what got me interested recently)
- A web audio api version of something similar with a nice explanation
- We wanted something noisy. Most similar perhaps is Chirp
- This article on portaudio is the best I've found for a beginner like me
- Though these articles were very useful The Sounds of Raspberry and Raspberry Sounds Continued
- I used THis example from portaudio as the basis for the C code.
A few interesting vaguely related things: