session.events. Get voice transcription, button presses, sensor data, and more.
Quick Start
How Events Work
Events are real-time data streams from the glasses. When you subscribe, your callback receives data as it happens.Common Events
Voice Transcription
Real-time speech-to-text:| Field | Type | Description |
|---|---|---|
text | string | Transcribed text |
isFinal | boolean | True if transcription is complete |
language | string | Language code (e.g., ‘en-US’) |
confidence | number | Confidence score (0-1) |
Button Presses
Hardware button events:| Field | Type | Description |
|---|---|---|
button | string | Button name (‘forward’, ‘back’, ‘select’, etc.) |
action | string | ’press’, ‘release’, ‘long_press’ |
timestamp | number | When button was pressed |
Head Position
Detect when user looks up/down:Location Updates
GPS coordinates:| Field | Type | Description |
|---|---|---|
lat | number | Latitude |
lng | number | Longitude |
accuracy | number | Accuracy in meters |
altitude | number | Altitude in meters (optional) |
timestamp | number | When location was captured |
Phone Notifications
Notifications from user’s phone:| Field | Type | Description |
|---|---|---|
app | string | App that sent notification |
title | string | Notification title |
text | string | Notification body |
timestamp | number | When notification arrived |
Battery Updates
Monitor battery levels:Event Reference Table
| Event | Requires Permission | Data Type |
|---|---|---|
onTranscription() | MICROPHONE | TranscriptionData |
onTranslation() | MICROPHONE | TranslationData |
onButtonPress() | None | ButtonPress |
onHeadPosition() | None | HeadPosition |
onPhoneNotification() | READ_NOTIFICATIONS | PhoneNotification |
onNotificationDismissed() | READ_NOTIFICATIONS | NotificationDismissed |
onGlassesBatteryUpdate() | None | GlassesBatteryUpdate |
onPhoneBatteryUpdate() | None | PhoneBatteryUpdate |
onGlassesConnectionState() | None | GlassesConnectionState |
onVAD() | MICROPHONE | Vad |
onAudioChunk() | MICROPHONE | ArrayBuffer |
Unsubscribing
All event methods return an unsubscribe function:Common Patterns
Command Processing
Voice + Button Navigation
Real-Time Data Processing
Notification Filtering
Location-Based Features
Best Practices
Check isFinal for Transcription
Check isFinal for Transcription
Always check
isFinal to avoid processing interim results:Unsubscribe When Done
Unsubscribe When Done
Clean up subscriptions to avoid memory leaks:
Handle Missing Permissions
Handle Missing Permissions
Events requiring permissions won’t fire without them:
Use Appropriate Event Frequency
Use Appropriate Event Frequency
Some events fire very frequently:
Permissions Required
Different events require different permissions:| Permission | Events Unlocked |
|---|---|
| MICROPHONE | Transcription, Translation, VAD, Audio Chunks |
| LOCATION | Location Updates |
| READ_NOTIFICATIONS | Phone Notifications, Notification Dismissed |
| CAMERA | Photo Taken, Stream Status |
| None | Button Press, Head Position, Battery, Connection State |
Set permissions in the Developer Console. Users approve them when installing your app.

