wav

Convert WAV to MP3 using LAME from PHP

为君一笑 提交于 2019-12-04 08:50:10
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 stored in $mp3. I've seen references to an FFMPEG PHP library, but I'd prefer to avoid having to install

Wav comparison, same file

人走茶凉 提交于 2019-12-04 07:54:39
I'm currently stumped . I've been looking around and experimenting with audio comparison. I've found quite a bit of material, and a ton of references to different libraries and methods to do it. As of now I've taken Audacity and exported a 3min wav file called "long.wav" and then split the first 30seconds of that into a file called "short.wav". I figured somewhere along the line I could visually log (log.txt) the data through java for each and should be able to see at least some visual similarities among the values.... here's some code Main method: int totalFramesRead = 0; File fileIn = new

Saving Microphone Stream to mp3 or wave

北慕城南 提交于 2019-12-04 07:40:37
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. 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-wav-format-streams/ Here's a great thread which answers this question: http://social.msdn.microsoft.com

Can someone explain .wav(WAVE) file headers?

守給你的承諾、 提交于 2019-12-04 06:38:11
问题 OK, so I'm trying to make a program that will manipulate .wav files, and I've seen this question/answers, but I'm not entirely sure as to what each piece of data in the header refers to. For example, what does a "chunk" refer to? Is that a specific number of bits/bytes? If somebody could just tell me, at least in the format used in this question, what each datum being written to the .wav, aside from the constant String Literals and the 'data' array, refer to? In particular I'd especially like

read markers of .wav file

試著忘記壹切 提交于 2019-12-04 06:00:17
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 ? 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, and some other metadata like pitch (if defined), etc.): wavfile.py (enhanced) Feel free to share it! I

How to convert g729 encoded byte array to .WAV in C#?

删除回忆录丶 提交于 2019-12-04 05:16:44
I have been working on a VoIP Application in C sharp language. The purpose of the project is VoIP Call Recording. It uses g729 Codec. I can extract the voice part from RTP payload. How to convert this Byte array to .wav format? Please help me. You can try to use ffmpeg.exe and work with it via command line 来源: https://stackoverflow.com/questions/13468240/how-to-convert-g729-encoded-byte-array-to-wav-in-c

Convert little endian string to integer

时光怂恿深爱的人放手 提交于 2019-12-04 00:32:01
I have read samples out of a wave file using the wave module, but it gives the samples as a string, it's out of wave so it's little endian (for example, \x00 ). What is the easiest way to convert this into a python integer, or a numpy.int16 type? (It will eventually become a numpy.int16, so going directly there is fine). Code needs to work on little endian and big endian processors. The struct module converts packed data to Python values, and vice-versa. >>> import struct >>> struct.unpack("<h", "\x00\x05") (1280,) >>> struct.unpack("<h", "\x00\x06") (1536,) >>> struct.unpack("<h", "\x01\x06")

Concatenating 'audio/x-wav' buffer and serving with 'Transfer-Encoding': 'chunked'

血红的双手。 提交于 2019-12-03 21:40:55
This question is a followup to a previous question , that was resolved thanks to @thejh. I'm trying to convert text to audio and serve the data to the client as 'chunked' data. So far my headers look like so: res.writeHead(200, { 'Content-Type': 'audio/wav', // I tried 'audio/x-wav' as well 'Transfer-Encoding': 'chunked' }); And then I'm converting snippets of text to audio in a queue (which I get back as base64 encoded data), and serving them like so: var src = Base64Audio.replace("data:audio/x-wav;base64,",""); var binAudio = new Buffer( src, 'base64'); res.write(binAudio); All the

how to record anything from soundcards?

时光毁灭记忆、已成空白 提交于 2019-12-03 21:00:24
i would like to record any sounds produced in my soundcard. please help, where i can get a freeware component or commercial(trial). delphi7/2009 I have very good experience with the BASS audio library API. Here is a forum thread with C# example , but since the BASS API is procedural and there is a good Delphi API interface, it translates pretty OK. --jeroen http://blogs.msdn.com/b/matthew_van_eerde/archive/2008/12/16/sample-wasapi-loopback-capture-record-what-you-hear.aspx might help try http://sourceforge.net/projects/delphiasiovst/ . there is a component to communicate with the ASIO driver.

How to play audio byte array (not file!) with JavaScript in a browser

牧云@^-^@ 提交于 2019-12-03 17:52:32
问题 For mostly security reasons, I'm not allowed to store a WAV file on the server to be accessed by a browser. What I have is a byte array contains audio data (the data portion of a WAV file I believe) on the sever, and I want it to be played on a browser through JavaScript (or Applet but JS preferred), I can use JSON-PRC to send the whole byte[] over, or I can open a socket to stream it over, but in either case I don't know who to play the byte[] within the browser? 回答1: The following code will