audiorecord

Is it possibly to have sumultaneously two instances of AudioRecord with Echoprint in Android?

不问归期 提交于 2019-12-08 05:14:17
Hi all! Sorry in advance for my English. :) I am trying to make an audio recognition app with Echoprint code. One instance works fine, but we would like to listen simultaneously with several AudioRecords. For example, instead of analyzing 20 seconds of a song for recognition, we would like to have, for example, 3 audio recorders with 3 matches to improve the results. Ex. one listening from the 0s to 20s, another one listening from 0s to 10s and another one listening from 10s to 20s. That way we will have 3 matches-responses, which we expect will give us more accuracy or more possibilities of

Is it possibly to have sumultaneously two instances of AudioRecord with Echoprint in Android?

*爱你&永不变心* 提交于 2019-12-08 05:11:24
问题 Hi all! Sorry in advance for my English. :) I am trying to make an audio recognition app with Echoprint code. One instance works fine, but we would like to listen simultaneously with several AudioRecords. For example, instead of analyzing 20 seconds of a song for recognition, we would like to have, for example, 3 audio recorders with 3 matches to improve the results. Ex. one listening from the 0s to 20s, another one listening from 0s to 10s and another one listening from 10s to 20s. That way

Cannot access AudioRecorder

我是研究僧i 提交于 2019-12-07 04:45:18
问题 I am trying to take small recordings to find the Sound Pressure Level from a service but Android wont give me access to the hardware. I get the following errors in Logcat: The error comes from the following code: AudioRecord recordInstance = null; // We're important... android.os.Process .setThreadPriority(android.os.Process.THREAD_PRIORITY_URGENT_AUDIO); short bufferSize = 4096;// 2048; recordInstance = new AudioRecord(MediaRecorder.AudioSource.MIC, this //line 167 .getFrequency(), this

Processing of Microphone Input

China☆狼群 提交于 2019-12-05 02:42:47
问题 I am trying to get audio data from the microphone. I have achieved this by using the AudioRecord class which fills a buffer with type shorts. Eventually I would like to graph this buffer so that I get an oscilloscope like display (realtime information). The problem is that if I want to display a value (say in text) then I need a different thread to update the UI. Currently I'm doing this by using an AsyncTask and updating the UI with AsyncTasks.publishProgress() . So far I haven't been very

AudioRecord records intermittent sound in Android L Developer Preview

女生的网名这么多〃 提交于 2019-12-04 18:59:01
问题 I'm recording sound with AudioRecord in PCM16LE format, 8000Hz, 1channel. It records ok in Android versions 2.3.3-4.4.4, but records strange intermittent sound in Android L(5.0) Developer Preview (on nexus 5, nexus 7 and emulator). Here is the sample of recorded sound (the first half - recording, the second half - playback): https://www.dropbox.com/s/3wcgufua5pphwtt/android_l_sound_record_error.m4a?dl=0 I tried to play recorded sound using different sample rate (4000, 16000) and as 8bit but

Audio recorded from microphone is muted during the voice call

落花浮王杯 提交于 2019-12-04 16:55:21
I am trying to build application which records audio from the microphone for the later processing. Everything works fairly well, except the following problem: During the voice call (in and out) the recorded file gets no audio data, it contains just NULLs. I am using AudioRecorder and MediaRecorder, both have the same problem. The question is if this is normal API behavior or I am missing something? Here some additional info: Permissions: <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.RECORD_AUDIO" /> SDK:

AudioFlinger could not create record track, status: -1 , Need help to ifx

我的梦境 提交于 2019-12-04 16:18:43
问题 public class AudioRecorderActivity extends Activity { 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 AudioRecord recorder = null; private static final String TAG = "AudioRecorderActivity"; short[][] buffers = new short[256][160]; int ix = 0; private boolean stopped = false; private void startRecording() { android.os.Process

Android AudioRecord Initialization delay

放肆的年华 提交于 2019-12-04 11:48:45
Here is a sample of the relevant code im working on: AudioRecord recorder = setupAudio(); recorder.startRecording(); SetupAudio method: public AudioRecord setupAudio() { AudioRecord recorder; minBufferSizeInBytes = AudioRecord.getMinBufferSize( RECORDER_SAMPLERATE, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT); Log.e("MoverAudio","BufferSize: " + minBufferSizeInBytes); recorder = new AudioRecord(MediaRecorder.AudioSource.CAMCORDER, RECORDER_SAMPLERATE, AudioFormat.CHANNEL_IN_MONO, AudioFormat.ENCODING_PCM_16BIT, minBufferSizeInBytes); return recorder; } RECORDER_SAMPLERATE =

Android AudioRecord and MediaRecorder

巧了我就是萌 提交于 2019-12-04 06:14:05
I'm developing an audio processing application where I need to record audio, and then process it to obtain features of that recording. However, I want the audio in a playable format to play it after with MediaPlayer. I've seen that to record audio to process it it's better to use AudioRecord, because I can get the raw audio from there. But then I can't write the data to a file in a playable format (is there any library to do this in android?). I used this method to record raw data and then write it into a file: http://andrewbrobinson.com/2011/11/27/capturing-raw-audio-data-in-android/ But when

Immediate Audio Input & Output Android

与世无争的帅哥 提交于 2019-12-03 22:31:17
In my Android App, I would like to take in some audio from the mic of the smartphone and play it immediately, live, like a microphone, with no lag. I am currently thinking of using AudioRecord and AudioTrack classes (from what I have read), but I'm not quite sure how to proceed. I checked out some other questions on Stack Overflow but they don't exactly answer what I would like to do. And most are from 2012. So how can I use these classes to input and output audio simultaneously? ALSO: I had a look at the MediaRecorder API , but from what I read, that requires you to save the audio to a file,