Skip to content

Add VoiceStudio as a TTS provider - #1800

Open
Edward143shyam wants to merge 1 commit into
harry0703:mainfrom
Edward143shyam:feat/voicestudio-tts
Open

Edward143shyam wants to merge 1 commit into
harry0703:mainfrom
Edward143shyam:feat/voicestudio-tts

Conversation

@Edward143shyam

Copy link
Copy Markdown

What

Adds VoiceStudio — a local desktop TTS app with an OpenAI-compatible /v1/audio/speech API — as a first-class voice provider, alongside Kokoro and Chatterbox.

  • app/services/voice.py
    • voicestudio_tts() built on the existing shared _openai_compatible_tts transport (same retry / redirect / decode-validation behaviour as Kokoro).
    • voicestudio:<id> voice routing in tts() and excluded from the Azure/Edge path.
    • get_voicestudio_voices() reads GET {base_url}/audio/voices, which returns OpenAI alias voices (alloy, nova, …) plus the user's own voice profiles (including cloned voices). Display names are recorded in VOICESTUDIO_VOICE_NAMES.
  • Config: new [voicestudio] section (base_url default http://127.0.0.1:3900/v1, api_key, model_id default tts-1, voices), persisted by save_config(); documented in config.example.toml.
  • WebUI: "VoiceStudio TTS" in the TTS server list, settings inputs, voice catalog with the same 30 s session cache/offline fallback as Kokoro, and friendly name (id) labels so cloned profiles show their names. English strings added to en.json (other locales fall back to English via tr()).

Why

VoiceStudio runs TTS engines (OmniVoice, KittenTTS, …) locally on GPU and supports voice cloning, giving a free, offline, custom-voice option.

Notes for reviewers

  • model_id = "tts-1" is VoiceStudio's alias for its active engine; an engine id such as omnivoice can be set instead.
  • Like the other OpenAI-compatible providers, no word timestamps are returned, so subtitle_provider = "whisper" gives tighter subtitle sync.

Testing

  • Generated speech end to end through voice.tts(voice_name="voicestudio:alloy", ...) against a running VoiceStudio 0.5.7 (valid MP3, 2.74 s).
  • Voice listing returned all 13 alias voices + user profiles.
  • pytest test/services/test_webui_kokoro.py test/services/test_voice.py test/services/test_config.py: 134 passed, 3 skipped.
  • No dedicated unit tests for VoiceStudio yet; the WebUI flow was not clicked through manually.

🤖 Generated with Claude Code

VoiceStudio is a local desktop TTS app that exposes an OpenAI-compatible
/v1/audio/speech endpoint (default http://127.0.0.1:3900/v1). This adds it
as a first-class voice option alongside Kokoro and Chatterbox:

- voice.py: voicestudio_tts() on the shared _openai_compatible_tts transport,
  voicestudio:<id> voice routing, and get_voicestudio_voices(), which lists
  OpenAI alias voices plus the user's own (cloned) voice profiles from
  GET /audio/voices and records their display names.
- config: new [voicestudio] section (base_url, api_key, model_id, voices).
- WebUI: "VoiceStudio TTS" in the TTS server list, settings inputs, voice
  catalog with a short session cache, and friendly "name (id)" labels.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@harry0703

Copy link
Copy Markdown
Owner

Thanks for adding VoiceStudio, and for including the live synthesis result. Reusing the existing speech transport makes sense here.

I checked the provider routing, voice listing, audio download/decoding and final video render against a local HTTP fixture. Those worked and produced a valid video with audio. I don't have VoiceStudio running locally, so that verifies the integration's protocol and media handling, not inference by a real VoiceStudio engine.

The two Python CI failures are reproducible locally. The seven new VoiceStudio strings were added only to webui/i18n/en.json; the other locales are missing those keys. test_webui_i18n.py checks key parity and then accesses the translated entries for its placeholder/link checks, so it reports missing keys and KeyErrors. My targeted run reported 192 failures in those checks, alongside 151 passes and 3 skips. The Python 3.11 CI log shows the same missing VoiceStudio keys.

The English fallback may work at runtime, but it doesn't satisfy the repository's existing translation checks. Please sync the new strings across the locales and get both Python jobs green. This isn't evidence that the existing TTS providers are broken; it is a confirmed CI blocker for this PR.

Could you also add dedicated VoiceStudio regressions? In particular, please cover voice routing, saving/reloading the new config section, and the WebUI's catalog behavior when the server goes offline or the endpoint changes. The current Kokoro tests don't exercise those new VoiceStudio paths.

For the real 0.5.7 run you mentioned, please include reproducible setup and request steps, and check the WebUI flow too: select the provider, load the voices, play a sample, and render a short video. Sanitized logs and the output's duration/decode result would be enough; no credentials needed.

I'll keep this unmerged while the CI and coverage gaps are addressed. Thanks again for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants