mirror of
https://github.com/zhayujie/chatgpt-on-wechat.git
synced 2026-06-02 00:57:41 +08:00
Merge branch 'zhayujie:master' into master
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user