🎨 Change the method of getting channel parameters

This commit is contained in:
Martial BE
2023-12-26 16:40:50 +08:00
parent 47b72b850f
commit eeb867da10
34 changed files with 67 additions and 120 deletions

View File

@@ -27,7 +27,7 @@ type AzureSpeechProvider struct {
// 获取请求头
func (p *AzureSpeechProvider) GetRequestHeaders() (headers map[string]string) {
headers = make(map[string]string)
headers["Ocp-Apim-Subscription-Key"] = p.Context.GetString("api_key")
headers["Ocp-Apim-Subscription-Key"] = p.Channel.Key
headers["Content-Type"] = "application/ssml+xml"
headers["User-Agent"] = "OneAPI"
// headers["X-Microsoft-OutputFormat"] = "audio-16khz-128kbitrate-mono-mp3"