The Bluetooth SDK exposes microphone input controls, microphone audio callbacks, local transcription events, and Mentra Live media-volume helpers. Speaker playback is separate: your app plays audio with normal Android, iOS, or React Native audio APIs, and the phone OS routes that audio to Mentra Live when the glasses are connected as the Bluetooth media output.
Mentra Live and G2 both have microphones. Mentra Live has a speaker; G2 does not.

Microphone Input

Use setMicState when your app wants microphone audio from the connected glasses or phone microphone path. enabled turns microphone capture on or off. useGlassesMic selects the glasses microphone when true, or the phone microphone when false. bypassVad controls whether Voice Activity Detection can gate the audio stream. Voice Activity Detection, or VAD, is the SDK’s speech detector. When VAD gating is enabled, the SDK emits microphone audio only around detected speech. That is useful for speech-triggered features, but it can remove leading/trailing silence and make PCM arrive in uneven bursts. For external STT services, WAV writing, recording, and playback, keep bypassVad at its default true value so the app receives continuous PCM.
await BluetoothSdk.setMicState(true);
Your app owns user-facing microphone permission copy, should ask for microphone access only when the feature needs it, and should provide a visible way to disable microphone streaming. Pass bypassVad = false only when your app intentionally wants VAD-gated microphone events.

Local Transcription

import {useBluetoothEvent} from '@mentra/bluetooth-sdk/react';

export function TranscriptLogger() {
  useBluetoothEvent('local_transcription', (event) => {
    console.log(`${event.text} final=${event.isFinal}`);
  });

  return null;
}

Microphone Audio Events

React Native can listen for microphone PCM events. PCM events are self-describing so apps can pass the buffer directly to STT, WAV writing, or playback code without reading native SDK sources:
import {useBluetoothEvent} from '@mentra/bluetooth-sdk/react';

export function MicPcmLogger() {
  useBluetoothEvent('mic_pcm', (event) => {
    console.log(event.sampleRate, event.bitsPerSample, event.channels, event.encoding);
    console.log(`VAD gated: ${event.vadGated}`);
    console.log(event.pcm);
  });

  return null;
}
mic_pcm emits 16 kHz, 16-bit, mono, signed little-endian PCM. vadGated is true when Voice Activity Detection is allowed to gate emitted audio before it reaches your listener. mic_lc3 emits SDK-encoded LC3 frames with sampleRate, channels, frameDurationMs, frameSizeBytes, bitrate, packetizedFromGlasses, and vadGated. For SDK-encoded LC3 events, packetizedFromGlasses is false: the SDK decodes glasses microphone LC3 and re-encodes it to the SDK’s canonical LC3 output format before emitting app-facing LC3 events. Native Android and iOS apps receive MicPcmEvent and MicLc3Event objects with the same metadata through the SDK listener/delegate surfaces. Disable microphone audio callbacks when the app finishes using them.

Mentra Live Speaker Playback

Mentra Live uses two Bluetooth paths:
  • The SDK’s BLE connection controls glasses features and receives device events.
  • The phone OS’s Bluetooth media connection carries speaker audio from the phone to the glasses.
There is no special Bluetooth SDK method for “play this sound through the speaker.” Play audio the same way you would play audio from any mobile app. If Mentra Live is the active Bluetooth media output, the sound comes from the glasses. On Android, the system usually creates the Bluetooth audio bond after the BLE connection flow. If the phone shows a pairing dialog, the user should accept it. On iOS, apps cannot programmatically pair or select the Bluetooth media output; ask the user to open Settings > Bluetooth and connect/select Mentra Live before playback.
import {createAudioPlayer, setAudioModeAsync} from 'expo-audio';

await setAudioModeAsync({
  playsInSilentMode: true,
  interruptionMode: 'duckOthers',
});

const player = createAudioPlayer({uri: 'https://example.com/reply.wav'});

await BluetoothSdk.setOwnAppAudioPlaying(true);
player.addListener('playbackStatusUpdate', (status) => {
  if (status.didJustFinish) {
    void BluetoothSdk.setOwnAppAudioPlaying(false);
  }
});
player.play();
setOwnAppAudioPlaying(true) does not route audio by itself. It tells the SDK that your app is playing audio so the Mentra Live microphone path can avoid conflicting with speaker playback. Set it back to false when playback finishes or stops.

Mentra Live Media Volume

Mentra Live exposes step-based media volume helpers where supported:
const current = await BluetoothSdk.getGlassesMediaVolume();
console.log(current.level); // 0-15

await BluetoothSdk.setGlassesMediaVolume(8);

Production Notes

  • Always provide a user-visible microphone permission explanation.
  • Let users disable microphone streaming.
  • For Mentra Live speaker features, explain that users may need to pair/select the glasses as the phone’s Bluetooth media output.
  • Expect model availability to differ by platform, locale, and app configuration.
  • Keep cloud upload and retention policies explicit in your privacy disclosures.
  • Disable microphone audio callbacks when the app finishes using them.