利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.
Python ai-video-generatorcontent-creationffmpeginstagram-reelsllmpythonshort-videosubtitlestext-to-speechtiktokvideo-automationvideo-workflowworkflow-automationyoutube-shorts
feat(tts): add VoxCPM provider
lottshin3d19075f93b3
diff --git a/README-en.md b/README-en.mdindex d1b845ac..69d593fe 100644--- a/README-en.md+++ b/README-en.md@@ -174,7 +174,7 @@ Thanks to [Kimi](https://platform.kimi.ai?track_id=track-f6b0a640d35c41deb03b247### Voiceover, Subtitles, and Background Music- [x] Choose automatic voiceover, uploaded audio, or no voiceover, with voice samples and full narration previews-- [x] Use **Edge TTS (free, no API key required)**, Azure Speech, SiliconFlow, Google Gemini, Xiaomi MiMo, MiniMax, ElevenLabs, Chatterbox, Kokoro, Fish Audio, and other voice services+- [x] Use **Edge TTS (free, no API key required)**, Azure Speech, SiliconFlow, Google Gemini, Xiaomi MiMo, MiniMax, ElevenLabs, Chatterbox, Kokoro, Fish Audio, ModelBest VoxCPM, and other voice services- [x] Generate subtitles and configure their font, position, color, size, outline, and background style- [x] Use random, local, or AI-generated background music with independent volume control@@ -436,10 +436,12 @@ The summary contains `total`, `succeeded`, `failed`, and `tasks`; each task entr### Voice Synthesis-**Azure TTS V1** in the WebUI is powered by **Edge TTS** and is free to use without an API key. MoneyPrinterTurbo also supports **Azure TTS V2**, **SiliconFlow TTS**, **Google Gemini TTS**, **Xiaomi MiMo TTS**, **ElevenLabs TTS**, self-hosted **Chatterbox TTS**, self-hosted **Kokoro TTS**, **Fish Audio TTS**, and a no-voice mode.+**Azure TTS V1** in the WebUI is powered by **Edge TTS** and is free to use without an API key. MoneyPrinterTurbo also supports **Azure TTS V2**, **SiliconFlow TTS**, **Google Gemini TTS**, **Xiaomi MiMo TTS**, **MiniMax TTS**, **ElevenLabs TTS**, self-hosted **Chatterbox TTS**, self-hosted **Kokoro TTS**, **Fish Audio TTS**, [ModelBest VoxCPM TTS](https://platform.modelbest.cn/console/docs/api/audio), and a no-voice mode.Select a provider and voice in the WebUI, then follow the on-screen instructions for any required credentials. Edge TTS does not require an API key; [Azure TTS V2](https://portal.azure.com/) and other cloud providers require credentials from their respective platforms. See the available Edge TTS voices in the [voice list](./docs/voice-list.txt).+ModelBest VoxCPM requires an API key and a model ID with the `speech_synthesis` capability. Its SSE response streams WAV audio, which MoneyPrinterTurbo automatically converts to the MP3 used by the video pipeline. This integration supports standard text-to-speech with the default voice; reference-audio voice cloning is not included yet.+### Subtitle GenerationTwo subtitle generation modes are available:diff --git a/README.md b/README.mdindex 3f2335df..4056cbc9 100644--- a/README.md+++ b/README.md@@ -174,7 +174,7 @@### 配音、字幕与配乐- [x] 支持自动配音、上传配音和无配音三种方式,并提供音色试听与完整配音预览-- [x] 集成 **Edge TTS(免费、无需 API Key)**、Azure Speech、SiliconFlow、Google Gemini、小米 MiMo、MiniMax、ElevenLabs、Chatterbox、Kokoro 和 Fish Audio 等配音服务+- [x] 集成 **Edge TTS(免费、无需 API Key)**、Azure Speech、SiliconFlow、Google Gemini、小米 MiMo、MiniMax、ElevenLabs、Chatterbox、Kokoro、Fish Audio 和 ModelBest VoxCPM 等配音服务- [x] 支持自动生成字幕,可调整字体、位置、颜色、大小、描边和背景样式- [x] 支持随机、本地及 AI 生成背景音乐,并可独立控制音量@@ -423,10 +423,12 @@ JSON 汇总。清单中的相对自定义音频与本地素材路径以清单目### 语音合成-WebUI 中的 **Azure TTS V1** 基于 **Edge TTS**,免费且无需 API Key。项目同时支持 **Azure TTS V2**、**SiliconFlow TTS**、**Google Gemini TTS**、**小米 MiMo TTS**、**ElevenLabs TTS**、自托管 **Chatterbox TTS**、自托管 **Kokoro TTS**、**Fish Audio TTS**,以及无配音模式。+WebUI 中的 **Azure TTS V1** 基于 **Edge TTS**,免费且无需 API Key。项目同时支持 **Azure TTS V2**、**SiliconFlow TTS**、**Google Gemini TTS**、**小米 MiMo TTS**、**MiniMax TTS**、**ElevenLabs TTS**、自托管 **Chatterbox TTS**、自托管 **Kokoro TTS**、**Fish Audio TTS**、[ModelBest VoxCPM TTS](https://platform.modelbest.cn/console/docs/api/audio),以及无配音模式。可直接在 WebUI 中选择 Provider 和音色,并按照界面提示填写所需凭据。Edge TTS 不需要 API Key;[Azure TTS V2](https://portal.azure.com/) 及其他云端服务需要对应平台的凭据。Edge TTS 音色可查看:[音色列表](./docs/voice-list.txt)。+ModelBest VoxCPM 需要填写 API Key 和支持 `speech_synthesis` 的模型 ID。服务以 SSE 返回 WAV 音频,项目会自动转换为视频流水线使用的 MP3。当前接入支持普通文本合成和默认音色;参考音频复刻尚未包含。+### 字幕生成当前支持两种字幕生成方式:diff --git a/app/config/config.py b/app/config/config.pyindex d9f62ed4..95452d20 100644--- a/app/config/config.py+++ b/app/config/config.py@@ -499,6 +499,7 @@ def save_config():config_to_save["chatterbox"] = dict(chatterbox)config_to_save["kokoro"] = dict(kokoro)config_to_save["fish_audio"] = dict(fish_audio)+ config_to_save["voxcpm"] = dict(voxcpm)config_to_save["ui"] = dict(ui)serialized_config = toml.dumps(config_to_save)@@ -556,6 +557,7 @@ elevenlabs = _SynchronizedConfig(_cfg.get("elevenlabs", {}))chatterbox = _SynchronizedConfig(_cfg.get("chatterbox", {}))kokoro = _SynchronizedConfig(_cfg.get("kokoro", {}))fish_audio = _SynchronizedConfig(_cfg.get("fish_audio", {}))+voxcpm = _SynchronizedConfig(_cfg.get("voxcpm", {}))ui = _SynchronizedConfig(_cfg.get("ui",diff --git a/app/services/voice.py b/app/services/voice.pyindex 2da26ffe..c317f732 100644--- a/app/services/voice.py+++ b/app/services/voice.py@@ -75,6 +75,8 @@ GEMINI_TTS_VOICES = (("Sulafat", "Warm"),)_MINIMAX_TTS_MAX_AUDIO_HEX_CHARS = 100 * 1024 * 1024+VOXCPM_DEFAULT_BASE_URL = "https://api.modelbest.cn/v1"+VOXCPM_DEFAULT_VOICE = "default"NO_VOICE_NAME = "no-voice"# `none` 是 PR #981 里曾使用过的无配音标识。这里短期兼容这个值,避免# 已经手动调用过该分支的 API 用户升级后立即失效;WebUI 和新代码统一使用@@ -312,6 +314,22 @@ def get_fish_audio_voices() -> list[str]:return result+def get_voxcpm_voices(voice_id: str | None = None) -> list[str]:+ """Return the ModelBest VoxCPM voice selected in the local configuration.++ ModelBest accepts ``default`` when no explicit voice is selected. Voice+ design is expressed in the input text and voice cloning requires a separate+ reference-audio workflow, so the first integration deliberately keeps the+ standard TTS selector to one configured voice id.+ """+ voice_id = str(+ voice_id+ or config.voxcpm.get("voice_id", VOXCPM_DEFAULT_VOICE)+ or VOXCPM_DEFAULT_VOICE+ ).strip()+ return [f"voxcpm:{voice_id}"]++_AZURE_VOICES_DATA_FILE = os.path.join(os.path.dirname(__file__), "data", "azure_voices.json")@@ -412,6 +430,10 @@ def is_fish_audio_voice(voice_name: str) -> bool:return (voice_name or "").startswith("fish_audio:")+def is_voxcpm_voice(voice_name: str | None) -> bool:+ return (voice_name or "").startswith("voxcpm:")++def get_fish_audio_api_key() -> str:configured_key = str(config.fish_audio.get("api_key", "") if hasattr(config, "fish_audio") and isinstance(config.fish_audio, dict) else "").strip()return configured_key or os.getenv("FISH_API_KEY", "").strip()@@ -458,6 +480,8 @@ def is_azure_v1_voice(voice_name: str | None) -> bool:return Falseif is_fish_audio_voice(name):return False+ if is_voxcpm_voice(name):+ return Falsereturn True@@ -672,6 +696,12 @@ def _single_tts(if reference_id == "default":reference_id = Nonereturn fish_audio_tts(text, voice_file, voice_rate, voice_volume, reference_id=reference_id)+ elif is_voxcpm_voice(voice_name):+ voice_id = voice_name.split(":", 1)[1].strip()+ if voice_id:+ return voxcpm_tts(text, voice_id, voice_file, voice_rate, voice_volume)+ logger.error(f"Invalid VoxCPM voice name format: {voice_name}")+ return Nonereturn azure_tts_v1(text, voice_name, voice_rate, voice_file)@@ -2401,6 +2431,169 @@ def fish_audio_tts(return None+def _iter_voxcpm_sse_events(response):+ """Yield JSON payloads from ModelBest's Server-Sent Event stream."""+ event_data = []+ for raw_line in response.iter_lines(decode_unicode=True):+ line = raw_line.decode("utf-8") if isinstance(raw_line, bytes) else raw_line+ if not line:+ if event_data:+ try:+ yield json.loads("\n".join(event_data))+ except (TypeError, ValueError) as exc:+ raise ValueError("VoxCPM returned invalid SSE event data") from exc+ event_data = []+ continue+ if line.startswith("data:"):+ event_data.append(line.removeprefix("data:").strip())+ if event_data:+ try:+ yield json.loads("\n".join(event_data))+ except (TypeError, ValueError) as exc:+ raise ValueError("VoxCPM returned invalid trailing SSE event data") from exc+++def voxcpm_tts(+ text: str,+ voice_id: str,+ voice_file: str,+ voice_rate: float = 1.0,+ voice_volume: float = 1.0,+) -> Union[SubMaker, None]:+ """Generate speech through ModelBest's VoxCPM Audio Speech API.++ ModelBest always streams Base64-encoded WAV chunks through SSE. The+ assembled WAV is decoded and exported to the project's requested output+ format so that the regular subtitle and video paths remain unchanged.+ ModelBest does not define a numeric speed field, so ``voice_rate`` is not+ sent. ``voice_volume`` is applied later by MoneyPrinterTurbo's video mixer.+ """+ from pydub import AudioSegment++ text = (text or "").strip()+ if not text:+ logger.error("VoxCPM TTS text is empty")+ return None++ api_key = str(config.voxcpm.get("api_key", "") or "").strip()+ if not api_key:+ logger.error("VoxCPM API key is not set")+ return None++ base_url = str(+ config.voxcpm.get("base_url", VOXCPM_DEFAULT_BASE_URL)+ or VOXCPM_DEFAULT_BASE_URL+ ).strip().rstrip("/")+ model_id = str(config.voxcpm.get("model_id", "") or "").strip()+ if not model_id:+ logger.error("VoxCPM model ID is not set")+ return None+ voice_id = str(voice_id or VOXCPM_DEFAULT_VOICE).strip() or VOXCPM_DEFAULT_VOICE++ url = f"{base_url}/audio/speech"+ headers = {+ "Authorization": f"Bearer {api_key}",+ "Content-Type": "application/json",+ "Accept": "text/event-stream",+ }+ payload = {+ "model": model_id,+ "input": text,+ "voice": voice_id,+ "response_format": "wav",+ "stream": True,+ }+ _configure_pydub_ffmpeg(AudioSegment)++ for attempt in range(3):+ temporary_audio = None+ response = None+ try:+ logger.info(+ f"start VoxCPM TTS, model: {model_id}, voice: {voice_id}, "+ f"try: {attempt + 1}"+ )+ response = requests.post(+ url,+ json=payload,+ headers=headers,+ stream=True,+ timeout=(10, 120),+ )+ if response.status_code != 200:+ logger.error(+ f"VoxCPM TTS failed with status {response.status_code}: "+ f"{response.text[:200]}"+ )+ continue++ audio_chunks = []+ completed = False+ for event in _iter_voxcpm_sse_events(response):+ event_type = event.get("type")+ if event_type == "speech.audio.delta":+ encoded_chunk = event.get("audio")+ if not isinstance(encoded_chunk, str) or not encoded_chunk:+ raise ValueError("VoxCPM returned an empty audio chunk")+ try:+ audio_chunks.append(base64.b64decode(encoded_chunk, validate=True))+ except (ValueError, TypeError) as exc:+ raise ValueError("VoxCPM returned invalid Base64 audio") from exc+ elif event_type == "speech.audio.done":+ completed = True+ break++ if not completed:+ raise ValueError("VoxCPM stream ended before speech.audio.done")+ audio_bytes = b"".join(audio_chunks)+ if not audio_bytes:+ raise ValueError("VoxCPM returned no audio data")++ audio_segment = AudioSegment.from_file(io.BytesIO(audio_bytes), format="wav")+ if len(audio_segment) <= 0:+ raise ValueError("VoxCPM returned an empty WAV")++ ensure_file_path_exists(voice_file)+ output_format = utils.parse_extension(voice_file) or "mp3"+ with tempfile.NamedTemporaryFile(+ dir=os.path.dirname(os.path.abspath(voice_file)),+ suffix=f".{output_format}",+ delete=False,+ ) as output:+ temporary_audio = output.name+ audio_segment.export(temporary_audio, format=output_format)++ audio_clip = AudioFileClip(temporary_audio)+ try:+ audio_duration = audio_clip.duration+ finally:+ audio_clip.close()+ if not math.isfinite(audio_duration) or audio_duration <= 0:+ raise ValueError("VoxCPM produced an invalid audio duration")++ sub_maker = ensure_legacy_submaker_fields(SubMaker())+ os.replace(temporary_audio, voice_file)+ logger.success(f"VoxCPM TTS succeeded: {voice_file}")+ return populate_legacy_submaker_with_full_text(+ sub_maker=sub_maker,+ text=text,+ audio_duration_seconds=audio_duration,+ )+ except Exception as exc:+ logger.error(f"VoxCPM TTS failed: {exc}")+ finally:+ close_response = getattr(response, "close", None)+ if callable(close_response):+ close_response()+ if temporary_audio and os.path.exists(temporary_audio):+ try:+ os.unlink(temporary_audio)+ except OSError as exc:+ logger.warning(f"could not remove temporary VoxCPM audio: {exc}")++ return None++def _format_text(text: str) -> str:"""清理字幕对齐前的脚本文本。diff --git a/config.example.toml b/config.example.tomlindex 72ce4e8f..58e7c5a5 100644--- a/config.example.toml+++ b/config.example.toml@@ -569,6 +569,16 @@ voices = []# windows (e.g. through August 2026). There is no SLA. Please check# https://fish.audio/pricing for current availability and commercial terms.+[voxcpm]+# ModelBest VoxCPM cloud TTS. Create an API Key and select a model with the+# `speech_synthesis` capability at https://platform.modelbest.cn/console/+# The Audio Speech API returns a streaming WAV response; MoneyPrinterTurbo+# converts it to its internal MP3 voiceover format automatically.+base_url = "https://api.modelbest.cn/v1"+api_key = ""+model_id = ""+voice_id = "default"+# =============================================================================# WebUI Preferences / WebUI 偏好# =============================================================================diff --git a/test/services/test_config.py b/test/services/test_config.pyindex 2a165b1b..343a36ff 100644--- a/test/services/test_config.py+++ b/test/services/test_config.py@@ -63,6 +63,12 @@ class TestConfigPersistence:assert "loomloom_market_listing_id" not in app_configassert "loomloom_video_market_listing_id" not in app_configassert app_config["shengsuanyun_api_key"] == ""+ assert example_config["voxcpm"] == {+ "base_url": "https://api.modelbest.cn/v1",+ "api_key": "",+ "model_id": "",+ "voice_id": "default",+ }assert example_config["whisper"]["device"] == "cpu"def test_example_config_covers_llm_provider_registry(self):diff --git a/test/services/test_voxcpm.py b/test/services/test_voxcpm.pynew file mode 100644index 00000000..7c66d0d9--- /dev/null+++ b/test/services/test_voxcpm.py@@ -0,0 +1,170 @@+"""ModelBest VoxCPM provider tests without external credentials or network access."""++import base64+import json+from pathlib import Path+from types import SimpleNamespace+from unittest.mock import Mock++import pytest++from app.config import config+from app.services import voice+++class _FakeSegment:+ def __init__(self, duration_ms=1600):+ self.duration_ms = duration_ms++ def __len__(self):+ return self.duration_ms++ def export(self, target, format):+ assert format == "mp3"+ Path(target).write_bytes(b"encoded-mp3")+++def _sse_event(event_type, **payload):+ return f"data: {json.dumps({'type': event_type, **payload})}"+++def _sse_lines(*events):+ lines = []+ for event in events:+ lines.extend([event, ""])+ return lines+++def voxcpm_config(monkeypatch):+ settings = {+ "api_key": "test-key",+ "base_url": "https://api.modelbest.cn/v1/",+ "model_id": "voxcpm-tts-test",+ "voice_id": "default",+ }+ monkeypatch.setattr(config, "voxcpm", settings)+ return settings+++def test_voice_helpers_and_dispatch():+ assert voice.get_voxcpm_voices("default") == ["voxcpm:default"]+ assert voice.is_voxcpm_voice("voxcpm:default")+ assert not voice.is_voxcpm_voice("fish_audio:default")+ assert not voice.is_azure_v1_voice("voxcpm:default")++ sentinel = object()+ with pytest.MonkeyPatch.context() as monkeypatch:+ implementation = Mock(return_value=sentinel)+ monkeypatch.setattr(voice, "voxcpm_tts", implementation)+ result = voice.tts("hello", "voxcpm:default", 1.2, "out.mp3", 0.8)++ assert result is sentinel+ implementation.assert_called_once_with("hello", "default", "out.mp3", 1.2, 0.8)+++def test_voxcpm_tts_assembles_sse_wav_and_converts_to_mp3(+ monkeypatch, tmp_path, voxcpm_config+):+ audio_chunks = [b"RIFF", b"WAVE"]+ response = SimpleNamespace(+ status_code=200,+ text="",+ iter_lines=lambda decode_unicode: _sse_lines(+ _sse_event("speech.audio.delta", audio=base64.b64encode(audio_chunks[0]).decode()),+ _sse_event("speech.audio.delta", audio=base64.b64encode(audio_chunks[1]).decode()),+ _sse_event("speech.audio.done", usage={"total_tokens": 1}),+ ),+ close=Mock(),+ )+ post = Mock(return_value=response)+ monkeypatch.setattr(voice.requests, "post", post)++ captured = {}++ def from_file(source, format):+ captured["source"] = source.read()+ captured["format"] = format+ return _FakeSegment()++ monkeypatch.setattr("pydub.AudioSegment.from_file", from_file)+ monkeypatch.setattr(voice, "AudioFileClip", Mock(return_value=SimpleNamespace(+ duration=1.6, close=lambda: None+ )))++ output = tmp_path / "voice.mp3"+ maker = voice.voxcpm_tts("Hello VoxCPM.", "default", str(output))++ assert maker is not None+ assert output.read_bytes() == b"encoded-mp3"+ assert captured == {"source": b"".join(audio_chunks), "format": "wav"}+ assert getattr(maker, "subs", []) == ["Hello VoxCPM"]+ assert post.call_args.kwargs["json"] == {+ "model": "voxcpm-tts-test",+ "input": "Hello VoxCPM.",+ "voice": "default",+ "response_format": "wav",+ "stream": True,+ }+ assert post.call_args.kwargs["headers"]["Authorization"] == "Bearer test-key"+ assert post.call_args.kwargs["headers"]["Accept"] == "text/event-stream"+ assert post.call_args.kwargs["stream"] is True+ assert post.call_args.kwargs["timeout"] == (10, 120)+ response.close.assert_called_once()+++ "events",+ [+ _sse_lines(_sse_event("speech.audio.done")),+ _sse_lines(_sse_event("speech.audio.delta", audio="not base64")),+ _sse_lines(_sse_event("speech.audio.delta", audio=base64.b64encode(b"audio").decode())),+ ["data: {invalid json}", ""],+ ],+)+def test_voxcpm_tts_failure_never_overwrites_existing_audio(+ monkeypatch, tmp_path, voxcpm_config, events+):+ response = SimpleNamespace(+ status_code=200,+ text="",+ iter_lines=lambda decode_unicode: events,+ close=lambda: None,+ )+ post = Mock(return_value=response)+ monkeypatch.setattr(voice.requests, "post", post)+ output = tmp_path / "existing.mp3"+ output.write_bytes(b"previous-audio")++ assert voice.voxcpm_tts("Hello", "default", str(output)) is None+ assert output.read_bytes() == b"previous-audio"+ assert post.call_count == 3+++def test_voxcpm_requires_key_and_model_without_making_requests(monkeypatch, tmp_path):+ post = Mock()+ monkeypatch.setattr(voice.requests, "post", post)+ monkeypatch.setattr(config, "voxcpm", {"api_key": "", "model_id": "model"})+ assert voice.voxcpm_tts("Hello", "default", str(tmp_path / "voice.mp3")) is None++ monkeypatch.setattr(config, "voxcpm", {"api_key": "key", "model_id": ""})+ assert voice.voxcpm_tts("Hello", "default", str(tmp_path / "voice.mp3")) is None+ post.assert_not_called()+++def test_voxcpm_http_error_is_retried_and_preserves_output(+ monkeypatch, tmp_path, voxcpm_config+):+ response = SimpleNamespace(+ status_code=503,+ text="temporarily unavailable",+ close=lambda: None,+ )+ post = Mock(return_value=response)+ monkeypatch.setattr(voice.requests, "post", post)+ output = tmp_path / "existing.mp3"+ output.write_bytes(b"previous-audio")++ assert voice.voxcpm_tts("Hello", "default", str(output)) is None+ assert output.read_bytes() == b"previous-audio"+ assert post.call_count == 3diff --git a/test/services/test_webui_tts_settings.py b/test/services/test_webui_tts_settings.pyindex 3c9de67f..76239b64 100644--- a/test/services/test_webui_tts_settings.py+++ b/test/services/test_webui_tts_settings.py@@ -24,6 +24,7 @@ TTS_API_KEY_LABELS = {"MiniMax TTS API Key": "platform.minimaxi.com","ElevenLabs API Key": "elevenlabs.io/app/settings/api-keys","Chatterbox API Key": "github.com/travisvn/chatterbox-tts-api",+ "VoxCPM API Key": "platform.modelbest.cn/console/keys",}TTS_PROVIDER_WIDGETS = {@@ -34,6 +35,7 @@ TTS_PROVIDER_WIDGETS = {"minimax-tts": ("minimax_tts_api_key_input", "MiniMax TTS API Key"),"elevenlabs": ("elevenlabs_api_key_input", "ElevenLabs API Key"),"chatterbox": ("chatterbox_api_key_input", "Chatterbox API Key"),+ "voxcpm": ("voxcpm_api_key_input", "VoxCPM API Key"),}@@ -99,6 +101,40 @@ def test_tts_provider_inputs_render_the_standardized_labels():assert [str(item.value) for item in app.exception] == []+def test_voxcpm_settings_render_model_and_endpoint_fields():+ test_config = dict(+ config.voxcpm,+ api_key="",+ model_id="speech-model",+ base_url=voice.VOXCPM_DEFAULT_BASE_URL,+ voice_id=voice.VOXCPM_DEFAULT_VOICE,+ )+ test_ui = dict(+ config.ui,+ voice_mode="tts",+ tts_server="voxcpm",+ voice_name="voxcpm:default",+ )++ with (+ patch.object(config, "voxcpm", test_config),+ patch.object(config, "ui", test_ui),+ patch.object(config, "try_save_config", return_value=True),+ ):+ app = AppTest.from_file(str(WEBUI_MAIN), default_timeout=30)+ app.session_state["ui_language"] = "en"+ app.run()++ api_key_input = _widget_by_key(app.text_input, "voxcpm_api_key_input")+ assert api_key_input.proto.type == api_key_input.proto.PASSWORD+ assert _widget_by_key(app.text_input, "voxcpm_model_id_input").value == "speech-model"+ assert (+ _widget_by_key(app.text_input, "voxcpm_base_url_input").value+ == voice.VOXCPM_DEFAULT_BASE_URL+ )+ assert [str(item.value) for item in app.exception] == []++def test_elevenlabs_reconnect_restores_saved_key_before_loading_voices():"""服务重启后浏览器可能重放空密码状态;WebUI 应保留配置并在当前 rerun 就用diff --git a/test/services/test_webui_voice_preview.py b/test/services/test_webui_voice_preview.pyindex f1b858ef..1ff7c614 100644--- a/test/services/test_webui_voice_preview.py+++ b/test/services/test_webui_voice_preview.py@@ -91,6 +91,12 @@ def test_provider_signature_changes_when_api_key_changes():"base_url": "http://127.0.0.1:4123/v1","model_id": "chatterbox",},+ voxcpm={+ "api_key": "old-voxcpm",+ "base_url": "https://api.modelbest.cn/v1",+ "model_id": "speech-model",+ "voice_id": "default",+ },)provider_signature = _load_provider_signature(test_config)@@ -103,6 +109,29 @@ def test_provider_signature_changes_when_api_key_changes():assert "new-elevenlabs" not in str(new_signature)+def test_voxcpm_preview_signature_tracks_endpoint_model_and_credentials():+ test_config = SimpleNamespace(+ app={}, azure={}, siliconflow={}, elevenlabs={}, chatterbox={}, kokoro={},+ voxcpm={+ "api_key": "old-key",+ "base_url": "https://api.modelbest.cn/v1",+ "model_id": "speech-model-a",+ "voice_id": "default",+ },+ )+ provider_signature = _load_provider_signature(test_config)++ original = provider_signature("voxcpm")+ test_config.voxcpm["model_id"] = "speech-model-b"+ changed_model = provider_signature("voxcpm")+ test_config.voxcpm["api_key"] = "new-key"+ changed_key = provider_signature("voxcpm")++ assert original != changed_model != changed_key+ assert "old-key" not in str(original)+ assert "new-key" not in str(changed_key)++def test_full_voiceover_preview_is_disabled_until_script_exists():"""完整预览必须由用户主动触发,文案为空时不能误调用商业 TTS。"""test_ui = dict(diff --git a/webui/Main.py b/webui/Main.pyindex a827d033..fb677e49 100644--- a/webui/Main.py+++ b/webui/Main.py@@ -101,6 +101,8 @@ DEFAULT_KOKORO_BASE_URL = "http://127.0.0.1:8880/v1"DEFAULT_KOKORO_MODEL = "kokoro"# empty = ask the server for its voice list (GET {base_url}/audio/voices)DEFAULT_KOKORO_VOICES: list[str] = []+DEFAULT_VOXCPM_BASE_URL = voice.VOXCPM_DEFAULT_BASE_URL+DEFAULT_VOXCPM_VOICE = voice.VOXCPM_DEFAULT_VOICEONBOARDING_TOUR_KEY = "mpt-onboarding-v1"CUSTOM_LLM_ENDPOINT_ID = "custom"VOICE_MODE_TTS = "tts"@@ -224,6 +226,7 @@ _RUNTIME_CONFIG_SECTIONS = {"minimax_tts": config.minimax_tts,"siliconflow": config.siliconflow,"fish_audio": config.fish_audio,+ "voxcpm": config.voxcpm,"ui": config.ui,}# 设置预设与密钥备份使用各自的文件标识。导入时先校验 schema 和版本,@@ -1402,6 +1405,8 @@ def _infer_tts_server_from_voice(voice_name):return "kokoro"if voice.is_fish_audio_voice(voice_name):return "fish_audio"+ if voice.is_voxcpm_voice(voice_name):+ return "voxcpm"if voice.is_azure_v2_voice(voice_name):return "azure-tts-v2"return "azure-tts-v1"@@ -5486,6 +5491,13 @@ def _get_voice_preview_provider_signature(tts_server: str) -> dict:"model_id": config.kokoro.get("model_id", ""),"credential": _credential_signature(config.kokoro.get("api_key", "")),}+ if tts_server == "voxcpm":+ return {+ "base_url": config.voxcpm.get("base_url", ""),+ "model_id": config.voxcpm.get("model_id", ""),+ "voice_id": config.voxcpm.get("voice_id", "default"),+ "credential": _credential_signature(config.voxcpm.get("api_key", "")),+ }return {}@@ -6329,6 +6341,7 @@ def _render_audio_settings(panel, params):("chatterbox", "Chatterbox TTS"),("kokoro", "Kokoro TTS"),("fish_audio", "Fish Audio TTS"),+ ("voxcpm", "VoxCPM TTS"),]tts_server_values = [server_value for server_value, _ in tts_servers]@@ -6404,6 +6417,8 @@ def _render_audio_settings(panel, params):filtered_voices = _get_kokoro_voice_options(saved_voice_name)elif selected_tts_server == "fish_audio":filtered_voices = voice.get_fish_audio_voices()+ elif selected_tts_server == "voxcpm":+ filtered_voices = voice.get_voxcpm_voices()else:# 获取Azure的声音列表all_voices = voice.get_all_azure_voices(filter_locals=None)@@ -6437,6 +6452,8 @@ def _render_audio_settings(panel, params):display_name.replace("Female", tr("Female")).replace("Male", tr("Male")))+ if voice.is_voxcpm_voice(v):+ return v.split(":", 1)[1] or DEFAULT_VOXCPM_VOICEreturn (v.replace("Female", tr("Female")).replace("Male", tr("Male"))@@ -6658,6 +6675,42 @@ def _render_audio_settings(panel, params):)_set_runtime_config("fish_audio", "model", fish_model)+ # ModelBest hosts VoxCPM behind its streaming Audio Speech API.+ # The fixed provider endpoint is still editable for compatible+ # gateways, while the user only has to supply an API key and a+ # speech_synthesis-capable model id for the standard platform.+ if tts_mode_enabled and (+ selected_tts_server == "voxcpm"+ or (voice_name and voice.is_voxcpm_voice(voice_name))+ ):+ voxcpm_api_key = st.text_input(+ tr("VoxCPM API Key"),+ value=config.voxcpm.get("api_key", ""),+ type="password",+ key="voxcpm_api_key_input",+ )+ _set_runtime_config("voxcpm", "api_key", voxcpm_api_key)++ voxcpm_model = st.text_input(+ tr("VoxCPM Model ID"),+ value=config.voxcpm.get("model_id", ""),+ key="voxcpm_model_id_input",+ placeholder=tr("VoxCPM Model ID Placeholder"),+ )+ _set_runtime_config("voxcpm", "model_id", voxcpm_model.strip())++ voxcpm_base_url = st.text_input(+ tr("VoxCPM Base URL"),+ value=config.voxcpm.get("base_url") or DEFAULT_VOXCPM_BASE_URL,+ key="voxcpm_base_url_input",+ placeholder=DEFAULT_VOXCPM_BASE_URL,+ )+ _set_runtime_config(+ "voxcpm",+ "base_url",+ (voxcpm_base_url or DEFAULT_VOXCPM_BASE_URL).strip().rstrip("/"),+ )+# Chatterbox API settings section (self-hosted, OpenAI-compatible)if tts_mode_enabled and (selected_tts_server == "chatterbox"diff --git a/webui/i18n/az.json b/webui/i18n/az.jsonindex 81e14bb9..21018c54 100644--- a/webui/i18n/az.json+++ b/webui/i18n/az.json@@ -256,6 +256,10 @@"ElevenLabs API Key": "ElevenLabs API açarı ([API açarını al](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "ElevenLabs modeli","Fish Audio API Key": "Fish Audio API açarı ([API açarını al](https://fish.audio/app/developers))",+ "VoxCPM API Key": "ModelBest API açarı ([API açarını al](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "VoxCPM model ID",+ "VoxCPM Model ID Placeholder": "ModelBest-də speech_synthesis model ID seçin",+ "VoxCPM Base URL": "VoxCPM Base URL","Fish Audio Model": "Fish Audio modeli","Chatterbox Base URL": "Chatterbox əsas URL-i","Chatterbox API Key": "Chatterbox API açarı (istəyə bağlı; [Quraşdırmaya bax](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/de.json b/webui/i18n/de.jsonindex 6715469f..46b949e6 100644--- a/webui/i18n/de.json+++ b/webui/i18n/de.json@@ -265,6 +265,10 @@"ElevenLabs API Key": "ElevenLabs API-Schlüssel ([Schlüssel abrufen](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "ElevenLabs Modell","Fish Audio API Key": "Fish Audio API-Schlüssel ([Schlüssel abrufen](https://fish.audio/app/developers))",+ "VoxCPM API Key": "ModelBest API-Schlüssel ([API-Schlüssel abrufen](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "VoxCPM-Modell-ID",+ "VoxCPM Model ID Placeholder": "Eine speech_synthesis-Modell-ID in ModelBest auswählen",+ "VoxCPM Base URL": "VoxCPM-Basis-URL","Fish Audio Model": "Fish Audio Modell","Chatterbox Base URL": "Chatterbox-Basis-URL","Chatterbox API Key": "Chatterbox API-Schlüssel (Optional; [Konfiguration ansehen](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/en.json b/webui/i18n/en.jsonindex 64d7c48a..b47fbdfe 100644--- a/webui/i18n/en.json+++ b/webui/i18n/en.json@@ -275,6 +275,10 @@"ElevenLabs Model": "ElevenLabs Model","Fish Audio API Key": "Fish Audio API Key ([Get API Key](https://fish.audio/app/developers))","Fish Audio Model": "Fish Audio Model",+ "VoxCPM API Key": "ModelBest API Key ([Get API Key](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "VoxCPM Model ID",+ "VoxCPM Model ID Placeholder": "Select a speech_synthesis model ID in ModelBest",+ "VoxCPM Base URL": "VoxCPM Base URL","Chatterbox Base URL": "Chatterbox Base URL","Chatterbox API Key": "Chatterbox API Key (Optional; [View Setup](https://github.com/travisvn/chatterbox-tts-api))","Chatterbox Model": "Chatterbox Model",@@ -296,6 +300,7 @@"tts_provider_tips.chatterbox": "Self-hosted. Run a compatible [Chatterbox TTS API](https://github.com/travisvn/chatterbox-tts-api), then enter a Base URL ending in `/v1`; the API key is usually optional.","tts_provider_tips.kokoro": "Self-hosted and free: run a compatible [Kokoro-FastAPI](https://github.com/remsky/Kokoro-FastAPI) server (Apache-2.0 model, CPU is enough), then enter a Base URL ending in `/v1`; the voice list is read from the server.","tts_provider_tips.fish_audio": "Requires a Fish Audio API key from the [developer portal](https://fish.audio/app/developers). [Browse public voices](https://fish.audio) or configure custom voices in `config.toml`. See [pricing & terms](https://fish.audio/pricing).",+ "tts_provider_tips.voxcpm": "Requires a [ModelBest API Key](https://platform.modelbest.cn/console/keys) and a model ID with the `speech_synthesis` capability. The API streams WAV audio and supports the default voice in this integration. Numeric speed is not supported; describe the desired pace at the start of the script, for example `(slightly faster)`. Reference-audio voice cloning is not included yet.","Hide Log": "Hide Log","Hide Basic Settings": "Hide Basic Settings\n\nHidden, the basic settings panel will not be displayed on the page.\n\nIf you need to display it again, please set `hide_config = false` in `config.toml`","LLM Settings": "**LLM Settings**",diff --git a/webui/i18n/es.json b/webui/i18n/es.jsonindex c8df1011..66c5c9e5 100644--- a/webui/i18n/es.json+++ b/webui/i18n/es.json@@ -262,6 +262,10 @@"ElevenLabs API Key": "Clave API de ElevenLabs ([Obtener clave](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "Modelo de ElevenLabs","Fish Audio API Key": "Clave API de Fish Audio ([Obtener clave](https://fish.audio/app/developers))",+ "VoxCPM API Key": "Clave API de ModelBest ([Obtener clave](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "ID del modelo VoxCPM",+ "VoxCPM Model ID Placeholder": "Selecciona un ID de modelo speech_synthesis en ModelBest",+ "VoxCPM Base URL": "URL base de VoxCPM","Fish Audio Model": "Modelo Fish Audio","Chatterbox API Key": "Clave API de Chatterbox (Opcional; [Ver configuración](https://github.com/travisvn/chatterbox-tts-api))","Chatterbox Base URL": "URL base de Chatterbox",diff --git a/webui/i18n/fr.json b/webui/i18n/fr.jsonindex d4084989..5a19e589 100644--- a/webui/i18n/fr.json+++ b/webui/i18n/fr.json@@ -262,6 +262,10 @@"ElevenLabs API Key": "Clé API ElevenLabs ([Obtenir la clé API](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "Modèle ElevenLabs","Fish Audio API Key": "Clé API Fish Audio ([Obtenir la clé API](https://fish.audio/app/developers))",+ "VoxCPM API Key": "Clé API ModelBest ([Obtenir la clé API](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "ID du modèle VoxCPM",+ "VoxCPM Model ID Placeholder": "Sélectionnez un ID de modèle speech_synthesis dans ModelBest",+ "VoxCPM Base URL": "URL de base VoxCPM","Fish Audio Model": "Modèle Fish Audio","Chatterbox Base URL": "URL de base Chatterbox","Chatterbox API Key": "Clé API Chatterbox (Optionnel ; [Voir la configuration](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/id.json b/webui/i18n/id.jsonindex 77e69f0c..d84e1887 100644--- a/webui/i18n/id.json+++ b/webui/i18n/id.json@@ -262,6 +262,10 @@"ElevenLabs API Key": "Kunci API ElevenLabs ([Dapatkan kunci](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "Model ElevenLabs","Fish Audio API Key": "Kunci API Fish Audio ([Dapatkan kunci](https://fish.audio/app/developers))",+ "VoxCPM API Key": "Kunci API ModelBest ([Dapatkan kunci](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "ID Model VoxCPM",+ "VoxCPM Model ID Placeholder": "Pilih ID model speech_synthesis di ModelBest",+ "VoxCPM Base URL": "URL Dasar VoxCPM","Fish Audio Model": "Model Fish Audio","Chatterbox Base URL": "URL Dasar Chatterbox","Chatterbox API Key": "Kunci API Chatterbox (Opsional; [Lihat konfigurasi](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/it.json b/webui/i18n/it.jsonindex 4490c327..3f732862 100644--- a/webui/i18n/it.json+++ b/webui/i18n/it.json@@ -262,6 +262,10 @@"ElevenLabs API Key": "Chiave API ElevenLabs ([Ottieni chiave API](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "Modello ElevenLabs","Fish Audio API Key": "Chiave API Fish Audio ([Ottieni chiave API](https://fish.audio/app/developers))",+ "VoxCPM API Key": "Chiave API ModelBest ([Ottieni chiave API](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "ID modello VoxCPM",+ "VoxCPM Model ID Placeholder": "Seleziona un ID modello speech_synthesis in ModelBest",+ "VoxCPM Base URL": "URL base VoxCPM","Fish Audio Model": "Modello Fish Audio","Chatterbox Base URL": "Base URL di Chatterbox","Chatterbox API Key": "Chiave API Chatterbox (facoltativa; [Visualizza configurazione](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/ko.json b/webui/i18n/ko.jsonindex 06c8e988..6b3ffc57 100644--- a/webui/i18n/ko.json+++ b/webui/i18n/ko.json@@ -262,6 +262,10 @@"ElevenLabs API Key": "ElevenLabs API 키 ([API 키 발급](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "ElevenLabs 모델","Fish Audio API Key": "Fish Audio API 키 ([API 키 발급](https://fish.audio/app/developers))",+ "VoxCPM API Key": "ModelBest API 키 ([API 키 발급](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "VoxCPM 모델 ID",+ "VoxCPM Model ID Placeholder": "ModelBest에서 speech_synthesis 모델 ID를 선택하세요",+ "VoxCPM Base URL": "VoxCPM Base URL","Fish Audio Model": "Fish Audio 모델","Chatterbox Base URL": "Chatterbox Base URL","Chatterbox API Key": "Chatterbox API 키 (선택; [설정 방법](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/pt.json b/webui/i18n/pt.jsonindex df0d0418..714a5696 100644--- a/webui/i18n/pt.json+++ b/webui/i18n/pt.json@@ -262,6 +262,10 @@"ElevenLabs API Key": "Chave API do ElevenLabs ([Obter chave](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "Modelo do ElevenLabs","Fish Audio API Key": "Chave API do Fish Audio ([Obter chave](https://fish.audio/app/developers))",+ "VoxCPM API Key": "Chave API do ModelBest ([Obter chave](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "ID do modelo VoxCPM",+ "VoxCPM Model ID Placeholder": "Selecione um ID de modelo speech_synthesis no ModelBest",+ "VoxCPM Base URL": "URL base do VoxCPM","Fish Audio Model": "Modelo Fish Audio","Chatterbox Base URL": "URL base do Chatterbox","Chatterbox API Key": "Chave API do Chatterbox (Opcional; [Ver configuração](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/ru.json b/webui/i18n/ru.jsonindex 97d49753..0f201513 100644--- a/webui/i18n/ru.json+++ b/webui/i18n/ru.json@@ -258,6 +258,10 @@"ElevenLabs API Key": "API-ключ ElevenLabs ([получить ключ](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "Модель ElevenLabs","Fish Audio API Key": "API-ключ Fish Audio ([получить ключ](https://fish.audio/app/developers))",+ "VoxCPM API Key": "API-ключ ModelBest ([получить ключ](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "ID модели VoxCPM",+ "VoxCPM Model ID Placeholder": "Выберите ID модели speech_synthesis в ModelBest",+ "VoxCPM Base URL": "Базовый URL VoxCPM","Fish Audio Model": "Модель Fish Audio","Chatterbox Base URL": "Базовый URL Chatterbox","Chatterbox API Key": "API-ключ Chatterbox (необязательно; [настройка](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/tr.json b/webui/i18n/tr.jsonindex b5daff94..a938097b 100644--- a/webui/i18n/tr.json+++ b/webui/i18n/tr.json@@ -260,6 +260,10 @@"ElevenLabs API Key": "ElevenLabs API Anahtarı ([Anahtar al](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "ElevenLabs Modeli","Fish Audio API Key": "Fish Audio API Anahtarı ([Anahtar al](https://fish.audio/app/developers))",+ "VoxCPM API Key": "ModelBest API Anahtarı ([Anahtar al](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "VoxCPM Model Kimliği",+ "VoxCPM Model ID Placeholder": "ModelBest'te bir speech_synthesis model kimliği seçin",+ "VoxCPM Base URL": "VoxCPM Temel URL","Fish Audio Model": "Fish Audio Modeli","Chatterbox Base URL": "Chatterbox Temel URL'si","Chatterbox API Key": "Chatterbox API Anahtarı (İsteğe bağlı; [Yapılandırmayı görüntüle](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/vi.json b/webui/i18n/vi.jsonindex 9d4298a4..5411822d 100644--- a/webui/i18n/vi.json+++ b/webui/i18n/vi.json@@ -262,6 +262,10 @@"ElevenLabs API Key": "Khóa API ElevenLabs ([Lấy khóa](https://elevenlabs.io/app/settings/api-keys))","ElevenLabs Model": "Mô hình ElevenLabs","Fish Audio API Key": "Khóa API Fish Audio ([Lấy khóa](https://fish.audio/app/developers))",+ "VoxCPM API Key": "Khóa API ModelBest ([Lấy khóa](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "ID mô hình VoxCPM",+ "VoxCPM Model ID Placeholder": "Chọn ID mô hình speech_synthesis trong ModelBest",+ "VoxCPM Base URL": "URL cơ sở VoxCPM","Fish Audio Model": "Mô hình Fish Audio","Chatterbox Base URL": "URL cơ sở Chatterbox","Chatterbox API Key": "Khóa API Chatterbox (Không bắt buộc; [Xem cấu hình](https://github.com/travisvn/chatterbox-tts-api))",diff --git a/webui/i18n/zh.json b/webui/i18n/zh.jsonindex d789b357..7f4794ec 100644--- a/webui/i18n/zh.json+++ b/webui/i18n/zh.json@@ -275,6 +275,10 @@"ElevenLabs Model": "ElevenLabs 模型","Fish Audio API Key": "Fish Audio API 密钥([点击获取](https://fish.audio/app/developers))","Fish Audio Model": "Fish Audio 模型",+ "VoxCPM API Key": "ModelBest API 密钥([点击获取](https://platform.modelbest.cn/console/keys))",+ "VoxCPM Model ID": "VoxCPM 模型 ID",+ "VoxCPM Model ID Placeholder": "在 ModelBest 中选择支持 speech_synthesis 的模型 ID",+ "VoxCPM Base URL": "VoxCPM Base URL","Chatterbox Base URL": "Chatterbox Base URL","Chatterbox API Key": "Chatterbox API 密钥(可选,[查看配置](https://github.com/travisvn/chatterbox-tts-api))","Chatterbox Model": "Chatterbox 模型",@@ -296,6 +300,7 @@"tts_provider_tips.chatterbox": "自托管服务。运行兼容的 [Chatterbox TTS API](https://github.com/travisvn/chatterbox-tts-api),并填写以 `/v1` 结尾的 Base URL;API Key 通常可选。","tts_provider_tips.kokoro": "自托管、免费:运行兼容的 [Kokoro-FastAPI](https://github.com/remsky/Kokoro-FastAPI)(Apache-2.0 模型,CPU 即可),并填写以 `/v1` 结尾的 Base URL;音色列表自动从服务端读取。","tts_provider_tips.fish_audio": "需要 Fish Audio API Key,可在[开发者控制台](https://fish.audio/app/developers)获取;可在 [Fish Audio](https://fish.audio) 浏览更多音色或在 `config.toml` 中配置自定义音色;查看[价格与条款](https://fish.audio/pricing)。",+ "tts_provider_tips.voxcpm": "需要 [ModelBest API Key](https://platform.modelbest.cn/console/keys) 和支持 `speech_synthesis` 能力的模型 ID。该 API 以流式 WAV 返回音频,本次接入使用默认音色。接口暂不支持数值语速,可在文案开头加入 `(语速稍快)` 等自然语言描述;参考音频复刻尚未包含。","Hide Log": "隐藏日志","Hide Basic Settings": "隐藏基础设置\n\n隐藏后,基础设置面板将不会显示在页面中。\n\n如需要再次显示,请在 `config.toml` 中设置 `hide_config = false`","LLM Settings": "**大模型设置**",