Overview
A pip-installable Python SDK for connecting to Omi wearable devices over Bluetooth, decoding Opus-encoded audio, and transcribing it in real time using Deepgram.Bluetooth Connection
Connect to any Omi device
Opus Decoding
Decode Opus audio to PCM
Real-time Transcription
Deepgram-powered STT
Installation
Prerequisites
The SDK requires the Opus audio codec library:- macOS
- Ubuntu/Debian
- CentOS/RHEL
- Fedora
Install the SDK
- From PyPI
- From Source
Quick Start
1
Set Up Your Environment
Get a free API key from Deepgram:
2
Find Your Omi Device
Scan for nearby Bluetooth devices:Look for a device named “Omi” and copy its MAC address:
3
Write Your Code
4
Run the Example
- Connect to your Omi device via Bluetooth
- Decode incoming Opus audio packets to PCM
- Transcribe audio in real-time using Deepgram
- Print transcriptions to the console
API Reference
Core Functions
| Function | Description |
|---|---|
omi.print_devices() | Scan for Bluetooth devices |
omi.listen_to_omi(mac, uuid, handler) | Connect to Omi device and receive audio |
omi.OmiOpusDecoder() | Decode Opus audio to PCM |
omi.transcribe(queue, api_key) | Real-time transcription via Deepgram |
Command Line Tools
| Command | Description |
|---|---|
omi-scan | Scan for nearby Bluetooth devices |
Development
Local Development Setup
Troubleshooting
Opus library error
Opus library error
Make sure the Opus audio codec is installed on your system. See the Prerequisites section above for installation commands.
Bluetooth permission errors on macOS
Bluetooth permission errors on macOS
Go to System Preferences → Privacy & Security → Bluetooth and grant access to Terminal and Python.
Python version issues
Python version issues
The SDK requires Python 3.10 or higher. Check your version with
python --version.Device not found
Device not found
Make sure your Omi device is powered on and nearby. Try running
omi-scan to verify it’s discoverable.WebSocket issues
WebSocket issues
The SDK uses
websockets>=11.0. Try upgrading: pip install --upgrade websockets