Convert Data to sound and back

前端 未结 6 2317
旧巷少年郎
旧巷少年郎 2021-02-15 19:50

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 rad

相关标签:
6条回答
  • 2021-02-15 20:04

    To give what I think is a better response to all of the above, have a look at packet radio and the various bits that correspond to it AX.25 is a good example and there are a number of implementations for it. POCSAG is also another good implementation. Both have libraries available for many different languages and have been around for quite a long time.

    Other example include things like WEFAX (weather fax), HFFax, SSTV (slow scan tv), etc.

    You can think of them all as being similar to the old school phone line modem type encoders and decoders that run around the 300-2400baud

    0 讨论(0)
  • 2021-02-15 20:09

    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.

    0 讨论(0)
  • 2021-02-15 20:09

    Does the audio file need to be convertible using lossy compressors (MP3 etc.)? If not, you can just add a WAV container around any binary data and you'll be fine. Otherwise it gets more difficult, and you need to ensure that the audio is audible (in a reasonable frequency range when played) and be tolerant enough on the frequency detection to match the output of lossy codecs.

    0 讨论(0)
  • 2021-02-15 20:17

    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#

    0 讨论(0)
  • 2021-02-15 20:18

    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.

    0 讨论(0)
  • 2021-02-15 20:22

    Best way is to convert the audio file into binary and store in a file type you specify.

    Try out the AudioInputStream Class in Java

    0 讨论(0)
提交回复
热议问题