On Tue, Mar 13, 2012 at 01:06:55AM -0700, Aledis wrote:
> I need to record frequencies about 17kHz. I'm using MediaRecorder like
> this:
You do realize, I hope, that most humans, by the time they're 18 or so,
have lost all hearing about around 16 kHz, right?
> recorder = new MediaRecorder();
> recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
> recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
> recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AMR_WB);
You didn't mention your sampling frequency.... Remember Nyquist? To
reproduce any digital signal, you MUST sample at twice the frequency of
the highest frequency you want to reproduce. In this case, you'd have to
sample at a minimum of 34,000 samples/second. HOWEVER.....
> When I analyze the recorded sound, 17kHz frequencies aren't there, its
> like the phone has a low pass filter that eliminates these
> frequencies.
Yes, the *PHONE* certainly does...but where? The question is, does the
non-phone portion of the Android device have access to the raw audio, or
has the low-pass filter already been applied? Check to see if you can
record frequencies above 5 kHz (DS0[1] is 300--3400 Hz, but since there
are no "brick-wall" filters, it usually extends to about 4000 Hz, and
then we allow a bit extra to make sure). If you can access up to 5000 Hz
or higher, you're getting audio before the low-pass filter. Just
remember to take Nyquist's Theorem into account, and when converting
your PCM to a digital signal, use enough bits/sample to get a decent
quality.
Later,
--jim
[1] DS0 is toll-quality voice in the US PSTN. 300--3400 (by definition,
again, it usually goes a bit beyond that), sampled at
8000 samples/second, encoded at 8 bits/sample, for 64 kb/s. *IF* I
remember correctly, the European network uses the same (or close to
it---it's been about 20 years (and two brain-mangling chemos) since I
last touched voice telephony, and then it was all highly-compressed
(ADPCM at 32 kb/s---and testing with 24 kb/s for international
circuits---using N.E.T. IDNX voice cards over a private network...not
telco standard stuff...that goes back about 4 years more).
--
THE SCORE: ME: 2 CANCER: 0
73 DE N5IAL (/4) | "This 'telephone' has too many
[email protected] | shortcomings to be seriously considered
< Running FreeBSD 7.0 > | as a means of communication. The device
ICBM / Hurricane: | is inherently of no value to us."
30.44406N 86.59909W | (Western Union internal memo, 1876)
Android Apps Listing at http://www.jstrack.org/barcodes.html
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en