Skip to main content
Audio files are supported on the platform, and can be uploaded via a file path or a Numpy array containing audio data forming frames * channels
You can instantiate an audio object using the pluto.Audio constructor.
audio = pluto.Audio(
    data=Union[str, np.ndarray],
    rate=int | None = 48000,
    caption=str | None = None,
)
pluto.log({"audio/0": audio}, step=step)
ParameterTypeDescription
dataUnion[str, np.ndarray]The audio data to log. Can be a path to an audio file or a NumPy array.
rateintThe sample rate of the audio data. Defaults to 48000.
captionstrA caption for the audio.

Examples

Logging from File Paths

import httpx
r = httpx.get(
    "https://actions.google.com/sounds/v1/alarms/digital_watch_alarm_long.ogg"
)
with open(f"test.ogg", "wb") as f:
    f.write(r.content)

pluto.log({"audio": pluto.Audio(data="test.ogg")}, step=step)

Logging from NumPy Arrays

data = np.array([1, 1, 1], [1, 1, 1], dtype=np.float32)
pluto.log({"audio": pluto.Audio(data=data)}, step=step)

Viewing Audio in the Dashboard

Logged audio files appear as player widgets in the dashboard with standard playback controls, volume adjustment, and a download button. Each audio card shows the filename and associated run. Audio widget in the dashboard

Step Navigation

If you log audio at multiple training steps, use the step navigator below the player to browse through different steps. This is useful for tracking how generated audio (e.g., text-to-speech) improves over the course of training.