Skip to content

Configurable transcription model for OpenAI-compatible backends (local Whisper) #90

Description

@paoloantinori

Context

ccbot's voice-message transcription (src/ccbot/transcribe.py) hardcodes the model:

data={"model": "gpt-4o-transcribe"},

OPENAI_BASE_URL already makes the endpoint configurable, so ccbot can target any OpenAI-compatible /audio/transcriptions server — but the hardcoded model name blocks backends that serve different model names (e.g. a self-hosted Whisper server).

Use case

Private / offline transcription against a local OpenAI-compatible backend. I run Speaches on my LAN exposing Whisper (large-v3-turbo, via faster-whisper) at http://<host>:9000/v1/audio/transcriptions. It's a drop-in OpenAI Whisper-compatible endpoint, but ccbot always requests gpt-4o-transcribe, which that server doesn't serve.

Proposal

Add a CCBOT_TRANSCRIBE_MODEL env var (default gpt-4o-transcribe), mirroring the existing OPENAI_BASE_URL / OPENAI_API_KEY overrides. Backwards compatible: unset preserves current OpenAI behaviour.

Verified end-to-end: a Telegram voice message → Speaches → correctly transcribed text forwarded to the Claude session.

PR incoming.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions