Questions tagged [wav]
This tag is for questions related to the "Waveform Audio File Format", WAVE, or wav for short.
3,006
questions
0
votes
0
answers
15
views
How to convert PCMU to WAV
I have a websocket stream returning PCMU files with the following spec.
media_format: { channels: 1, encoding: 'PCMU', sample_rate: 8000 }
How can I convert them to wav. I'm using Node in the backend,...
0
votes
0
answers
42
views
store ulaw to pcm converted sound to a wave file
I am trying to store a converted audio to a wave file and the file is not working correctly as it is not playing any sound and seems corrupted.
I first read a base64.txt as an ulaw audio and then ...
0
votes
0
answers
25
views
How to create multiple audio files through audio live streaming chunks through Node JS
I am receiving chunks of audio live streaming and I want to make multiple audio files by size or specific time.
I am trying with fs library to create audio files. For simplify my problem I am reading ...
4
votes
1
answer
98
views
Convert more than 2 channels audio to mono
I am using the next code for converting stereo to mono:
using (var waveFileReader = new WaveFileReader(sourceStream))
{
var outFormat = new WaveFormat(waveFileReader.WaveFormat.SampleRate, 1);
...
0
votes
0
answers
131
views
Baldur's Gate 3 how to convert wav to wem correctly so that these files work in the game's voice acting?
Question: How can I correctly convert wav files to wem format for Baldur's Gate 3 to make these files work in the game's voiceover?
I use ExportTool-v1.18.5 to extract the contents of Voice.pak and ...
0
votes
1
answer
89
views
Reversing WAV files, "An error occurred while opening the audio file"
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include "wav.h"
bool check_format(WAVHEADER header);
int get_block_size(WAVHEADER ...
0
votes
1
answer
77
views
How to properly construct a wav file from a stream of bytes in flutter?
I am receiving bytes from a BLE device. The device is recording audio for 5 secs and sends it to an Android phone in pcm format.
8khz
4 channels
16-bit sample (2 bytes per sample).
number of samples =...
0
votes
0
answers
37
views
Play wav file with PortAudio and libsndfile
I'm writing a drum trigger detector in c++ with PortAudio and libsndfile. The part when the program detects the input and decides if the sound should be played is done but I have no idea how to ...
0
votes
0
answers
71
views
Read signed 16bit PCM Audacity export file (RAW) and convert to unsigned 16 bit
I'm trying to "decode" and extract the raw pcm audio from a Audacity raw export file.
the code below opens such file and produces a new file witch can be opened by Audacity and reproduce the ...
0
votes
1
answer
41
views
How can I convert an aac encoded octet-stream into a wav in swift
I'm attempting to convert a playable aac encoded octet-stream (recording.aac) that I recorded from an aac encoded livestream (https://archives.kdvs.org/stream) into a wav file. I'm not sure where to ...
0
votes
1
answer
28
views
How to play a sound (wav) in Dart?
I use a Dart script in a web page and need to play a WAV file in the browser when a certain event is triggered. I do not use Flutter. Instead, it is a simple DOM-interacting program. What I’m ...
2
votes
1
answer
51
views
Calculate audio time from RecordRTC blob
I'm trying to calculate the audio time from the RecordRTC blobs I received. I have specified the timeSlice=500ms, desiredSampRate=16kHz, numberOfAudioChannels=1, mimeType='audio/webm;codecs=pcm'. I ...
2
votes
1
answer
39
views
Saving an audio file using Flask, then immediately printing it's duration gives incorrect duration
I'm using Flask for a web app. My frontend records some audio and sends it to a Flask route. In the route I am saving a wav audio file to an uploads folder:
# Save the audio file to a unique file
...
0
votes
2
answers
154
views
ExtAudioFileOpenURL & AVAudioFile unable to read .aac file
I'm currently making a swift app that records an aac file from an audiostream and uses shazamKit to identify the song. The stream itself plays back audio in the aac format which is why I download it ...
0
votes
0
answers
17
views
EXPO AV not playing WAV files on iOS
I have an application developed under Expo Go for android and IoS. I have found that the media player I developed using Expo AV will play MP3 and WAV files on android but cannot play the WAV files on ...
1
vote
0
answers
22
views
Audio waveform generation by streaming audio file
So I am trying to generate an audio waveform for a given audio file(can be mp3, wav etc). Currently I am using scipy.io.wavfile.read_wav to get the samples and then resample it using scipy.signal....
0
votes
1
answer
72
views
Bit rate of an IMA ADPCM wav file
I have a wav file and when I analyze it using ffprobe:
$ ffprobe audio.wav
Input #0, wav, from 'audio.wav':
Duration: 08:05:29.64, bitrate: 192 kb/s
Stream #0:0: Audio: adpcm_ima_wav ([17][0][0][...
0
votes
1
answer
26
views
Saving multichannel audio to one channel per file
I am recording from a multichannel audio device using pyaudio and struggle saving each channel in a separate file. I use pyaudio since I am playing back audio simultaneously with the recording, and ...
0
votes
1
answer
1k
views
How to convert m4a to wav in python?
I used this code to convert the m4a file that I have and the audio file is in the same directory as my code, but the code can't find the file.
m4a_file = '1.m4a'
wav_filename = 'output.wav'
sound = ...
0
votes
1
answer
171
views
How to extract the rttm format file from .wav audio file
I would like to extract the .rttm file for an input .wav audio file in python
def extract_rttm_file(wav_path):
"""Extracts the .rttm file from the converted wav file.
Args:
...
0
votes
0
answers
62
views
How to play a wav file received from server as response in react?
i'm sending a .wav file from server
app.use('/audio', upload.single('file'), async (req, res) => {
let file = req.file;
const destinationPath = await saveFile(req, res, file);
const text = ...
2
votes
0
answers
57
views
Is there a way to play part of a .wav file vb.net
I'm making a music program and I want to be able to skip into songs, for example skipping to 30 seconds in.
I couldn't find a way to skip into a wav file, so I tried to take the wav file as a string, ...
0
votes
0
answers
28
views
How to convert pcm16Audio to .wav then to a base64 string
I'm using a voice capture SDK that returns a pcm16Audio representation of the capture. I need to convert this to wav, then convert the wav to base64 to send to an API.
This is the function in the SDK ...
0
votes
1
answer
46
views
C++ Reading the Data of a WAV for FIR filter
I'm trying to get data from WAV file for FIR filter.That's what I have so far. Is this code reading WAV correctly? Also I need to store data into an array of double to be able to pass them to a FIR ...
0
votes
0
answers
20
views
Playing mp3/wav in Java
For a school project we programmed a Pong game in Java. Unfortunately I am not that skilled in the language. In the GamePanel class shown below there is a function "checkCollision", which ...
-1
votes
1
answer
49
views
How to filter a wave file to remove background noise?
I have used Arduino rp2040 connect to record a wave file at a frequency of 3k Hz. But there is much noise in the audio file.
This is the code that I have used to filter the audio-
from scipy.signal ...
0
votes
0
answers
30
views
FileNotFoundError: [WinError 2] The system cannot find the file specified (Although all the files are there)
I am trying to make an audio converter to convert audio files to WAV format.
I am getting an error FileNotFoundError: [WinError 2] The system cannot find the file specified where it says the specified ...
0
votes
0
answers
76
views
Converting a MIDI file to MP3 in Java
I have midi files I want to convert to an mp3 file programmatically with a custom soundbank.
As far as I can see the whole javax.sound package is only concerned with playback and the Soundbank loading ...
0
votes
1
answer
41
views
is there a way to make a file picker that only accepts wave files in python/tkinter?
i'm making a "waveform generator" in python that requires wave files to work. currently, i have a filepicker and path for my gui, but i need a way to make the file picker exclusively pick ...
1
vote
0
answers
45
views
How to convert a WAV file into a 3gp in Android using MediaCodec
I have tried to perform the with the following conversion loop.
while (true) {
sampleSize = extractor.readSampleData(inputBuffer, 0)
if (sampleSize < 0) break
val ...
0
votes
0
answers
30
views
How do you convert AAC_ADTS files to WAV files in Kotlin for Android Studio?
I have a few files from MediaRecorder() that I want to convert into WAV files (or preferably into CSV files), but I can't find any library on github that can convert between the two for Kotlin. WAV is ...
0
votes
0
answers
27
views
Getting broken radio sound with tuneR::writeWave
I have this Wave object (from the tuneR R package):
> wav
Wave Object
Number of Samples: 32000
Duration (seconds): 1
Samplingrate (Hertz): 32000
Channels (Mono/Stereo): ...
0
votes
0
answers
17
views
Sox is splitting audio file a little too early
I am splitting an audio file with sox and it works reasonably well with these settings:
sox in.wav out5.wav silence -l 1 0.1 1% 1 0.5 1% : newfile : restart
However, it often cuts just a little bit ...
0
votes
1
answer
43
views
I have this function that tells me the length of an audio but it tells me a wrong number
from pydub import AudioSegment
import math
def get_audio_length(audio_file_path):
# Load the audio file
audio_file = AudioSegment.from_file(audio_file_path)
# Get the duration of the ...
0
votes
0
answers
59
views
Convert ogg/oga file to wav using Java
I have an ogg file downloaded from whatsapp. I am trying to convert it to wav. However, reading the input stream is failing with Unsupported format.
File file = new File("audio.ogg")...
-2
votes
1
answer
150
views
Text-to-speech convert to wav in python
I'm using pyttsx3 for text-to-speech tasks. Here's an example https://github.com/padmalcom/AISpeechAssistant/blob/main/code/02_text_to_speech/simple_main_02.py
Is there a way to convert the spoken ...
0
votes
0
answers
14
views
converting byte array to alaw (wav) produced bad file in java
I have an existing logic to convert a byte array to alaw (wav) file. We have changed our backend. After this, the conversation starts producing file bad content (noise instead of proper voice)
It ...
0
votes
1
answer
68
views
How to convert mp3 data to wav data?
I have a wav audio file and i extracted data from that wav using python pydub module and i got this data
[-139 18 -215 34 -196 6 -295 -31 -301 -35 -211 13 -93 47
-60 39 -58 7 -17 ...
0
votes
0
answers
7
views
Upload audio bytes data in memory to AWS S3 bucket as a .wav file in python [duplicate]
I have bytes data of the audio file. I want to store it in S3 Bucket as a .wav file. Currently I'm storing it into a temporary folder and then copying it into S3. This will increase the time because ...
0
votes
2
answers
96
views
Windows error sound instead of music is played
I have a little code that is supposed to play music in the background. The problem is that the music does not play, but the sound of the Windows error is played.
System.Reflection.Assembly assembly = ...
0
votes
0
answers
56
views
Pycharm .wav file unrecognized
I'm having trouble working with a .wav file in Pycharm. I'm following a YouTube video on speech recognition but the editor I'm using it's recognizing the file type. Is there a addon I'm supposed to ...
1
vote
0
answers
36
views
Chrome STT using given wav file
I want to do STT in Chrome browser with a given wav file.
I tried the following code, but it only uses audio from the microphone of my PC..
I wished it utilizes the wav file I provided.
<script&...
0
votes
0
answers
30
views
How to encode an INFO+LIST subchunk according to RIFF and defacto standards?
I'm trying to correctly encode a LIST chunk of the INFO type such that it follows standards. The original 1.0 IBM/Microsoft spec for RIFF (https://www.aelius.com/njh/wavemetatools/doc/riffmci.pdf) is ...
1
vote
0
answers
96
views
How to get WAV audio from a microphone in Go
My program uses the Go bindings of the Vosk speech recognition library, which takes in the audio as byte slices of WAV mono audio. My program currently uses the external command arecord to get WAV ...
0
votes
0
answers
91
views
Why is the first PlaySound call from memory delayed a lot in WinAPI?
I am trying to play a WAV resource with low latency.
If I load my audio into memory and then call PlaySound with SND_MEMORY, then there should be almost no delay, however, there is a huge delay of ...
0
votes
0
answers
85
views
Click sound in audio playing using web audio API
I have been trying to play a wav file which is received from the server as a base64 string.
Everything works perfectly but there's a click sound at the beginning of the audio. I have checked the ...
0
votes
0
answers
70
views
Trying to create dial tone frequency as a wav file
I'm creating a program that takes in user input and generates the dial tone of a phone number, the expected user input should go something like this:
./a.exe wavename.wav 0.5 3456781234
I've gotten ...
2
votes
0
answers
67
views
Why does applying the hamming window to framed data show a consistent difference in behavior between python and C?
This is the code I wrote in python that extracts data from a .wav file, applies pre-emphasis, divide into frames of 0.025ms with 0.010 stride, and applies a hamming window:
import scipy.io.wavfile as ...
1
vote
1
answer
206
views
How do I write a wav file in C?
I'm trying to write a wav file in C but the file is not recognized by audacity or vlc.
I know that some of the header data is big endian and I'm not sure how to determine that when writing a binary ...