chore: update config with TTS and ASR tokens

master
HALIndex 2025-03-16 19:18:34 +08:00
parent 8e8267b0a6
commit 509f694eaf
1 changed files with 12 additions and 0 deletions

View File

@ -57,11 +57,21 @@ export class ConfigFactory {
* @note , "语音合成" , App * @note , "语音合成" , App
*/ */
TTSAppId: 'Your TTS AppId', TTSAppId: 'Your TTS AppId',
/**
* @brief token
* 使
*/
TTSToken: undefined,
/** /**
* @brief , ASR() AppId, https://console.volcengine.com/speech/app?s=g 中获取, 若无可先创建应用。 * @brief , ASR() AppId, https://console.volcengine.com/speech/app?s=g 中获取, 若无可先创建应用。
* @note , "流式语音识别" , App * @note , "流式语音识别" , App
*/ */
ASRAppId: 'Your ASR AppId', ASRAppId: 'Your ASR AppId',
/**
* @brief AppId Access Token
* 使
*/
ASRToken: undefined,
}; };
Model: AI_MODEL = Model[SCENE.INTELLIGENT_ASSISTANT]; Model: AI_MODEL = Model[SCENE.INTELLIGENT_ASSISTANT];
@ -142,6 +152,7 @@ export class ConfigFactory {
*/ */
Mode: 'smallmodel', Mode: 'smallmodel',
AppId: this.BaseConfig.ASRAppId, AppId: this.BaseConfig.ASRAppId,
...(this.BaseConfig.ASRToken ? { AccessToken: this.BaseConfig.ASRToken } : {}),
/** /**
* @note Cluster ID * @note Cluster ID
* : https://console.volcengine.com/speech/service/16?s=g * : https://console.volcengine.com/speech/service/16?s=g
@ -162,6 +173,7 @@ export class ConfigFactory {
ProviderParams: { ProviderParams: {
app: { app: {
AppId: this.BaseConfig.TTSAppId, AppId: this.BaseConfig.TTSAppId,
...(this.BaseConfig.TTSToken ? { Token: this.BaseConfig.TTSToken } : {}),
Cluster: TTS_CLUSTER.TTS, Cluster: TTS_CLUSTER.TTS,
}, },
audio: { audio: {