Merge branch 'main' into clean_beep
# Conflicts: # internal/routes/wait.go
This commit is contained in:
@@ -61,6 +61,7 @@ func (tts *AliTTS) getToken() error {
|
||||
if err != nil {
|
||||
return err
|
||||
} else if resultMessage.ErrMsg != "" {
|
||||
zap.S().Errorf("获取Token失败: %s", resultMessage.ErrMsg)
|
||||
return errorsx.ThirdPartyErr
|
||||
}
|
||||
tts.tokenResult = resultMessage.TokenResult
|
||||
@@ -69,8 +70,9 @@ func (tts *AliTTS) getToken() error {
|
||||
|
||||
func (tts *AliTTS) Get(text string) (io.Reader, error) {
|
||||
param := nls.DefaultSpeechSynthesisParam()
|
||||
param.Volume = 100
|
||||
param.Volume = tts.Volume
|
||||
param.Voice = tts.Voice
|
||||
param.SpeechRate = tts.SpeechRate
|
||||
|
||||
err := tts.getToken()
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user