Questions tagged [pydub]

Pydub is a Python library for audio manipulation.

Pydub is a Python library for manipulating audio.

Quick links:

427 questions
0
votes
0 answers

How to make number of samples in two audios with same name equal?

I have two audios with same name say a.wav But both the audios having different number of samples, how could i make number of samples same in both the audios? Any kind of help or hint would be appreciated.
Rishabh Ojha
  • 57
  • 1
  • 8
0
votes
0 answers

Pydub, cannot locate mp3 file (OSError: [Errno 2] No such file or directory)

While trying to use an mp3 file in a python environment I get this error, my file directories are all properly spelt. Note: the directories are formatted so that within a project folder there is the main code, and 2 sub-folders one for the…
Kimchoo
  • 261
  • 1
  • 3
  • 5
0
votes
1 answer

How to extract perceived loudness of a speech signal in an audio (WAV) file using Python?

I would like to extract loudness of a speech signal from an audio file (WAV). I believe it is a perceived quantity that depends not only on the amplitude of a signal but also the frequencies involved. I found a link that was useful…
Melsauce
  • 2,535
  • 2
  • 19
  • 39
0
votes
1 answer

FileNotFoundError when Script is started from PyCharm

I am using pydub to convert a mp3 file to wav. I switch from Atom to PyCharm and now is throws following error. C:\Users\BlakkM9\AppData\Local\Programs\Python\Python37\lib\site-packages\pydub\utils.py:193: RuntimeWarning: Couldn't find ffprobe or…
BlakkM9
  • 400
  • 4
  • 17
0
votes
2 answers

How can I install ffmpeg if I'm using Cloud Foundry and a python buildpack

I'm writing a python application which uses pydub and want to run it in the cloud, I'm using IBM's ibmcloud Cloud Foundry implementation to deploy the application. pydub requires access to ffmpeg. The python buildpacks do not include this tool. How…
0
votes
1 answer

Issue Importing AudioSegment from Pydub in Python

I'm trying to import pydub into a project and am getting the following errors: Traceback (most recent call last): File "wave.py", line 3, in from pydub import AudioSegment File…
Sergio
  • 792
  • 3
  • 10
  • 35
0
votes
0 answers

pydub copying, resaving and splitting 192kHz sample rate wav file

I have .wav files sampled at 192kHz and want to split them based on time to many smaller files while keeping the same sample rate. To start with I thought I would just open and re-save the wav file using pydub in order to learn how to do this. …
Shara
  • 121
  • 2
  • 10
0
votes
1 answer

How to add noise to audiosegment using pydub?

I am very new to signal processing so apologies for the simplicity! I would like to use pydub to add noise to a sound clip. I know pydub has several generator functions for noise and an overlay audio one. Is overlaying the generated noise segment…
Xun
  • 43
  • 1
  • 5
0
votes
1 answer

Python: Getting Pydub to work with OSError: [Errno 2] No such file or directory and OSError: [WinError 740] errors

I am trying to get pydub package to work. I installed pydub and ffmpeg. When I run my code: from pydub import AudioSegment sound = AudioSegment.from_mp3('Q001007.mp3') I get the following error: > OSError: [WinError 740] The requested operation…
ASE
  • 1,702
  • 2
  • 21
  • 29
0
votes
1 answer

When/why does split_on_silence() return an empty list

I'm trying to take an mp3 and simply remove silent blocks. I'm using pydub.split_on_silence(), but it returns an empty list. In my code below, the audio chunk seems to be silent for the first 4 seconds, has 12 seconds of audio, then is silent for…
cperlmutter
  • 308
  • 3
  • 9
0
votes
0 answers

How to export wave slices to the same bits per sample as the original file

I am looping through a large wave file, via a dictionary of new file names, lengths and versions. The loop exports the individual slices as files: mix.export(key, format='wav') However, it converts the original 24-bit file to 32-bit slices. I…
tzujan
  • 186
  • 1
  • 10
0
votes
1 answer

Export .wav from Audio Segment to AWS S3 Bucket

I'm using IBM's Text-to-Speech API to run speaker detection. I used pydub to concatenate several .wav files into one, but I cannot pass an AudioSegment to IBM. My questions are: Can I export my file directly to an AWS S3 bucket, as I can later…
Sophie Proud
  • 223
  • 1
  • 6
0
votes
1 answer

How to use file path as function parameters

I'm trying to create a function that will remove the vocals from the multiple wav files in a folder but keep running into an index error. I am new to python so am not sure where the issue is arising from but i think it might stem from the way i…
0
votes
1 answer

AudioSegment.from_file overwritten for some reason?

I use in my program the function AudioSegment.from_file: sound = AudioSegment.from_file(audio_path, format="m4a") I also implement a file the I created: import GUI_log In this file I have the next class: class TextHandler(logging.Handler): …
Netanel
  • 477
  • 2
  • 11
0
votes
2 answers

PyDub play audio from variable

I have a function that can generate WAV audio frames into a list. Is there any way I can play audio from that list without using an intermediate file to generate an AudioSegment object? EDIT: For reference, this is my code.
Noam Barnea
  • 23
  • 1
  • 7