feat(pitch-deck): make OVH DE TTS opt-in via OVH_TTS_ENABLED_DE env var
Some checks failed
Build pitch-deck / build-push-deploy (push) Successful in 1m25s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 47s
CI / test-python-voice (push) Successful in 36s
CI / test-bqas (push) Has been cancelled

Without the flag, German routes to the compliance TTS service which uses
Edge TTS (de-DE-ConradNeural) with Piper as fallback — easier to A/B
between OVH and compliance/Edge TTS without code changes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sharang Parnerkar
2026-04-16 21:40:32 +02:00
parent 09ac22f692
commit 6a6b3e8cee

View File

@@ -6,13 +6,16 @@ const LITELLM_API_KEY = process.env.LITELLM_API_KEY || ''
// OVH AI Endpoints TTS via the LiteLLM passthrough. // OVH AI Endpoints TTS via the LiteLLM passthrough.
// Path on the LiteLLM side: /tts-ovh/audio/* → https://nvr-tts-<lang>.endpoints.kepler.ai.cloud.ovh.net/api/* // Path on the LiteLLM side: /tts-ovh/audio/* → https://nvr-tts-<lang>.endpoints.kepler.ai.cloud.ovh.net/api/*
// OVH DE is opt-in: set OVH_TTS_ENABLED_DE=true to activate.
// When disabled, German falls through to the compliance TTS service (Edge TTS → Piper).
const OVH_TTS = { const OVH_TTS = {
de: { de: process.env.OVH_TTS_ENABLED_DE === 'true'
? {
url: process.env.OVH_TTS_URL_DE || `${LITELLM_URL}/tts-ovh/audio/v1/tts/text_to_audio`, url: process.env.OVH_TTS_URL_DE || `${LITELLM_URL}/tts-ovh/audio/v1/tts/text_to_audio`,
// German only exposes a male voice; note the hyphen separator (EN uses dots).
voice: process.env.OVH_TTS_VOICE_DE || 'German-DE-Male-1', voice: process.env.OVH_TTS_VOICE_DE || 'German-DE-Male-1',
languageCode: 'de-DE', languageCode: 'de-DE',
}, }
: null,
// Enable by setting OVH_TTS_URL_EN (e.g. pointing at a second LiteLLM // Enable by setting OVH_TTS_URL_EN (e.g. pointing at a second LiteLLM
// passthrough that targets nvr-tts-en-us). Keeps EN on the old path until set. // passthrough that targets nvr-tts-en-us). Keeps EN on the old path until set.
en: process.env.OVH_TTS_URL_EN en: process.env.OVH_TTS_URL_EN
@@ -22,7 +25,7 @@ const OVH_TTS = {
languageCode: 'en-US', languageCode: 'en-US',
} }
: null, : null,
} as const }
const SAMPLE_RATE_HZ = parseInt(process.env.OVH_TTS_SAMPLE_RATE || '16000', 10) const SAMPLE_RATE_HZ = parseInt(process.env.OVH_TTS_SAMPLE_RATE || '16000', 10)