【发布时间】:2021-06-24 19:49:42
【问题描述】:
from os import path
from pydub import AudioSegment
input_file = "audio.mp3"
output_file = "result.wav"
sound = AudioSegment.from_mp3(input_file)
sound.export(output_file, format="wav")
当我运行上面的代码时。它显示以下错误。
FileNotFoundError: No such file or directory: 'ffprobe'
我也尝试过使用子进程模块。
input_file = "audio.mp3"
output_file = "result.wav"
import subprocess
subprocess.call(['ffmpeg', '-i', input_file, output_file])
它给出了以下错误
FileNotFoundError: No such file or directory: 'ffmpeg'
我不确定这段代码有什么问题。我目前正在使用 Windows 10。请解决这个问题。
【问题讨论】: