O'Reilly logo

Python Multimedia Beginner's Guide by Ninad Sathaye

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Time for action - audio file format converter

Let's write a simple audio file converter. This utility will batch process input audio files and save them in a user-specified file format. To get started, download the file AudioConverter.py from the Packt website. This file can be run from the command line as:

python AudioConverter.py [options]

Where, the [options] are as follows:

  • --input_dir : The directory from which to read the input audio file(s) to be converted.
  • --input_format: The audio format of the input files. The format should be in a supported list of formats. The supported formats are "mp3", "ogg", and "wav". If no format is specified, it will use the default format as ".wav".
  • --output_dir : The output directory where the converted files ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required