microphone

iphone - How can i read the microphone input?

跟風遠走 提交于 2019-12-06 07:05:40
问题 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? 回答1: 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. 回答2: Check this link: http://code

How to send audio stream via UDP in java?

两盒软妹~` 提交于 2019-12-06 06:54:26
问题 I have a problem, i have set MediaLocator to microphone input, and then created Player. I need to grab that sound from the microphone, encode it to some lower quality stream, and send it as a datagram packet via UDP. Here's the code, i found most of it online and adapted it to my app: public class AudioSender extends Thread { private MediaLocator ml = new MediaLocator("javasound://44100"); private DatagramSocket socket; private boolean transmitting; private Player player; TargetDataLine mic;

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

怎甘沉沦 提交于 2019-12-06 05:31:42
问题 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

Saving Microphone Stream to mp3 or wave

痴心易碎 提交于 2019-12-06 03:23:25
问题 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. 回答1: 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

Jack Sensing in C#

老子叫甜甜 提交于 2019-12-06 01:23:20
问题 I am writing an application that will record audio from microphone. My problem is I need to know when the user plug in the jack and remove the jack out. I looked into Win32_SoundDevice WMI class and seems to me there is no such a property that I can check the status of the Jack. Then I found RegisterEndpointNotificationCallback in IMMDeviceEnumerator which seems to do what I need but I have no clue how to do this in C#. Does anyone know how to use MMDeviceEnumerator methods to check for audio

AVAudioSession : microphone headphone as input and iphone speaker as output

末鹿安然 提交于 2019-12-05 17:52:43
With iOS10 there are more possibilities to manage AUdioSession, but i couldn't manage to keep the headphone microphone as input while audio is going out through the iphone speaker. The 'overrideOutputAudioPort' method below also override the input audio port as the iphone microphone let session = AVAudioSession.sharedInstance() do { try session.setCategory(AVAudioSessionCategoryPlayAndRecord) try! session.overrideOutputAudioPort(.speaker) } catch { } Is there any solution to keep the headphone as input? How I undeerstand this Apple documentation , this is not possible using AVAudioSession : If

Simulate microphone Input

和自甴很熟 提交于 2019-12-05 17:25:04
I am trying to write a little program that reads a wav file and sends the output as if it would come from my microphone. Unfortunately I do not have much experience with the sound API. Background: What I am basically trying to realize is a program that plays a sound while I am in a voicechat (i.e Teamspeak, Ventrilo). To get that to work now I would have to switch the recording device to "What you hear", play the sound and then switch back to microphone. The program should simulate input from the microphone. So far I could not get any further than just playing the sound. I guess I just need a

Flash - prompt user to remember camera and mic settings

感情迁移 提交于 2019-12-05 13:06:02
I request my user from mic and camera setting on my website with Flash, but the remember checkbox does not show, so every time my user logs in he's requested once again for permissions, how can I make the checkbox show to avoid this? Call Security.showSettings(SecurityPanel.PRIVACY) before trying to access the camera. Camera Class LiveDocs var _mic:Microphone; _mic = Microphone.getMicrophone(<index>); if(_mic.muted){ Security.showSettings(SecurityPanel.PRIVACY); } You can use "muted" property of the microphone instance. You do not need to listen the StatusEvent.STATUS . With the code block

Detect blow in Mic and do something

痞子三分冷 提交于 2019-12-05 09:10:49
i found this tutorial , and it's good , but doesn't work for me ! here is the code : - (void)listenForBlow:(NSTimer *)timer { [recorder updateMeters]; const double ALPHA = 0.05; double peakPowerForChannel = pow(10, (0.05 * [recorder peakPowerForChannel:0])); lowPassResults = ALPHA * peakPowerForChannel + (1.0 - ALPHA) * lowPassResults; if (lowPassResults > 0.95) NSLog(@"Mic blow detected"); //change the background color e.g ! } in the console show me the nslog reseult like this (without any bowling !): 2010-04-11 23:32:27.935 MicBlow[2358:207] Mic blow detected 2010-04-11 23:32:27.965 MicBlow

Python read microphone

喜夏-厌秋 提交于 2019-12-05 07:57:18
I am trying to make python grab data from my microphone, as I want to make a random generator which will use noise from it. So basically I don't want to record the sounds, but rather read it in as a datafile, but realtime. I know that Labview can do this, but I dislike that framework and am trying to get better at python. Any help/tips? luc You may be interested by PyAudio . I think you can get some bytes from the stream. Here is an interesting example u can refer speech_recognition module or PyAudio module for recording speech.I used PyAudio module with Microsoft cognitive service.It worked