Skip to main content
Listen to user voice input with session.events.onTranscription(). Get real-time speech-to-text transcription from the user’s microphone.

Basic Usage

How It Works

  1. User speaks into microphone
  2. Audio streams to MentraOS Cloud
  3. Speech recognition processes audio
  4. Transcription events sent to your app
  5. You receive interim and final results

Transcription Data

Interim vs Final Results

Interim results - Partial transcription while user is speaking:
Final results - Complete transcription when user finishes:

Common Patterns

Voice Commands

Voice Notes

Conversation

Confidence Checking

Language Support

Default language:
Multiple languages - Transcription automatically detects the spoken language based on device settings.

Best Practices

Only process commands on final results:
Display what the user said:
Acknowledge user input:
User might say something unexpected:

Permissions Required

Transcription requires the MICROPHONE permission. Set this in the Developer Console.

Unsubscribing

Example: Voice Assistant

Troubleshooting

Check permission:
  • Ensure MICROPHONE permission is set in Developer Console
  • User must approve permission when installing app
  • Check logs for permission errors
Possible causes:
  • Background noise
  • User speaking too quietly
  • Microphone quality
  • Non-standard accent or pronunciation
Check data.confidence to detect low-quality transcriptions.
Network latency:
  • Transcription requires internet connection
  • Processing happens in cloud
  • Some delay is normal (typically < 1 second)

Performance Tips

Avoid processing every interim result:
If you must process interim results:
Store frequently used command responses:

Next Steps

Text-to-Speech

Respond with voice synthesis

Audio Chunks

Process raw audio data

Event Manager

Complete event API reference

Permissions

Learn about permissions