wav

Convert WAV to MP3 using LAME from PHP

做~自己de王妃 提交于 2019-12-06 03:29:12
问题 I have WAV data that I'd like to convert to MP3 on the fly with a PHP script. The WAV file originates with the script, so it does not start out as a file. I can run something like this: exec( "lame --cbr -b 32k in.wav out.mp3" ); But this will require that I first write in.wav to disk, read out.mp3 from disk, and then clean up when I'm finished. I'd prefer not to do that. Instead, I have the wav file stored in $wav, and I'd like to run this through LAME such that the outputted data is then

Saving Microphone Stream to mp3 or wave

痴心易碎 提交于 2019-12-06 03:23:25
问题 I recording sound from Microphone in Windows Phone device. Using Xna.Framework.Audio.Microphone I store the sound in MemoryStream . I can save it to PCM format. However It will be much better to convert it to mp3 file. If converting to mp3 is impossible then maybe somebody at least knows how to convert it to wav. Thanks for your answers. 回答1: Here is a brief example I created showing how to save wp7 recorded audio as a wav stream: http://damianblog.com/2011/02/07/storing-wp7-recorded-audio-as

Correct Media Type settings for a DirectShow filter that delivers Wav audio data?

偶尔善良 提交于 2019-12-06 03:00:29
I am using Delphi 6 Pro with the DSPACK DirectShow component library to create a DirectShow filter that delivers data in Wav format from a custom audio source. Just to be very clear, I am delivering the raw PCM audio samples as Byte data. There are no Wave files involved, but other Filters downstream in my Filter Graph expect the output pin to deliver standard WAV format sample data in Byte form. Note: When I get the data from the custom audio source, I format it to the desired number of channels, sample rate, and bits per sample and store it in a TWaveFile object I created. This object has a

Coverting PCM 16bit LE to WAV

可紊 提交于 2019-12-06 02:16:37
I'm trying to write a program in C that converts a captured Raw 16kHz PCM 16-bit file to a 16-bit WAV . I've read some posts and people recommended using libsox . Installed it and now i'm really struggling with understanding the man-page . So far (by reading the example in the source dist) I've figured out that the structs : sox_format_t sox_signalinfo_t can probably be used to describe the data I'm inputting. I also know how much info i'm processing (time) if that is somehow necessary? Some guidance is appreciated! I would recommend to write WAV header and data manually, it is really very

cordova-plugin-media: Parse “.amr” Audio File on nodejs server

我是研究僧i 提交于 2019-12-06 01:47:08
问题 I'm using the cordova-plugin-media plugin to record audio-files from android and ios devices. However, android only allows to record the file in ".amr" ending, iOS on the otherside only supports ".wav". Playing the ".wav" from the iOS device on Android works, however, iOS doesn't support ".amr" files. That's why I have to convert them somehow. Since I couldn't find any cordova-plugin converting the ".amr" file on the clientside besides this one (which is based on an external API and

Load .wav file for OpenAL in Cocoa

拜拜、爱过 提交于 2019-12-06 00:29:12
I need to load sound files to a Cocoa-based OpenAL app. Progress: The OpenAL utility function alutLoadWAVFile has been deprecated; the alut header is no longer included in Mac OS X SDKs. According to the TechNotes, the actual code is still there for binary compatibility. However, if I attempt to add a declaration for the function, the code will compile but the linker will abort, complaining that the symbol for alutLoadWAVFile could not be found. (I am linking to the OpenAL.framework). Yet, Apple OpenAL sample code still uses this symbol. When I Clean the sample code project, it compiles and

iPhone SDK: Play a single WAV from a button

霸气de小男生 提交于 2019-12-06 00:26:28
I am currently trying out this code: NSString *path = [[NSBundle mainBundle] pathForResource:@"dream" ofType:@"m4a"]; AVAudioPlayer* theAudio=[[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL]; theAudio.delegate = self; [theAudio play]; However, the SDK says that the ViewController does not implement the AVAudioPlayer Delegate. Any body any ideas on how to play a WAV (or M4a) using the 2.2 SDK? You need to add <AVAudioPlayerDelegate> to the end of your controller's class declaration, along these lines: @interface MyViewController : UIViewController

read markers of .wav file

不想你离开。 提交于 2019-12-05 23:17:07
问题 I would like to use markers in .wav files. It seems to be supported by aifc module with getmarkers() : http://docs.python.org/2/library/aifc.html#aifc.aifc.getmarkers (for .aiff files), but not for wave module (http://docs.python.org/2/library/wave.html?highlight=wave#wave.Wave_read.getmarkers). How could we read markers of .wav files ? 回答1: Edit : here is an updated version of scipy.io.wavfile that adds many things (24 bit .wav files support for read/write, cue markers, cue markers labels,

Change huge amount of data from NIST to RIFF wav file

自闭症网瘾萝莉.ら 提交于 2019-12-05 22:42:21
So, I am writing a speech recognition program. To do that I downloaded 400MB of data from TIMIT. When I inteded to read the wav files (I tried two libraries) as follow: import scipy.io.wavfile as wavfile import wave (fs, x) = wavfile.read('../data/TIMIT/TRAIN/DR1/FCJF0/SA1.WAV') w = wave.open('../data/TIMIT/TRAIN/DR1/FCJF0/SA1.WAV') In both cases they have the problem that the wav file format says 'NIST' and it must be in 'RIFF' format. (Something about sph also I readed but the nist file I donwloaded are .wav, not .sph). I downloaded then SOX from http://sox.sourceforge.net/ I added the path

Java Exception Reading Stream from Resource .wav

删除回忆录丶 提交于 2019-12-05 20:43:46
I guess my code is okay, and my .jar file its okay with the .wav inside it.. But when I try to load it using getResourceAsStream I get a error.. this is my error: java.io.IOException: mark/reset not supported at java.util.zip.InflaterInputStream.reset(Unknown Source) at java.io.FilterInputStream.reset(Unknown Source) at com.sun.media.sound.SoftMidiAudioFileReader.getAudioInputStream(Unkno wn Source) at javax.sound.sampled.AudioSystem.getAudioInputStream(Unknown Source) at operation.MainWindowOperations.prepareAudio(MainWindowOperations.java :92) at operation.MainWindowOperations.<init>