wav

Reading .wav file in Matlab Coder

别等时光非礼了梦想. 提交于 2019-12-11 08:45:39
问题 I want to read an audio file with matlab coder . The problem is that wavread() is not supported, but as this is a pretty essential part of any audio coding I am thinking that there must be another way to achieve this? Any ideas? 回答1: What is your use case? If you really just want to run the generated code in a MEX-function within MATLAB you can use coder.extrinsic to call wavread. This will not work outside of the MATLAB environment. Outside the MATLAB environment, you will need to use custom

How to automatically silence sections of audio below a given volume threshold?

て烟熏妆下的殇ゞ 提交于 2019-12-11 08:37:29
问题 I'm coding a monophonic music transcription application using C#. I want to silence all parts of a WAV file below a certain volume threshold. Any idea how to do this? 回答1: You need a Noise Gate. A noise gate is a type of audio effect that silences (or reduces in volume) any quiet sections that fall below a set volume threshold. It would probably be easier to use an existing noise gate implementation rather then create your own. Understanding and implementing a basic noise gate isn't too

Resolving 'ValueError: Unexpected end of file.' from scipy/wavfile/read

爱⌒轻易说出口 提交于 2019-12-11 07:27:52
问题 I am splitting a stereo wav file in Java using iterative methods with the Java WavFile class. When I use a python to read the resulting mono wav file and out put the sample rate and data using the read method from scipy.io.wavfile I get an error: 'Value Error: Unexpected end of File.' I do not get this error with other mono wav files I try, only those I have made with Java. Looking at other forum posts I know that it must have to do with how I am setting up the header information for the

Problem with reading wav file with Java

这一生的挚爱 提交于 2019-12-11 07:19:35
问题 I use that API to read wav file at Java: Reading and Writing Wav Files in Java I read a wav file with Java and want to put all the values into an arraylist. I wrote: // Open the wav file specified as the first argument WavFile wavFile = WavFile.openWavFile(fileToRemoveSilence); List<Double> allBuffer = new ArrayList<Double>(); .... do { // Read frames into buffer framesRead = wavFile.readFrames(buffer, 50); for (double aBuffer : buffer) { allBuffer.add(aBuffer); } } while (framesRead != 0);

How to read MP3 in MATLAB

喜欢而已 提交于 2019-12-11 06:29:05
问题 I am currently working on watermarking audio files in Matlab for a mathematics research project. So far I have been able to read wav files using wavread in Matlab. However, because wav files are very large, the resulting data is also large. Therefore, in order to simplify this I would like to know how I would be able to read an mp3 file in Matlab. So far I have only tried to read an mp3 by using dsp.AudioFileReader. However, the resulting data only contains 0's and a few other numbers, which

Using a c# handler to serve up wav files cuts audio short (only a couple of seconds)

假如想象 提交于 2019-12-11 04:28:47
问题 I've got a c# handler that serves up audio files I've generated using text-to-speech. When the files are written to disk they sound fine, but when I try and play them in a browser (via the handler) using a quicktime plugin it cuts them short at about 2 seconds. Inside the handler I'm using the following code... context.Response.ClearContent(); context.Response.ClearHeaders(); context.Response.ContentType = "audio/x-wav"; context.Response.WriteFile(fileName); context.Response.Flush(); Anyone

SoundPlayer not playing any bundled windows sounds PCM wav files

蓝咒 提交于 2019-12-11 03:29:11
问题 In C# I cannot get SoundPlayer class from System.Media to play any wav from my C:\Windows\Media folder using the following code. All I get is no sound: String filename = "C:\\Windows\\Media\\tada.wav"; SoundPlayer sp = new SoundPlayer(filename); sp.Load(); sp.Play(); I have checked the wave file "tada.wav" with a program called "Gspot" that tells me the audio codec is "PCM Audio". I do not receive any compiler warnings or errors and there is no exceptions raised when I run the program. I just

Record/Convert AUDIO data to WAV in Real-time

你说的曾经没有我的故事 提交于 2019-12-11 03:26:32
问题 I am new when it comes to audio signal processing. Currently I have connected device to my PC that sends me audio data from mic/playback track. I have already created host application with usage of Steinberg ASIO SDK 2.3 which connects to the device and in repeating callback returns raw data. Signal is 24bit and frequency can be chosen whatever I like, let's say 44100 hZ, 2pan's, single channel. I have converted this signal also to double <-1.0, 1.0> because I am doing some signal processing

html embeddable flash wav player

时光怂恿深爱的人放手 提交于 2019-12-11 00:18:01
问题 I need an embeddable audio player that will play wav files in IE, FF, and Chrome. Converting to mp3 (or any other format) is not an option at this time. This player should be very simple with only a play/pause button and perhaps a timeline bar that a user could click to go to a specific part of the audio. There also should be an easy way to have multiple instances of this audio player on a single page. I've found information on solutions that range from very feature-rich (complex) to simple,

Finding number of samples in a .wav header

梦想的初衷 提交于 2019-12-10 22:54:05
问题 The wav file has a header (44 bytes). In this header is specified the sample rate of the signal, number of channels and so on, number of samples from the audio file. I need to know where can I find the number of samples information in the header. What would be the formula. 回答1: Starting at the 40th byte for the next 4 bytes (little endian) is the Subchunk2 size. This can also be deduced from the formula: Subchunk2size = NumSamples * NumChannels * BitsPerSample/8 NumChannels start at byte 22