🔖 chore: optimize the settings of Azure Speech
This commit is contained in:
parent
1e07b0b25f
commit
f91b9856d4
@ -1120,5 +1120,7 @@
|
|||||||
"开始时间": "Start Time",
|
"开始时间": "Start Time",
|
||||||
"模型名称为coze-{bot_id},你也可以直接使用 coze-* 通配符来匹配所有coze开头的模型": "The model name is coze-{bot_id}, you can also directly use the coze-* wildcard to match all models starting with coze",
|
"模型名称为coze-{bot_id},你也可以直接使用 coze-* 通配符来匹配所有coze开头的模型": "The model name is coze-{bot_id}, you can also directly use the coze-* wildcard to match all models starting with coze",
|
||||||
"模型名称映射, 你可以取一个容易记忆的名字来代替coze-{bot_id},例如:": "Model name mapping, you can take an easy-to-remember name to replace coze-{bot_id}, for example: ",
|
"模型名称映射, 你可以取一个容易记忆的名字来代替coze-{bot_id},例如:": "Model name mapping, you can take an easy-to-remember name to replace coze-{bot_id}, for example: ",
|
||||||
",注意:如果使用了模型映射,那么上面的模型名称必须使用映射前的名称,上述例子中,你应该在模型中填入coze-translate(如果已经使用了coze-*,可以忽略)。": ", Note: If a model mapping is used, then the model name above must use the name before the mapping. In the example above, you should fill in coze-translate in the model (if coze-* has been used, it can be ignored)."
|
",注意:如果使用了模型映射,那么上面的模型名称必须使用映射前的名称,上述例子中,你应该在模型中填入coze-translate(如果已经使用了coze-*,可以忽略)。": ", Note: If a model mapping is used, then the model name above must use the name before the mapping. In the example above, you should fill in coze-translate in the model (if coze-* has been used, it can be ignored).",
|
||||||
|
"位置/区域": "Location/Region",
|
||||||
|
"请输入你 Speech Studio 的位置/区域,例如:eastasia": "Please enter the location/region of your Speech Studio, for example: eastasia"
|
||||||
}
|
}
|
||||||
|
@ -1,9 +1,11 @@
|
|||||||
package azureSpeech
|
package azureSpeech
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"one-api/common/requester"
|
"one-api/common/requester"
|
||||||
"one-api/model"
|
"one-api/model"
|
||||||
"one-api/providers/base"
|
"one-api/providers/base"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// 定义供应商工厂
|
// 定义供应商工厂
|
||||||
@ -26,6 +28,17 @@ type AzureSpeechProvider struct {
|
|||||||
base.BaseProvider
|
base.BaseProvider
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (p *AzureSpeechProvider) GetFullRequestURL(requestURL string, modelName string) string {
|
||||||
|
baseURL := ""
|
||||||
|
if p.Channel.Other != "" {
|
||||||
|
baseURL = fmt.Sprintf("https://%s.tts.speech.microsoft.com", p.Channel.Other)
|
||||||
|
} else {
|
||||||
|
baseURL = strings.TrimSuffix(p.GetBaseURL(), "/")
|
||||||
|
}
|
||||||
|
|
||||||
|
return fmt.Sprintf("%s%s", baseURL, requestURL)
|
||||||
|
}
|
||||||
|
|
||||||
// 获取请求头
|
// 获取请求头
|
||||||
func (p *AzureSpeechProvider) GetRequestHeaders() (headers map[string]string) {
|
func (p *AzureSpeechProvider) GetRequestHeaders() (headers map[string]string) {
|
||||||
headers = make(map[string]string)
|
headers = make(map[string]string)
|
||||||
|
@ -159,12 +159,16 @@ const typeConfig = {
|
|||||||
modelGroup: 'Baichuan'
|
modelGroup: 'Baichuan'
|
||||||
},
|
},
|
||||||
24: {
|
24: {
|
||||||
|
inputLabel: {
|
||||||
|
other: '位置/区域'
|
||||||
|
},
|
||||||
input: {
|
input: {
|
||||||
models: ['tts-1', 'tts-1-hd']
|
models: ['tts-1', 'tts-1-hd']
|
||||||
},
|
},
|
||||||
prompt: {
|
prompt: {
|
||||||
test_model: '',
|
test_model: '',
|
||||||
base_url: '请输入请求地址,例如:https://eastasia.tts.speech.microsoft.com'
|
base_url: '',
|
||||||
|
other: '请输入你 Speech Studio 的位置/区域,例如:eastasia'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
27: {
|
27: {
|
||||||
|
Loading…
Reference in New Issue
Block a user