<<<<<<< HEAD
=======
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.
- 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
- Python 3.8 or higher
- Microphone access
- Internet connection (for TTS and AI responses)
-
Clone or download this project
git clone <repository-url> cd debate
-
Install dependencies
pip install -r requirements.txt
-
Set up API keys (you'll need these for full functionality):
- Google Gemini API Key: Get from Google AI Studio
- Create a
.envfile in the project root:
GOOGLE_API_KEY=your_gemini_api_key_here
- Go to Google AI Studio
- Create a new API key
- Add it to your
.envfile
- Windows: Download from FFmpeg website or use chocolatey:
choco install ffmpeg - Mac:
brew install ffmpeg - Linux:
sudo apt install ffmpeg
- Create an
avatars/folder - Add images for each character (PNG/JPG format)
- Update the character configurations in
app.py
streamlit run app.pyThe app will open in your browser at http://localhost:8501
- Choose Your Opponent: Select a character from the sidebar
- Record Your Argument: Click the microphone button and speak
- Wait for Processing: The app will transcribe your speech and generate an AI response
- Listen to Response: The AI will respond with text-to-speech
- Continue the Debate: Keep the conversation flowing!
debate/
├── app.py # Main Streamlit application
├── requirements.txt # Python dependencies
├── README.md # This file
├── .env # API keys (create this)
└── avatars/ # Custom avatar images (optional)
- ✅ 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
- 🔄 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
-
"No module named 'whisper'"
- Run:
pip install openai-whisper
- Run:
-
"FFmpeg not found"
- Install FFmpeg (see installation section)
-
"No microphone access"
- Allow microphone access in your browser
- Check system microphone permissions
-
"API key error"
- Make sure your
.envfile exists with the correct API key
- Make sure your
Feel free to contribute by:
- Adding new AI characters
- Improving the scoring system
- Enhancing the UI/UX
- Adding new features
This project is open source and available under the MIT License.
Happy Debating! 🎭
f27cb38 (Initial commit)