wav

Converting a 32 bit wave form to a 16 bit wave form

心已入冬 提交于 2019-12-04 17:08:00
I've been capturing audio using the loopback capture mode. The captured waveform is a 32 bit waveform. I'm struggling with converting this to a 16 bit waveform so encoders like lame can deal with it (it says Unsupported data format: 0x0003). I've tried shifting the bits (not my strong point) in the wave stream itself from 32 bit to 16 bit but the result still sounds distorted. The Wave32To16Stream class seems to blow up on this case: if (sourceStream.WaveFormat.Encoding != WaveFormatEncoding.IeeeFloat) throw new ApplicationException("Only 32 bit Floating point supported"); Ideally I would want

Reading a single channel from a multi-channel wav file

本秂侑毒 提交于 2019-12-04 16:09:21
问题 I need to extract the samples of a single channel from a wav file that will contain up to 12 (11.1 format) channels. I know that within a normal stereo file samples are interleaved, first left, and then right, like so, [1st L] [1st R] [2nd L] [2nd R]... So, to read the left channel I'd do this, for (var i = 0; i < myByteArray.Length; i += (bitDepth / 8) * 2) { // Get bytes and convert to actual samples. } And to get the right channel I'd simply do for (var i = (bitDepth / 8)... . But, what

How to remove noise from wav file? [duplicate]

牧云@^-^@ 提交于 2019-12-04 15:17:25
This question already has an answer here: Suppressing noise in wav files 1 answer I am actually mixing two wav files using the simple equation (a+b)/2 where a and b are the samples from the two wav files.This is fine and I am able to listen the audio from both files at the same time. But the problem is there is a lot of hssss noise (similar like the radio) playing in the background,how can I get rid of this white noise/noise. karthick You can create a low pass filter to remove the noise. How to implement low pass filter using java Please look into this link too http://www.dsprelated.com

Android Record raw bytes into WAVE file for Http Streaming

左心房为你撑大大i 提交于 2019-12-04 14:16:41
问题 So I am using AudioRecord from Android to record raw bytes and for writing them into a .wav file. Since Android has no support for this I had to write the .wav file headers manually with the following code: randomAccessWriter.writeBytes("RIFF"); randomAccessWriter.writeInt(0); // Final file size not known yet, write 0 randomAccessWriter.writeBytes("WAVE"); randomAccessWriter.writeBytes("fmt "); randomAccessWriter.writeInt(Integer.reverseBytes(16)); // Sub-chunk size, 16 for PCM

Converting mp3 data to wav data C#

非 Y 不嫁゛ 提交于 2019-12-04 13:08:15
问题 In my project I am receiving mp3 data in a byte array. I want to convert that data to wav format and store it in another byte array. I searched internet for mp3 to wav converters but all of them support file to file conversion. None of them seems to take raw data as inputs. Is there any way I can achieve this in C# ? Here is the protoype of the function I am trying to create. bool ConvertToWav(byte[] buffer){ //Do some processing and store the wav data in buffer2 Buffer.BlockCopy(buffer2,0

Send audio over skype call

ⅰ亾dé卋堺 提交于 2019-12-04 12:59:41
I'm trying to send an audio file (or directly audio over current input device for skype) when I click a button on a windows form. I found some links but all references appear to be broken and I'm going mad on how to work with it. I already manage to connect to skype api and use it (I already use it for other projects and it's working well), but I really can't send any audio over input audio stream. Any suggestion will be appreciated. Current code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using

Merge WAV audio and WebM video

拟墨画扇 提交于 2019-12-04 12:30:52
There's a way to merge an audio (wav) and a video (webm) in a nodejs server? Since WebM is a container format, I hope that is possible add audio track to an existing WebM file. I'm right? Anyone know a NodeJS package for doing this? Found a solution, but is not really simple to do. For do this is required ffmpeg (or similar). To install it I done this steps: (only for mac) install HomeBrew . run the installation of ffmpeg with all the dependences that is required: sudo brew install ffmpeg --with-libvpx --with-theora --whit-libogg --with-libvorbis now we can merge a audio and a video file with

How to divide a wav file into 1 second pieces with Java?

旧街凉风 提交于 2019-12-04 11:11:18
I had a question previously: Reading wav file in Java Firstly, I want to read a wav file with Java and get its bytes to process into an array. Secondly, I will remove the silences of it(this is another question's topic). After that I will divide that wav file into 1 second pieces(I should handle header problem for that small wav files, this is one of the major problems) I tried to read wav file with Java with that API, the answer of my previous question. However with that API should I do anything for header or API does it itself and how can I divide that wav file into 1 second pieces with Java

How can I convert between midi to wav/mp3 in c#?

我与影子孤独终老i 提交于 2019-12-04 11:00:59
问题 I started a small project which includes working with MIDI files. I've been wondering, is there any C# or VB.Net code that peforms that cast between MIDI and WAV files? 回答1: You could try to somehow interface with Timidity, which is Open Source: TiMidity++ is a software synthesizer. It can play MIDI files by converting them into PCM waveform data; give it a MIDI data along with digital instrument data files, then it synthesizes them in real-time, and plays. It can not only play sounds, but

Noise reduction and compression in streaming audio

荒凉一梦 提交于 2019-12-04 09:47:39
hope you can help. I am recording audio from a microphone and streaming it live across a network. The quality of the samples is 11025hz, 8 bit, mono. Although there is a small delay (1 second), it works great. What I need help with is I am trying to now implement noise reduction and compression, to make the audio quieter and use less bandwidth. The audio samples are stored in a C# array of bytes[], which I am sending/receiving using Socket. Could anyone suggest how, in C#, to implement compression and noise reduction? I do not mind using a third party library as long as it is free (LGPL