FAQ Database Discussion Community


Python Ripping CD Files to WAV

python,audio,wav,cd-rom
I'm writing a program where I need to be able to rip files from a CD into WAV format (or flac but wav works fine). It must run on Windows. I saw other answers where Express Rip and Audio Commander were recommended as command line tools. But Audio Commander's page...

Upsampling wav file for Android Devices (Bluetooth LE)

android,audio,bluetooth-lowenergy,wav,tritonus
I have been trying for about a week now to get an extremely difficult concept completed for a project. I am attempting to use the 19 bytes BLE allows to transfer raw PCM data through Bluetooth LE to all other Android devices in the vicinity. I used Audacity to reduce...

Reversing a .wav file in C#

c#,wav
I'm trying to reverse a .wav file in C#. I am basically reading a forwards .wav file, and copying in the format/meta data bytes directly into a new byte array. The rest of the "audio data" bytes I am copying into the new byte array in reverse. I am then...

How to check if file (.wav) is opened and then play file

vb.net,wav,audio-player
I am currently working on a console application to play a freshly created WAV RIFF file, and then delete it. Like I said, it is freshly created, so I need to make sure the file isn't being edited before I start playing it or it will be corrupted. After it...

How to I cut a wav file based on time segments?

python,wav
I have a wav file that I need to split up using the following list: [0.89, 1.38, 1.945, 2.93, 3.435, 4.47, 5.435, 6.035, 6.67, 7.665, 8.48] I want to create an array of smaller wav files that are the following segments from the original wav file: 0.89 to (1.38 -...

Using matlab record and save in a specific folder

matlab,user-interface,save,record,wav
I'm recording a sound and using wavwrite to save the wav file, but I need to save it in a specific folder in C:, such as in c:\monitoringsystem. That's a part of my code: format shortg c = clock; fix(c); a=num2str(c); year=strcat(a(1),a(2),a(3),a(4),a(5)); month=strcat(a(19),a(20)); day=strcat(a(34),a(35)); hour=strcat(a(48),a(49)); min=strcat(a(63),a(64)); sec=strcat(a(74),a(75)); name=strcat(year,'-',month,'-',day,'-',hour,'-',min,'-',sec); wavwrite(y,44100,name); y=[];...

LameMP3FileWriter: Unsupported encoding format MuLaw Parameter name: format

wav,naudio,lame
Trying to convert a 12 year old wav file to mp3, 8K, 8bit, Mono-channel, Mu-Law format, WAV and I am getting this error in LameMP3FileWriter line: LameMP3FileWriter: Unsupported encoding format MuLaw Parameter name: format static void Main(string[] args) { string wavFilePath = @"C:\temp\Message.wav"; string mp3FilePath = @"C:\temp\Message.mp3"; if (!File.Exists(mp3FilePath)) {...

C# NAudio makes Noise WAV file without errors after POST from another page

c#,audio,wav,naudio
I am posting a file in callback(base64data); to the server using. When I get the file all seems well but the file sounds like white noise. Thanks for your help. protected void Page_Load(object sender, EventArgs e) { var strUser = Request.Form["UserId"]; int userId = Convert.ToInt32(strUser); var reader = new RawSourceWaveStream(HttpContext.Current.Request.InputStream,...

How to create MP3 file using CSCore from WAV file or how to solve “No MP3-Encoder was found”

c#,mp3,wav,encode,cscore
I was wondering if it is possible to encode to mp3 after recording a wav file. I tried to change the WasapiCapture parameters but I think that is not working since the sound length has only 5 seconds and 1,20 MB. Here the sample code trying to converting to mp3...

Send wav data to from Java to Cpp via string

java,android,c++,audio,wav
I need to be able to send a wav files to a background process in android, which is running my audio plugin code from a different package: Samsung Audio SDK. The only interface to the background process is to send strings - thus the solution seems to be to convert...

How to control red noise generator by another one (Rocket engine effect - Subtractive synthesis of sound)

java,audio,signals,signal-processing,wav
I programming some sound effects in Java and exporting them into .wav files. Currently, I am trying to program a rocket engine sound effect. I want to do it in the following way: The sound of a rocket engine may be synthesized with a red noise generator controlled by a...

Java - Determine number of bytes to read from wave file to get to timestamp

java,audio,wav,frame-rate,sample-rate
I have an AudioFormat object (returned from audioInputStream.getFormat()). I have a timestamp (in milliseconds) that I want to start reading from the corresponding wav file from. How do I determine how many bytes to read/skip from the AudioInputStream in order to get to the appropriate timeStamp? I get confused with...

Changing a byte in a .wav file header while creating an output file

c,wav
I'm trying to change the bytes corresponding to file size in the header of a .wav file, which are the 4th and 40th bytes. Currently, I am copying the entire header to a buffer, attempting to edit it there and then writing it to a destination file, but it doesn't...

Concatenate two audio files in Swift and play them

swift,audio,concatenation,avaudioplayer,wav
I try to concatenate .wav audio files in swift. Here is my code : func merge(audio1: NSURL, audio2: NSURL) { var error:NSError? var ok1 = false var ok2 = false var documentsDirectory:String = paths[0] as! String //Create AVMutableComposition Object.This object will hold our multiple AVMutableCompositionTrack. var composition = AVMutableComposition() var...

Matlab .wav normalization

matlab,audio,import,wav,normalize
I'm currently working in a project where I record sound using sound meter and then export the resulting files in .wav format. After that, I import the .wav files into MATLAB using audioread function. I realized that the data is normalized between -1 and 1 (default option). This means that...

Audio recorded file corrupted issue in Actionscript

php,actionscript-3,flex3,wav,riff
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...

WASAPI Loopback: Save wave file

c++,wav,file-format,wasapi,audioformat
I want to record the system's audio output using WASAPI and then saving it to a .wav file. So far I've followed these guides on WASAPI: https://msdn.microsoft.com/en-us/library/windows/desktop/dd316551%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/dd370800%28v=vs.85%29.aspx I get the buffer data using audioCaptureClient->GetBuffer(&data, &numFramesAvailable, &flags, NULL, NULL); then, I'm processing this data, by just writing it at the...

How do I downsample a .wav file in C and apply bandpass filter?

c,audio,wav
I need to take a .wav file with 44.1k and downsample it to 11.25k (Dividing samples by 4). I also need to apply a bandpass filter to 300 Hz -> 3,200 Hz to the .wav file. I am new to audio programming, I have been trying to research how to...

Create a wav. file from a MIDI file and serving it to NWEB

c,server,wav,midi
I'm trying to add a feature to nweb which allows it to render MIDI .mid files into .wav sound files so that a browser such as Chrome with a built-in .wav player can play them. I have the nweb but other than that I'm completely stumped. Help would be appreciated!...

Creating WAV file from data in real time - need assist

c++,ios,audio,wav
I am quite new to audio processing and my C++ programming skills are also on basic level. I have to create recording function and I receive data signal from device in form of callback. I would like someone to assist me with basic theory how should I manage WAV memory...

Record/Convert AUDIO data to WAV in Real-time

c++,audio,wav,recording
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...

Convert WAV to base64

c,python-2.7,audio,wav
I have some wave files (.wav) and I need to convert them in base64 encoded strings. Could you guide me how to do that in Python/C/C++ ?

When reading a WAV file, dataID is printed as “fact” and not “data”

audio,wav
I'm new to audio playback and have spent the day reading over the wav file specification. I wrote a simple program to extract the header of a file but right now my program always returns false as the DataID keeps returning as "fact" instead of "data". There are a few...

Append WAV Header in NAudio

c#,header,wav,naudio
I am trying to convert audio MP3 files to WAV with a standard rate (48 KHz, 16 bits, 2 channels) by opening with "MediaFoundationReaderRT" and specifying the standard settings in it. After the file is converted to PCM WAV, when I try to play the WAV file, it gives corrupt...

Convert audio to 8-bit signed PCM

audio,wav,signed,pcm,8bit
I have a .mp4 audio file that I want to convert to a 8-bit unsigned PCM format for an Arduino Uno using the TMRpcm library. It also could be a .wav file. Anyways, I have tried many things to no avail. The closest I got was with Audacity using the...

Cannot convert Wav to Flac, c#, 1 Error

c#,wav,flac
I'm using this WaveReader class in my code. I'm getting this error: ERROR: Ensure that samples are integers (e.g. not floating-point numbers) if (format.wFormatTag != 1) // 1 = PCM 2 = Float throw new ApplicationException("Format tag " + format.wFormatTag + " is not supported!"); All I'm trying to is...

Stop previously played WAV sound

java,netbeans,wav
I am making a desktop Softphone-like application in Java. I want to add the dialed-number sounds (DTMF). For example, when I dial 51, it plays dtmf5.wav after pressing the 5, but then it plays dtmf1.wav when I press the 1, without stopping the 5's tone. How do I make sure...

Python u-law issues: unknown format: 7

python,numpy,format,fft,wav
I'm trying to compare two large sets of wav files to remove duplicates. The issue is that one set is PCM, the other has been u-law'd. When I try to read in PCM wav, no problem, but the u-law files give the following error: >>> wav = wave.open("C:\\soundfiles\\Olympus Recordings\\1019.wav") Traceback...

Windows - sound recording program giving noise

windows,audio,wav
I wrote the following program to record the sound through soundcard in windows and print the PCM data from buffer of waveheader. But it gives only the data 32600-32700. Is the problem with my soundcard? I have used WAVE_MAPPER which automatically selects the source...Please help me #include <Windows.h> #include <MMSystem.h>...

Handling many ofstream operations at once

c++,multithreading,stream,wav
I would like to ask for advice. As I am not very experienced user of C++. I lack a bit knowledge about threads - but I've been doing a lot in Android so I know the general idea. I need to write 8 *.wav files at once. I have a...

AudioStreamBasicDescription setting values for wav

ios,wav,audioqueue
I am trying to play a simple PCM file on iOS but couldn't wrap my head around AudioStreamBasicDescription and this link does not provide enough information. I get this values from terminal afinfo BlameItOnTheNight.wav File: BlameItOnTheNight.wav File type ID: WAVE Num Tracks: 1 ---- Data format: 2 ch, 44100 Hz,...

How do I record an audio in JUCE that have headers without the 'JUNK' subchunk?

c++,ios,audio,wav,juce
I am trying to develop an application using the JUCE library that can record an audio or open an audio file. The audio file is to be passed into the openSMILE program to have its feature values extracted. All audio files are in wave format and the application is to...