FROM python:3.11-slim
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends     ffmpeg git libsndfile1 &&     rm -rf /var/lib/apt/lists/*
WORKDIR /app
# Use Coqui OSS fork for local voice cloning
RUN pip install --no-cache-dir TTS==0.22.0
COPY services/tts/server.py /app/server.py
VOLUME ["/app/reference"]
EXPOSE 5002
CMD ["python", "server.py"]