Skip to content

Instantly share code, notes, and snippets.

@openroomxyz
Created April 13, 2020 14:49
Show Gist options
  • Save openroomxyz/dc8cd73ec225f5cce316f2b32edfc9dc to your computer and use it in GitHub Desktop.
Save openroomxyz/dc8cd73ec225f5cce316f2b32edfc9dc to your computer and use it in GitHub Desktop.
Python : How can i convert from ogg to mp3?
#you need to have installed pydub and conda
#conda install -c conda-forge ffmpeg
#conda install -c conda-forge pydub
from pydub import AudioSegment
path_file_input = "C://Users//X//Downloads//t_voice5812054872861705901.ogg"
path_file_output = "C://Users//X//Desktop//bip//audioX.mp3"
ogg_version = AudioSegment.from_ogg(path_file_input)
ogg_version.export(path_file_output, format="mp3")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment