Batch transcribes audio files in the specified folder.
- Python 3
- OpenAI API key of an active account.
For MacOS or Linux:
# setup python environment
python3 -m venv venv
source venv/bin/activate
pip install -U pip
pip install -r requirements.txt
# set api key as environment variable
echo "export OPENAI_API_KEY=<your-openai-api-key>" \
>> ~/.zshrc # use ~/.bashrc if bash
source ~/.zshrc
The folder containing the audio files is the 'source folder', the folder that will store the transcription results as txt files is the 'export folder'.
python script.py <source-folder-path> <export-folder-path>
Example:
python script.py ~/Downloads/records/ transcripts/
Available audio file types:
- flac
- mp3
- mp4
- mpeg
- mpga
- m4a
- ogg
- wav
- webm