microphone

iphone - How can i read the microphone input?

强颜欢笑 提交于 2019-12-04 11:47:06
How can i read the sound data from the microphone? I don't want to record and then access the data, i want to be able to access the sound input live? You can record sound (PCM samples) from the microphone to very short memory buffers (as short as a few milliseconds in duration). That's as close to "live" as there is using iOS API's. Look at the aurioTouch example for low latency AudioUnit RemoteIO recording code, with live FFT analysis and display. Check this link: http://code.google.com/p/ios-coreaudio-example/ Captures from Microphone & plays through speaker. 来源: https://stackoverflow.com

Disable speech to text button (Micro phone) on soft input keyboard in android programmatically

早过忘川 提交于 2019-12-04 09:45:01
Thanks in advance for the help. I am developing an android application for research purposes and need to disable the speech to text button on the soft input keyboard. The reason for this is due to concurrency issues that arise since the application I am developing uses the microphone. I understand that for a general application disabling keys is generally seen as impossible (since users may change default keyboards). I know for a fact that the default keyboard will be used. With this in mind is it possible to disable certain keys? I believe that at the least I should be able to specify the

Saving Microphone Stream to mp3 or wave

北慕城南 提交于 2019-12-04 07:40:37
I recording sound from Microphone in Windows Phone device. Using Xna.Framework.Audio.Microphone I store the sound in MemoryStream . I can save it to PCM format. However It will be much better to convert it to mp3 file. If converting to mp3 is impossible then maybe somebody at least knows how to convert it to wav. Thanks for your answers. Here is a brief example I created showing how to save wp7 recorded audio as a wav stream: http://damianblog.com/2011/02/07/storing-wp7-recorded-audio-as-wav-format-streams/ Here's a great thread which answers this question: http://social.msdn.microsoft.com

Java Record Mic to Byte Array and Play sound

心已入冬 提交于 2019-12-04 07:39:11
问题 I want to make a live voice chatting program in Java, but I know nothing about recording/playing sound in Java, so with the help of Google, I think I have been able to record from my mic to a byte array with the following: AudioFormat format = new AudioFormat(8000.0f, 16, 1, true, true); TargetDataLine microphone; try{ microphone = AudioSystem.getTargetDataLine(format); DataLine.Info info = new DataLine.Info(TargetDataLine.class, format); microphone = (TargetDataLine)AudioSystem.getLine(info)

How to get the fundamental frequency from FFT?

若如初见. 提交于 2019-12-04 04:59:24
问题 I am developing a flash guitar, and the only apparent method to discover the frequency of the mic's data looks to be using FFT. Nevertheless, after something like 30 hours of research I could not discover the best way to do that. Should I use Harmonic Product Spectrum (HPS), Cepstrum or Maximum Likelihood? The tuner will have to show frequencys from 25 to 3000Hz. Also, if someone knows about some open source code ready to find the fundamental frequency, please tell me. I can translate it to

How to check for microphone access at time of launch?

江枫思渺然 提交于 2019-12-04 04:25:26
In my app, I will be using a microphone to do some recording. From iOS7.0 onwards, the user is asked to check the permission to access the microphone before starting the audio. I have a button 'Start Recording' in my app. Here it first checks the user's permission for recording. Here's the code to do this: if([[AVAudioSession sharedInstance] respondsToSelector:@selector(requestRecordPermission:)]) { [[AVAudioSession sharedInstance] performSelector:@selector(requestRecordPermission:) withObject:permissionBlock]; } #ifndef __IPHONE_7_0 typedef void (^PermissionBlock)(BOOL granted); #endif

Microphone level in Java

余生颓废 提交于 2019-12-04 03:33:12
问题 I'm trying to access the level of the mic through Java. I don't need to record anything, I just want to know a relative scale of sound level. Is this possible in real-time? If it's impossible, maybe this could work: Start recording when the level is over a certain value, stop when the level drops under a certain level for a certain time Recording bits of a quarter second and reading it's volume, and if it's under the threshold stop recording. Thanks in advance 回答1: You can access microphones

Use microphone in multiple app simultaneously in Android

旧时模样 提交于 2019-12-04 00:22:55
We have an Android device on which we would like to use the microphone in 2 app simultaneously. In fact, we have a vocal command service that is running in the background (we are using the CMU Sphinx library). The problem is when we start a video recorder (camera application), we can't start the recording as 2 applications can't access to the microphone at the same time. Error 08-20 12:20:14.601: I/MediaRecorderJNI(7261): prepare: surface=0x59590668 08-20 12:20:15.916: E/MediaRecorder(7261): start failed: -38 08-20 12:20:15.916: E/com.example.CamcorderView(7261): Failed to start recorder. 08

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,

HTML Audio recording until silence?

走远了吗. 提交于 2019-12-03 16:40:38
问题 I'm looking for a browser-based way of recording until a silence occurs. HTML audio recording from the microphone is possible in Firefox and Chrome - using Recordmp3js see: http://nusofthq.com/blog/recording-mp3-using-only-html5-and-javascript-recordmp3-js/ and the code on github: http://github.com/nusofthq/Recordmp3js I can't see a way to change that code to record until silence. Record until silence can be done (and tuned) using Java for a native Android App - see here: Android audio