Skip to main content
View source

Player

View as Markdown

A RocketRide audio sink that plays incoming audio or a video's audio track through the system output device.

What it does

The node passes incoming audio and video streams to a PCM player and has no downstream lane. Choose it when a local pipeline needs to play a stream rather than transform it, transcribe it, or generate speech. It serializes playback across node instances with one shared lock.

Lanes

Lane inLane outDescription
audioPass the audio stream to the player.
videoExtract and play the video's audio track.

Configuration

This node exposes no configuration fields. It has one empty default profile; playback behavior is fixed by the implementation.

Limitations

The nosaas capability means this node is excluded from SaaS deployments. It opens an output stream through sounddevice, so it is intended for a runtime that can access an audio output device.

Notes

Fixed playback format and buffering

The player is configured for 44,100 Hz, two-channel, signed 16-bit PCM output with a low-latency stream and 1,024-frame callback blocks. It accumulates input into 16 KiB chunks and enqueues at most 32 chunks; a full queue blocks incoming writes, providing natural backpressure that prevents unbounded memory growth.

At end of stream, whatever is left in the accumulator — a partial chunk, or the whole stream when it is shorter than 16 KiB — is queued ahead of the end-of-stream marker, so short streams and stream tails are never discarded.

On stop, the node polls until the queue and the internal playback buffer are both fully drained before closing the stream, so buffered audio plays to completion. The final callback always fills its output buffer as required by sounddevice: a partial block is played in full and padded with silence, while an exact-boundary end writes silence before stopping. The callback stops immediately after committing that terminal block.

Schema

No configuration fields.

Dependencies

  • imageio_ffmpeg
  • sounddevice >=0.5