π§ Omi Python SDK
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.π¦ Installation
Prerequisites
The Omi SDK requires the Opus audio codec library to be installed on your system: macOS:Option 1: Install from PyPI (when published)
Option 2: Install from source
π Quick Start
1. Set up your environment
2. Find your Omi device
3. Use in your Python code
4. Run the example
The included example demonstrates connecting to an Omi device and real-time transcription:- 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
omi.print_devices()
- Scan for Bluetooth devicesomi.listen_to_omi(mac, uuid, handler)
- Connect to Omi deviceomi.OmiOpusDecoder()
- Decode Opus audio to PCMomi.transcribe(queue, api_key)
- Real-time transcription
Command Line Tools
omi-scan
- Scan for nearby Bluetooth devices
π§ Development
Local development setup
π§© Troubleshooting
- Opus library error: Make sure Opus audio codec is installed (see Prerequisites section)
- Bluetooth permission errors on macOS: Go to System Preferences β Privacy & Security β Bluetooth and grant access to Terminal and Python
- Python version: Requires Python 3.10+
- Omi device: Make sure device is powered on and nearby
- WebSocket issues: SDK uses
websockets>=11.0