Click here to Skip to main content
14,219,244 members
Rate this:
Please Sign up or sign in to vote.
See more:

Anyone has any idea how I can convert an audio file into binary code? Are there any programs I can use?

Thank you,
Sergey Alexandrovich Kryukov 27-Sep-12 13:50pm
What do you mean, exactly?

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

The question makes no sense. Everything is "binary", including your original audio file.


After OP's (incomplete) clarification:

I can only guess that you need to represent the waveform and do some image recognition, but it all depends on what you have and what you want — please see my comments below.

First, you can convert your audio file in the format more suitable for direct representation of the waveform. I would advise to convert it to the .WAV format. You can use many different applications, but first of all, I would advise to use multiplarform ffmpeg:[^],[^].[^] (also applicable to Windows, but you can also just run ffmpeg.exe on Windows to get help).

For reading the file into a waveform in memory, you can use many different libraries depending on the language you use and the platform.

If, at first, you just want to see the waveform on screen, you can also use many programs. The one which is open source and available on many platforms is Audacity (audio editor):[^],[^].

In principle, you would be able to recognize Morse code "manualy" (should I say "visually") using just the audio editor. If the message is short enough for such work.

fjdiewornncalwe 27-Sep-12 14:02pm
+5. Just what I was thinking
Sergey Alexandrovich Kryukov 27-Sep-12 14:38pm
Thank you, Marcus.
After OP's clarifications, I finally gave some references...
Sergey Alexandrovich Kryukov 27-Sep-12 14:04pm
[OP commented:]

I understand that everything is binary, but how can see the binary code on an audio file.

This is what I am trying to do;

I got an audio file which I believed is got a message, so I will like to translate onto binary to latter converted into morse code.

Do you get what I'm trying to do?

Thank you, Sergey
Sergey Alexandrovich Kryukov 27-Sep-12 14:10pm
First of all, please don't post comments or questions as "solution" -- they will be removed, no one gets notifications, and you can be down-voted or reported for improper use (sometimes, even spamming :-). You can add comment to existing posts (in this case -- to my answer) or use "Improve question".

Even though you maintain that you understand this "binary", you don't explain what you mean by it in the case of your desired output data. You don't explain what do you want to do with it, programmatically or not.

It looks like you want to see something called "waveform" and somehow recognize it. The first part depends on the input format. Again, programmatically, or not?
Sergey Alexandrovich Kryukov 27-Sep-12 14:21pm
So, from what you already told me, I can tell you what to use. Please see the updated answer, after [EDIT].
Feel free to ask your follow-up question, especially if you need something different. Main thing is: programmatical or not (and in what part), if so -- platform/language.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100