wav

What does the data returned by scipy.io.wavfile.read mean?

走远了吗. 提交于 2019-12-10 22:38:16
问题 The documentation of scipy.io.wavfile.read says that it returns sample rate and data. But what does data actually mean here in case of .wav files? Can anyone let me know in layman terms how that data is prepared? PS. I read somewhere that it means amplitude? Is what I read correct? If yes, how is that amplitude calculated and returned by scipy.io.wavfile.read ? 回答1: scipy.io.wavfile.read is a convenience wrapper to decompose the .wav file into a header and the data contained in the file. From

playing a .wav file

删除回忆录丶 提交于 2019-12-10 22:22:23
问题 I'm using visual studio 2010 express and I'm trying to write a simple program that will repeat a wave file 5 times(I'm running a windows xp sp3). This is as far as I got: #include "stdafx.h" #include <windows.h> #include <iostream> using namespace std; int main () { int a = 5; while(a >= 1){ cout << "It's a wav file"; PlaySound(L"SomeAudioFile-01.wav", NULL, SND_FILENAME); --a; } return 0; } The problem is I keep getting this error message when I'm building it: 1>------ Build started: Project

Trying to Split Wav file into two pieces with SoX

跟風遠走 提交于 2019-12-10 20:14:23
问题 I'm trying to split one .wav file into two pieces where there is a few seconds of silence. Based on the documentation I've found, the following should work: sox testfile.wav tester.wav silence 1 0.50 0.1% 1 1.0 0.1% : newfile : restart "testfile.wav" is a voice recording and I put about 4 seconds of silence right in the middle of it to test. The expected result is that I would get "tester001.wav" and "tester002.wav" from running this. Instead I get one file - "tester.wav" which is the first

Java Sampling Rate Conversion

非 Y 不嫁゛ 提交于 2019-12-10 18:02:36
问题 In my Java code, I would like to convert a WAV file of 44100 Hz to a WAV file of 8000 Hz. I know that I have to low-pass filter and then decimate (+interpolate) (the DSP theory) but I do not want to implement it from scratch. I am looking for a library that can efficiently do it. Do you know any? I am able to read wav files into a buffer and also write wav files from buffer to file if it will make it easier. 回答1: You should look at FMJ. It provides a wrapper for ffmpeg which can handle all

Storing a wav file in an array

[亡魂溺海] 提交于 2019-12-10 15:23:40
问题 I need a fast method to store all samples of a wav file in an array. I am currently working around this problem by playing the music and storing the values from the Sample Provider, but this is not very elegant. From the NAudio Demo I have the Audioplayer Class with this Method: private ISampleProvider CreateInputStream(string fileName) { if (fileName.EndsWith(".wav")) { fileStream = OpenWavStream(fileName); } throw new InvalidOperationException("Unsupported extension"); } var inputStream =

Java resample .wav soundfile without third party library

巧了我就是萌 提交于 2019-12-10 14:58:11
问题 Is it possible to resample a .wav file from 22050 khz to 44100 khz in java without the use of any third party library? Maybe using AudioInputStream ? edit: since it seems that without a third party library it isnt possible easily, what third party libraries do exist to accomplish a resampling? 回答1: Since you are now accepting Third Party libraries, here is my suggestion There are a lot of third party libraries that allows you to resample an audio wav file, For me, in my case(And I've recently

Audio recorded file corrupted issue in Actionscript

谁都会走 提交于 2019-12-10 14:25:48
问题 I recorded voice samples from my microphone using Adobe Flash Builder 4.6 / AIR, voice recorded successfully. I first converted voice data(byte array) to base64 format in actionscript then I converted that base64 data to WAV file using my PHP code. but that WAV file throw file corrupted issue in RiffPad. RIFFPad is a viewer for RIFF formatted files like WAV, AVI. expected wav file specification: sampling Rate : 22KHZ // -- saves the current audio data as a .wav file protected function

Extracting an amplitude list from *.wav file for use in Python

梦想与她 提交于 2019-12-10 14:23:45
问题 I'm having a little bit of programing and conversion trouble. I'm designing an AI to recognize notes played by instruments and need to extract the raw sound data from a wave file. My objective is to perform a FFT operation over chunks of time in the file for use by the AI. For this I need an amplitude list of the audio file, but I can't seem to find a conversion technique that will work. The files start as MP3's and then I convert them to wav file, but I always end up with a compressed file

printing of a wav header in c

时间秒杀一切 提交于 2019-12-10 11:45:17
问题 Hi i have this code for taking as input a wav file and then putting the wah header into a struct and then output it. Everything is good except audioFormat and numChannels but i can't understand why.For example it should output audioFormat: 1 and numChannels: 2 but it outputs audioFormat:0 and numChannels: 1 . I can't understand why this happens. typedef struct wavHeader { byte chunckID[4]; dword chunckSize; byte format[4]; byte subchunk1ID[4]; word subchunk1Size; word audioFormat; word

Convert mp3 to wav on Android

筅森魡賤 提交于 2019-12-10 10:59:19
问题 There seem to be a lot of questions regarding the inverse wav to mp3 conversion, but none to go the other way. My situation is that I can use steganography to embed data in wav files. I can convert these to ogg and back (the steganography is format independent, and can survive format conversion). What I want to do now is build in AudioBoo integration. Uploading to AudioBoo is not a problem, retrieving the files in mp3 format is not a problem, but converting those mp3 files back to wav to