Glassly Miniapp SDK betaThe SDK is in beta, so its APIs may change before general availability.Developing on Mentra Live? We recommend using the Glassly Bluetooth SDK.The developer tools are available in the Glassly App under Settings → Miniapp Developer Settings.Share feedback with an in-app bug report, on Discord, or by email at [email protected].
session.mic is the low-level audio input: raw frames and a voice-activity signal. If you want text, use session.transcription instead. Reach for mic when you need the audio itself, like recording a clip or running your own audio processing. Both subscriptions need the MICROPHONE permission in your manifest. Without it the phone drops them, no events arrive, and onPermissionError fires with PERMISSION_NOT_DECLARED.

Raw audio

Each AudioChunkData has:

Voice activity

onVoiceActivity fires when the user starts and stops speaking, without giving you the audio:

Overriding gating

Two methods temporarily override how the glasses gate audio, for the lifetime of your miniapp. Both need MICROPHONE and revert to the Glassly App’s configured value when your miniapp disconnects. setVoiceActivityDetectionEnabled(enabled) overrides the glasses-side voice activity detection. Disabled, mic gating falls back to the loudness gate alone (if that’s enabled). setLoudnessGateEnabled(enabled) overrides the center-mic loudness gate (“Barrier”), which blocks quiet or self-talk audio independent of VAD.

Cleaning up

Both subscription methods return an unsubscribe function, and stop() tears down everything this module owns:
session.mic.hasPermission reports whether MICROPHONE is declared in your manifest, not whether the user granted the OS prompt. If they denied it, the subscription succeeds but no chunks arrive.
mic, transcription, and translation are independent. Subscribing to raw audio does not give you transcripts, and vice versa. Audio output (playback and text-to-speech) lives on session.speaker.