Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# API Keys
TWILIO_ACCOUNT_SID="..."
TWILIO_AUTH_TOKEN="..."
NGROK_AUTHTOKEN="..."
GOOGLE_API_KEY="..."
TWILIO_ACCOUNT_SID=""
TWILIO_AUTH_TOKEN=""
NGROK_AUTHTOKEN=""
GOOGLE_API_KEY=""

# Twilio Configuration
TWILIO_PHONE_NUMBER="+1234567890"

# Gemini Configuration
GEMINI_ASSISTANT_MODEL="gemini-2.5-flash-native-audio-preview-09-2025"
GEMINI_SUMMARIZATION_MODEL="gemini-2.5-flash"
GEMINI_ASSISTANT_MODEL="gemini-2.5-flash-native-audio-preview-12-2025"
GEMINI_ASSISTANT_VOICE="Sulafat"
GEMINI_SUMMARIZATION_MODEL="gemini-2.5-flash-lite"

# AutoPhone Configuration
SERVICE_PORT=8080
WEBHOOK_TARGET_URL="https://webhook-target.example.com"
ASSISTANT_LANGUAGE="English"
ASSISTANT_OWNER_NAME="John"
KEEP_CALL_RECORDINGS=3
KEEP_CALLS=5
SUMMARIZE_CALLS=true
#WEBHOOK_NOTIFICATION_URL="https://webhook-target.example.com"
#APP_PASSWORD="your_password" # Optional: Uncomment to enable password protection
#SERVER_PUBLIC_URL="" # Optional: Manually override public URL (skips Ngrok)
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
__pycache__/
calls/
user_data/
.env
3 changes: 3 additions & 0 deletions CREDITS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Credits

- [WebSocket extension for MIT App Inventor](https://sumitkmr.com/projects/doc/web-socket/)
50 changes: 21 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,50 @@
# AutoPhone
A voice assistant application powered by Gemini and Twilio, capable of handling inbound and outbound calls with real-time AI interaction.
A voice assistant application powered by Gemini and Twilio, capable of handling phone calls with real-time AI interaction.

## Features

- **Real-time Voice AI**: Uses Gemini Live API for voice conversations.
- **Twilio Integration**: Handles phone calls via Twilio Voice.
- **Call Summarization**: automatically summarizes calls after they end.
- **Call Summarization**: Automatically summarizes calls after they end.
- **Live call preview**: Preview the call in real-time.
- **GUI App**: Graphical user interface for managing assistant.

## Prerequisites

- Docker (and Docker Compose)
- Twilio Account (with phone number used for voice assistant)
- Docker (with Docker Compose)
- Twilio Account (with dedicated phone number used for AutoPhone)
- Ngrok Account
- Gemini API Key

## Configuration
# Configuration

### Get all required API keys.

- [Gemini API key](https://aistudio.google.com/api-keys)
- [Twilio Account SID and API key](https://www.twilio.com/docs/usage/requests-to-twilio)
- [Twilio Account SID and API key](https://console.twilio.com)
- [Ngrok API key](https://dashboard.ngrok.com/get-started/your-authtoken)

### Copy the example environment file:
```
cp .env.example .env
```

```bash
cp .env.example .env
```
Edit `.env` to provide API keys and settings.

## Running with Docker
# Usage

To start the application:
## Running with Docker

```
sudo docker compose up --build
```

Public URL will be available with Ngrok tunnel.

## API Endpoints

- `POST /call`: Initiate an outbound call.
```bash
curl -X POST "http://0.0.0.0:8080/call" \
-H "Content-Type: application/json" \
-d '{
"to_number": "+1234567890",
"prompt": "Ask how life is going"
}'
```
- After every call, a call summary is sent to the configured webhook.
```json
{
"call": {
"call metadata here"
},
"summarized_text": "AI summarization of call"
}
```
Go to `/docs` to view API documentation.

## GUI

App is available [here](https://gallery.appinventor.mit.edu/?galleryid=468a172f-b469-43d4-b359-93a40cb70d4a).
Loading