astoreyai avatar

stt-transcription

Speech-to-text transcription using multiple engines (Whisper, Google Speech, Azure, AssemblyAI). Rec

by astoreyai|Open Source

Speech-to-Text Transcription

Version Status License

Description

Comprehensive speech-to-text capabilities using multiple STT engines including Whisper (local/free), Google Speech, Azure Speech, and AssemblyAI. Record audio, transcribe files, real-time processing, speaker identification, timestamps, and multi-language support.

Features

  • ✅ Multiple STT engines (Whisper, Google, Azure, AssemblyAI)
  • ✅ Audio recording with voice activity detection
  • ✅ File transcription (WAV, MP3, M4A, FLAC, OGG)
  • ✅ Real-time streaming transcription
  • ✅ Speaker diarization (identify who said what)
  • ✅ Multi-language support (99+ languages)
  • ✅ Timestamp and segment tracking
  • ✅ Multiple output formats (text, JSON, SRT, VTT)
  • ✅ Batch processing
  • ✅ Audio enhancement (denoise, normalize)
  • ✅ Video subtitle generation

Installation

Prerequisites

  • Python 3.8+
  • Microphone (for recording)
  • API keys (for cloud engines)

Setup

  1. Install Whisper (free, local):

    pip install openai-whisper
    
  2. For cloud engines (optional):

    pip install google-cloud-speech azure-cognitiveservices-speech assemblyai
    
  3. Audio dependencies:

    pip install sounddevice soundfile numpy
    

Usage

Record and Transcribe

# Record audio
python scripts/record_audio.py --output recording.wav

# Transcribe with Whisper (free)
python scripts/transcribe_whisper.py --file recording.wav

# Real-time transcription
python scripts/stream_whisper.py

Engine Comparison

EngineCostSpeedQualityBest For
WhisperFreeMediumHighPrivacy, offline
Google$1.44/hrFastHighReal-time
Azure$1/hrFastHighEnterprise
AssemblyAI$0.90/hrMediumVery HighAnalysis

Examples

Example 1: Meeting Transcription

Record meeting, transcribe with speaker labels, export as markdown

Example 2: Voice Notes

Quick voice note recording and transcription to markdown

Example 3: Video Subtitles

Extract audio from video, generate SRT subtitles

Configuration

Choose Whisper model size:

  • tiny/base: Fast, good for notes
  • small/medium: Balanced
  • large: Best accuracy, slower

License

MIT License - see LICENSE for details.

Author

Aaron Storey (@astoreyai)