Skip to content

About

AI programming assistant for Meta Ray-Ban glasses: photograph a coding problem, hear the solution. FastAPI + Gemini Vision backend, Kotlin/Compose app.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

MetaHelper — hear the code in front of you, read aloud through your Meta Ray-Ban glasses

CI Kotlin / Android iOS / Compose Multiplatform License Backend: self-hosted

Hands-free audio programming assistant for Meta Ray-Ban smart glasses. Snap a photo of code on a screen, whiteboard, or paper, and hear the explanation spoken directly into your ears.

💡 What is MetaHelper?

Code on a whiteboard, presentation slide, or printed handout can be difficult to read when working hands-free or with a visual impairment.

MetaHelper is an audio coding companion for Meta Ray-Ban smart glasses. When you capture a photo of code, the app sends it for analysis with Gemini Vision and speaks the returned explanation through the glasses' open-ear speakers. The analysis can describe syntax and potential errors; its output still needs review.

Backend deployment: Self-host the Dockerized Spring Boot service with Coolify, or run the included Compose definition on any Docker host.

How it works

When you take a photo with your glasses, it syncs to your phone. The mobile app detects the new image, sends it to the backend for vision analysis and speech generation, and plays the response through the glasses. Double-tapping the glasses stem replays the audio.

The phone app posts the photo to the backend. The backend sends it to Gemini and gets answer text, sends the text to Azure Speech and gets an MP3, lowers the volume, and returns the audio to the phone.

Android GalleryWatcher or iOS PhotosObserver detects a new photo, and GlassesManager posts its bytes through ApiClient to the Spring Boot backend. The backend asks Gemini for the answer, has Azure Speech read it aloud as an MP3, and lowers the volume with ffmpeg before it returns the audio. The app plays it through the glasses; a double-tap replays it. Editable HTML source.

Capture note: Photo capture currently works through gallery polling: the glasses take the photo through Meta AI natively and the app reads it from the phone gallery (READ_MEDIA_IMAGES on Android, Photos framework on iOS). The Meta Wearables SDK's direct-capture path (StreamSession on Android, MWDAT on iOS) is stubbed/in-progress and is the intended future approach.

Project structure

MetaHelper/
├── backend/   Java 26 · Spring Boot 4.1.1 — vision → TTS → audio pipeline
│   └── src/main/java/com/metahelper/
│       ├── controller/ImageController.java  GET / and POST /process-image
│       └── service/                          Gemini, Azure Speech, and ffmpeg pipeline
├── shared/    Kotlin Multiplatform — shared business logic
│   └── src/
│       ├── commonMain/kotlin/com/metahelper/shared/
│       │   ├── GlassesManager.kt     Core flow coordinator
│       │   ├── ApiClient.kt          Platform-agnostic HTTP client
│       │   ├── GalleryWatcher.kt     expect/actual for photo detection
│       │   ├── AudioPlayer.kt        expect/actual for audio playback
│       │   ├── VolumeController.kt   expect/actual for volume control
│       │   └── WearablesConnectionMonitor.kt  expect/actual for SDK connection
│       ├── androidMain/...           Android implementations (MediaStore, MediaPlayer, etc.)
│       └── iosMain/...               iOS implementations (Photos, AVFoundation, MWDAT)
├── android/   Kotlin · Jetpack Compose — Meta Wearables SDK client
│   └── app/src/main/kotlin/com/metahelper/app/
│       ├── GalleryWatcher.kt   Detects new glasses photos via MediaStore
│       ├── GlassesManager.kt   Reads photo bytes, drives the flow
│       ├── ApiClient.kt        multipart POST /process-image
│       └── AudioPlayer.kt      Plays the returned MP3 (double-tap to replay)
├── iosApp/    iOS · Compose Multiplatform — shared UI + iOS platform code
└── assets/    Shared brand assets (banner, logo) referenced by the README

Backend — setup

Audit your local prerequisites first with node scripts/doctor.mjs (Node.js 24+). Use --profile backend, --profile web, or --profile shell to check just that environment, and --json for automation. Failures include a suggested fix and exit with status 1. See environment diagnostics.

Requires Java 26, Gradle 9.7.1, and ffmpeg (used for audio export). Azure Speech is used for text-to-speech.

