SpeakerSink

sink extra: speaker-sink

Play the audio of every received message on a speaker, one message after the other.

Node type:

SpeakerSink

Input:

AudioPayload

Output:

–

Extra:

speaker-sink

$ pip install "juturna-nodes[speaker-sink]"

The node README describes the system requirements, the messages and the licenses of the node.

Arguments

Argument

Type

Default

Description

device

str

""

Output device, as a name (or part of it) or an index listed by python -m sounddevice; empty for the system default

Input message

Field

Use

payload.audio

Mono float32 samples, required. Values outside [-1, 1] are clipped

payload.sampling_rate

Required. If the device does not support this rate, the audio backend decides: it may resample or refuse to play

meta is not read. SynthesizerSherpa produces this format.

Output message

The node does not transmit messages.

License

  • Code: this node is part of juturna-nodes, MIT (its LICENSE file).

  • sounddevice: MIT (the License-Expression of sounddevice on PyPI).

  • NumPy: BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0 (the License-Expression of numpy on PyPI).

Pipeline usage

{
  "name": "speaker",
  "type": "SpeakerSink",
  "configuration": {}
}

Configuration

Default node arguments, as defined in the node config.toml file. Any of them can be overridden in the node configuration of a pipeline.

[arguments]
device = ""

[meta]

Reference

class SpeakerSink(device: str, **kwargs)

Play incoming audio on an output device, one message after the other