wav

From IEEE32 float to 32bit integer numpy array (example : audio .wav files)

微笑、不失礼 提交于 2019-12-08 10:19:49
问题 I read some data which is stored as IEEE32 float in the interval [-1, +1] with A = numpy.fromstring(data, dtype = numpy.float32) But then I don't want to keep the array as float32 , but rather, as 32-bit integers (in [-2^31, +2^31-1] ). I tried by doing simply : A = numpy.fromstring(data, dtype = numpy.int32) # that's wrong! but it provides a bad result. (wrong probably by a multiplicative constant, or another reason?) How to read an array of IEEE32 float in [-1,1] into a 32bits-integer array

What is the difference between these 2 wav files?

旧城冷巷雨未停 提交于 2019-12-08 06:41:02
问题 I am trying to use a program called arss to create a spectrogram from a wav file. I have 2 wav files, one works and the other does not (it was converted to wav from mp3). The error that arss throws at me is This WAVE file is not currently supported . Which is fine, but I have no idea what parts of my wav file to change so that it will be supported. The docs don't help here (as far as I can tell) When I run mediainfo on both wav files, I can the following specs: working wav: General Complete

wav file manupalation

孤者浪人 提交于 2019-12-08 06:36:03
问题 I want get the details of the wave such as its frames into a array of integers. Using fname.getframes we can ge the properties of the frame and save in list or anything for writing into another wav or anything,but fname.getframes gives information not in integers some thing like a "/xt/x4/0w' etc.. But i want them in integer so that would be helpful for manupation and smoothening join of 2 wav files 回答1: I don't know what library you're using, but it looks like it's probably returning a

How to split a Wav file into channels in java?

£可爱£侵袭症+ 提交于 2019-12-08 05:55:29
问题 I would like to write a Java program to split a wav file into channels. The input would be a wav file, and the output would be as many wav files as there are channels. I can read a wav file in Java but, how can I split it into channels? 回答1: Found a pretty easy way of doing it, not sure how computationally efficient it is though... public void splitByteArray (byte [] fileContent, byte [] fileContentLeft, byte [] fileContentRight) { for (int i = 0; i < fileContent.length; i += 4) {

How to play more than 1 .wav sounds in C++ at the same time using PlaySound() or any basic function/method?

霸气de小男生 提交于 2019-12-08 05:48:44
问题 I am trying to make a game where I need to play many sounds simultaneously I know v.basic or rather just know about the func. PlaySound() to run .wav sounds. The problem is that with SND_ASYNC I cannot play multiple sound at once but the sound which plays first skips in the middle and plays the next sound. Is there any way (simple and easy to understand) so that I can play multiple sounds at once? 回答1: Playsound is not meant for mixing sounds. Essentially, it's an older technology that can

Need a javascript/HTML 5 web player that plays audio with G.711 codec wrapped in WAV container

我的梦境 提交于 2019-12-08 04:57:35
问题 I'm looking for a javascript/HTML5 embeddedable player with the libraries to play audio with G.711 codec wrapped in WAV container. So far standard HTML5 does not support this type of audio. Does anyone have any suggestion of any players/libraries? Paid or free suggestions welcome. Thanks. 回答1: If the codec/format/wrapper is not supported natively by the browsers you are aiming it will never work. You should convert your audio file in a format natively supported by most of the browsers. http:/

rfft or irfft increasing wav file volume in python

痞子三分冷 提交于 2019-12-08 04:39:13
问题 I have just started writing a program to manipulate some audio in python. Before I write any filtering functions, I wanted to do a test to compare the input signal to the output signal after having the input signal go through an rfft and irfft. For some reason the output file has an incredible amount of gain in it (50db!) compared to the input file, and I can't figure out why this is happening. Here is the code: from scipy.io.wavfile import read, write from scipy.fftpack import rfft, irfft

How to join multiple .wav files with python [duplicate]

笑着哭i 提交于 2019-12-08 03:38:22
问题 This question already has answers here : How to join two wav files using python? (8 answers) Closed last year . I saw a post that joined two .wav files together, but I was wondering how can I join multiple .wav files using python? I am using python 3.6.0. If anyone has a way to do this please teach me. I saw that the other post ask for joining 2 .wav files and with that I used this code form the comments there: import wave infiles = ["sound_1.wav", "sound_2.wav"] outfile = "sounds.wav" data=

Failed to open file file.wav as a WAV due to: file does not start with RIFF id

百般思念 提交于 2019-12-08 02:31:04
问题 I am getting this error when trying to open a RIFF file (which as I understand it is a type of WAV) in python. Failed to open file file.wav as a WAV due to: file does not start with RIFF id When I inspect it with various tools which leads me to believe that it is really a WAV / RIFF file. $ file file.wav file.wav: MBWF/RF64 audio, stereo 96000 Hz $ file -i file.wav file.wav: audio/x-wav; charset=binary $ mediainfo file.wav General Complete name : file.wav Format : Wave Format profile : RF64

Java - Trouble combining more than 2 .wav files

假如想象 提交于 2019-12-08 01:57:35
问题 for a project I'm working on, I want to be able to concatenate multiple .wav files. Through my research I was able to come up with this code: File sample1 = new File("F:\\Programming\\Resources\\Java_Sound\\trumpet1.wav"); File sample2 = new File("F:\\Programming\\Resources\\Java_Sound\\trumpet2.wav"); File fileOut = new File("F:\\Programming\\Resources\\Java_Sound\\Test.wav"); AudioInputStream audio1 = AudioSystem.getAudioInputStream(sample1); AudioInputStream audio2 = AudioSystem