[Python] Unable to import audio on python using ffmpeg

Discussão em 'Python' iniciado por Stack, Agosto 14, 2025.

  1. Stack

    Stack Membro Participativo

    I'm running my code on a VM, so I can't add it to my path. I want to do:

    audio = AudioSegment.from_mp3(path_mp3)
    audio.export(path_wav, format="wav")


    I keep getting:

    FileNotFoundError: [WinError 2] The system cannot find the file specified


    I tried GPT (and Claude, and Deepseek, etc....) and looking at other questions here posted, without sucess. I know I must have ffpmeg. I have download it and added the .exe at both my script folder (such as suggested elsewhere) and also tried adding the option directly to AudioSegmenter, as in

    AudioSegment.converter = ffmpeg_path
    AudioSegment.ffmpeg = ffmpeg_path
    AudioSegment.ffprobe = ffprobe_path


    ffmpeg is working. I tried using it directly on the command prompt and it went just fine. I really do not know what is going on here. And, yes, I'm sure that the audio files do exist. This is not the problem. I'll be happy to provide any additional information and/or context.

    Continue reading...

Compartilhe esta Página