Questions tagged [wav]

This tag is for questions related to the "Waveform Audio File Format", WAVE, or wav for short.

Waveform Audio File Format (WAVE, or more commonly known as WAV due to its filename extension) is an audio file format standard for storing an audio bitstream. It is an application of the Resource Interchange File Format (RIFF) bitstream format method for storing data in "chunks". It is the main format used on Windows systems for raw and typically uncompressed audio.

More information at Wave in Wikipedia

3013 questions
123
votes
15 answers

Playing .mp3 and .wav in Java?

How can I play an .mp3 and a .wav file in my Java application? I am using Swing. I tried looking on the internet, for something like this example: public void playSound() { try { AudioInputStream audioInputStream =…
Stan
  • 3,659
  • 14
  • 35
  • 42
121
votes
14 answers

Reading *.wav files in Python

I need to analyze sound written in a .wav file. For that I need to transform this file into set of numbers (arrays, for example). I think I need to use the wave package. However, I do not know how exactly it works. For example I did the…
Roman
  • 124,451
  • 167
  • 349
  • 456
111
votes
6 answers

Detect & Record Audio in Python

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…
Sam Machin
58
votes
10 answers

How to play .wav files with java

I am trying to play a *.wav file with Java. I want it to do the following: When a button is pressed, play a short beep sound. I have googled it, but most of the code wasn't working. Can someone give me a simple code snippet to play a .wav file?
greenLizard
  • 2,326
  • 5
  • 24
  • 30
53
votes
3 answers

Writing musical notes to a wav file

I am interested in how to take musical notes (e.g A, B, C#, etc) or chords (multiple notes at the same time) and write them to a wav file. From what I understand, each note has a specific frequency associated with it (for perfect pitch) - for…
simonalexander2005
  • 4,338
  • 4
  • 48
  • 92
51
votes
6 answers

What do the bytes in a .wav file represent?

When I store the data in a .wav file into a byte array, what do these values mean? I've read that they are in two-byte representations, but what exactly is contained in these two-byte values?
user1330691
  • 997
  • 4
  • 11
  • 13
51
votes
4 answers

Can ffmpeg convert audio from raw PCM to WAV?

I can convert wav file to pcm ffmpeg -i file.wav -f s16le -acodec pcm_s16le file.pcm How can I revert this operation?
xXx_CodeMonkey_xXx
  • 800
  • 1
  • 7
  • 14
50
votes
3 answers

How to convert any mp3 file to .wav 16khz mono 16bit

Please, help to choose solution for converting any mp3 file to special .wav - I'm a newbie with Linux command line tools, so It's hard for me right now. I need to get wav with 16khz mono 16bit sound properties from any mp3 file. I was trying ffmpeg…
Alve
  • 1,315
  • 2
  • 17
  • 16
49
votes
9 answers

Get length of .wav from sox output

I need to get the length of a .wav file. Using: sox output.wav -n stat Gives: Samples read: 449718 Length (seconds): 28.107375 Scaled by: 2147483647.0 Maximum amplitude: 0.999969 Minimum amplitude: -0.999969 Midline…
joshu
  • 851
  • 2
  • 9
  • 18
48
votes
8 answers

How to handle Uncaught (in promise) DOMException: The play() request was interrupted by a call to pause()

Below is my code in aspx page to allow playing audio's of wav format in the browser but with my current code I am unable to play wav audios in Chrome browser but it works in Firefox. How can I handle this exception?