Skip to content

Audio

marimo.audio

audio(src: Union[str, BytesIO]) -> Html

Render an audio file as HTML.

PARAMETER DESCRIPTION
src

a path or URL to an audio file, bytes, or a file-like object opened in binary mode

TYPE: Union[str, BytesIO]

RETURNS DESCRIPTION
Html

An audio player as an Html object.

Example
mo.audio(
    src="https://upload.wikimedia.org/wikipedia/commons/8/8c/Ivan_Ili%C4%87-Chopin_-_Prelude_no._1_in_C_major.ogg"
)

mo.audio(src="path/to/local/file.wav")