Skip to content

feat: add local whisper backend for voice transcription#53

Open
Devail1 wants to merge 1 commit intosix-ddc:mainfrom
Devail1:feat/local-whisper-backend
Open

feat: add local whisper backend for voice transcription#53
Devail1 wants to merge 1 commit intosix-ddc:mainfrom
Devail1:feat/local-whisper-backend

Conversation

@Devail1
Copy link
Contributor

@Devail1 Devail1 commented Mar 7, 2026

Summary

  • Add faster-whisper (CPU, free, no API key) as a local transcription backend alongside the existing OpenAI API option
  • Unified transcribe() entry point that routes based on CCBOT_WHISPER_BACKEND (openai/local/off)
  • Default remains openai for zero-config experience; missing API key message now guides users to the local alternative
  • Local backend defaults to small model with English hardcoded to skip detection overhead

Changes

  • transcribe.py — dual backend support with TranscriptionDisabled/TranscriptionError exceptions
  • bot.py — download voice to file (works for both backends), cleanup in finally, better error handling
  • config.pyCCBOT_WHISPER_BACKEND and CCBOT_WHISPER_MODEL settings
  • pyproject.toml[voice] optional extra for faster-whisper
  • .env.example — documents new env vars

Test plan

  • Send voice message with CCBOT_WHISPER_BACKEND=openai + valid key — transcribes via OpenAI
  • Send voice message with CCBOT_WHISPER_BACKEND=openai without key — shows helpful message with local alternative
  • Send voice message with CCBOT_WHISPER_BACKEND=local + [voice] installed — transcribes locally
  • Send voice message with CCBOT_WHISPER_BACKEND=local without dep — shows install instructions
  • Send voice message with CCBOT_WHISPER_BACKEND=off — shows "not available"

🤖 Generated with Claude Code

@Devail1 Devail1 force-pushed the feat/local-whisper-backend branch from 154b965 to 9d2d9d8 Compare March 7, 2026 17:24
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>
@Devail1 Devail1 force-pushed the feat/local-whisper-backend branch from 9d2d9d8 to 29b50ef Compare March 7, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant