wav

How to crop an audio file based on the timestamps present in a list

How to crop an audio file based on the timestamps present in a list Question: So, I have an audio file which is very long in duration. I have manual annotations (start and end duration in seconds) of the important parts which I need from the whole audio in a text file. I have converted …

Total answers: 1

Using a for loop to rename processed .wav file with pydub AudioSegment function

Using a for loop to rename processed .wav file with pydub AudioSegment function Question: I am trying to rename multiple files in a loop using the AudioSegment function. Below is the function for a single file (which works perfectly from pydub import AudioSegment audio = AudioSegment.from_wav("./OM1/BMM.wav") new_audio = audio[1000:len(audio)-1000] new_audio.export(‘newSong.wav’, format="wav") Now I want to …

Total answers: 2

What is the max sampling rate for scipy.io.wavfile.write command?

What is the max sampling rate for scipy.io.wavfile.write command? Question: As I checked, usually it is 44100 Hz, but I am wondering for my own purposes can it be 490 KHz? Didn’t notice any information about that in documentation. I successfully made a wavfile with 48000 Hz, but it’s nearly the same that 44100. import …

Total answers: 1

Audio frame not converting to ndarray

Audio frame not converting to ndarray Question: I am trying to run a colab file training openAI’s jukebox, however when I try to run the function code which loads the audio, I am getting an error: File "/content/jukebox/jukebox/data/files_dataset.py", line 82, in get_song_chunk data, sr = load_audio(filename, sr=self.sr, offset=offset, duration=self.sample_length) File "/content/jukebox/jukebox/utils/io.py", line 48, in load_audio …

Total answers: 3

Error passing wav file to IPython.display

Error passing wav file to IPython.display Question: I am new to Python but I am studying it as programming language for DSP. I recorded a wav file, and have been trying to play it back using IPython.display.Audio: import IPython.display from scipy.io import wavfile rate, s = wavfile.read(‘h.wav’) IPython.display.Audio(s, rate=rate) But this gives the following error: …

Total answers: 2

Trying to get the frequencies of a .wav file in Python

Trying to get the frequencies of a .wav file in Python Question: What I’m trying to do seems simple: I want to know exactly what frequencies there are in a .wav file at given times; i.e. "from the time n milliseconds to n + 10 milliseconds, the average frequency of the sound was x hertz". …

Total answers: 4

Python: Get volume decibel Level real time or from a wav file

Python: Get volume decibel Level real time or from a wav file Question: For a project work, I need to measure the volume level either from a recorded audio file or in real time recording using a mic. After my primary research, I have tried using soundfile library. The file was read using soundfile and …

Total answers: 2

How to change audio playback speed using Pydub?

How to change audio playback speed using Pydub? Question: I am new learner of audio editing libs – Pydub. I want to change some audio files’ playback speed using Pydub(say .wav/mp3 format files), but I don’t know how to make it. The only module I saw that could possibly deal with this problem is speedup …

Total answers: 5

python – how can I generate a WAV file with beeps?

python – how can I generate a WAV file with beeps? Question: is there a way in python to generate a continuous series of beeps in increasing amplitude and export it into a WAV file? Asked By: Meni || Source Answers: I’ve based this on the answer to the previous question and added a lot …

Total answers: 3

How do I write a 24-bit WAV file in Python?

How do I write a 24-bit WAV file in Python? Question: I want to generate a 24-bit WAV-format audio file using Python 2.7 from an array of floating point values between -1 and 1. I can’t use scipy.io.wavfile.write because it only supports 16 or 32 bits. The documentation for Python’s own wave module doesn’t specify …

Total answers: 8