feat: add password authentication option and update related translations

This commit is contained in:
wxg0103 2025-09-18 15:47:38 +08:00
parent e1b3f47337
commit faf238109b
4 changed files with 13 additions and 24 deletions

View File

@ -8709,4 +8709,8 @@ msgid "Duration"
msgstr ""
msgid "Failed to generate video"
msgstr ""
msgstr ""
msgid "password"
msgstr "Password login"

View File

@ -8835,4 +8835,7 @@ msgid "Duration"
msgstr "时长"
msgid "Failed to generate video"
msgstr "生成视频失败"
msgstr "生成视频失败"
msgid "password"
msgstr "密码登录"

View File

@ -8835,4 +8835,7 @@ msgid "Duration"
msgstr "時長"
msgid "Failed to generate video"
msgstr "生成視頻失敗"
msgstr "生成視頻失敗"
msgid "password"
msgstr "密码登录"

View File

@ -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 <token>",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
def is_cache_model(self):
return False