mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-12 12:25:20 +00:00
fix: openai audio revert
This commit is contained in:
parent
c51a65173e
commit
8339f59cdf
1 changed files with 3 additions and 8 deletions
|
|
@ -337,10 +337,7 @@ async def speech(request: Request, user=Depends(get_verified_user)):
|
|||
timeout=timeout, trust_env=True
|
||||
) as session:
|
||||
r = await session.post(
|
||||
url=urljoin(
|
||||
request.app.state.config.TTS_OPENAI_API_BASE_URL,
|
||||
"/audio/speech",
|
||||
),
|
||||
url=f"{request.app.state.config.TTS_OPENAI_API_BASE_URL}/audio/speech",
|
||||
json=payload,
|
||||
headers={
|
||||
"Content-Type": "application/json",
|
||||
|
|
@ -468,10 +465,8 @@ async def speech(request: Request, user=Depends(get_verified_user)):
|
|||
timeout=timeout, trust_env=True
|
||||
) as session:
|
||||
async with session.post(
|
||||
urljoin(
|
||||
base_url or f"https://{region}.tts.speech.microsoft.com",
|
||||
"/cognitiveservices/v1",
|
||||
),
|
||||
(base_url or f"https://{region}.tts.speech.microsoft.com")
|
||||
+ "/cognitiveservices/v1",
|
||||
headers={
|
||||
"Ocp-Apim-Subscription-Key": request.app.state.config.TTS_API_KEY,
|
||||
"Content-Type": "application/ssml+xml",
|
||||
|
|
|
|||
Loading…
Reference in a new issue