Support both "voice" and "speaker" params in chat completions (#3248)

Signed-off-by: Mike_Qiu <qiudayu.qdy@antgroup.com>
Co-authored-by: Mike_Qiu <qiudayu.qdy@antgroup.com>
Co-authored-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2026-05-06 02:56:23 +00:00
1 parent 4e41b7bc23
commit 005621ba7f
1 file changed
+1 -1
+1 -1
View File
@@ -560,7 +560,7 @@ class OmniOpenAIServingChat(OpenAIServingChat, AudioMixin):
if hasattr(request, "cache_salt") and request.cache_salt is not None:
engine_prompt["cache_salt"] = request.cache_salt
speaker = getattr(request, "speaker", None)
speaker = getattr(request, "voice", None) or getattr(request, "speaker", None)
normalized = validate_requested_speaker(speaker, self._get_supported_speakers())
if normalized is not None:
if "additional_information" not in engine_prompt or engine_prompt["additional_information"] is None: