⚠️ This type is unstable and may change significantly in a way that the data won't be backwards compatible.
An audio file, stored as-is (.aac, .flac, .m4a, .mp3, .ogg, .wav).
The audio starts playing at the time it was logged,
so log it on a temporal timeline (duration or timestamp) at the point where playback should begin.
The viewer plays it while time is playing, in an views.AudioView.
Fields
Required
blob:Blob
Recommended
media_type:MediaType
Can be shown in
API reference links
Example
Simple audio asset
"""Log an audio file at t=0 on the `time` timeline."""
import sys
import rerun as rr
if len(sys.argv) < 2:
print(f"Usage: {sys.argv[0]} <path_to_audio.[aac|flac|m4a|mp3|ogg|wav]>")
sys.exit(1)
rr.init("rerun_example_asset_audio", spawn=True)
rr.set_time("time", duration=0.0)
rr.log("audio", rr.AssetAudio(path=sys.argv[1]))