From 5605ff9803392c3d1446eb6d9f16dc091f866d79 Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Fri, 1 Nov 2024 16:42:32 +0800 Subject: [PATCH] fix voice list --- api/core/plugin/manager/model.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/api/core/plugin/manager/model.py b/api/core/plugin/manager/model.py index fb58c4bb8d..2081dcc298 100644 --- a/api/core/plugin/manager/model.py +++ b/api/core/plugin/manager/model.py @@ -413,7 +413,7 @@ class PluginModelManager(BasePluginManager): """ response = self._request_with_plugin_daemon_response_stream( method="POST", - path=f"plugin/{tenant_id}/dispatch/model/voices", + path=f"plugin/{tenant_id}/dispatch/tts/model/voices", type=PluginVoicesResponse, data=jsonable_encoder( { @@ -434,8 +434,10 @@ class PluginModelManager(BasePluginManager): ) for resp in response: + voices = [] for voice in resp.voices: - return [{"name": voice.name, "value": voice.value}] + voices.append({"name": voice.name, "value": voice.value}) + return voices return []