A level for the audio the assistant is playing
AssistantSession.audioLevels() streams the RMS of the audio the assistant is currently speaking — normalised 0...1, at about 25 Hz.
It is the output-side counterpart to AudioClient.audioChunks, which meters the wearer. audioChunks does not take the microphone away from a live assistant session (the SDK fans a single input tap out to every consumer), so together the two drive a full two-sided voice visualiser.
The property that makes it usable
Levels are placed on the playback clock, not at enqueue. The model streams its reply faster than real time, so a chunk handed to the player stays audible for seconds afterwards. Metering where the audio arrives would run a visualiser ahead of the voice by the whole queue depth — which reads as broken rather than as missing.
Measured on a live session: 66 level frames spread across 2.81 s of speech, with a visible trough at the pause between two sentences.
Contract
- Values arrive only between
assistantAudioStartedandassistantAudioFinished. - A final
0when playback is cut short by barge-in,cancelSpeak()or session end, so a visualiser lands at rest rather than freezing mid-swell. - Opt-in and free when unused — nothing is computed or emitted until the first subscriber.
- RMS, not peak. An estimate good to a fraction of a second: the phone is the player and a wearable is a Bluetooth sink, so the tail of that hop is not observable from any layer of the SDK.
- Not available on the on-device local tier, whose speech pump runs outside the shared core.
audioLevels()there completes without emitting.
Compatibility
Additive for callers, and AssistantEvent is unchanged in this release — so unlike 2.4.0 there is no exhaustive-switch break. Anyone who implements AssistantSession themselves, such as a hand-rolled test fake, gains a protocol requirement.