Questions tagged [audiosegment]

42 questions
5
votes
2 answers

Cannot find a solution to [WinError 2] File not found by AudioSegment.from_mp3

Even though there are a handful of threads on this issue, no solutions have helped me, here is the problematic lines of code: AudioSegment.converter =…
Draco
  • 145
  • 10
5
votes
1 answer

Creating an empty AudioSegment File in Python (pydub)

Beginner here. I'm trying to loop through a list of paths to mp3 files and merge all the mp3s: combined_sounds = AudioSegment.from_mp3('./00.mp3') for file in files: sound = AudioSegment.from_mp3(file) combined_sounds= combined_sounds +…
userjmillohara
  • 457
  • 5
  • 25
3
votes
0 answers

Python AudioSegment: exporting wav to mp3 increases file duration

I have a wav file, with exactly 4 minutes and 24 seconds of duration. When i try to convert it to mp3 format whit this simple code: from pydub import AudioSegment AudioSegment.from_wav("wavfile.wav").export("mp3file.mp3", format="mp3") the result…
3
votes
1 answer

pydub.AudioSegment messes up the audio data when loading from a numpy.ndarray

I have to mix audio files programmatically (add background noises to recordings) and all of my files are 8-9 hour long recordings in the .opus format. I have tried to use pydub.AudioSegment to load one in the memory but I get this following…
Ani
  • 53
  • 1
  • 8
2
votes
0 answers

Downloading a podacts

I am trying to dwonload some podcasts and title them accordingly. Here is my code s_out_dir = os.path.join(source_dir, pod_label, owner) source_file = s_out_dir + '/' + pod_title + '.mp3' audio_file_name = wget.download(link, out=source_file) …
2
votes
0 answers

pydub audiosegement gives a FileNotFoundError

I'm trying to work with pydub to get the times of each word spoken in an audio file, but python throws me a FileNotFoundError The code: from pydub import AudioSegment from pydub.silence import detect_nonsilent path =…
DuduYassa
  • 33
  • 4
2
votes
0 answers

How to fix pyDub Error "Decoding failed" while segmenting Audio

Initially the code below worked well. But once, during execution of the code i stopped the execution. Then, it constantly shows 'Decoding failed. ffmpeg returned error code:1'. My OS is linux mint. What i've tried: Reinstalled pydub Tried solving…
Surya Bhusal
  • 520
  • 2
  • 8
  • 28
2
votes
1 answer

AudioSegment results in MemoryError while i have plenty of memory

I'm trying to concatenate two mp3 files with AudioSegment (pydub). For small size files (less then 35 Mb) it's working. For bigger, i get a MemoryError. Python version:3.6.2 Here is my code. Thank you for any help! from pydub import…
2
votes
2 answers

IsADirectoryError: [Errno 21] Is a directory ( in AudioSegment)

Script : from pydub import AudioSegment sound = AudioSegment.from_mp3("/srv/python/welcome.mp3") sound.export("/srv/python/test", format="wav") ERROR: IsADirectoryError: [Errno 21] Is a directory: '/srv/python/test' path /srv/python/test is exits…
Saurabh Chandra Patel
  • 12,712
  • 6
  • 88
  • 78
1
vote
0 answers

FileNotFoundError when trying to split audio

I'm trying to split some audio files but I can't seem to find the solution for the error that occurs. I have imported pydub and AudioSegment. audio_file = AudioSegment.from_mp3(abs_path_file) This is the…
Luke
  • 31
  • 3
1
vote
0 answers

An issue with reading files using Pydub AudioSegment

I am very new to Pydub library and having trouble with some functionalities. I'm trying to provide an audio file in same directory to the AudioSegment.from_file() function and it keeps returning this error, File "c:/Users/Win 10/Desktop/Final Year…
1
vote
0 answers

Thread stops running when creating an AudioSegment from pydub

I'm creating an application that will play audio on a different thread. The thread runs fine until it reaches the statement where I create an AudioSegement from the pydub library. I want it to continue executing after this statement so that the…
PhonyStark
  • 21
  • 2
1
vote
1 answer

.raw to .wav via pydub(AudioSegment) sounds noisy

I want to convert .raw audio file to .wav audio file. So, I use below code with pydub AudioSegment final = AudioSegment.from_file('input.raw', format='raw', frame_rate=8000, channels=1, sample_width=1).export('result.wav', format='wav') btw, its…
dmjeong
  • 101
  • 2
  • 7
1
vote
1 answer

Permission denied when trying to play AudioSegment in python

I am trying to split mp3 file into chunks by silence and getting File "C:\Anaconda3\envs\py27\lib\site-packages\pydub\playback.py", line 71, in play _play_with_ffplay(audio_segment) File…
Dims
  • 47,675
  • 117
  • 331
  • 600
0
votes
0 answers

Errno 13 Permission denied Python pydub

im trying to run pydub and audiosegment but i keep getting errno13 permission denied and i need someone to help me fix it here is image of the code you can see the error im getting in the image i didnt like other libraries but if you have…
1
2 3