How sanjogbora/whisper-hindi2hinglish works
This repository combines a Hindi/Hinglish speech-recognition service with video-to-SRT conversion. The main workflow accepts a video through the web interface or REST API, extracts audio, transcribes it with word timestamps, groups the transcript into subtitles, and returns an SRT file; a CLI entry point is also documented. A separate WebSocket workflow streams audio from file or microphone clients for incremental transcription. The source excerpts show the video conversion and streaming internals; some UI and model details are documented in the README rather than inspected source.
Main entry points: websocket_server.py WebSocket server · video_to_srt.py Video converter · web_server.py Video upload · templates Web UI
Components 18
Video subtitles
- Video converter
video_to_srt.py - Audio extraction
video_to_srt.py - Timestamped ASR
video_to_srt.py - Subtitle grouping
video_to_srt.py - SRT generation
video_to_srt.py - CLI
video_to_srt.py
Web interface
- Video upload
web_server.py - Web UI
templates - REST API
web_server.py
Live transcription
- File audio client
client_file.py - Microphone client
client_mic.py - WebSocket server
websocket_server.py
Shared inference
- Audio preprocessing
utils.py - Model loading
utils.py
Other components
- Video user
- FFmpeg
- Whisper timestamped
- Hinglish speech model
Connections 17
- Video user → Web UI: uses
README.md - Web UI → Video upload: submits video
README.md - Video upload → REST API: uploads to
web_server.py - REST API → Video converter: calls
web_server.py - Video converter → Audio extraction: extracts audio
video_to_srt.py - Audio extraction → FFmpeg: runs
README.md - Video converter → Timestamped ASR: transcribes audio
video_to_srt.py - Timestamped ASR → Whisper timestamped: uses
video_to_srt.py - Video converter → Subtitle grouping: groups words
video_to_srt.py - Subtitle grouping → SRT generation: writes subtitles
video_to_srt.py - Video user → CLI: runs conversion
README.md - File audio client → WebSocket server: streams audio
client_file.py - Microphone client → WebSocket server: streams audio
client_mic.py - WebSocket server → Audio preprocessing: preprocesses audio
websocket_server.py - WebSocket server → Model loading: loads pipeline
websocket_server.py - Model loading → Hinglish speech model: loads model
utils.py - WebSocket server → Hinglish speech model: transcribes chunks
websocket_server.py