Saarthi - Voice Assistant over IVR

Saarthi is a powerful Flask application that acts as a voice assistant and chatbot. It allows users to interact with Saarthi by calling a designated IVR (Interactive Voice Response) number and engage in voice-based conversations. The application leverages transcription to convert speech to text, processes the text input using OpenAI's ChatGPT API, generates contextually relevant responses, and converts them back to speech using Twilio. Saarthi provides a seamless and intuitive voice interface, enabling users to continue conversations until they hang up the call. The application's flexibility and customization options make it suitable for a wide range of applications, while contributions are welcome to enhance its features and performance. For more information, click here to call Saarthi.

Prerequisites

Installation

  1. Clone the repository:
    git clone https://github.com/RoyalMamba/MeraSaarthi.git
  2. Change into the project directory:
    cd MeraSaarthi
  3. Install the required dependencies:
    pip install -r requirements.txt
  4. Set up the environment variables:
    • ACCOUNT_SID: Your Twilio account SID
    • AUTH_TOKEN: Your Twilio authentication token
    • OPENAI_API: Your OpenAI API key
  5. Start the Flask application:
    python main.py

Usage

  1. Ensure the Flask application is running.
  2. Configure your Twilio phone number's voice URL to point to the deployed URL or ngrok URL followed by /call.
  3. Call the Twilio phone number and interact with Saarthi by speaking.
  4. Saarthi will convert your speech to text using transcription, process it using the ChatGPT API, generate a response, and convert it back to speech using Twilio.
  5. Continue the conversation with Saarthi until you hang up the call.

Customization

Contributing

Contributions to Saarthi are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request.

Creators

License

This project is licensed under the MIT License.