Documentation
¶
Overview ¶
Package vllmrealtime adapts vLLM's realtime transcription WebSocket (/v1/realtime) to the stable OpenRealtime perception interface.
vLLM serves natively streaming recognisers on that route - Voxtral Mini 4B Realtime and Qwen3-ASR among them - by feeding audio into one running generation and returning text deltas as the decoder emits them. The route is append-only: a delta is never withdrawn, so every word it reports is already committed. The adapter therefore reports all text as StableText, and names that as a property of this serving route (decoder-policy commitment) rather than as a claim about the checkpoint.
One adapter is one utterance and one socket. The socket opens on the first frame and closes after Finalize.
Index ¶
- Constants
- type Adapter
- func (adapter *Adapter) Close() error
- func (adapter *Adapter) Descriptor() v1.Descriptor
- func (adapter *Adapter) Finalize(ctx context.Context, sourceSample uint64) (v1.PerceptionRevision, error)
- func (adapter *Adapter) PushFrame(ctx context.Context, frame v1.AudioFrame) ([]v1.PerceptionRevision, error)
- type Config
Constants ¶
const ( // DefaultURL is the realtime route of a local vLLM server. The port is the // one the duplex deployment profiles give Voxtral; the room's :8001 stays // the start/chunk/finish Qwen service. DefaultURL = "ws://127.0.0.1:9101/v1/realtime" // DefaultModel is the served model name the deployment profiles use. DefaultModel = "voxtral-realtime" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter owns one realtime transcription socket for one utterance.
func (*Adapter) Descriptor ¶
func (adapter *Adapter) Descriptor() v1.Descriptor
Descriptor implements api/v1.PerceptionProvider.
func (*Adapter) Finalize ¶
func (adapter *Adapter) Finalize(ctx context.Context, sourceSample uint64) (v1.PerceptionRevision, error)
Finalize ends the audio, waits for the decoder to finish the delayed tail, and returns one final revision.
func (*Adapter) PushFrame ¶
func (adapter *Adapter) PushFrame(ctx context.Context, frame v1.AudioFrame) ([]v1.PerceptionRevision, error)
PushFrame resamples a frame to 16 kHz, appends it to the running generation, and returns a revision when the decoder has emitted new text.