6e6cfd77b7
Off-the-shelf Whisper wrappers hardcode faster-whisper defaults that cause cascading hallucinations on real dictations (2/13 runs against ahmetoner v1.9.1). This thin FastAPI service mirrors the /asr interface but fixes condition_on_previous_text=False, temperature=0.0, and vad_filter=True so the Axum server can switch by changing WHISPER_URL.
22 lines
513 B
Docker
22 lines
513 B
Docker
FROM nvidia/cuda:12.1.0-cudnn8-runtime-ubuntu22.04
|
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends \
|
|
python3 python3-pip ffmpeg && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
WORKDIR /app
|
|
|
|
COPY requirements.txt .
|
|
RUN pip install --no-cache-dir -r requirements.txt
|
|
|
|
COPY main.py .
|
|
|
|
ENV WHISPER_MODEL=large-v3-turbo \
|
|
WHISPER_COMPUTE_TYPE=float16 \
|
|
WHISPER_MODELS_DIR=/models
|
|
|
|
VOLUME ["/models"]
|
|
EXPOSE 9001
|
|
|
|
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "9001", "--workers", "1"]
|