Skip to content

A Chrome(ium) extension to replace YouTube's auto-captions with Whisper-generated ones

Notifications You must be signed in to change notification settings

iGerman00/buttercup-chrome

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buttercup Buttercup - Better YouTube Captions

Buttercup

A Chromium extension to enhance your YouTube caption experience.
Say goodbye to those horrible auto-generated captions.
Powered by Groq API for transcription
Powered by Cobalt API for audio extraction.


screenshot of extension UI

Badge indicating count of captions cached

Donate on Ko-Fi

Features

  • Whisper-Generated Captions: Leverages OpenAI's Whisper AI tech through Groq API for high-quality captions.
  • Automatic Replacement: Replaces YouTube's default auto-captions with Buttercup, not affecting videos with existing real captions. Real captions always take priority over automatically generated ones.
  • Caching System: Utilizes an optional caching database to store video IDs and generated captions for enhanced performance.
  • Translation: Seamlessly translate all speech to English (only available with the whisper-large-v3 model).
  • Word-Level Timestamps: Uses word-level timestamps with a configurable sliding window to create better-formatted subtitles with precise timing.
  • Download: Quickly download the generated subtitles as an .srt file for further use.
  • Multiple Models: Choose between different Whisper models for different speed/quality tradeoffs.
  • Flexible API Setup: Configure your own API keys for Cobalt and Groq.
  • Model Prompting: Guide the model's style or specify how to spell unfamiliar words with customizable prompts.

Installation

  1. Enable Developer Mode in Chrome Extensions.
  2. Download this repository and unpack the ZIP file to a safe location.
  3. Load the unpacked extension in Chrome(ium) through the Extensions (chrome://extensions) menu.
  4. Set up API keys by clicking on the extension icon and going to the API Setup tab.

API Setup

Buttercup requires API keys to function:

  1. Groq API Key (Required): Sign up at Groq to get your API key. It's free!
  2. Cobalt API Key (Optional): Some Cobalt instances may require an API key. You can also use a different Cobalt API base URL if needed.

Model Selection

Buttercup supports different Whisper models through the Groq API:

  • whisper-large-v3: Best quality, supports multilingual transcription and translation to English.
  • whisper-large-v3-turbo: Faster processing, supports multilingual transcription but no translation.
  • distil-whisper-large-v3-en: Fastest processing, English-only transcription, no translation.

Privacy and Data Usage

Buttercup has no need to spy on you, however:

  • You can opt out of using the cache database in the extension settings.
  • The cache database source code is available here.
  • Your API keys are stored locally in your browser and are only sent to the respective API services.

Getting Started

After installation and API setup, simply navigate to any YouTube video and play it. Upon clicking the captions button, the icon of which will be replaced with BC, Buttercup will automatically replace YouTube's captions with the enhanced ones, unless real captions are available.

Translation

When you enable translation after clicking the extension's icon, Buttercup will translate all speech to English. Note that translation is only available with the whisper-large-v3 model. If you select a different model, the translation option will be disabled.

Advanced Features

Word-Level Timestamps

Buttercup uses word-level timestamps to create better-formatted subtitles. This feature:

  • Provides more precise timing for each word
  • Uses a sliding window to combine words into readable lines
  • Is fully configurable - adjust words per line and maximum line length
  • Can be disabled to fall back to segment-level timestamps

Model Prompting

You can guide the model's transcription style or help it with unfamiliar words:

  • Enter a prompt (up to 896 characters) to influence how the model transcribes
  • Useful for technical content, names, or specific terminology
  • Helps maintain consistent style across transcriptions

Support & Feedback

Encountered an issue? Have suggestions? Feel free to open an issue or a pull request on this GitHub repository. I'm always looking to improve Buttercup and appreciate your feedback.

Credits

  • Groq for providing the API for Whisper models
  • Cobalt for the audio extraction API
  • DualSubs project and Virgil Clyne specifically for some help on overriding the responses for YouTube's captions API
  • Cloudflare for providing the free and easy-to-use serverless architecture and KV database API for the cache database service

About

A Chrome(ium) extension to replace YouTube's auto-captions with Whisper-generated ones

Topics

Resources

Stars

Watchers

Forks

Sponsor this project

  •