4 ms·
Ask HN: Get sound from mic, process it and output it to iPhone
I am trying to make a program that encrypts audio in real time. Program takes audio input from my earphones which are plugged in via audio jack/bluetooth, processes the audio real time, and then outputs the result onto my iphone via cable/bluetooth, which then could be used as an input onto other apps within my iphone. I see that theres a library called SOX that might help, and some apps made by RogueAmoeba, but as far as I can see they don't really help. Is Apple Developer Documentation my last resort? Any help is welcome
- Nextgrid 6y agoI am not familiar with analog audio encryption and am not sure if it's even possible to achieve strong security with that. What you can do though is essentially create a modem that would encode digital data into an audio stream, and through that send encrypted audio packets. If we assume perfect audio quality, a software implementation of a 56k modem would give you roughly 50kbps to play with, over which you can send the encrypted audio from a low-bandwidth audio codec like those used by VoIP. I am not aware of any out-of-the-box solutions for this, so you'll have to build most of it manually. To be honest, getting the audio in and out is the easy part; doing the encryption and modulation/demodulation is the hard part.
- quotz 6y agoThanks for the answer Andre. We actually have the same name, and I too lived in London haha. Could you explain what do you mean by Modem? Modulation/demodulation? I know analog encryption doesn't exist, except scrambling. I am trying to achieve this for VoIP. There are so many apps that encrypt their calls, there must be some easy way of doing this.
- Nextgrid 6y agoVoIP encrypts calls at the digital level after the audio has been converted to packets (which are then transmitted over a digital network). The initial description of you are trying to achieve would require somehow encrypting the audio at an analog level so it can be transmitted through a simple audio jack.
- quotz 6y agoRight, lets say we use USB3.0/ Lightning port or bluetooth, which are all digital. Audio input goes into my mac program from a bluetooth/USB mic, then gets processed there, and then sends the digital data stream as an audio output to the iphone via USB/bluetooth. The iphone reads that as a digital audio stream input and its apps can use it accordingly. The audio stream would of course be incoherent, but say someone on the other end of the apps can decrypt it.