Skip to content

blackdorn/speechtotext

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Speech to Text Transcription

Simple Python script to transcribe audio files using OpenAI's API with word-level timestamps.

Setup

  1. Install dependencies:
pip install -r requirements.txt
  1. 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

Usage

python transcribe.py <audio_file> [output_file]

Examples

# 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

Features

  • Supports MP4, MP3, WAV, and other audio formats
  • Word-level timestamps (character-aware)
  • Simple command-line interface
  • Automatically saves transcriptions to text files

Output Format

When using word-level timestamps, the output includes:

  • Full transcript text
  • Word-level timestamps with start and end times

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages