FROM python:3.11-slim
ENV PYTHONUNBUFFERED=1
RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
WORKDIR /app
RUN pip install --no-cache-dir fastapi==0.115.0 "uvicorn[standard]==0.30.6" python-multipart==0.0.9 httpx==0.27.2 \
    edge-tts==6.1.12 piper-tts==1.2.0 faster-whisper==1.0.3
COPY server.py .
VOLUME ["/voices"]
EXPOSE 8766
CMD ["uvicorn", "server:app", "--host", "0.0.0.0", "--port", "8766"]
