Skip to content

vllm.entrypoints.speech_to_text.realtime.serving

Classes:

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:

Attributes:

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: