Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Edge — Local Speech Transcription

A self-hosted web app that turns any audio or video file into a word-timed transcript using faster-whisper (OpenAI Whisper running on CTranslate2). Everything runs on your own machine — audio never leaves your computer.

Built with Python + Flask + faster-whisper + ffmpeg. No cloud, no API keys, no accounts.

stack license platform


Why Edge?

  • Private by design — audio is converted and transcribed locally. Uploads are cleaned up after each job.
  • Word-level timestamps — every word is time-coded, so you can click a word and jump to that moment in the audio.
  • Fast on CPU — CTranslate2 int8 inference is several times faster than stock Whisper and uses far less memory.
  • Model of your choicetiny (fastest) through large-v3 (most accurate), with device and compute-type options.
  • Exports — download your transcript as plain text (txt), SubRip (srt), or WebVTT (vtt).
  • Multi-language — auto-detect or pin a language (18 built-in options).

Features

🎧 Drag-and-drop upload MP3, WAV, M4A, FLAC, OGG, OPUS, AAC, WMA, and video with audio
🧠 Local AI models tiny · base · small · medium · large-v3, cached in memory after first load
⏱️ Word timestamps click any word to seek the audio player to that exact moment
🎞️ Live highlight the current word is highlighted while audio plays
📤 Exports .txt · .srt · .vtt
🗂️ Session history past transcripts listed on the home page, with delete
🌍 Language control auto-detect or pin one of 18 languages
⚙️ Tunable CPU/GPU device, int8/float16/float32 compute

Quick start

1. Prerequisites

  • Python 3.9+
  • ffmpeg on your PATH (used for audio conversion)
  • ~2 GB free disk for dependencies + your chosen model

2. Install & run

git clone https://github.com/yaleedhaque/Edge-project.git
cd Edge-project
python -m venv .venv
.venv\Scripts\activate        # Windows
source .venv/bin/activate     # Linux / macOS
python -m pip install -r requirements.txt
python app.py

Open http://127.0.0.1:5000. On the first transcription, the selected Whisper model is downloaded (~75 MB for tiny up to ~3 GB for large-v3) — after that it loads from cache on every request.

3. Run on your network

EDGE_HOST=0.0.0.0 EDGE_PORT=5000 python app.py

Configuration

Environment variables (all optional):

Variable Default Description
EDGE_HOST 127.0.0.1 Bind address (0.0.0.0 to expose on your LAN)
EDGE_PORT 5000 HTTP port
EDGE_DEBUG 0 Flask debug mode (1 to enable)
EDGE_MAX_MB 512 Max upload size in MB

API

Method Route Description
GET / Upload page
POST / Upload audio → returns {"url": "/session/<id>"} (multipart form: audio, model_size, device, compute_type, language)
GET /session/<id> Transcript view
GET /session/<id>/export/<fmt> Export as txt, srt, or vtt
POST /session/<id>/delete Delete session + audio
GET /api/sessions List sessions (JSON)
GET /uploads/<file> Serve stored audio

How it works

  1. Convert — the uploaded file is converted to 16 kHz mono WAV with ffmpeg.
  2. Transcribe — faster-whisper runs the chosen model on the WAV (VAD filtering removes silence).
  3. Timing — each segment and word is timestamped and stored as a session JSON.
  4. View — the session page renders timestamped words and wires them to the audio player; one click seeks.

Models are loaded once and cached in memory per (model_size, device, compute_type) combination, so repeat transcriptions skip model loading.

Performance notes

  • The base model with int8 is a good default for CPU machines — accurate enough and fast.
  • Use tiny for very long files or weak CPUs; medium/large-v3 for noisy audio or hard languages (best with a GPU).
  • compute_type: int8 is ~4× faster and uses far less RAM than float32.

Project layout

app.py            Flask app — routes, model cache, exports
templates/        index.html (upload) + session.html (transcript view)
static/           style.css + app.js (shared UI)
requirements.txt  pinned Python dependencies

License

MIT — do whatever you like with it.


Md. Yaleed HaqueGitHub · Portfolio · yaleedhaque@users.noreply.github.com

About

Edge — self-hosted, on-device AI speech-to-text. Upload any audio/video, get word-timed transcripts with clickable words, exports (txt/srt/vtt). Flask + faster-whisper + ffmpeg. No cloud, no API keys.

Topics

Resources

Security policy

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages