pyFDN.labeled_audio#

pyFDN.labeled_audio(label, signal, *, fs, label_size='1.1em', gap=0)[source]#

Stack a text label above an audio player (a marimo element).

Convenience for A/B listening layouts: returns mo.vstack([label, audio]) with label rendered as sized HTML and signal as an mo.audio player at fs. marimo is imported lazily, so this only requires marimo when actually called.

Parameters:
  • label (str) – HTML/text shown above the player.

  • signal (ArrayLike) – Audio samples. 1-D for mono; a 2-D array is treated as multi-channel and oriented for mo.audio, so either (samples, channels) (the pyFDN render convention) or (channels, samples) plays correctly.

  • fs (float) – Sample rate in Hz.

  • label_size (str) – CSS font-size for the label (default "1.1em").

  • gap (float) – Vertical gap between the label and the player (default 0).

Return type:

Any

Returns:

A marimo vstack element.