From faf238109bdee967ef8108ac6f4e2c3a6a254833 Mon Sep 17 00:00:00 2001 From: wxg0103 <727495428@qq.com> Date: Thu, 18 Sep 2025 15:47:38 +0800 Subject: [PATCH] feat: add password authentication option and update related translations --- apps/locales/en_US/LC_MESSAGES/django.po | 6 +++++- apps/locales/zh_CN/LC_MESSAGES/django.po | 5 ++++- apps/locales/zh_Hant/LC_MESSAGES/django.po | 5 ++++- .../siliconCloud_model_provider/model/tts.py | 21 ------------------- 4 files changed, 13 insertions(+), 24 deletions(-) diff --git a/apps/locales/en_US/LC_MESSAGES/django.po b/apps/locales/en_US/LC_MESSAGES/django.po index 364419723..894506111 100644 --- a/apps/locales/en_US/LC_MESSAGES/django.po +++ b/apps/locales/en_US/LC_MESSAGES/django.po @@ -8709,4 +8709,8 @@ msgid "Duration" msgstr "" msgid "Failed to generate video" -msgstr "" \ No newline at end of file +msgstr "" + + +msgid "password" +msgstr "Password login" \ No newline at end of file diff --git a/apps/locales/zh_CN/LC_MESSAGES/django.po b/apps/locales/zh_CN/LC_MESSAGES/django.po index dc1046dcb..5a5405a80 100644 --- a/apps/locales/zh_CN/LC_MESSAGES/django.po +++ b/apps/locales/zh_CN/LC_MESSAGES/django.po @@ -8835,4 +8835,7 @@ msgid "Duration" msgstr "时长" msgid "Failed to generate video" -msgstr "生成视频失败" \ No newline at end of file +msgstr "生成视频失败" + +msgid "password" +msgstr "密码登录" \ No newline at end of file diff --git a/apps/locales/zh_Hant/LC_MESSAGES/django.po b/apps/locales/zh_Hant/LC_MESSAGES/django.po index c7c0d9c98..e41aab721 100644 --- a/apps/locales/zh_Hant/LC_MESSAGES/django.po +++ b/apps/locales/zh_Hant/LC_MESSAGES/django.po @@ -8835,4 +8835,7 @@ msgid "Duration" msgstr "時長" msgid "Failed to generate video" -msgstr "生成視頻失敗" \ No newline at end of file +msgstr "生成視頻失敗" + +msgid "password" +msgstr "密码登录" \ No newline at end of file diff --git a/apps/models_provider/impl/siliconCloud_model_provider/model/tts.py b/apps/models_provider/impl/siliconCloud_model_provider/model/tts.py index b5ddd6c86..fecfe6694 100644 --- a/apps/models_provider/impl/siliconCloud_model_provider/model/tts.py +++ b/apps/models_provider/impl/siliconCloud_model_provider/model/tts.py @@ -60,26 +60,5 @@ class SiliconCloudTextToSpeech(MaxKBBaseModel, BaseTextToSpeech): ) as response: return response.read() - import requests - - url = "https://api.siliconflow.cn/v1/audio/speech" - - payload = { - "model": "FunAudioLLM/CosyVoice2-0.5B", - "input": "Can you say it with a happy emotion? <|endofprompt|>I'm so happy, Spring Festival is coming!", - "voice": "FunAudioLLM/CosyVoice2-0.5B:alex", - "response_format": "mp3", - "sample_rate": 123, - "stream": True, - "speed": 1, - "gain": 0 - } - headers = { - "Authorization": "Bearer ", - "Content-Type": "application/json" - } - - response = requests.request("POST", url, json=payload, headers=headers) - def is_cache_model(self): return False