Simple Python script to transcribe audio files using OpenAI's API with word-level timestamps.
- Install dependencies:
pip install -r requirements.txt- Set your OpenAI API key:
export OPENAI_API_KEY="your-api-key-here"Or create a .env file:
OPENAI_API_KEY=your-api-key-here
python transcribe.py <audio_file> [output_file]# Transcribe audio.mp4 and save to audio.txt
python transcribe.py audio.mp4
# Transcribe audio.mp4 and save to custom output file
python transcribe.py audio.mp4 output.txt- Supports MP4, MP3, WAV, and other audio formats
- Word-level timestamps (character-aware)
- Simple command-line interface
- Automatically saves transcriptions to text files
When using word-level timestamps, the output includes:
- Full transcript text
- Word-level timestamps with start and end times