feat: add password authentication option and update related translations
parent
e1b3f47337
commit
faf238109b
|
|
@ -8709,4 +8709,8 @@ msgid "Duration"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
msgid "Failed to generate video"
|
msgid "Failed to generate video"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|
||||||
|
msgid "password"
|
||||||
|
msgstr "Password login"
|
||||||
|
|
@ -8835,4 +8835,7 @@ msgid "Duration"
|
||||||
msgstr "时长"
|
msgstr "时长"
|
||||||
|
|
||||||
msgid "Failed to generate video"
|
msgid "Failed to generate video"
|
||||||
msgstr "生成视频失败"
|
msgstr "生成视频失败"
|
||||||
|
|
||||||
|
msgid "password"
|
||||||
|
msgstr "密码登录"
|
||||||
|
|
@ -8835,4 +8835,7 @@ msgid "Duration"
|
||||||
msgstr "時長"
|
msgstr "時長"
|
||||||
|
|
||||||
msgid "Failed to generate video"
|
msgid "Failed to generate video"
|
||||||
msgstr "生成視頻失敗"
|
msgstr "生成視頻失敗"
|
||||||
|
|
||||||
|
msgid "password"
|
||||||
|
msgstr "密码登录"
|
||||||
|
|
@ -60,26 +60,5 @@ class SiliconCloudTextToSpeech(MaxKBBaseModel, BaseTextToSpeech):
|
||||||
) as response:
|
) as response:
|
||||||
return response.read()
|
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):
|
def is_cache_model(self):
|
||||||
return False
|
return False
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue