Questions tagged [audiosegment]
42 questions
0
votes
0 answers
python write mp3 AudioSegment slice to file as mp3 without export method
I have an mp3 live radio stream, which i write locally to an mp3 file using ffmpeg and subprocess Popen (the ffmpeg).
After i open this file with pydub and i wrote the raw_data to pyaudio for hearing the stream.
Now after all, i want to record some…

Chris P
- 2,059
- 4
- 34
- 68
0
votes
0 answers
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 files are not there although I can clearly see…

Md. Rezuwan Hassan
- 59
- 1
- 12
0
votes
0 answers
Pydub can't locate existing audio file in a different PC
I made a script that at some point creates a an audio from a scraped text, and I need to get the lenght of this audio so I'm using pydub AudioSegment to read it and get the duration in seconds.
def time_of_audio(AUDIO_PATH):
audio =…

Lautaro Pacella
- 5
- 2
0
votes
0 answers
Pydub audiosegment output shorter than the sum of concatenated constitutent audiosegments
I use Pydub to concatenate very short wav audiofiles (200ms) that include sounds and silences for an experiment. The sounds I use are previously created and manipulated in Audacity to have sepcific durations and charachteristics. These concatenated…

biancaf
- 1
0
votes
1 answer
Python conversion from wav to mp3 file
How can I convert wav files to mp3 files in Python ? The only answers I found say to use "pydub" but it's not working at all for me :
from pydub import AudioSegment
AudioSegment.from_wav("myfile.wav").export("myfile.mp3", format="mp3")
Result with…

chang thenoob
- 79
- 8
0
votes
0 answers
Slicing MediaRecorder stream bytes in Python WebSocket produces invalid data when found processing input from FFmpeg
I have a WebSocket created using Python WebSocket.
I have a JS client.
The client uses .getUserMedia to capture only audio stream. The client uses MediaRecorder(stream), and .ondataavailable to send the WebSocket a message as a blob.
WebSocket…
0
votes
1 answer
Issue on rejoining splitted AudioSegment
I'm working on a script that splits an AudioSegment into 2 second sub segments and then rejoin them. The final purpose of this is to apply a transform function to each segment before rejoining them but at this point I'm just trying to rejoin the…

F P
- 1
- 1
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
0 answers
how to get file mp3 using audiosegment
i have function to encryp steganography lsb. but when i want to open my mp3 file that can be convert to wav, there's error:
[WinError 2] The system cannot find the file specified
maybe how i open the file was wrong? here's my code:
def…

HelpMeInDjango
- 51
- 4
0
votes
0 answers
AudioSegment Not able to find File
I am trying to convert some mp3 files to "Wav".
Currently the AudioSegnment throws:
FileNotFoundError: [WinError 2] The system cannot find the file specified
I am using the full path to ensure specifity, but it stills does not work. When checking…

Norristoystory
- 1
- 1
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
1 answer
PermissionError: [Errno 13] Permission denied: 'ffprobe' (AudioSegment)
I am trying to get AudioSegment working on my local computer. After resolving some issues, I am stuck on a permission error that I cannot seem to resolve. Let me detail what I have done so far (so that the error is easy to detect):
I pip installed…

AYA
- 21
- 6
0
votes
1 answer
How to merge/layer two audio files using Python AudioSegment without it breaking the wav header
I am more or less following the code below to merge two audio files. It mostly works, where audio segment can export both the original files and the combined file to a folder. These play fine in finder (Mac). However, when brought into a music app…

tambourine
- 89
- 1
- 5
0
votes
1 answer
How do I get number of frames from the m4a file?
I want to open the m4a audio file for analysis but I am getting this error.
File "E:\audio stego\code.py", line 5, in
song = AudioSegment.from_file('E:\\audio stego\\03 VALNDALUM UMMODU.m4a')
File…

Stella Joseph
- 25
- 6
0
votes
2 answers
FileNotFoundError: [Errno 2] No such file or directory: 'Interview-part2.mp3' - pydub
I am trying to convert a .mp3 file into a .wav file based on [this website][1].
I have set my working directory to the location that stores both the python script and the .mp3 file, and tried running the code below:
from os import path
from pydub…

Emil
- 1,531
- 3
- 22
- 47