Skip to content

Noah-Ribaudo/bandophone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

34 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Bandophone πŸ¦πŸ“ž

Give your AI assistant a real phone.

Got a spare rootable Android and a spare phone line? Bandophone lets your AI assistant make and receive actual phone calls β€” dial real numbers, talk to real people, handle real conversations.

No SIP infrastructure. No number porting. No dedicated hardware. Just a phone that your AI can use like a person would.

⚠️ Active Development β€” Core audio pipeline working. Clawdbot integration in progress.

πŸ› οΈ Built by a UX designer and an AI β€” This is a best-effort project by Noah (UX designer, not a systems programmer) and Bando (an AI assistant). We're learning as we go. Do not assume this is secure. Don't use it for anything sensitive. We're sharing it because the concept is cool and maybe real developers can help make it better.

The Vision

Your AI assistant shouldn't be trapped in a chat window. It should be able to:

  • πŸ“ž Call businesses β€” Schedule appointments, check hours, make reservations
  • πŸ“² Receive calls β€” Answer your phone when you're busy, take messages
  • πŸ—£οΈ Have real conversations β€” Using OpenAI Realtime API with sub-second latency

All over the regular phone network, with a real phone number that anyone can call.

How It Works

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   Cellular  │────▢│            Bandophone App               │────▢│  Clawdbot   β”‚
β”‚    Call     │◀────│  TinyALSA β†’ OpenAI Realtime β†’ TinyALSA  │◀────│  Gateway    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                       β”‚
                                       β–Ό
                              β€’ Context (memories, calendar)
                              β€’ Transcript logging
                              β€’ Tool execution (lights, reminders)

Audio Pipeline

  1. Capture: TinyALSA captures far-end audio from device 20 (48kHz stereo)
  2. Convert: Downsample to 24kHz mono for Realtime API
  3. AI Processing: Stream to OpenAI with server-side VAD and barging
  4. Playback: TinyALSA injects AI audio via device 19 into the call

Clawdbot Integration

  1. Context Injection: On call start, fetch memories, calendar, user info
  2. Transcript Logging: Stream conversation to daily memory files
  3. Tool Bridging: AI can check calendar, create reminders, control lights

Requirements

  • Rooted Android phone (Magisk recommended)
  • Pixel 7 Pro (other devices need adaptation)
  • SELinux permissive or appropriate policies
  • TinyALSA binaries on device (/data/local/tmp/)
  • OpenAI API key with Realtime API access
  • Clawdbot Gateway (optional, for full integration)

Project Status

βœ… Phase 1: Audio Discovery β€” COMPLETE

  • Map PCM devices for call audio on Pixel 7 Pro
  • Identify mixer controls for far-end capture
  • Document audio routing (48kHz stereo native)
  • Verify TinyALSA capture/playback during calls

βœ… Phase 2: Audio Pipeline β€” COMPLETE

  • TinyALSAStreamer: Process-based capture/playback
  • Sample rate conversion: 48kHz ↔ 24kHz
  • Stereo ↔ mono conversion
  • FIFO-based continuous playback

πŸ”„ Phase 3: OpenAI Realtime β€” COMPLETE

  • HybridRealtimeBridge: Full Realtime API integration
  • Server-side VAD (voice activity detection)
  • Barging (interrupt AI while speaking)
  • Whisper transcription of both parties
  • Function calling support

πŸ”„ Phase 4: Clawdbot Integration β€” IN PROGRESS

  • ClawdbotBridge: RPC client for Gateway
  • Context fetching (memories, user info, calendar)
  • Transcript streaming
  • phone-bridge plugin for Gateway
  • Tool execution (calendar, reminders, lights)
  • Full testing with live calls

Phase 5: Android App

  • Call detection and auto-answer
  • Background service
  • API key secure storage
  • Settings UI

Architecture

bandophone/
β”œβ”€β”€ android/
β”‚   └── app/src/main/java/com/bando/phone/
β”‚       β”œβ”€β”€ audio/
β”‚       β”‚   β”œβ”€β”€ HybridRealtimeBridge.kt  # Main orchestrator
β”‚       β”‚   └── TinyALSAStreamer.kt      # TinyALSA wrapper
β”‚       └── bridge/
β”‚           └── ClawdbotBridge.kt        # Gateway RPC client
β”œβ”€β”€ docs/
β”‚   β”œβ”€β”€ CLAWDBOT_PHONE_CHANNEL_PLAN.md   # Integration design
β”‚   β”œβ”€β”€ HYBRID_REALTIME_AUDIO_PLAN.md    # Audio architecture
β”‚   β”œβ”€β”€ AUDIO_ROUTING.md                 # Device findings
β”‚   └── NATIVE_AUDIO_ARCHITECTURE.md     # TinyALSA details
└── working-docs/                        # Development notes

Quick Start

1. Set up TinyALSA on Phone

# Push TinyALSA binaries
adb push tinycap tinyplay tinymix /data/local/tmp/
adb shell chmod +x /data/local/tmp/tiny*

# Test capture (during active call)
adb shell su -c "/data/local/tmp/tinycap /data/local/tmp/test.wav -D 0 -d 20 -c 2 -r 48000 -b 16 -p 480 -n 4"

2. Configure phone-bridge Plugin

Add to your Clawdbot config:

extensions:
  phone-bridge:
    enabled: true
    authToken: "your-secret-token"
    trustedNumbers:
      - "+16305382264"  # Your number
    logTranscripts: true

3. Build and Run Android App

cd android
./gradlew assembleDebug
adb install app/build/outputs/apk/debug/app-debug.apk

Key Files

File Purpose
HybridRealtimeBridge.kt Orchestrates TinyALSA + Realtime API + Clawdbot
TinyALSAStreamer.kt Process-based TinyALSA wrapper
ClawdbotBridge.kt JSON-RPC client for Gateway
phone-bridge/index.ts Gateway plugin for phone calls

Pixel 7 Pro Audio Routing

Device 20 (Capture):  Far-end audio (what caller says)
Device 19 (Playback): Inject audio (what AI says)
Mixer 167: Mic mute control
Mixer 152: Capture routing (set to DL for far-end)

Voices

Supported OpenAI Realtime voices:

  • alloy - Neutral, balanced (default)
  • echo - Warm, conversational male
  • shimmer - Clear, expressive female
  • ash - Soft, thoughtful
  • ballad - Warm, storytelling
  • coral - Bright, friendly
  • sage - Calm, wise
  • verse - Dynamic, engaging

Contributing

This is uncharted territory. If you have:

  • A rooted Android device and want to help test
  • Knowledge of Android audio internals
  • Experience with real-time audio streaming

Please open an issue or PR! Device-specific findings are especially valuable.

License

MIT

Acknowledgments

  • Built for the Clawdbot community
  • Designed to integrate with OpenAI Realtime API
  • Inspired by the dream of AI assistants that can actually call people

See Also


"The best interface is no interface." β€” Golden Krishna

Sometimes the best interface is just a phone call.

About

Give your AI assistant a real phone πŸ¦πŸ“ž

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published