Skip to content

vipyne/american-dream-phone

Repository files navigation

🇺🇸💭📞 American Dream Phone 🇺🇸💭📞

+ =

Democracy dies in silence

See a demo of it in action here.

The first thing you need to know is that in the 90's, there was a board game called Dream Phone. This is a real thing that exists. With that whimsy in mind, American Dream Phone is a Pipecat AI Voice Agent to help you call your political representatives. Some may call it 'revenge of the robo-calls', I call it civic engagement.

dependencies

setup

cp env.example .env

Add API keys as needed. All services (transport, LLM, STT, and TTS) are all changeable. See services.

python3 -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
pip install -r requirements.txt

run

server

python bot_runner.py

make a call

test (webrtc)

curl -X POST "http://localhost:7860/start" \
-H "Content-Type: application/json" \
-d '{
  "config": {"testInPrebuilt": true}
 }'
==>
{"status":"Bot started","bot_type":"bot","room_url":"https://YOUR_DOMAIN.daily.co/ROOM"}

This will return a daily prebuilt URL. Navigate there to talk to and test the bot.

phone call

curl -X POST "http://localhost:7860/start" \
-H "Content-Type: application/json" \
-d '{
  "config": {
    "dialout_settings": [{
        "phoneNumber": "+15551234567"
      }]
    }
 }'
==>
{"status":"Bot started","bot_type":"bot","dialing_to":"phone:+15551234567"}

This actually calls the phone number. (Debug pro tip- stay in the daily room and listen in on the conversation.)

services

By using pipecat, all services (transport, LLM, STT, and TTS) are all changeable. These are just the ones I started with.

  • "Orchestration"
    • Pipecat - ᓚᘏᗢ Python framework; the glue that makes it all possible.
  • transport
    • Daily - webrtc transport docs
    • The domain needs to have dialout enabled and a phone number purchased.
  • LLM
  • STT
  • TTS
    • PlayAI
    • I used this service to clone my voice.
  • MCP server for fetch
    • mcp.run - "mcp.run"
    • Connect as many MCP servers as you like...

TODO list / notes to self / ideas / creedthoughts

credits

About

An AI voice agent to help you call your political representatives.

Topics

Resources

Stars

Watchers

Forks

Languages