cd backend
./gradlew bootRun

Copy backend/.env.exampletobackend/.env and fill in your values:

Variable Required Default Purpose
GOOGLE_API_KEY yes — Google Gemini API key (create one)
AZURE_SPEECH_KEY yes — Azure Speech resource key
AZURE_SPEECH_REGION yes — Azure Speech resource region, such as westus2
AZURE_SPEECH_VOICE no en-US-GuyNeural Azure neural voice
AUDIO_AMPLITUDE_MULTIPLIER no 0.1 Playback gain (0.0–1.0); lower keeps audio from overpowering the glasses' speakers

API

Method Route Body Returns
GET / — JSON health check
POST /process-image multipart form, fieldfile(image) audio/mpeg MP3 bytes

Offline knowledge lookup

Search curated technical runbooks offline with node scripts/knowledge.mjs <query...>, for example node scripts/knowledge.mjs java jdk. Results include file paths and section line numbers. Use --json for automation and --limit 1..20 to cap results. Requires only Node.js 24+, with no package installation or credentials. See offline knowledge lookup.

Diagnostic log parsing

Classify errors, rate limits, and service anomalies in logs with node scripts/logs.mjs [options] [files...] or piped stdin. Results cluster repeating failures by signature, report root cause stack traces, and provide actionable remediation steps. Use --json for automation and --fail-on error to gate CI pipelines. Requires only Node.js 24+, with no package installation or credentials. See diagnostic log parsing.

Tests

Run tooling and backend checks together with node scripts/workflow.mjs verify (Node.js 24+, JDK 26, and ffmpeg). Use verify-tools or verify-backend to run one workflow, or append --dry-run to inspect its commands. See workflow automation for deadlines and exit codes.

cd backend
./gradlew test

(Tests live in backend/src/test/.)

Android — CI build

The Mac checkout is source-only. Android lint, tests, APK packaging, and emulator checks run in the x86_64 GitHub Actions Android job. The job uses Java 21, API 34, and an x86_64 emulator, then publishes a seven-day meta-helper-debug-apk artifact.

Android builds are not run on the Mac or the ARM64 verifier. Use the workflow artifact for manual device testing.

Meta Wearables SDK access (required).The app depends on the Meta Wearables SDK (com.meta.wearable:mwdat-core/mwdat-camera 0.3.0), which is published toGitHub Packagesat https://maven.pkg.github.com/facebook/meta-wearables-dat-android. GitHub Packages requires authentication even for read access, so you must supply aGitHub Personal Access Token with the read:packages scope or Gradle cannot resolve the SDK and the build will fail.

The workflow supplies the existing GH_PACKAGES_TOKEN repository secret as GITHUB_TOKEN. Do not create a Mac local.properties file or place the token in the source checkout.

Point the app's ApiClient at your backend. Android accepts the URL through the metahelper.backend.url Gradle property; iOS reads MetaHelperBackendURL from Info.plist. See the self-hosted deployment guide.

Self-hosting

The backend ships with a Dockerfile (Java 26, ffmpeg baked in):

docker build -t metahelper-backend ./backend
docker run -p 8080:8080 --env-file backend/.env metahelper-backend

For the hosted deployment path, use the Coolify instructions. The backend image is published to GHCR after the main CI workflow succeeds, and Coolify can redeploy it through a repository webhook.

Website

The static Astro site lives in web/ and is hosted on Vercel at https://meta-helper.vercel.app. It presents MetaHelper as a whiteboard you can look around, with a plain-text transcript at /transcript. Its spoken examples were written for the site, and the Listen button uses the visitor's browser voice.

Run npm ci and npm run dev from web/ on a build host. Run npm run build there to produce the static dist/ directory. Deployments are managed with the Vercel CLI from the linked repository root. See web/README.md.

License

MetaHelper is released under the MIT License. See LICENSE for the full text.

About

AI programming assistant for Meta Ray-Ban glasses: photograph a coding problem, hear the solution. FastAPI + Gemini Vision backend, Kotlin/Compose app.

Topics

Resources

Contributing

Stars

1 star

Watchers

0 watching

Forks

Contributors

Languages