from pydub import AudioSegment
import pydub
import os
pydub.AudioSegment.ffprobe = os.getcwd()+ "\\ffprobe.exe"
pydub.AudioSegment.converter = os.getcwd()+ "\\ffmpeg.exe"
w=AudioSegment.from_ogg(r'C:\Users\gelse\PycharmProjectsd\telegrambot_chatgpt4\voices\7053673038300.ogg')
w.export(r'C:\Users\gelse\PycharmProjectsd\telegrambot_chatgpt4\voices\7053673038300.mp3', format="mp3")
Не работает, как бы не пытался. Вылетает ошибка:
C:\Users\gelse\PycharmProjectsd\telegrambot_chatgpt4\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\gelse\PycharmProjectsd\telegrambot_chatgpt4\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\gelse\PycharmProjectsd\telegrambot_chatgpt4\test.py", line 37, in <module>
w=AudioSegment.from_ogg(r'C:\Users\gelse\PycharmProjectsd\telegrambot_chatgpt4\voices\7053673038300.ogg')
File "C:\Users\gelse\PycharmProjectsd\telegrambot_chatgpt4\venv\lib\site-packages\pydub\audio_segment.py", line 804, in from_ogg
return cls.from_file(file, 'ogg', parameters=parameters)
File "C:\Users\gelse\PycharmProjectsd\telegrambot_chatgpt4\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\gelse\PycharmProjectsd\telegrambot_chatgpt4\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\gelse\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\gelse\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1438, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Не удается найти указанный файл
Нормального туториала по установке всяких .exe , я не нашел. Установил, как установил.