Click here to Skip to main content
15,879,348 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
i have asp.net mvc app which check given song (recorded sample of song) and gives the name of it.

I need to make sound recorder which will record song via browser, and to send it to my app and my app to return the name of the song.

Any ideas ?
Posted

Google for "javascript sound recorder". Keep in mind that browsers typically run code in a sandbox environment and access to the client machine hardware, including the microphone (if there is one), is heavily restricted. By default, your code will not have access to it. There is nothing you can do in your code to enable it without use intervention.
 
Share this answer
 
First question is completely unclear. "Gives then name" could be anything, but it may sounds like you wanted to recognize the music piece by the audio record and identify it in some hypothetical database. If so, you need to understand that it would be extremely advanced and complicated technology, which is, in certain sense, does not even exist, at least not available to the general public.

The problem of sound recorder is a problem of standardization, because the browser gives you no access to sound recording hardware, as Solution 1 explains to you. I don't want to discuss any OS-specific possibilities like ActiveX, which is also extremely unsafe. You should not try to implement any input except the input fully standardized and implemented in the browser according W3 standards. The standards for media capture are presently only emerging. Please see:
http://www.w3.org/TR/html-media-capture[^],
http://www.w3.org/TR/webaudio[^].

At the same time, there is no a serious need in this feature. Think logically: if the user's system is equipped with everything which is needed for audio recording, nothing prevents such user from doing this recording locally, saving the record on some file and then submit the file to the server. This is the only practical solution, so I suggest you do it this way.

It's also possible (please, no offense, this is just my assumption; and I would be glad if it turns out to be wrong) that you don't really understand what server and client parts do in the Web technologies. You mentioned ASP.NET, which uses .NET which could be used to perform Windows audio recording. If this is the way you think, think at this: do you hope to implement it on the server side or client side? .NET works on the server side, so what audio it may record: the buzzing of cooling systems? :-)
Anyway, for your consolation, I can suggest you a better sound recorder anyone could use on Windows to record audio which could be latter submitted via a Web page, as I suggested above: Practical Sound Recorder with Sound Activation[^]. :-)

In contrast to the problem you formulated, there is something which will really need audio capture: interactive audio input, such as we could use, for example, in audio chats, similar to Skype, but Web-based. There are many other applications. From your formulation of your problem, I cannot see that you really need it.

—SA
 
Share this answer
 
v2
Comments
Wendelius 8-Sep-15 0:26am    
Nice answer!
Sergey Alexandrovich Kryukov 8-Sep-15 0:37am    
Thank you, Mika.
—SA

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