We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
def convert_audio_to_wav(audio_path, wav_path): file_extension = os.path.splitext(audio_path)[1] if file_extension != '.wav': # Specify the paths to ffmpeg and ffprobe within the virtual environment ffmpeg_path = r"C:\Users\nwpno\AppData\Local\ffmpeg-6.1.1\bin\ffmpeg.exe" ffprobe_path = r"C:\Users\nwpno\AppData\Local\ffmpeg-6.1.1\bin\ffprobe.exe" # Set the paths for Pydub AudioSegment.converter = ffmpeg_path AudioSegment.ffmpeg = ffmpeg_path AudioSegment.ffprobe = ffprobe_path # Perform the conversion audio = AudioSegment.from_file(audio_path) audio.export(wav_path, format='wav') print("Conversion successful") else: print("File is already in WAV format") return wav_path
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: