Mi código es el siguiente:
from pydub import AudioSegment \
song = AudioSegment.from_mp3(r"C:\Users\Peter\workspace\Bot_Telegram\Audio de Pedro.mp3")
song.export(r"C:\Users\Peter\workspace\Bot_Telegram\Audio convertido.wav", format="wav")
Y me devuelve este error
C:\Users\Peter\workspace\Bot_Telegram\venv\lib\site-packages\pydub\utils.py:170: RuntimeWarning: Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work warn("Couldn't find ffmpeg or avconv - defaulting to ffmpeg, but may not work", RuntimeWarning) C:\Users\Peter\workspace\Bot_Telegram\venv\lib\site-packages\pydub\utils.py:198: RuntimeWarning: Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work warn("Couldn't find ffprobe or avprobe - defaulting to ffprobe, but may not work", RuntimeWarning) Traceback (most recent call last): File "C:\Users\Peter\workspace\Bot_Telegram\probadera.py", line 5, in song = AudioSegment.from_mp3(r"C:\Users\Peter\workspace\Bot_Telegram\Audio de Pedro.mp3") File "C:\Users\Peter\workspace\Bot_Telegram\venv\lib\site-packages\pydub\audio_segment.py", line 796, in from_mp3 return cls.from_file(file, 'mp3', parameters=parameters) File "C:\Users\Peter\workspace\Bot_Telegram\venv\lib\site-packages\pydub\audio_segment.py", line 728, in from_file info = mediainfo_json(orig_file, read_ahead_limit=read_ahead_limit) File "C:\Users\Peter\workspace\Bot_Telegram\venv\lib\site-packages\pydub\utils.py", line 274, in mediainfo_json res = Popen(command, stdin=stdin_parameter, stdout=PIPE, stderr=PIPE) File "C:\Users\Peter\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\Peter\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, FileNotFoundError: [WinError 2] El sistema no puede encontrar el archivo especificado
Couldn't find ffmpeg or avconv
. Revisa que tengas instalado ffmpeg