Go Back   Android Forums > Android Development > Application Development
Application Development Dev lounge for our application developers.

New Forums: Nexus Player | Nexus 9
test: Reply
 
LinkBack Thread Tools
Old April 27th, 2012, 06:01 AM   #1 (permalink)
New Member
Thread Author (OP)
 
Join Date: Apr 2012
Posts: 2
 
Device(s):
Carrier: Not Provided

Thanks: 0
Thanked 0 Times in 0 Posts
Default Record a call using AudioRecord and process audiou

I am trying to implement an application that records voice during a call ( my voice not the caller's ) and do some audio processing to that signal.

For doing this I use AudioRecord class as following:

Code:
private static final int RECORDER_SAMPLERATE = 8000;

private static final int RECORDER_CHANNELS = AudioFormat.CHANNEL_IN_MONO;

private static final int RECORDER_AUDIO_ENCODING = AudioFormat.ENCODING_PCM_16BIT;

private static final int AUDIO_SOURCE = AudioSource.VOICE_UPLINK;

int N = AudioRecord.getMinBufferSize(RECORDER_SAMPLERATE, RECORDER_CHANNELS, RECORDER_AUDIO_ENCODING);

recorder = new AudioRecord(AUDIO_SOURCE, RECORDER_SAMPLERATE, RECORDER_CHANNELS, RECORDER_AUDIO_ENCODING, N*10);
Then I use the recorder.read() method to read the recording to a buffer process them and write them to a file.

When I try to hear the file with audacity the sound seems corrupted. Moreover I can hear also the caller's voice.

I would like to note that my code works when the audio source is the MIC (not during a call).

Is it something about the sample rate or some settings of the audio Recorder?

Any other ideas how to implement this?

Giorgos

Advertisements
gosom is offline  
Reply With Quote
sponsored links
Reply
Tags
android, audio recorder, audiorecord, voice recorder


Go Back   Android Forums > Android Development > Application Development
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 03:03 PM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.