bitreka

Software Engineering Leader | AI-Assisted Development | .NET & C# | FinTech & Payments | E-Commerce | Architecture • Backend • Microservices • DevOps • Test Automation • AI Agents

All work

Dubhero

Turns video and audio into subtitles or a dub in the target language — on the web, in the browser and on the phone.

Status
MVPA working first version with the core flows.
Role
Sole engineer: product design, architecture, API, pipeline, web, browser extension and native mobile apps.
Started
Categories
Media, AI and LLM
Parts
Web, Android, iOS, Browser extension

Purpose

Let someone watch a video in their own language: upload a file or share a link, choose subtitles, a voice-over or a full dub, and play it back with the result.

The problem

Translating speech is a chain of steps — transcription, translation, timing, synthesis — and each one can fail quietly: a misheard name, a line too long to read, a voice clip that does not fit its slot. A pipeline that only reports "done" hides exactly the errors a viewer notices.

What I built

  • A .NET 10 API around one segment pipeline — speech recognition, translation, output — with pluggable providers behind interfaces and FFmpeg for audio extraction, mixing and merging.
  • Two independent output axes: a subtitle mode (none, translated, bilingual, source only) and an audio mode (original, voice-over, full dub), with the older single-axis field kept working for backward compatibility.
  • A per-stage quality report: transcription, translation, subtitle and speech-fit audits, plus a reviewer model that must come from a different provider than the translator; "no findings" is kept distinct from "not reviewed".
  • Model selection as data: a model catalog, language support backed by provider documentation, fail-closed plan permissions and a capacity check before a job starts, so a job does not hit a shared provider limit halfway.
  • Playback without hosting third-party media: sources are downloaded only for processing and then deleted; the player streams from the original address and overlays the voice-over by lowering the video volume.
  • Four clients on the same API: a React web app, a Firefox and Chrome extension that sends the open tab's video, and native iOS (SwiftUI) and Android (Jetpack Compose) apps with rotating refresh tokens.

Features

  • Upload a file or paste a link.
  • Two output axes: subtitles (none, translated, bilingual, source only) and audio (original, voice-over, full dub).
  • A player with a subtitle strip and a dub overlay, plus watch pages.
  • A quality report with per-segment review and re-synthesis.
  • Tokenised public share links for the subtitle file and the dubbed audio.
  • An optional merged video download, off by default and behind a rights attestation.
  • Plan quotas, usage and spend chart, and admin panels for the model catalogue, prices and reconciliation.
  • Per-account model and voice preferences, and voice cloning with consent.
  • A Firefox and Chrome extension, and native iOS and Android apps, on the same API.

Stack

  • .NET
  • ASP.NET Core
  • PostgreSQL
  • FFmpeg
  • Claude API
  • React
  • TypeScript
  • Browser extension
  • SwiftUI
  • Jetpack Compose

AI in this project

In the product

  • A pipeline of speech recognition, translation, an optional refinement pass, a judge and speech synthesis. Providers are swappable through configuration and a model catalogue: recognition (Whisper, ElevenLabs, AssemblyAI, Deepgram, Google), translation (OpenAI, Gemini, Claude) and synthesis (OpenAI, ElevenLabs, Cartesia).
  • The judge is a Claude model that lists only problem segments. A judge from the same provider as the translator makes the app refuse to start, and a refinement pass from the same provider is skipped and logged. "No finding" is kept distinct from "not reviewed".
  • Quality gates: a deterministic audit runs on every job, a hallucination filter removes invented segments, a back-translation gate compares meaning, and an optional audio round-trip check runs recognition on the result.
  • Voice cloning is fail-closed: it needs both a plan flag and a valid consent record, and each rejection has its own code.
  • Cost guards: a provider budget pre-check before a job starts, a cost cap per media minute, a 60-minute media limit, and an unknown price is never counted as zero. Which model is used is data in a catalogue, not code, and an explicitly requested model never silently falls back.

In how it was built

  • 315 of 355 commits carry a Claude co-author trailer.
  • A 242-line rule file records lessons such as "a green build is not a working system" and a git-ignore pattern that swallowed source files. Separate coverage gates are required for the web client, the extension and the iOS and Android apps.

Key flows

Steps

From a link to a dubbed video

  1. Step 1 of 4: Pick a source

    A file is uploaded or a link pasted on the web, or the browser extension sends the video in the current tab.

  2. Step 2 of 4: Choose the output

    The user selects the target language, a subtitle mode and an audio mode; a preflight check rejects requests this setup cannot deliver before any paid call is made.

  3. Step 3 of 4: Processing

    The job runs transcription, translation and subtitle or speech synthesis, and each stage is audited into one quality report.

  4. Step 4 of 4: Watch

    The player shows the video with the new subtitles or voice-over; the browser extension notifies when the job is finished.

Limitations

  • The extension submits a video and notifies when it is ready; real-time translation while watching is not built yet.
  • Burning subtitles into the picture needs an FFmpeg build with libass; without it such jobs are rejected before they are queued.

Want something like this?

Tell me about your project — I reply within two working days.

Start a project