audio-processing

Extracting audio data every t seconds

我的未来我决定 提交于 2019-12-08 13:04:34
问题 I am trying to extract amplitude information from a sound loaded from a URL using the Web Audio API instantaneously (not in real time), which will likely require the OfflineAudioContext . I am expecting to obtain something along the lines of an array containing the amplitude of the sound every t seconds for the duration of the sound (with size depending on the duration of the sound, divided by t ). Unfortunately, documentation is sparse at this point, and I'm unsure of how to proceed. How can

need to understad how AudioRecord and AudioTrack work for raw PCM capture and playback

被刻印的时光 ゝ 提交于 2019-12-08 11:56:41
问题 I use the following code in a Thread to capture raw audio samples from the microphone and play it back through the speaker. public void run(){ short[] lin = new short[SIZE_OF_RECORD_ARRAY]; int num = 0; // am = (AudioManager) this.getSystemService(Context.AUDIO_SERVICE); // -> MOVED THESE TO init() // am.setMode(AudioManager.MODE_IN_COMMUNICATION); record.startRecording(); track.play(); while (passThroughMode) { // while (!isInterrupted()) { num = record.read(lin, 0, SIZE_OF_RECORD_ARRAY);

How to apply filters to previously recorded sound and save modified version using AudioKit?

心已入冬 提交于 2019-12-08 04:26:20
问题 There is a previously recorded sound file containing user's voice. What I need to do is apply some sound filter to change the voice and after that be able to save and play modified version. AudioKit can open file using [[AKFileInput alloc] initWithFilename:file1]; and save with [[AKManager sharedManager] renderToFile:outputFile forDuration:duration]; Any ideas how to apply some effects between these 2 commands? 回答1: In addition to opening the file with AKFileInput, you have to play it back,

Adding silent frame to wav file using python

倖福魔咒の 提交于 2019-12-07 08:12:43
问题 First time posting here, lets see how this goes. I trying to write a script in python which would add a second of silence in the beginning of the wav file, but so far been unsuccessfully in doing so. What I was trying to do is read in the wav header and then adding a \0 to the beginning using the wave module but that did not work quite well. Here is the code which is based from here http://andrewslotnick.com/posts/audio-delay-with-python.html import wave from audioop import add def input_wave

Audio Noise removal in java [closed]

╄→гoц情女王★ 提交于 2019-12-06 16:45:56
Closed . This question needs to be more focused . It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post . Closed 2 years ago . Need an algorithm (or a set of good ones to compare for various input data) that will reduce the noise level of a voice audio signal without distorting the signal appreciably using Java. Input is an audio signal that includes a voice along with some background noises. The noise varies over the course of the recording. There definitely exists ways to remove noise like this,

Modify volume gain on audio sample buffer

六眼飞鱼酱① 提交于 2019-12-06 01:11:09
问题 I want to increase a volume on buffer with voice data. The point is I'm using DirectSound and I have one primary and one secondary buffer - all streams mixing is done by hand. In a voice chat all participants can have independent volume levels. I multiply each stream data by a value (gain) and sum it to one buffer. Everything works fine but when I try to multiply data by a value greater than 1.0f - I hear some clipping or what. I've tried using Audacity effect compressor but this doesn't help

Get Video and Audio buffer separately while recording video using front camera

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-04 23:03:12
问题 I dug a lot on SO and some nice blog post But seems I am having unique requirement of reading Video and Audio buffer separately for further processing on it while recording going on. My use case is like When the user starts the Video recording, I need to continuously process the Video frame using ML-Face-Detection-Kit and also continuously process the Audio frame to make sure user is speaking out something and detect the noise level as well. For this, I think I need both Video and Audio in a

Implementing a post-processed low-pass filter using core audio

可紊 提交于 2019-12-04 16:56:37
I have implemented a rudimentary low-pass filter using a time based value. This is ok, but trying to find the correct time slice is guess work, and gives different results based on different input audio files. Here is what I have now: - (void)processDataWithInBuffer:(const int16_t *)buffer outBuffer:(int16_t *)outBuffer sampleCount:(int)len { BOOL positive; for(int i = 0; i < len; i++) { positive = (buffer[i] >= 0); currentFilteredValueOfSampleAmplitude = LOWPASSFILTERTIMESLICE * (float)abs(buffer[i]) + (1.0 - LOWPASSFILTERTIMESLICE) * previousFilteredValueOfSampleAmplitude;

Modify volume gain on audio sample buffer

二次信任 提交于 2019-12-04 07:27:26
I want to increase a volume on buffer with voice data. The point is I'm using DirectSound and I have one primary and one secondary buffer - all streams mixing is done by hand. In a voice chat all participants can have independent volume levels. I multiply each stream data by a value (gain) and sum it to one buffer. Everything works fine but when I try to multiply data by a value greater than 1.0f - I hear some clipping or what. I've tried using Audacity effect compressor but this doesn't help reducing the strange noise. Probably I should modify gain in some other way? Or just use another post

Python NumPy - FFT and Inverse FFT?

跟風遠走 提交于 2019-12-04 06:19:04
So I've been working with FFT, and I'm currently trying to get a sound waveform from a file with FFT, (modify it eventually), but then output that modified waveform back to a file. I've gotten the FFT of the soundwave and then used an inverse FFT function on it, but the output file doesn't sound right at all. I haven't done any filtering on the waveform - I'm just testing out getting the frequency data and then putting it back into a file - it should sound the same, but it sounds wildly different. Any ideas? -- EDIT -- I have since been working on this project a bit, but haven't yet gotten