سؤال

I am building a web page where i need to do something when a particular sound is caught by the microphone. I searched a lot and found this link :

Write a Program Which Recognizes a Sound and Performs Action

I am stuck at two things:

  1. how to use java based sound recognizers though a webpage or javascript
  2. how to match two sounds (one from the mic. and other from saved file) using any recognizer

For sound recognizer, I am using Sphinx-4 .

هل كانت مفيدة؟

المحلول

To use java sound recognizers, you will need to: either submit/stream the content recorded in the browser, or use a local processing (applet/javafx).

An applet/javafx might not be a bad idea at all; since recording might yield a large data blob, you can do the processing in the local machine. My bet is that the applet will need to be signed to access the mic. You could also stream the audio data to the server, websockets might be a cool shot.

For Javascript, i think you need to use HTML5 for microphone recording or Flash.


For audio comparison, i think you want audio fingerprinting. That is a summary of the audio file. You need to search your own database for the "best match" from what you got among what you have.

I'm not sure Sphinx is the man here. Both Musicg and MusicUri have audio fingerprinting.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top