Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Microphone To Pick Up A Specific Tone

Hello I was wondering if using the android tone generator class would it be possible to create a tone in one device and listen for this same tone in another device. If this is possible I do have a few other questions.

Taking backround noise into consideration is it possible to listen for only this specific tone?

Would this process be resource intensive?

Could I use a tone that would be inaudable to the human ear or close to it?

Lastly could I use a tone that could only be heard with a couple of feet from the sending device?

Thanks very much for yer time guys and girls :)

Edit > Thanks For adding the audio processing tag sabastian. Much better discription.

like image 275
Keith Avatar asked Jan 30 '11 13:01

Keith


2 Answers

It would be CPU intensive, yes. The way to it is quite simple: you need a permanent recorder which puts the received data into a FFT (fast fourier transform). FFT basically does one thing: splits the audio into a frequency/power-scale. With this "background noise cleaned" result you can check things like "was there a tone with 1000Hz playing for at least 2 seconds" - and act accordingly. There is a reasonable speed FFT implementation here: http://www.badlogicgames.com/wordpress/?p=449 FFT can also be used (actually, IS used) for detection of dualtone dialing (DTMF) - 2 frequencies at same time is much better than just using one (as the error rate drop significantly and you can go to shorter duration for the tone sending/detecting).

"Inaudible" won't be possible, as (a) the speaker can not produce such sounds (b) you are limited in sampling rate - so also limited in both producing and recording such high frequencies.

"couple of feet" will be naturally imposed (not very loud speaker, not very good microphone).

like image 67
Oliver Avatar answered Oct 21 '22 06:10

Oliver


Have a look at this other question: "Android: Need to record mic input". I think you can modify that for your task, then with sound bytes you can have filtering or FFT.

Hope it helps

like image 2
Filippo Mazza Avatar answered Oct 21 '22 08:10

Filippo Mazza