Skip to content

Microphone

Overview

Maverick AI glasses include two on-board microphones. You can open either one, or both at the same time. The SDK handles microphone functionality via the M2MicService (accessed from Evs.micService).

Microphone M2MicMode Frame id Picks up
Directional Directional M2MicService.MIC_ID_SELF Mainly the wearer's own voice (beamforming) - the default
Omni Omni M2MicService.MIC_ID_OMNI Sound from all around - other people, the room

Audio frames are captured on the glasses, encoded as LC3, and streamed to the SDK over BLE.

Configuration

The microphone is opened with a bitrate parameter (in KB/s):

Parameter Range Default Description
Bitrate 10–40 KB/s 32 LC3 encoding bitrate

Higher bitrate produces better audio quality but uses more BLE bandwidth. The bitrate is shared: when both microphones are open, they use the same one.

Audio Format

Property Value
Codec LC3
Sample rate (glasses) 16 kHz
Channels Mono
Frame size 10 ms
Frame delivery onMicrophoneRawReceived(micId, rawData) callback

Raw LC3 frames are tagged with the source microphone id; use M2MicMode.fromMicId(micId) to tell them apart.

Usage

Opening the microphone

Evs.micService.registerListener(object : IM2MicrophoneEvents {
    override fun onMicrophoneStateChanged(isOn: Boolean) {
        // microphone started or stopped
    }

    override fun onMicrophoneRawReceived(micId: Int, rawData: ByteArray) {
        // Raw LC3 frame (10 ms, mono, 16 kHz) from M2MicMode.fromMicId(micId)
    }

    override fun onError(type: M2MicService.Errors, message: String) {
        // handle error
    }
})

Evs.micService.openMicrophone(M2MicMode.Directional, bitrateKBs = 20)
Evs.shared.micService.registerListener(listener: micEventsHandler)
Evs.shared.micService.openMicrophone(mode: .directional, bitrateKBs: 20)

Opening both microphones

Call openMicrophone once per microphone. Frames from both arrive in the same onMicrophoneRawReceived callback - use the micId to tell them apart.

Evs.micService.openMicrophone(M2MicMode.Directional, bitrateKBs = 20)
Evs.micService.openMicrophone(M2MicMode.Omni, bitrateKBs = 20)

override fun onMicrophoneRawReceived(micId: Int, rawData: ByteArray) {
    when (M2MicMode.fromMicId(micId)) {
        M2MicMode.Directional -> { /* the wearer */ }
        M2MicMode.Omni -> { /* the surroundings */ }
        null -> {}
    }
}
Evs.shared.micService.openMicrophone(mode: .directional, bitrateKBs: 20)
Evs.shared.micService.openMicrophone(mode: .omni, bitrateKBs: 20)

Opening a second microphone restarts the stream

The glasses start a microphone only when the stream (re)opens, so adding the second microphone - or changing the bitrate - restarts the audio stream, with a short gap. Open both microphones together, before you start using the audio.

openMicrophone returns false when that microphone is already open at that bitrate. Check one microphone with isMicrophoneOpen(mode), or any with isOn().

Closing the microphones

closeMicrophone() closes all open microphones.

Evs.micService.closeMicrophone()

PCM Decoding (Optional)

The SDK includes a built-in LC3-to-PCM decoder. When enabled, frames from the Directional microphone are decoded to raw PCM alongside the LC3 stream. Omni frames are delivered as LC3 only:

Evs.micService.enablePCM(true)
Evs.micService.pcmFrameListener { micId, pcmData, sampleRate ->
    // micId: source microphone id
    // pcmData: decoded PCM audio bytes
    // sampleRate: output sample rate in Hz
}

Call enablePCM(false) to disable decoding when no longer needed.

Notes

  • The microphone operates on glasses hardware; opening it starts the audio pipeline.
  • Close the microphone when not in use to save battery. Open only the microphones you need.
  • Enable PCM decoding to feed speech-to-text engines (e.g. Google Speech, Whisper) with raw audio.

Codec may change

The current LC3 codec is subject to change in future SDK versions. Plan for codec abstraction if building long-term audio pipelines.


See Also

  • Speaker - Play audio on the glasses speaker
  • AI Vision - Glasses AI vision capture and streaming
  • Display - Brightness and display control