Merge branch 'zhayujie:master' into master

This commit is contained in:
跃迁
2023-12-06 00:44:18 +08:00
committed by GitHub
4 changed files with 21 additions and 6 deletions

View File

@@ -33,7 +33,8 @@ class OpenaiVoice(Voice):
def textToVoice(self, text):
try:
url = 'https://api.openai.com/v1/audio/speech'
api_base = conf().get("open_ai_api_base") or "https://api.openai.com/v1"
url = f'{api_base}/audio/speech'
headers = {
'Authorization': 'Bearer ' + conf().get("open_ai_api_key"),
'Content-Type': 'application/json'