[TTS] Add missing _generate_pcm_chunks for OmniOpenAIServingSpeech streaming (#2569)

Signed-off-by: Yueqian Lin <pandaleefree@gmail.com>
Signed-off-by: Yueqian Lin <70319226+linyueqian@users.noreply.github.com>
Co-authored-by: vveerrgg <vveerrgg@users.noreply.github.com>
This commit is contained in:
vveerrggandvveerrgg authored and GitHub committed 2026-04-08 22:20:33 +00:00
1 parent fcda835f4d
commit 2c6c07c4f6
2 files changed
+24

No files matched your search

@@ -1459,6 +1459,15 @@ class OmniOpenAIServingSpeech(OpenAIServing, AudioMixin):
)
return request_id, generator, tts_params
async def _generate_pcm_chunks(self, generator, request_id: str):
"""Yield raw PCM byte chunks from the engine generator.
Delegates to ``_generate_audio_chunks`` with ``response_format="pcm"``.
Used by the WebSocket streaming handler and ``_iter_pcm_audio_bytes``.
"""
async for chunk in self._generate_audio_chunks(generator, request_id, response_format="pcm"):
yield chunk
async def _iter_pcm_audio_bytes(self, request: OpenAICreateSpeechRequest):
"""Yield raw PCM bytes for a speech request as soon as chunks are decoded."""
request_id, generator, _ = await self._prepare_speech_generation(request)