pyFDN.labeled_audio#
- pyFDN.labeled_audio(label, signal, *, fs, label_size='1.1em', gap=0)[source]#
Stack a text
labelabove an audio player (a marimo element).Convenience for A/B listening layouts: returns
mo.vstack([label, audio])withlabelrendered as sized HTML andsignalas anmo.audioplayer atfs. 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 formo.audio, so either(samples, channels)(the pyFDN render convention) or(channels, samples)plays correctly.fs (
float) – Sample rate in Hz.label_size (
str) – CSSfont-sizefor the label (default"1.1em").gap (
float) – Vertical gap between the label and the player (default 0).
- Return type:
- Returns:
A marimo
vstackelement.