8000 GitHub - sachin2000k/voice-agent
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

sachin2000k/voice-agent

Repository files navigation

Real Estate Voice Agent

A complete end-to-end voice agent system for real estate companies to make outbound calls to potential customers about property listings in India.

Features

  • Automated Outbound Calls: Make calls to potential customers using Twilio
  • Natural Conversations: Engage in natural conversations using OpenAI's speech-to-text and text-to-speech capabilities
  • Property Information: Extract and present property details from PDF documents
  • Appointment Booking: Schedule site visits, meetings, or callbacks with customers
  • Call Tracking: Record and analyze call data for follow-up

System Architecture

The system consists of the following components:

  1. MongoDB Database: Stores customer data, property details, call logs, and appointments
  2. PDF Parser: Extracts property information from PDF documents
  3. Twilio Integration: Handles outbound calls and call events
  4. OpenAI Integration: Provides speech-to-text, text-to-text, and text-to-speech capabilities
  5. Conversation Flow: Manages the conversation state and appointment booking logic
  6. Main Server Application: Integrates all components and provides API endpoints

Project Structure

real_estate_voice_agent/
├── app.py                  # Main Flask application
├── run.sh                  # Deployment script
├── run_tests.sh            # Test runner script
├── requirements.txt        # Python dependencies
├── USER_GUIDE.md           # User guide documentation
├── README.md               # Project overview (this file)
├── todo.md                 # Project task list
├── data/                   # Data storage directory
│   ├── pdfs/               # Property PDF documents
│   └── recordings/         # Call recordings
├── src/                    # Source code
│   ├── config.py           # Configuration module
│   ├── database/           # Database components
│   │   ├── __init__.py
│   │   ├── db.py           # Database connection and operations
│   │   ├── init_db.py      # Database initialization
│   │   └── schema.py       # MongoDB schema definitions
│   ├── pdf_parser/         # PDF parsing components
│   │   ├── __init__.py
│   │   ├── parser.py       # PDF parser implementation
│   │   └── utils.py        # PDF utility functions
│   ├── twilio_integration/ # Twilio integration components
│   │   ├── __init__.py
│   │   ├── twilio_service.py # Twilio service implementation
│   │   └── call_handlers.py  # Call event handlers
│   ├── openai_integration/ # OpenAI integration components
│   │   ├── __init__.py
│   │   ├── conversation.py # Conversation management
│   │   └── audio.py        # Audio processing utilities
│   └── conversation_flow/  # Conversation flow components
│       ├── __init__.py
│       └── flow_manager.py # Conversation state management
└── tests/                  # Test cases
    └── test_voice_agent.py # Unit tests

Setup and Installation

See the User Guide for detailed setup and installation instructions.

API Endpoints

Call Management

  • POST /api/call/initiate: Initiate an outbound call to a customer
  • GET /api/call/list: List call logs

Property Management

  • POST /api/property/import: Import property details from a PDF file
  • GET /api/property/list: List properties

Customer Management

  • GET /api/customer/list: List customers

Appointment Management

  • GET /api/appointment/list: List appointments

Webhooks

  • POST /webhook/call/initiated: Webhook for when a call is initiated and answered
  • POST /webhook/call/status: Webhook for call status updates
  • POST /call/user_response: Handle user response during a call

Technologies Used

  • Python: Primary programming language
  • Flask: Web framework for the server application
  • MongoDB: Database for storing customer and property data
  • Twilio: Service for making outbound calls
  • OpenAI: API for speech-to-text, text-to-text, and text-to-speech capabilities
  • PyPDF2/pdfminer.six: Libraries for PDF parsing
  • Gunicorn: WSGI HTTP server for deployment

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

  • Twilio for their communication APIs
  • OpenAI for their language processing capabilities
  • MongoDB for their database solution

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published
0