[Cleanup]Migrate model validation to adapters and clean up serving_speech.py (#4833)

Signed-off-by: boatman <109857087+sphinxkkkbc@users.noreply.github.com>
Co-authored-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com>
This commit is contained in:
boatmanandYueqian Lin authored and GitHub committed 2026-07-19 23:03:32 -07:00
1 parent 10d3a25916
commit 32dddfcef4
16 files changed
+547 -550

No files matched your search

@@ -23,8 +23,9 @@ class StepAudio2Adapter(ARTTSAdapter):
name = "step_audio2"
def validate(self, request: "OpenAICreateSpeechRequest") -> str | None:
# Dispatcher routes to the step_audio2 case (non-empty input check).
return self.ctx.server._validate_tts_request(request)
if not request.input or not request.input.strip():
return "Input text cannot be empty"
return None
async def build(
self, request: "OpenAICreateSpeechRequest", sampling_params_list: list, has_inline_ref_audio: bool