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 can I get around ffmpeg with python Permission Denied?

I am trying to get raw data from an mp3 file with python. I know there are easy ways to do this with a wave file, but I don't want to convert it. This is the relevant part of my code: from pydub import AudioSegment AudioSegment.converter =…
evettsam
  • 19
  • 3
0
votes
2 answers

Using ffmpeg on PythonAnywhere

My (first) web app uses pydub, which depends on ffmpeg. On my local windows environment, I installed ffmpeg and added the path to the ffmpeg executables to the windows "path" environment variables. It all works locally, but bow that I have deployed…
0
votes
0 answers

I get this error :[Errno 2] No such file or directory: 'ffprobe'

I have installed ffmpeg as a dependency in my conda env but still get this error. class UserSearchView(APIView): def get(self, request, link): url = config('BASE_URL') querystring = {"track_url": f'{link}'} headers = { …
Riccardo
  • 107
  • 6
0
votes
1 answer

How do I split audio in python [PYDUB]

I am trying to split the audio of multiple audio files can you tell me where I am going wrong thanks :) from pydub import AudioSegment import os folder_number = 1 folder_number_str = str(folder_number) folder_type = 'short/' audio_file_dir =…
0
votes
0 answers

PyDub opens window no matter what I have tried

I'm trying to make a music making program and used PyDub for playing sounds as I could change the pitch. However, it opens a window whenever playing a sound. No matter what I do, it will open a window. I have tried using startupinfo =…
Abyssor
  • 1
  • 1
0
votes
0 answers

How to upload an object (not a file) to amazonaws using python boto3

There are a lot of webpages designed to show one how to upload a file to amazonaws s3 using boto3 but what if you want to make changes to an object after you open it and it would be time consuming and wasteful to export the object as a file? So I…
brussell_1900
  • 51
  • 1
  • 1
  • 8
0
votes
0 answers

How to export audio in pydub so that raw data is preserved?

I'm trying steganography in Python and I'm using pydub for audio manipulation. What my code basically does is that it gets raw audio data from given file, modifies the least significant bit and exports raw data back to audio. The exported file…
Kate
  • 23
  • 5
0
votes
2 answers

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

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 =…
0
votes
0 answers

Play and record audio simultaneously in real-time with Pydub and Streamlit (streamlit-webrtc)

I'm building a web application for acoustic measurements. I would like the user to be able to play a sinusoidal sweep and record it simultaneously. The playback and the recording must be in sync. I'm using streamlit, streamlit-webrtc and pydub, as…
0
votes
0 answers

How can I overlay ALL of the wav files in a folder to make one new wav file in python?

from pydub import AudioSegment I am using pydub Audiosegment but can only overlay 2 wav files. I would like to overlay All the wav files in a directory without using their filenames. from pydub import AudioSegment from glob import glob import…
Ryan
  • 1
  • 2
0
votes
2 answers

TypeError a bytes-like object is required, not 'str' (Pydub)

I'm getting: Exception has occurred: TypeError a bytes-like object is required, not 'str' When I run the following code: from pydub import AudioSegment from pydub.utils import which AudioSegment.converter = which('ffmpeg') AudioSegment.ffmpeg =…
0
votes
1 answer

PyDub: ffmpeg not found

I have pip installed python-ffmpeg and am trying to play a wav file with PyDub. I get this warning: Warning (from warnings module): File "C:\Users\divel\AppData\Local\Programs\Python\Python39\lib\site-packages\pydub\utils.py", line 170 …
FulvioD 23
  • 17
  • 5
0
votes
1 answer

installing pydub package on spyder anaconda

im trying to install pydub package with this line pip install pydub unfortunately im getting an error that says invalid syntax. i tried the same line on google collab and worked just fine instillation was completed . what do you suggest i should…
user18165921
0
votes
1 answer

Use of ffprobe in kivy 'File not Found'

i am trying to convert audio from webm to mp3 using pudub module in android using kivy. I've included pydub,ffprobe-python,ffmpeg-python in buildozer.spec file but when i run the app i get the following error ! FileNotFoundError: [Errno 2] No such…
Pranzal360
  • 60
  • 1
  • 5
0
votes
1 answer

How to read m4a file in python?

I tried with the following code to read the file: from pydub import AudioSegment filename = "test.m4a" audio = AudioSegment.from_file(filename) This throwed the following error: [mov,mp4,m4a,3gp,3g2,mj2 @ 000001a101b24980] Format…
Manish Shegokar
  • 101
  • 1
  • 10