microphone

Recording Voice JAVAFX

自古美人都是妖i 提交于 2020-03-23 04:02:13
问题 I´m here again to request your great Help. I´m Trying to record voice from the microphone using a code from Internet. this is the configuration to the audio format: public class microfono { File wavFile = new File("C:\\NXB\\Kamui\\img\\audio.wav"); AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE; TargetDataLine line; AudioFormat getAudioFormat() { float sampleRate = 16000; int sampleSizeInBits = 8; int channels = 2; boolean signed = true; boolean bigEndian = true; AudioFormat format

Recording Voice JAVAFX

a 夏天 提交于 2020-03-23 04:00:38
问题 I´m here again to request your great Help. I´m Trying to record voice from the microphone using a code from Internet. this is the configuration to the audio format: public class microfono { File wavFile = new File("C:\\NXB\\Kamui\\img\\audio.wav"); AudioFileFormat.Type fileType = AudioFileFormat.Type.WAVE; TargetDataLine line; AudioFormat getAudioFormat() { float sampleRate = 16000; int sampleSizeInBits = 8; int channels = 2; boolean signed = true; boolean bigEndian = true; AudioFormat format

How do I allow Xcode to access the microphone?

痞子三分冷 提交于 2020-03-04 18:30:50
问题 I am running Xcode 10.2 on Mojave 10.14.6. I am rewriting the example code from the book "Learning Core Audio" into Swift. Two of these examples capture audio from the standard input device, one uses AudioQueueServices to write the captured data to a file while the other uses a ring buffer to pass it directly to the standard hardware output. Both are command line tools and both work as intended when I run them from the terminal. On the first launch I was asked to give terminal permission to

AttributeError: __enter__ while trying to take input from microphone

假装没事ソ 提交于 2020-02-25 06:40:43
问题 I had been trying to take input from microphone in my python program using speech_recognition I try to run this code: - import speech_recognition as sr import pyaudio r = sr.Recognizer() with sr.Microphone as source: audio = r.listen(source) text = r.recognize_google(audio) print(text) But it does not run. It says: - "C:\Users\Bravo Six\AppData\Local\Programs\Python\Python37-32\python.exe" "D:/BROTEEN/Works/Python/VALINI/speech testing.py" Traceback (most recent call last): File "D:/BROTEEN

AttributeError: __enter__ while trying to take input from microphone

一个人想着一个人 提交于 2020-02-25 06:38:27
问题 I had been trying to take input from microphone in my python program using speech_recognition I try to run this code: - import speech_recognition as sr import pyaudio r = sr.Recognizer() with sr.Microphone as source: audio = r.listen(source) text = r.recognize_google(audio) print(text) But it does not run. It says: - "C:\Users\Bravo Six\AppData\Local\Programs\Python\Python37-32\python.exe" "D:/BROTEEN/Works/Python/VALINI/speech testing.py" Traceback (most recent call last): File "D:/BROTEEN

Unity中使用Microphone录音保存以及回放

僤鯓⒐⒋嵵緔 提交于 2020-02-16 22:14:34
录音类 MicrophoneManager包含开始录音,停止录音,播放录音以及录音的保存等。 public partial class MicrophoneManager : MonoBehaviour { private static MicrophoneManager m_instance; private static string[] micArray = null; //录音设备列表 private AudioClip audioClip; private DateTime beginTime; public float sensitivity=100; public float loudness=0; const int HEADER_SIZE = 44; const int RECORD_TIME = 10; const int RECORD_RATE = 44100; //录音采样率 //void Awake() //{ // m_instance = this; //} public static MicrophoneManager GetInstance() { if (m_instance == null) { micArray = Microphone.devices; if (micArray.Length == 0) { Debug.LogError(

Simulate Microphone (virtual mic)

雨燕双飞 提交于 2020-02-01 16:07:29
问题 I've got a problem where I need to "simulate" microphone output. Data will be coming over the network, decoded into PCM and basically needs to be written into the mic - which then other programs can read/record/whatever. I've been reading up on alsa but information is pretty sparse. The file plugin seemes promising - I was thinking of having a named pipe as "infile" which I could then deliver data to from my application. I can't get it to work however (vlc/audacity just segfault). pcm.testing

Simulate Microphone (virtual mic)

梦想与她 提交于 2020-02-01 16:05:18
问题 I've got a problem where I need to "simulate" microphone output. Data will be coming over the network, decoded into PCM and basically needs to be written into the mic - which then other programs can read/record/whatever. I've been reading up on alsa but information is pretty sparse. The file plugin seemes promising - I was thinking of having a named pipe as "infile" which I could then deliver data to from my application. I can't get it to work however (vlc/audacity just segfault). pcm.testing

Android. How to record the microphone over audio stream?

别等时光非礼了梦想. 提交于 2020-01-25 22:01:09
问题 In my application playing music, the user should say at this time into the microphone. Can you please tell me how to make a record? Music and top path from the microphone. I looked through MediaRecorder, but there is not, in my opinion, an appropriate recording source. 回答1: For Recording Through Mic Start and stop recording through Mic.... Start Recording static MediaRecorder recorder = new MediaRecorder(); static String path, filename, time; static int duration; public void startRecording()

How to select audio input device (mic) in AVAudioEngine on macOS / swift?

空扰寡人 提交于 2020-01-25 08:03:45
问题 Is it possible to select the input device in AVAudioEngine using Swift on macOS? Use case: I am using SFSpeechRecognizer on macOS. To feed microphone data into it I am using private let audioEngine = AVAudioEngine() : let inputNode = audioEngine.inputNode let recordingFormat = inputNode.outputFormat(forBus: 0) inputNode.installTap( onBus: 0, bufferSize: 1024, format: recordingFormat ) { (buffer: AVAudioPCMBuffer, when: AVAudioTime) in self.recognitionRequest?.append( buffer ) } audioEngine