diff --git a/Dockerfile b/Dockerfile index 62fe8f4..84b5971 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,13 +17,14 @@ COPY src/ src/ RUN --mount=type=cache,target=/root/.cache/pip \ pip install . -# Voice deps (faster-whisper, kokoro, torch, soundfile, spacy) are NOT -# installed in the production image. They added ~2 GB and pulled numpy<2, -# which has no cp314 wheel and broke the slim-image build. -# Voice paths in code are lazily guarded; with VOICE_ENABLED=false (default), -# the app starts cleanly. With voice enabled, missing imports log and -# the feature gracefully degrades. To re-enable voice in a build, install -# the `voice` extra: `pip install .[voice]` — and add an extras step here. +# Speech-to-text (faster-whisper + soundfile). faster-whisper is pure +# Python; the actual inference engine is ctranslate2 (C++) which has +# cp314 wheels as of v4.7.2 (2026-05-19). No torch needed — ctranslate2 +# does its own CPU inference. Image add: ~150 MB. +# TTS (piper-tts) is installed in a separate later step so STT can +# stand alone if TTS becomes problematic. +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install faster-whisper soundfile # Build the fable-mcp wheel so it can be served for download COPY fable-mcp/ fable-mcp/