microphone

How to record audio using audio api in Android?

你。 提交于 2019-11-29 10:10:52
问题 I have an LG Android Phone with Version 2.3.3. I need to connect a microphone in the headphone jack because I want to create an app that reads sound samples. How can I read samples programmatically?. 回答1: If you really want to read AudioSamples, I would suggest you to use AudioRecord instead of MediaRecorder since it gives you more control on AudioSamples... For that you can use following code, AudioCapturer is my wrapper class which I use for getting the samples from AudioRecord object.

How can i remove background noise with java, while recording audio in a crowd zone?

情到浓时终转凉″ 提交于 2019-11-29 09:36:55
问题 When i capture with JavaSound or Third party sound capture tools and record it to a file. Afterwards read the file back to modify it, is there any way to remove the "background noise" with my java application. Such as road traffic/air noises while main person was talking? Thanks 回答1: Removing background noise is very difficult. If it is uniform noise, such as the "white" noise on an airplane, there are algorithms to remove those frequency components. But if the noise is non-uniform and

Why is it impossible to use the Speech Recorder on the Android emulator?

巧了我就是萌 提交于 2019-11-29 05:57:41
I am trying to run the Speech Recorder that comes with the Android 2.2 emulator. The problem is that the moment I click the "Record" button: It aborts with an error message "The application Speech Recorder (process com.android.speechrecorder) has stopped unexpectedly. Please try again." The problem is that trying again doesn't help. Now, I searched StackOverflow and I combed the entire Internet and I found many reports of the same problem, without any working solution. My conclusion is that, for some strange reason, the Android emulator is capable of using the Windows audio device for output,

How to adjust microphone gain from C# (needs to work on XP & W7)

﹥>﹥吖頭↗ 提交于 2019-11-29 04:25:42
First, note that I know there are a few questions like this already posted; however they don't seem to address the problem adequately. I have a C# application, with all the pInvoke hooks to talk to the waveXXX API, and I'm able to do capture and play back of audio with that. I'm also able to adjust speaker (WaveOut) volume with that API. The problem is that for whatever reason, that API does not allow me to adjust microphone (WaveIn) volume. So, I managed to find some mixer code that I've also pulled in and access through pInvoke and that allows me to adjust microphone volume, but only on my

Record audio to NSData

狂风中的少年 提交于 2019-11-29 02:37:58
I have set up a TCP connection between two iPhones and I am able to send NSData packages between the two. I would like to talk into the microphone and get the recording as an NSData object and send this to the other iPhone. I have successfulyl used Audio Queue Services to record audio and play it but I have not managed to get the recording as NSData. I posted a question about converting the recording to NSData when using Audio Queue Services but it has not got me any further. Therefore I would like to hear if there is any other approach I can take to speak into the microphone of an iPhone and

Getting decibel from an Android microphone

雨燕双飞 提交于 2019-11-29 01:55:32
问题 I have been searching for quite some time now, and I haven't been able to find a way to actually get an SPL/db value from a microphone on Android. The few threads and articles that I have found that discussed it treated it like something so obvious that anyone should be able to do it, and were more concerned with getting their conversion algorithms correct. Does anyone know how to do this? 回答1: You would have to first disable any automatic level control. I assume you either know, or know

Microphone access in Python

烈酒焚心 提交于 2019-11-29 01:30:52
问题 Can I access a users microphone in Python? Sorry I forgot not everyone is a mind reader: Windows at minimum XP but Vista support would be VERY good. 回答1: Best way to go about it would be to use the ctypes library and use WinMM from that. mixerOpen will open a microphone device and you can read the data easily from there. Should be very straightforward. 回答2: I got the job done with pyaudio It comes with a binary installer for windows and there's even an example on how to record through the

Capture a Microphone Audio Stream Using .NET Framework

人盡茶涼 提交于 2019-11-28 23:23:13
I need to capture the input stream from a microphone in my application, which is written in VB.NET. I need to be able to stream this data to a file or over HTTP and possibly encode it using LAME MP3. Can anybody help me get started with this? Thank you! If you want a .NET solution, you can check out NAudio which is an open source audio library. Look at the WaveInStream class (or WaveIn in the latest code). This will let you open a microphone, and receive events containing the latest captured bytes. This would be quite easy then to pass on to a stream. As for encoding MP3 using LAME, one

Linux pipe audio file to microphone input

半腔热情 提交于 2019-11-28 22:00:47
I'm looking for a way to feed audio data from a file into the microphone so when 3rd party applications (such as arecord or Chromium's "search by voice" feature) use the microphone for audio input, they receive the audio data from the file instead. Here's my scenario : An application I wrote records audio data from the microphone (using ALSA) and saves it to a file (audioFile0.raw). At some unknown point in time in the future, some unknown 3rd party application (as in, something I did not develop so I have no development control over, such as the Chromium web browser's "search by voice"

How To Modify Android's Bluetooth Stack to Enable A2dp Sink

微笑、不失礼 提交于 2019-11-28 21:21:15
问题 I'm working on an audio recorder app that uses a bluetooth mic to record audio on to an Android device (Nexus 7 - rooted Android 4.4.2). It's currently implemented on HFP and everything is working fine. The bluetooth mic is implemented with Bluegiga's WT32 bluetooth module + a mic input, audio quality via HFP isn't great but it's sufficient for now. However, I'm now trying to change the bluetooth profile to A2dp, since there are two mic inputs (L/R) and WT32 supports A2dp (source). After much