feat: add local whisper backend for voice transcription#53
Open
Devail1 wants to merge 1 commit intosix-ddc:mainfrom
Open
feat: add local whisper backend for voice transcription#53Devail1 wants to merge 1 commit intosix-ddc:mainfrom
Devail1 wants to merge 1 commit intosix-ddc:mainfrom
Conversation
154b965 to
9d2d9d8
Compare
Add faster-whisper (CPU, free, no API key) as an alternative to the existing OpenAI transcription backend. Default language set to English to skip auto-detection overhead. Configurable via CCBOT_WHISPER_BACKEND (local/openai/off) and CCBOT_WHISPER_MODEL. Defaults to local with base model. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
9d2d9d8 to
29b50ef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
transcribe()entry point that routes based onCCBOT_WHISPER_BACKEND(openai/local/off)openaifor zero-config experience; missing API key message now guides users to the local alternativesmallmodel with English hardcoded to skip detection overheadChanges
transcribe.py— dual backend support withTranscriptionDisabled/TranscriptionErrorexceptionsbot.py— download voice to file (works for both backends), cleanup infinally, better error handlingconfig.py—CCBOT_WHISPER_BACKENDandCCBOT_WHISPER_MODELsettingspyproject.toml—[voice]optional extra for faster-whisper.env.example— documents new env varsTest plan
CCBOT_WHISPER_BACKEND=openai+ valid key — transcribes via OpenAICCBOT_WHISPER_BACKEND=openaiwithout key — shows helpful message with local alternativeCCBOT_WHISPER_BACKEND=local+[voice]installed — transcribes locallyCCBOT_WHISPER_BACKEND=localwithout dep — shows install instructionsCCBOT_WHISPER_BACKEND=off— shows "not available"🤖 Generated with Claude Code