Spaces:
Running

YT-AI-based / Dockerfile
MDHojayfa213's picture
v17.3 AUDIO FIX β€” the video had NO VOICE because all TTS engines failed and the pipeline shipped a 2s tone. Now: (1) piper local neural TTS fallback added (works offline); (2) edge-tts retries with param degradation; (3) gTTS TLD retries; (4) pipeline HARD-ABORTS on tone/silence β€” never ships silent video; (5) Telegram send retries with backoff
931d61a verified
Raw History Blame Contribute Delete
1.21 kB
# YT HISTRY NEXUS v17 β€” HF Space Dockerfile
FROM python:3.12-slim
ENV PYTHONUNBUFFERED=1 \
PIP_NO_CACHE_DIR=1 \
PORT=7860
# system deps: ffmpeg (Debian build has drawtext/xfade/sidechaincompress) + fonts
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg \
fonts-dejavu-core \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY requirements.txt .
RUN pip install --upgrade pip && pip install -r requirements.txt
# faster-whisper (audio = source of truth) β€” best-effort, non-fatal
RUN pip install "faster-whisper>=1.0.3" || true
# piper local TTS fallback + voice model β€” guarantees speech even if edge/gTTS blocked
RUN mkdir -p /app/assets/voices \
&& curl -sL -o /app/assets/voices/en_US-lessac-medium.onnx \
"https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US/lessac/medium/en_US-lessac-medium.onnx" || true \
&& curl -sL -o /app/assets/voices/en_US-lessac-medium.onnx.json \
"https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json" || true
COPY . .
RUN chmod +x start.sh && mkdir -p vault state artifacts logs assets/music
EXPOSE 7860
CMD ["./start.sh"]