vllm.entrypoints.speech_to_text.realtime.serving
¶
Classes:
-
OpenAIServingRealtime–Realtime audio transcription service via WebSocket streaming.
OpenAIServingRealtime
¶
Bases: GenerateBaseServing
Realtime audio transcription service via WebSocket streaming.
Provides streaming audio-to-text transcription by transforming audio chunks into StreamingInput objects that can be consumed by the engine.
Methods:
-
transcribe_realtime–Transform audio stream into StreamingInput for engine.generate().
Attributes:
-
model_cls(type[SupportsRealtime]) –Get the model class that supports transcription.
model_cls
cached
property
¶
Get the model class that supports transcription.
transcribe_realtime(audio_stream, input_stream)
async
¶
Transform audio stream into StreamingInput for engine.generate().
Parameters:
-
(audio_stream¶AsyncGenerator[ndarray, None]) –Async generator yielding float32 numpy audio arrays
-
(input_stream¶Queue[list[int]]) –Queue containing context token IDs from previous generation outputs. Used for autoregressive multi-turn processing where each generation's output becomes the context for the next iteration.
Yields:
-
AsyncGenerator[StreamingInput, None]–StreamingInput objects containing audio prompts for the engine