microphone

WebRTC Play Audio Input as Microphone

≡放荡痞女 提交于 2019-12-03 15:50:16
I want to play my audio file as microphone input (without sending my live voice but my audio file) to the WebRTC connected user. Can anybody tell me how could it be done? I have done some following tries in the JS code, like: 1. base64 Audio <script> var base64string = "T2dnUwACAAAAAAA.."; var snd = new Audio("data:audio/wav;base64," + base64string); snd.play(); var Sound = (function () { var df = document.createDocumentFragment(); return function Sound(src) { var snd = new Audio(src); df.appendChild(snd); snd.addEventListener('ended', function () {df.removeChild(snd);}); snd.play(); return

Non-Speech Noise or Sound Recognition Software?

南楼画角 提交于 2019-12-03 15:11:47
I'm working on some software for children, and looking to add the ability for the software to respond to a number of non-speech sounds. For instance, clapping, barking, whistling, fart noises, etc. I've used CMU Sphinx and the Windows Speech API in the past, however, as far as I can tell neither of these have any support for non-speech noises, and in fact I believe actively filter them out. In general I'm looking for "How do I get this functionality" but I suspect it may help if I break it down into three questions that are my guesses for what to search for next: Is there a way to use one of

Python Speech Recognition: 'module' object has no attribute 'microphone'

只谈情不闲聊 提交于 2019-12-03 14:57:31
Running the following code on a macbook air 64 bit, testing the code on python 2.7 and python 3.4 import speech_recognition as sr r = sr.Recognizer() with sr.microphone() as source: audio = r.listen(source) try: print("You said " + r.recognize(audio)) except LookupError: print("Could not understand audio") When i try python 2.7, I keep getting the error of : Traceback (most recent call last): File "star.py", line 3, in <module> with sr.microphone() as source: AttributeError: 'module' object has no attribute 'microphone' (star.py is the name of the file I am testing it on) When I try python 3.4

How to capture sound from microphone with java sound API?

怎甘沉沦 提交于 2019-12-03 14:45:33
The tutorial http://download.oracle.com/javase/tutorial/sound/capturing.html does not cover how to select microphone. I am enumerating mixers with the following code System.out.println("Searching for microphones"); for(Mixer.Info mixerinfo : AudioSystem.getMixerInfo()) { mixer = AudioSystem.getMixer(mixerinfo); //System.out.println(mixerinfo.toString()); if( mixer.isLineSupported(Port.Info.MICROPHONE) ) { mixers.add(mixer); System.out.println(Integer.toString(mixers.size()) + ": " + mixerinfo.toString()); } } i.e. by presense of microphone input. But next, having a mixer, I can't get line to

Outputting audio stream into microphone

谁都会走 提交于 2019-12-03 14:45:29
Hey everyone. Is there a way of outputting audio from my program and redirecting that stream to the system's microphone input 'layer'? I understand this might require some low-level calls being 'Pinvoked', but are there any articles that might help me. For example, if I was to run the output audio stream of my application into Window's Sound Recorder program, it would think that the audio is coming from a microphone and thus record that. I don't want to record a stream, just output it to the device's micrphone input. Thanks for any ideas. Consider looking into Pure Data (PC) or Max MSP (Mac)

How to detect blow in android device microphone

痞子三分冷 提交于 2019-12-03 14:19:44
How can I detect when the user blows into the device microphone? This would then be used to trigger some action by the app. The job of detecting when a user blows into the microphone is separable into two parts: (1) taking input from the microphone and (2) listening for a blowing sound. The noise/sound of someone blowing into the mic is made up of low-frequency sounds. We’ll use a low pass filter to reduce the high frequency sounds coming in on the mic; when the level of the filtered signal spikes we’ll know someone’s blowing into the mic. Source: http://mobileorchard.com/tutorial-detecting

How to release the microphone resource when another Android app needs it?

▼魔方 西西 提交于 2019-12-03 11:53:05
I have implemented an Android background service (based in Pocket Sphinx) that continuously listens, detects and spots certain keywords when the phone's screen is on, and then reacts accordingly (for a domotic project). However, my app should always have a lower priority and I want it to release the microphone's resources when any other app needs to use it. Is there any system intent or system broadcast that I can receive when an app -wants- to use the microphone (so that my service can release it)? Or, is there a better approach or better practice? This is the log with the errors I want to

Adjust Microphone Recording Volume

眉间皱痕 提交于 2019-12-03 08:49:11
问题 We are trying to adjust the volume level at which we record. It seems like the microphone is very sensitive and picks up a lot of static. We looked at setVolumeControlStream, but could not find a stream to pass into it to control the microphone. 回答1: Set your audio source as 'MIC' using MediaRecorder.AudioSource class and adjust volume by calling onVolumeSetRequest method. 来源: https://stackoverflow.com/questions/5994683/adjust-microphone-recording-volume

iOS xcode microphone volume detection?

浪子不回头ぞ 提交于 2019-12-03 08:41:36
What frameworks are required to detect how loud someone is talking into a microphone... Also, can anyone tell me what to search for in the documentation or google so I can create some code... What line of code would be commonly used when detecting volume levels of noise through the microphone? Thanks! Erik B This seems to be a duplicate of: Realtime microphone sound level monitoring However, that question is old and the accepted answer links to a deprecated library . They now recommend that you instead use AVAudioRecorder . They suggest this tutorial and it seems to be what you are looking for

Android, How to use microphone in order to calculate sound frequencies?

久未见 提交于 2019-12-03 07:55:02
问题 I'm working on Audio tuner application in order to tune musical instruments. User should play a note, then in my application I should show which frequency it has. The first, I should access to microphone? AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, sampleRate, AudioFormat.CHANNEL_IN_STEREO, AudioFormat.ENCODING_PCM_16BIT, bufferSize); Then I need to calculate frequency of sound. How can I do this? 回答1: I'm also trying to do this. I haven't managed it myself yet, as I