A sophisticated conversational AI bot that enables real-time voice interactions with customizable AI characters. This project combines speech processing, natural language understanding, and real-time communication to create interactive AI agents.
- Real-time voice interactions using Daily's communication platform
- Speech-to-text and text-to-speech capabilities via Deepgram
- Natural language processing using OpenAI's language models
- Customizable character personalities and scenarios
- Support for different interaction modes and difficulty levels
- Kid-friendly content filtering options
- Real-time transcript generation and handling
- Python 3.8+
- Redis server
- API keys for:
- OpenAI
- Deepgram
- Daily
- Clone the repository:
git clone [your-repository-url]
cd new_agents- Create and activate a virtual environment:
python -m venv env
source env/bin/activate # On Windows use: env\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Create a
.envfile with your API keys and configuration:
OPENAI_API_KEY=your_openai_key
DEEPGRAM_API_KEY=your_deepgram_key
DAILY_API_KEY=your_daily_keyRun the bot with customized parameters:
python bot.py --character_name "Assistant" \
--character_gender "female" \
--character_description "A helpful AI assistant" \
--scenario "General conversation" \
--role "Assistant" \
--mode "chat" \
--kid_friendly true \
--voice "default" \
--room_url "your_daily_room_url" \
--level_of_difficulty "medium"bot.py: Main application file containing core bot logicmodels.py: Data models and structuresapp_main/: Core application componentsapp_tts/: Text-to-speech related functionalityrequirements.txt: Project dependencies
The project utilizes several key components:
- Daily SDK: For real-time voice communication
- Deepgram: Handles speech-to-text and text-to-speech conversion
- OpenAI: Powers the natural language understanding and generation
- Redis: Manages state and message queuing
- Pipecat: Custom pipeline system for processing audio and text streams
Contributions are welcome! Please feel free to submit a Pull Request.
[Your chosen license]
[Your contact information]