Skip to content

sandbox-science/transcriber

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Capski CLI

A fast, Rust video subtitle pipeline that:

  • Extracts audio from a video using ffmpeg
  • Transcribes speech into text with precise timestamps using whisper_rs
  • Generates styled karaoke-style ASS subtitles (with word-level highlighting)
  • Burns subtitles into videos or overlays on new video, image, or solid color backgrounds with ffmpeg

Note

More examples are available in the example directory.

output_bg_image.mp4

Important

Tested on macOS only.

The instructions below assume you’re on a Mac (using Homebrew).

Engineering Requirements Document

The Engineering Requirements Document (ERD) is available here :

-> ERD on Google Docs

Getting started

1. Install ffmpeg

brew install ffmpeg

2. Install Capski

You can now install Capski using Rust Cargo.

cargo install --path .

3. Run Capski

Basic transcription (auto-detects language):

capski --input "example/input_audio.wav"

You can also translate your non-English audio to English:

capski --input "japanese_audio.wav" --translate

Also explicity set the source language to translate to English:

capski --input "french_audio.wav" --language FR --translate

Note

Capski uses Whisper to transcribe audio. If you want to translate non-English speech into English subtitles, use the --translate flag along with the --language option to specify the source language (e.g., fr for French, es for Spanish).

📌 Whisper only supports translation into English. Translating English into other languages is not supported.

This runs the pipeline end-to-end:

  • extracts or processes audio,
  • transcribes with Whisper,
  • generates subtitles,
  • burns subtitles into a new video.

Configuration

In the style.json file, you control:

  • Subtitle text styling: font, size, colors, alignment
  • Background style: solid color, image, or looping video

You can control your background type to be either solid, video, or image. Here are the 3 way to configure it:

  • Video Background

{
  "background": {
    "type": "video",
    "solid_color": null,
    "video_path": "assets/bg_example.mp4",
    "image_path": null
  }
}
  • Image Background

{
  "background": {
    "type": "image",
    "solid_color": null,
    "video_path": null,
    "image_path": "assets/bg_image.jpg"
  }
}
  • Solid Background

{
  "background": {
    "type": "solid",
    "solid_color": "#101020",
    "video_path": null,
    "image_path": null
  }
}

Note

You can find the example of each of those configurations in the example directory. In assets directory, you will find the video and image backgrounds used in those examples.

About

A fast, Rust video subtitle pipeline

Topics

Resources

License

Stars

Watchers

Forks

Languages