Open
Conversation
Adds ModelsLab as a new TTS backend for VideoLingo, following the same per-file pattern as the existing SiliconFlow, OpenAI, Azure, and Edge TTS integrations. Changes: - core/tts_backend/modelslab_tts.py — new provider module - core/tts_backend/tts_main.py — import + dispatch case - config.yaml — modelslab_tts config section - core/st_utils/sidebar_setting.py — Streamlit API key + voice picker Features: - 10 voices: Bella, Antoni, Elli, Josh, Arnold, Adam, Sam, Rachel, Domi, Gigi - Async polling: handles 'processing' status (polls every 5 s, up to 5 min) - 2 500-character limit enforced automatically - 3-retry logic via @except_handler decorator (same as other providers) - WAV output — compatible with VideoLingo's audio pipeline Setup: 1. Get an API key at https://modelslab.com 2. Set modelslab_tts.api_key in config.yaml (or via the Streamlit sidebar) 3. Select 'modelslab_tts' as the TTS Method and choose a voice
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds ModelsLab as a new TTS backend for VideoLingo, following the exact same per-file pattern as the existing SiliconFlow, OpenAI, Azure, and Edge TTS integrations.
Changes
core/tts_backend/modelslab_tts.pycore/tts_backend/tts_main.pyelif TTS_METHOD == 'modelslab_tts'dispatchconfig.yamlmodelslab_tts:section withapi_keyandvoicecore/st_utils/sidebar_setting.pyFeatures
status: "processing"responses (polls every 5s, up to 5 min)@except_handler(same pattern as other providers)Setup
modelslab_tts.api_keyinconfig.yaml(or via Streamlit sidebar)About ModelsLab
ModelsLab offers affordable AI inference including TTS, image generation, and video generation. API docs: https://docs.modelslab.com