feat(omnivoice): wire to asset-engine via FastAPI wrapper + reuse chatterbox voices

- app.py: thin FastAPI wrapper exposing OpenAI /v1/audio/speech (+ /v1/audio/voices,
  /healthz) around OmniVoice's Python API; precomputes a voice-clone prompt per voice
  at startup (loaded Whisper auto-transcribes each reference). Replaces the Gradio demo.
- Dockerfile/compose: run the uvicorn wrapper, /healthz healthcheck, project name pinned
  to "omnivoice" so the asset-engine liveness probe matches.
- deploy-omnivoice.yaml: stage chatterbox /refs/*.wav as clone voices (skip _* artifacts)
  + verify the API surface.
- services.yaml: catalog entry (id omnivoice, :8199/v1/audio/speech, voice list sourced
  live from /v1/audio/voices) + reproducibility_audit row.

Verified live on irv-ml1: /healthz ok, 33 voices loaded, test synth -> 24kHz PCM_16 WAV.
This commit is contained in:
vh
2026-06-18 23:03:20 -07:00
parent 984b72757f
commit 06eb487a26
6 changed files with 255 additions and 37 deletions
+11 -10
View File
@@ -33,22 +33,23 @@ RUN pip install --no-cache-dir \
ARG OMNIVOICE_VERSION=
RUN pip install --no-cache-dir "omnivoice${OMNIVOICE_VERSION:+==${OMNIVOICE_VERSION}}" huggingface_hub
# Fail the build loudly if the console script name isn't what we expect,
# rather than crash-loop at runtime. Logs the actual omni* entrypoints.
RUN echo "omni console scripts:" && (ls /opt/venv/bin | grep -i omni || true) \
&& command -v omnivoice-demo >/dev/null \
|| { echo "ERROR: omnivoice-demo CLI not found after install"; exit 1; }
# Our asset-engine wrapper deps (FastAPI stack + soundfile for WAV encoding).
RUN pip install --no-cache-dir fastapi 'uvicorn[standard]' soundfile python-multipart
# Fail the build loudly if the runtime imports aren't satisfiable.
RUN python -c "import omnivoice, fastapi, soundfile, uvicorn; print('omnivoice wrapper deps OK')"
WORKDIR /app
COPY app.py /app/app.py
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
EXPOSE 8001
# Gradio serves HTML at / — 200 once the UI is up (weights load lazily on
# first synth; the entrypoint pre-warms them). Generous start period.
HEALTHCHECK --interval=30s --timeout=10s --start-period=900s --retries=3 \
CMD wget -q -O /dev/null http://127.0.0.1:8001/ || exit 1
# Our wrapper exposes /healthz (200 once model + >=1 voice are loaded). Generous
# start period: first boot pre-warms OmniVoice + Whisper ASR + clones every voice.
HEALTHCHECK --interval=30s --timeout=10s --start-period=1200s --retries=3 \
CMD wget -q -O /dev/null http://127.0.0.1:8001/healthz || exit 1
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["omnivoice-demo", "--ip", "0.0.0.0", "--port", "8001"]
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8001"]