mirror of
https://github.com/remsky/Kokoro-FastAPI.git
synced 2025-04-13 09:39:17 +00:00
Update openai_compatible.py to fix lang_code
properly sets lang_code from api request, and applies config default if not set
This commit is contained in:
parent
24b31ccbb5
commit
1cf011b2eb
1 changed files with 1 additions and 1 deletions
|
@ -137,7 +137,7 @@ async def stream_audio_chunks(
|
||||||
voice=voice_name,
|
voice=voice_name,
|
||||||
speed=request.speed,
|
speed=request.speed,
|
||||||
output_format=request.response_format,
|
output_format=request.response_format,
|
||||||
lang_code=request.lang_code or request.voice[0],
|
lang_code=request.lang_code if request.lang_code else (settings.default_voice_code if settings.default_voice_code else voice_name[0].lower()),
|
||||||
):
|
):
|
||||||
# Check if client is still connected
|
# Check if client is still connected
|
||||||
is_disconnected = client_request.is_disconnected
|
is_disconnected = client_request.is_disconnected
|
||||||
|
|
Loading…
Add table
Reference in a new issue