Skip to content

Commit 8339f59

Browse files
committed
fix: openai audio revert
1 parent c51a651 commit 8339f59

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

backend/open_webui/routers/audio.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,7 @@ async def speech(request: Request, user=Depends(get_verified_user)):
337337
timeout=timeout, trust_env=True
338338
) as session:
339339
r = await session.post(
340-
url=urljoin(
341-
request.app.state.config.TTS_OPENAI_API_BASE_URL,
342-
"/audio/speech",
343-
),
340+
url=f"{request.app.state.config.TTS_OPENAI_API_BASE_URL}/audio/speech",
344341
json=payload,
345342
headers={
346343
"Content-Type": "application/json",
@@ -468,10 +465,8 @@ async def speech(request: Request, user=Depends(get_verified_user)):
468465
timeout=timeout, trust_env=True
469466
) as session:
470467
async with session.post(
471-
urljoin(
472-
base_url or f"https://{region}.tts.speech.microsoft.com",
473-
"/cognitiveservices/v1",
474-
),
468+
(base_url or f"https://{region}.tts.speech.microsoft.com")
469+
+ "/cognitiveservices/v1",
475470
headers={
476471
"Ocp-Apim-Subscription-Key": request.app.state.config.TTS_API_KEY,
477472
"Content-Type": "application/ssml+xml",

0 commit comments

Comments
 (0)