Skip to content

FathimaManal/DebateMeAI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<<<<<<< HEAD

DebateMeAI

=======

🎭 DebateMe.AI

A real-time debate application where users can challenge AI opponents with different personalities using voice input and receive AI responses with text-to-speech.

🚀 Features

  • Voice Recording: Record your arguments using your microphone
  • Speech-to-Text: Transcribe speech using OpenAI Whisper
  • AI Responses: Get intelligent responses from Google Gemini
  • Text-to-Speech: Hear AI responses with gTTS
  • Character Selection: Choose from different AI personalities:
    • 🤖 Logical Bot: Analytical and fact-based
    • 😈 Villain Bot: Aggressive and confrontational
    • 🤝 Supportive Bot: Empathetic and encouraging
    • 🧠 Philosopher Bot: Deep and contemplative
  • Debate History: Track the conversation flow
  • Scoring System: Basic scoring based on argument length
  • Beautiful UI: Modern, responsive design with animations

📋 Prerequisites

  • Python 3.8 or higher
  • Microphone access
  • Internet connection (for TTS and AI responses)

🛠️ Installation

  1. Clone or download this project

    git clone <repository-url>
    cd debate
  2. Install dependencies

    pip install -r requirements.txt
  3. Set up API keys (you'll need these for full functionality):

    • Google Gemini API Key: Get from Google AI Studio
    • Create a .env file in the project root:
    GOOGLE_API_KEY=your_gemini_api_key_here
    

🎯 What You Need to Do Manually

1. Get Google Gemini API Key

2. Install FFmpeg (for Whisper)

  • Windows: Download from FFmpeg website or use chocolatey: choco install ffmpeg
  • Mac: brew install ffmpeg
  • Linux: sudo apt install ffmpeg

3. Optional: Add Custom Avatars

  • Create an avatars/ folder
  • Add images for each character (PNG/JPG format)
  • Update the character configurations in app.py

🚀 Running the App

streamlit run app.py

The app will open in your browser at http://localhost:8501

🎮 How to Use

  1. Choose Your Opponent: Select a character from the sidebar
  2. Record Your Argument: Click the microphone button and speak
  3. Wait for Processing: The app will transcribe your speech and generate an AI response
  4. Listen to Response: The AI will respond with text-to-speech
  5. Continue the Debate: Keep the conversation flowing!

📁 Project Structure

debate/
├── app.py              # Main Streamlit application
├── requirements.txt    # Python dependencies
├── README.md          # This file
├── .env               # API keys (create this)
└── avatars/           # Custom avatar images (optional)

🔧 Technical Details

Current Implementation (Step 1)

  • ✅ Voice recording with Streamlit's audio recorder
  • ✅ Speech transcription with Whisper
  • ✅ Basic AI responses (placeholder)
  • ✅ Text-to-speech with gTTS
  • ✅ Character selection and UI
  • ✅ Debate history tracking
  • ✅ Basic scoring system

Next Steps

  • 🔄 Integrate Google Gemini API for intelligent responses
  • 🔄 Add debate memory and context
  • 🔄 Improve scoring algorithm
  • 🔄 Add speaking animations
  • 🔄 Custom avatar images
  • 🔄 Real-time voice streaming

🐛 Troubleshooting

Common Issues:

  1. "No module named 'whisper'"

    • Run: pip install openai-whisper
  2. "FFmpeg not found"

    • Install FFmpeg (see installation section)
  3. "No microphone access"

    • Allow microphone access in your browser
    • Check system microphone permissions
  4. "API key error"

    • Make sure your .env file exists with the correct API key

🤝 Contributing

Feel free to contribute by:

  • Adding new AI characters
  • Improving the scoring system
  • Enhancing the UI/UX
  • Adding new features

📄 License

This project is open source and available under the MIT License.


Happy Debating! 🎭

f27cb38 (Initial commit)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages