File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed
backend/open_webui/routers Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -337,10 +337,7 @@ async def speech(request: Request, user=Depends(get_verified_user)):
337
337
timeout = timeout , trust_env = True
338
338
) as session :
339
339
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" ,
344
341
json = payload ,
345
342
headers = {
346
343
"Content-Type" : "application/json" ,
@@ -468,10 +465,8 @@ async def speech(request: Request, user=Depends(get_verified_user)):
468
465
timeout = timeout , trust_env = True
469
466
) as session :
470
467
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" ,
475
470
headers = {
476
471
"Ocp-Apim-Subscription-Key" : request .app .state .config .TTS_API_KEY ,
477
472
"Content-Type" : "application/ssml+xml" ,
You can’t perform that action at this time.
0 commit comments