Click here to Skip to main content
15,887,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello member >
i ask you why i can convert audio wave from microphone to digital data and compared it of audio wave in my database or fro file in my pc and send command to printer port when the audio waves are equals.

please give me the cod or project in c# do that .
Posted
Comments
TRK3 16-Nov-11 18:30pm    
What do you mean by equal??

If you mean they are exactly the same, then this code will do the job 99.999999% of the time:

bool IsEqual(audiofile1, audiofile2) { return false; }

It is practically impossible for one recording to be exactly the same as another.

What exactly are you trying to accomplish? Are you matching songs in a database? Or are you authenticating users by voice pattern? Or... ???

The answer to "equal" is different depending on your application. And no matter what your application is, the answer is going to be a fairly complicated algorithm that is probably the subject of lots of accademic papers. Don't expect to find C# source code to do it.

1 solution

mohammed alshaweesh wrote:
Give me the code or a project
Are you kidding? Audio wave from microphone — of course, but comparison of audio…

How can you be so naive? This is probably beyond the contemporary level of computing. Even is some successful research exist (which I can believe), you hardly can find something freely accessible and really working. How can you imagine the criteria for such comparison? The same audio fragment which can be easily identified by human beings as related or similar can come at different tempo, noises, timbre, etc. For example, the same musical piece can be perform using different instruments and voices. A qualified human being can recognize the similarity, but a program? Do you require such things? Comparison criteria can be very complex, and you did not mention any.

Even though such a complex thing as speech recognition almost becoming successful, the problem of comparison is very different. One problem is the social one: speech recognition is a subject of extensive research, but "abstract" comparison of audio — hardly. What would be the purpose to spend a lot of resources in this direction? Audio Internet search? Everyone understands we are to far from solving such problems, so such research hardly could be commercialized in observable future. So even some research exist, you can hardly expect much financing in this field.

The last thing I tries were the system of recognition of musical tones from the digital audio source. Such programs attempt to create MIDI our of raw audio. Even though this problem is one of the easiest in the field of audio recognition (after all, instruments tuners are usual and are very effective and precise), the accuracy of recognition was quite poor, pretty far from being useful. I someone tells me this problem is finally solved with good quality, I would easily believe, but not too much beyond this problem. Even this relatively easy problem requires very good qualification from developers.

—SA
 
Share this answer
 
Comments
TRK3 16-Nov-11 19:22pm    
I wouldn't say "beyond the contemporary level of computing". Have you see the iPhone app "Shazam"? It identifies songs on the radio by sampling them from the iPhone microphone.

It works well the few times I tried it -- so at least the problem of matching poor quality recordings against the original recording for current popular hits is not beyond the contemporary level of computing.

I don't know how it's done, but I suspect the audio is uploaded to a server farm, where some gross level approximation of the song (tempo, energy at frequency bands over time, etc.) is used as a sort of fingerprint of the recording that is compared against a database optimised for such a comparison.

And they give that app away for free and make their money by getting a small percentage on the songs you buy via the links they provide to buy them -- they are still in business so it least must be viable.

But I am sure they aren't giving away their algorithm to anybody who asks for it.
Sergey Alexandrovich Kryukov 17-Nov-11 1:16am    
This is spectral analysis and image recognition, very sophisticated. Well, I might have exaggerated, but this is still on the cutting edge which is far from practical feasibility for anyone who just want to start doing anything in this field.
--SA
TRK3 17-Nov-11 13:16pm    
Yeah. You're right. It's way beyond what OP could reasonably attempt, but it sound like a very interesting problem to me if I just had the time to devote to it.

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900