Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save diewland/65565b4b12bed25da56b49e91e4fa510 to your computer and use it in GitHub Desktop.
Save diewland/65565b4b12bed25da56b49e91e4fa510 to your computer and use it in GitHub Desktop.
subprocess in pydub.AudioSegment.from_file_using_temporary_files
# https://github.com/jiaaro/pydub/blob/master/pydub/audio_segment.py
with open(os.devnull, 'rb') as devnull:
p = subprocess.Popen(conversion_command, stdin=devnull, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
p_out, p_err = p.communicate()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment