audio-recording

AVAudioSession / Audio Session Services switching output

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 12:59:44
Okay, I have my AVAudioSession defined with the following (yes, mix of the c and obj-c calls) Also note that the app has background mode audio, because if recording it must continue to do so while the app is in the background: [(AVAudioSession *)[AVAudioSession sharedInstance] setDelegate: self]; // Allow the app sound to continue to play when the screen is locked. [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryPlayAndRecord error:nil]; //Turn off automatic gain on the microphone [[AVAudioSession sharedInstance] setMode:AVAudioSessionModeMeasurement error:nil]; //Turn on

How to record audio from bluetooth headset (startBluetoothSco() )

荒凉一梦 提交于 2019-12-03 09:50:01
问题 I am trying to record audio from bluetooth headset, startBluetoothSco() works different in different versions of android, Recording audio from bluetooth headset on android 4.2, 4.4, and 5.0. using " Nokia BH-310 and 9xxPlantronics " bluetooth headsets. SAMPLE_RATE = 8000; Devices running Android 4.2 records audio from bluetooth device only when when AudioRecord() object is created like this AudioSource.DEFAULT mRecorder = new AudioRecord(MediaRecorder.AudioSource.DEFAULT, SAMPLE_RATE,

AudioRecord with Gain Adjustment not working on Samsung Device

我的未来我决定 提交于 2019-12-03 08:22:40
I have written code for recording audio file using AudioRecord and while writing file on SD card i am making two version. Version 1 Recorded file is saved on SD Card as it is. Version 2 I am applying Gain feature on recorded file and saving on SD card. This works awesome on Sony Ericson mobiles.Also audio volume is boost to great extent. But i am struggling to make it work on Samsung Devices. when i play recorded file it sound like Talking Tom :P Initially i thought Samusung device did not like the combinations i have used to create AudioRecorder . So i used following approach in which i loop

Recording a wav file from the mic in Android - problems

拜拜、爱过 提交于 2019-12-03 07:56:36
问题 I need to be able to create a WAV file using the mic in Android. Currently, I'm having a lot of trouble. So far, this is my situation. I'm using parts of the micDroid project code to record thus: //read thread int sampleRate = 44100; int bufferSize = AudioRecord.getMinBufferSize(sampleRate,android.media.AudioFormat.CHANNEL_CONFIGURATION_MONO,android.media.AudioFormat.ENCODING_PCM_16BIT); AudioRecord ar = new AudioRecord(AudioSource.MIC,sampleRate,android.media.AudioFormat.CHANNEL

how can the noise be removed from a recorded sound,using fft in MATLAB?

老子叫甜甜 提交于 2019-12-03 06:06:52
问题 I want to remove noises from a recorded sound and make the fft of it finding fundamental frequencies of that sound, but I don't know how to remove those noises. I'm recording the sound of falling objects from different heights. I want to find the relation between the height and the maximum frequency of the recorded sound. [y,fs]=wavread('100cmfreefall.wav'); ch1=y(:,1); time=(1/44100)*length(ch1); t=linspace(0,time,length(ch1)); L=length(ch1); NFFT = 2^nextpow2(L); % Next power of 2 from

Android: Audio Recording with voice level visualization

∥☆過路亽.° 提交于 2019-12-03 05:09:59
问题 I need to create a android application which is for recording voice while showing the voice(sound) level visualization. I already created an audio recording application but I can not add sound level visualization. How can I do it? please someone help me a giving suggestion or a sample tutorials link or code. 回答1: Create a xml activity_recording.xml like this. <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width=

Recording with NAudio using C#

天大地大妈咪最大 提交于 2019-12-03 04:47:17
I am trying to record audio in C# using NAudio. After looking at the NAudio Chat Demo, I used some code from there to record. Here is the code: using System; using NAudio.Wave; public class FOO { static WaveIn s_WaveIn; static void Main(string[] args) { init(); while (true) /* Yeah, this is bad, but just for testing.... */ System.Threading.Thread.Sleep(3000); } public static void init() { s_WaveIn = new WaveIn(); s_WaveIn.WaveFormat = new WaveFormat(44100, 2); s_WaveIn.BufferMilliseconds = 1000; s_WaveIn.DataAvailable += new EventHandler<WaveInEventArgs>(SendCaptureSamples); s_WaveIn

Record Audio Using the Users Microphone with HTML5

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-03 04:38:41
问题 I am very close to having a little project of mine done, however, I have run into a slight problem I cannot seem to figure out on my own. What I ultimately want to do is record a user's voice from the users microphone, and then upload the recording to my server when they are done. I am using the code from this project: https://github.com/cwilso/AudioRecorder It works great, but I am needing to add a feature that it does not include out of the box. I need to be able to upload the file to my

Can I use AVCaptureSession to encode an AAC stream to memory?

我怕爱的太早我们不能终老 提交于 2019-12-03 03:59:10
问题 I'm writing an iOS app that streams video and audio over the network. I am using AVCaptureSession to grab raw video frames using AVCaptureVideoDataOutput and encode them in software using x264. This works great. I wanted to do the same for audio, only that I don't need that much control on the audio side so I wanted to use the built in hardware encoder to produce an AAC stream. This meant using Audio Converter from the Audio Toolbox layer. In order to do so I put in a handler for

Android record audio while doing speech recognition

萝らか妹 提交于 2019-12-03 03:44:23
I am doing speech recognition using a third party cloud service on Android, and it works well with Android API SpeechRecognizer. Code below: Intent recognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH); recognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_WEB_SEARCH); // accept partial results if they come recognizerIntent.putExtra(RecognizerIntent.EXTRA_PARTIAL_RESULTS, true); //need to have a calling package for it to work if (!recognizerIntent.hasExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE)) { recognizerIntent.putExtra