tiny-voca-da / recipe /docker /Dockerfile.asr
inlanger's picture
tiny-voca-da v0.1: frontend v4 + sm9 vocoder (ONNX fp32/int8, PyTorch, frontend, recipe, samples)
adabee1 verified
Raw History Blame Contribute Delete
1.47 kB
# Intelligibility scoring (CPU): Danish ASR on rendered speech, CER/WER with jiwer.
# - openai/whisper-large-v3 (Apache-2.0), language forced to Danish, greedy decoding.
# Image 1 used CoRal's Røst v3 wav2vec2. It was dropped on 2026-11-25: its licence (inherited
# from the CoRal ASR data, Alvenir/coral-1-whisper-large LICENSE) forbids using the model "to
# impersonate any person ... including the creation of synthetic speech emulating a specific
# natural person". This project builds a voice of one CoRal speaker.
FROM python:3.12-slim
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
RUN pip install --no-cache-dir torch==2.8.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cpu \
&& pip install --no-cache-dir transformers==4.57.1 jiwer==4.0.0 librosa==0.11.0 soundfile==0.14.0 "numpy<2.4"
# Model files are fetched at build time into a read-only HF_HOME so containers run offline.
ENV HOME=/opt/asr/home HF_HOME=/opt/asr/hf NUMBA_CACHE_DIR=/tmp/numba PYTHONUNBUFFERED=1
ARG ASR_REVISION=06f233fe06e710322aca913c1bc4249a0d71fce1
ENV ASR_MODEL=openai/whisper-large-v3 ASR_REVISION=${ASR_REVISION}
RUN python -c "import os; from huggingface_hub import snapshot_download as s; s(os.environ['ASR_MODEL'], revision=os.environ['ASR_REVISION'], allow_patterns=['*.json', '*.txt', 'model.safetensors'])" \
&& chmod -R a+rX /opt/asr
ENV HF_HUB_OFFLINE=1
WORKDIR /work