$ show Turbo1123/turbometa-rayban-ai
This repository contains a cross-platform mobile application (iOS and Android) that functions as an AI assistant for Ray-Ban Meta smart glasses. The app connects to the glasses via the Meta Wearables DAT SDK to access camera and microphone streams, then provides various AI-powered features including real-time conversations (Live AI), image recognition (Quick Vision), food nutrition analysis (LeanEat), real-time translation, and experimental RTMP streaming. The architecture follows MVVM patterns on both platforms, with SwiftUI/Jetpack Compose for UI, ViewModels for state management, and service layers handling API communications with multiple AI providers (Alibaba Cloud, Google Gemini, OpenRouter). Key features include secure API key storage, Bluetooth audio routing for glasses microphones, and integration with external systems like OpenClaw. The application is actively maintained with recent commits and demonstrates solid engineering practices, though the multi-platform nature and reliance on external AI services introduce some complexity.
The LLM identified 6 files worth highlighting for reuse:
Provides thread-safe, secure storage for API keys using iOS Keychain. Abstracts complex Keychain operations into a simple singleton interface with error handling, making it reusable across any iOS project needing secure credential storage.
Centralizes permission management for camera, microphone, and other system permissions. Uses Combine publishers to observe permission status changes, reducing boilerplate in views and view models while handling the asynchronous nature of permission requests.
Encapsulates API endpoint and model configuration for multiple AI providers (Alibaba Cloud, OpenRouter, Google Gemini) in a type-safe manner. Enables easy switching between providers and models through associated values, demonstrating a clean strategy pattern for service configuration.
Securely stores API keys using Android's EncryptedSharedPreferences (Jetpack Security). Provides a simple interface for storing and retrieving sensitive data with transparent encryption, offering cross-platform parity with the iOS Keychain solution.
Manages Bluetooth SCO audio connections for using the glasses' microphone. Handles the complex lifecycle of Bluetooth audio routing, including connection/disconnection, audio mode changes, and proper resource cleanup, abstracting platform-specific audio complexities.
Implements always-on wake word detection ('Jarvis') using Picovoice Porcupine running as a foreground service. Properly handles audio processing, focus management, and Android service lifecycle requirements to maintain reliable background wake word detection.