stream-translator  by fortypercnt

CLI tool for real-time audio transcription/translation from livestreams

created 2 years ago
257 stars

Top 98.8% on sourcepulse

GitHubView on GitHub
Project Summary

This utility transcribes or translates audio from live streams in real-time, targeting users who need to process audio from online broadcasts. It leverages streamlink for stream acquisition and OpenAI's Whisper for speech processing, offering a convenient command-line solution for content creators and analysts.

How It Works

The tool integrates streamlink to fetch audio streams from various platforms, passing the stream URL to ffmpeg for processing. OpenAI's Whisper model then transcribes or translates the audio. An optional faster-whisper implementation is available for significant performance gains, offering up to 4x speed improvement and 2x memory reduction when models are converted to the CTranslate2 format.

Quick Start & Requirements

  • Install ffmpeg and add it to your PATH.
  • Install CUDA (version 11.3 or compatible, adjust requirements.txt if needed).
  • Clone the repository: git clone https://github.com/fortypercnt/stream-translator.git
  • Install dependencies: pip install -r requirements.txt
  • Ensure PyTorch is installed with CUDA support.
  • Run: python translator.py <URL> --flags
  • Supported sites depend on streamlink plugins.

Highlighted Details

  • Real-time transcription and translation of live streams.
  • Supports various Whisper model sizes and language detection.
  • Configurable parameters for transcription interval, history buffer, and beam search.
  • Option to use faster-whisper for enhanced performance.
  • Supports direct URL input to ffmpeg, bypassing streamlink.

Maintenance & Community

No specific contributors, sponsorships, or community links (Discord/Slack, roadmap) are mentioned in the README.

Licensing & Compatibility

The README does not explicitly state a license. Compatibility for commercial use or closed-source linking is not specified.

Limitations & Caveats

Whisper performance is heavily reliant on GPU acceleration; CPU execution is unlikely to be real-time. The history_buffer_size parameter can lead to repetition if not configured carefully. The README does not mention testing on different operating systems or provide benchmarks beyond the faster-whisper claims.

Health Check
Last commit

2 years ago

Responsiveness

1 week

Pull Requests (30d)
0
Issues (30d)
0
Star History
4 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.