mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-20 19:29:13 +08:00
fix voice list
This commit is contained in:
parent
84b7a4607a
commit
5605ff9803
@ -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 []
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user