wav

How to join two wav files using python?

浪尽此生 提交于 2019-11-26 17:34:11
I am using python programming language,I want to join to wav file one at the end of other wav file? I have a Question in the forum which suggest how to merge two wav file i.e add the contents of one wav file at certain offset,but i want to join two wav file at the end of each other... And also i had a prob playing the my own wav file,using winsound module..I was able to play the sound but using the time.sleep for certain time before playin any windows sound,disadvantage wit this is if i wanted to play a sound longer thn time.sleep(N),N sec also,the windows sound wil jst overlap after N sec

Java - reading, manipulating and writing WAV files

℡╲_俬逩灬. 提交于 2019-11-26 16:22:56
In a Java program, what is the best way to read an audio file ( WAV file) to an array of numbers ( float[] , short[] , ...), and to write a WAV file from an array of numbers? I read WAV files via an AudioInputStream . The following snippet from the Java Sound Tutorials works well. int totalFramesRead = 0; File fileIn = new File(somePathName); // somePathName is a pre-existing string whose value was // based on a user selection. try { AudioInputStream audioInputStream = AudioSystem.getAudioInputStream(fileIn); int bytesPerFrame = audioInputStream.getFormat().getFrameSize(); if (bytesPerFrame ==

How to convert the WAV/OGG file to FLAC file in Android?

流过昼夜 提交于 2019-11-26 16:12:22
问题 EDIT: Incorporated the changed uv001's answer. I can only find that ICS 4.0 support decoding of FLAC, but encode. I need some encoder to convert wav to flac, but currenty I can't find it. I find there is a jFlac avaible , but I don't know how to use this library, just simply convert the files. Could anyone give me a hand on it? Today, I just some idea by myself, with using the JavaFlacEncoder. and it works for certain bitrates of WAV. I changed the value into a hard coding value in which it

Playing short .wav files - Android

柔情痞子 提交于 2019-11-26 16:05:03
问题 I would like to play sound after touching the button. MediaPlayer works fine, but I read somewhere that this library is for long .wav (like music). Is there any better way to play short .wav(2-3 sec.)? 回答1: The SoundPool is the correct class for this. The below code is an example of how to use it. It is also the code I use in several apps of mine to manage the sounds. You can have as may sounds as you like (or as memory permits). public class SoundPoolPlayer { private SoundPool mShortPlayer=

Creating a WAV file from raw PCM data using the Android SDK

狂风中的少年 提交于 2019-11-26 15:59:55
问题 I'm trying to use the AudioRecord class to record a WAV file. The problem is that it only supplies the raw PCM data, and if I write it to a file, there is no header information, so it will not play in any media player. How can I create a WAV file from this raw data? Or alternatively, is there any other way to record sound in Android to a WAV file (or, alternatively MP3)? Oh, and I know that MediaRecorder can'y be used because it doesn't support either WAV or MP3 formats. 回答1: OK, I've got

Decrease bitrate on WAV file created with recorderjs

人走茶凉 提交于 2019-11-26 15:58:33
问题 I'm trying to use recorderjs on an app engine site where users upload short audio recordings (say, 1 to a dozen seconds long). I've noticed that the WAV files I'm uploading are much larger than I expected. For example, I just created a recording that lasts roughly 9 seconds, and the uploaded blob is 1736769 bytes, which is > 1.5 megabytes. Question: How do I modify the recorderjs code (or my own code -- maybe I'm using recorderjs incorrectly) so that my audio blobs have a lower bitrate? I'd

How can I write a WAV file from byte array in java? [closed]

房东的猫 提交于 2019-11-26 15:49:56
问题 I would like to write the Wav file from byte array and I also want to split channels from the input wav file The Java Sound API shows that you can record music from a TargetDataLine and as an example shows the data being written to a byte array. But writing this byte array out into its own file is fairly useless since it is not in the WAV file format and cannot be played in other applications. How do I write sound files using the javax.sound.sampled package? 回答1: I have used this in the past

Using AudioTrack in Android to play a WAV file

落花浮王杯 提交于 2019-11-26 15:48:31
问题 I'm working with Android, trying to make my AudioTrack application play a Windows .wav file (Tada.wav). Frankly, it shouldn't be this hard, but I'm hearing a lot of strange stuff. The file is saved on my phone's mini SD card and reading the contents doesn't seem to be a problem, but when I play the file (with parameters I'm only PRETTY SURE are right), I get a few seconds of white noise before the sound seems to resolve itself into something that just may be right. I have successfully

Detect & Record Audio in Python

纵然是瞬间 提交于 2019-11-26 14:52:58
I need to capture audio clips as WAV files that I can then pass to another bit of python for processing. The problem is that I need to determine when there is audio present and then record it, stop when it goes silent and then pass that file to the processing module. I'm thinking it should be possible with the wave module to detect when there is pure silence and discard it then as soon as something other than silence is detected start recording, then when the line goes silent again stop the recording. Just can't quite get my head around it, can anyone get me started with a basic example. As a

How to play wav audio byte array via javascript/html5?

会有一股神秘感。 提交于 2019-11-26 13:59:41
问题 I'm using the following method to play a byte array containing wav data. The function is being called from a GWT project. This function plays back sound, but it sounds like some kind of Hellish monster. The sample rate is definitely correct (the sound is being generated by neospeech) and I've tried all kinds of values for numberOfSamples, which just seems to represent how long the audio data is. A value greater than 30000 for numberOfSamples will play the audio file's full length but it is