Open SuperFeda opened 1 year ago
I want to write programs that takes an .mp3 file and converts it to an .ogg file.
from pydub import AudioSegment from colorama import Fore import os ffprobe_path = r"ff_programs\\" #r"C:\Users\User\PycharmProjects\pythonProject\AudioManager\ff_programs" os.environ["PATH"] += os.pathsep + ffprobe_path def convert_to_ogg(mp3_file): audio = AudioSegment.from_file(mp3_file, "mp3") audio.export(mp3_file, format="ogg") input_file = input("Путь к файлу формата mp3 ----> ") try: convert_to_ogg(input_file) except FileNotFoundError as e: print(f"{Fore.RED}[ERROR] Путь к файлу был указан не верно. {e}.{Fore.RESET}")
Sound: gdgdfg.zip
What's going to happen:
I want to write programs that takes an .mp3 file and converts it to an .ogg file.
Code:
Error:
Error
``` Traceback (most recent call last): File "C:\Users\User\PycharmProjects\pythonProject\AudioManager\audio_manager.py", line 22, inSystem configuration:
Sound: gdgdfg.zip