feat: add TTS Model ID configuration UI#24
Closed
YizukiAme wants to merge 3 commits intoTHU-MAIC:mainfrom
Closed
Conversation
Add a Model ID input field to the TTS provider settings dialog, allowing users to customize the model used for text-to-speech generation. Changes: - Add Model ID input to tts-settings.tsx with conditional rendering (only shown for providers that support model IDs: OpenAI, GLM, Qwen) - Import DEFAULT_TTS_MODELS constant for placeholder and conditional logic - Add ttsModelId i18n keys for Chinese and English locales - Add modelId field support in audio constants (DEFAULT_TTS_MODELS map) - Add modelId to TTSProviderConfig type and settings store - Wire modelId through TTS API route and provider implementations The field shows the default model as placeholder text and persists user-specified model IDs to the settings store.
f5efce6 to
8e2f2c3
Compare
Author
|
Closing in favor of #50 which provides a more comprehensive solution covering both TTS and ASR model configuration, with a UI pattern consistent with image-generation model management. |
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
Add a Model ID input field to the TTS provider settings dialog, allowing users to customize the model used for text-to-speech generation (e.g., switching from
gpt-4o-mini-ttstotts-1-hdfor OpenAI).Previously, model IDs were hardcoded and users had no way to change them through the UI.
Closes #14
Changes
UI (
components/settings/tts-settings.tsx)DEFAULT_TTS_MODELSconstant for placeholder display and conditional logicgpt-4o-mini-ttsfor OpenAI)Constants & Types (
lib/audio/)DEFAULT_TTS_MODELSmap inconstants.tswith default model IDs per providermodelIdtoTTSProviderConfigtype definitionmodelIdfrom config with fallback to defaultsAPI & Integration
modelIdthrough the TTS API route (app/api/generate/tts/route.ts)modelIdfrom scene generator (lib/hooks/use-scene-generator.ts)i18n (
lib/i18n/settings.ts)ttsModelIdtranslation key for Chinese ("模型 ID") and English ("Model ID")Test Plan
gpt-4o-mini-ttsplaceholderemoti-voiceplaceholder