video-transcriber / README.md
ThreeSixNine's picture
Initial commit: video transcription Space with Whisper + ffmpeg
946b6aa verified
|
Raw
History Blame Contribute Delete
1.57 kB
---
title: Video Transcriber
emoji: 🎬
colorFrom: indigo
colorTo: purple
sdk: docker
app_port: 7860
pinned: false
license: mit
tags:
- transcription
- speech-to-text
- whisper
- video
---
# 🎬 β†’ πŸ“ Video Transcriber (Speech-to-Text)
Upload a **video** (or audio) file and get a full text transcription, ready to **download** as plain text (`.txt`) or timed subtitles (`.srt`).
## How it works
1. **Upload** a video file β€” `.mp4`, `.mov`, `.mkv`, `.webm`, `.avi`, `.m4v` (audio files like `.mp3`/`.wav`/`.m4a` work too).
2. Click **Transcribe** β€” the audio track is extracted with `ffmpeg` (mono, 16 kHz WAV).
3. **OpenAI Whisper** (via πŸ€— Transformers) transcribes the audio.
4. Read the transcript and **download**:
- `*_transcript.txt` β€” plain text
- `*_subtitles.srt` β€” timestamped subtitles
## Options
- **Language** β€” leave on `auto` for auto-detection, or pin a language for better accuracy.
- **Task** β€” `transcribe` keeps the original language; `translate` translates the speech into English.
## Model
Defaults to [`openai/whisper-base`](https://huggingface.co/openai/whisper-base) for fast transcription on free CPU hardware. On GPU hardware you can switch to [`openai/whisper-large-v3`](https://huggingface.co/openai/whisper-large-v3) for higher accuracy β€” just change `MODEL_ID` in `app.py`.
## Tech stack
- [Gradio](https://gradio.app) UI
- [πŸ€— Transformers](https://huggingface.co/docs/transformers) `automatic-speech-recognition` pipeline
- `ffmpeg` for audio extraction (installed via the Dockerfile)