Skip to content

Alok-Godara/Calling-Bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ™οΈ Calling Assistant Bot πŸ“ž

Welcome to the Calling Assistant Bot project! This is an intelligent, audio-based conversational assistant designed specifically for IGNUS, IIT Jodhpur's electrifying annual cultural fest. 🌟

The bot seamlessly interacts with potential attendees over audio, providing details about the fest and gauging their interest in ticket purchases. It's smart, efficient, and powered by cutting-edge AI! πŸš€


✨ Features

🌟 Audio Recording: Detects speech automatically and records user responses.
πŸ“ Transcription: Converts recorded audio into text with AssemblyAI.
πŸ€– AI-Generated Responses: Uses Google Gemini AI for natural, conversational replies.
🎧 Text-to-Speech: Brings the bot to life with ElevenLabs API, generating human-like audio responses.
🎟️ Ticket Interest Assessment: Summarizes the user's likelihood of purchasing tickets for IGNUS.


πŸ“‹ Requirements

πŸ› οΈ Libraries

  • AssemblyAI: For transcribing audio files.
  • Google Generative AI (Gemini): For crafting engaging conversational responses.
  • PyPDF2: To extract detailed information from IGNUS PDF documents.
  • Pygame: For smooth audio playback of the bot's responses.
  • Pyaudio: Captures live audio directly from the microphone.
  • Requests: Communicates with APIs like ElevenLabs.
  • Numpy: Efficiently processes audio data.

🌐 APIs Needed

πŸ”‘ AssemblyAI API Key: Sign Up Here
πŸ”‘ Google Gemini API Key: Sign Up Here
πŸ”‘ ElevenLabs API Key: Sign Up Here

πŸ“‚ Environment Variables

Store your API keys securely in an .env file:

ASSEMBLY_AI_KEY=your_assembly_ai_key
GEMINAI_API_KEY=your_google_gemini_key
ELEVENLABS_API_KEY=your_elevenlabs_key

πŸš€ Installation, Usage, and How It Works


βš™οΈ Installation

Follow these steps to set up the Calling Assistant Bot on your local machine:

  1. Clone the repository πŸ“:

    git clone https://github.com/your-username/IGNUS-Assistant-Bot.git
  2. Navigate to the project directory πŸ“‚:

    cd IGNUS-Assistant-Bot
  3. Install dependencies πŸ“¦:

    Ensure you have Python installed on your system. Then, run:

    pip install -r requirements.txt
  4. Set up API keys πŸ”‘:

    Create a .env file in the root directory and add the following variables:

    ASSEMBLY_AI_KEY=your_assembly_ai_key
    GEMINAI_API_KEY=your_google_gemini_key
    ELEVENLABS_API_KEY=your_elevenlabs_key
  5. Verify installation βœ…:

    Run the following command to check if everything is set up correctly:

    python ignus_assistant.py --check

    This will test API connections and display readiness.


🎯 Usage

Here’s how to start and use the bot:

  1. Run the bot πŸ–₯️:

    Start the assistant by running:

    python ignus_assistant.py
  2. Interactive conversation πŸ—£οΈ:

    • The bot will greet the user and initiate the conversation.
    • Speak clearly when prompted, and the bot will capture your responses.
  3. Real-time transcription and reply πŸ”Š:

    • Your voice input will be transcribed and processed.
    • The bot will generate a conversational response and play it back to you.
  4. Ticket assessment summary 🎟️:

    After the conversation concludes, the bot will evaluate your interest in purchasing tickets and provide a summary.


πŸ› οΈ How It Works

The Calling Assistant Bot is powered by advanced AI technologies and works in the following steps:

  1. Conversation Kickoff 🎀:
    The bot greets the user and introduces them to the highlights of IGNUS, using information extracted from a PDF document.

  2. Audio Input πŸ—£οΈ:
    Users respond verbally, and their speech is recorded using the microphone.

  3. Transcription ✍️:
    The bot sends the recorded audio to AssemblyAI, which converts it into text for further processing.

  4. AI-Generated Response πŸ€–:
    The transcribed text is processed by Google Gemini AI, which generates an intelligent and context-aware response.

  5. Text-to-Speech Conversion πŸ”Š:
    The response text is converted into natural-sounding speech using ElevenLabs API and played back to the user.

  6. Interest Evaluation πŸ“ˆ:
    Based on the user’s responses, the bot determines their interest in purchasing tickets and prepares a final summary.


πŸŽ₯ Demo Video

Check out a quick demo of the Calling Assistant Bot in action:

Voice Bot Demo Video


Example Flow

  • Bot: "Hello! This is a call from IIT Jodhpur regarding our upcoming cultural fest, Ignus. Can we take a moment to talk about it?"
  • User: "Sure, I’d like to know more."
  • Bot: "Ignus is a vibrant cultural extravaganza featuring diverse events and renowned artists. Are you interested in attending?"
  • User: "Yes, it sounds exciting!"

At the end, the bot provides a detailed summary of the conversation and highlights ticket interest. πŸŽ‰


You're all set to run and interact with the Calling Assistant Bot! 🎊

πŸŽ‰ Acknowledgements

We would like to thank the following platforms and tools for making this project possible:

  • AssemblyAI πŸ“: For providing high-quality transcription services.
  • Google Gemini πŸ€–: For its exceptional generative AI capabilities.
  • ElevenLabs πŸŽ™οΈ: For lifelike text-to-speech services.
  • Pygame 🎧: For smooth audio playback.

⭐ If you found this project helpful, don’t forget to give it a star! ⭐

About

πŸŽ™οΈ AI-Powered Calling Assistant Bot for IGNUS, IIT Jodhpur!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages