Convert Data to sound and back

15,113

Solution 1

I think the medium is important, as are other factors such as the size of the files and the transmission time available. A simple algorithm would be to convert your files to text (UUENCODE should do that trick) then convert to morse code : http://www.codeproject.com/KB/vb/morsecode.aspx

Morse gives you a simple alphabet able to survive transmission over a fairly noisy radio channel.

If your carrier is cleaner a conversion of your UUEncoded file into a series of frequencies one per character would probably also work, and be easy enough to decode at the other end, Frequency Analyzer in C#

Solution 2

You could try to use the magnetic card technology for your files, I'm also trying to do this on android. Any data can be converted to byte into a string of characters it very possible with java and android. then use the Encoding mechanism of Magnetic Cards API to encode the string to sound. Then you can just use the vice versa, convert the sound into string convert string into byte and save the data. It's just it takes time to convert both ways but it is feasible, I'm trying to do this so that any one with unlimited voice connection can transfer files or in the future browse the internet just through calling the other number. I hope I gave you some idea.

Solution 3

The problem is that the data in a word document doesn't necessarily make decent sound. If you pick a 1.8kHz carrier and use the binary contents of the word document to modulate the volume or the frequency (AM or FM) the result will be messy and hardly to decode.

But if you save the document as a bitmap, you can use the pixel values to modulate the volume of the carrier wave.

We've been sending pictures (not just black/white but greyscale and color (three different separations of the image, r, g and b) over phonelines using this method for many years before modems and the internet took off.

The fun part is that you can broadcast data this way. The sound can be received by more than one receiver at the same time. There's no error correction, but as you deal with visual data, you don't have to worry about a few pixels getting lost. It's similar to old fax protocols.

Share:
15,113
Shawn Mclean
Author by

Shawn Mclean

:)

Updated on June 24, 2022

Comments

  • Shawn Mclean
    Shawn Mclean almost 2 years

    Are there libraries out there that can convert data (text files, etc) to sound and back to the original data?

    The sound can be transmitted any medium I wish, whether radio, etc. I just need to store data in sound files.

    Scenario:

    step1: Convert a .docx file with embedded images to .wav.

    step2: Send over a radio wave.

    step3: Convert this .wav back to the .docx file with the embedded images.

    This concept can be applied to any data.

    Technology:

    .net or java

  • Ignacio Vazquez-Abrams
    Ignacio Vazquez-Abrams over 13 years
    Not if you're transmitting it over radio.
  • Shawn Mclean
    Shawn Mclean over 13 years
    Well, if he can tell me how to convert the binary back into audio file, he's half way there :)
  • Andiih
    Andiih over 13 years
    I think lossy is implied from the mention of radio in the question, but its not clear. I guess there is a step missing between 1 & 2!