mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
feat: add password authentication option and update related translations
This commit is contained in:
parent
e1b3f47337
commit
faf238109b
|
|
@ -8709,4 +8709,8 @@ msgid "Duration"
|
|||
msgstr ""
|
||||
|
||||
msgid "Failed to generate video"
|
||||
msgstr ""
|
||||
msgstr ""
|
||||
|
||||
|
||||
msgid "password"
|
||||
msgstr "Password login"
|
||||
|
|
@ -8835,4 +8835,7 @@ msgid "Duration"
|
|||
msgstr "时长"
|
||||
|
||||
msgid "Failed to generate video"
|
||||
msgstr "生成视频失败"
|
||||
msgstr "生成视频失败"
|
||||
|
||||
msgid "password"
|
||||
msgstr "密码登录"
|
||||
|
|
@ -8835,4 +8835,7 @@ msgid "Duration"
|
|||
msgstr "時長"
|
||||
|
||||
msgid "Failed to generate video"
|
||||
msgstr "生成視頻失敗"
|
||||
msgstr "生成視頻失敗"
|
||||
|
||||
msgid "password"
|
||||
msgstr "密码登录"
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue