🔊 Real-Time Voice AI Assistant using Groq LLaMA3 + Deepgram + LangChain .
This project is a real-time voice-based conversational AI assistant that integrates:
🧠 Groq’s LLaMA3 (via LangChain) for ultra-fast, high-quality conversational intelligence
🎙️ Deepgram STT (Speech-to-Text) for real-time transcription from microphone input
🗣️ Deepgram TTS (Text-to-Speech) for fast and natural voice responses using ffplay
Core components such as LLM (Large Language Model), STT (Speech to Text Model), TTS (Text to Speech Model), and the overall Chatbot architecture have also been documented to support comprehensive understanding and customization.
- Real-time voice recognition using Deepgram
- AI-powered responses via Groq LLM
- Easy setup with virtual environment
- Cross-platform compatibility
Option A: Using VS Code Terminal
- Open Visual Studio Code
- Open a new terminal (Terminal → New Terminal or `Ctrl+Shift+`` )
- Navigate to your desired directory:
cd path/to/your/desired/folder
- Clone the repository:
git clone https://github.com/Sharan-Kumar-R/Voice-Chat-Bot.git
- Open the project folder:
cd Voice-Chat-Bot
- Open the project in VS Code:
code .
Option B: Using VS Code Git Integration
- Open Visual Studio Code
- Press
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(Mac) - Type "Git: Clone" and select it
- Paste the repository URL:
https://github.com/Sharan-Kumar-R/Voice-Chat-Bot.git
- Choose a folder location and click "Select Repository Location"
- Click "Open" when prompted
- Visit FFmpeg Download Page
- Download the appropriate version for your operating system
- Follow the installation instructions for your platform
- Verify the installation by opening a terminal/command prompt and typing:
If FFmpeg is properly installed, you should see version information displayed.
ffmpeg -version
Open a terminal in Visual Studio Code and run:
python -m venv myenv
For Windows:
myenv\Scripts\activate
For macOS/Linux:
source myenv/bin/activate
After activation, you should see something like this in your terminal:
(myenv) PS C:\Users\username\path\to\project>
pip install -r requirements.txt
- Visit Groq Console
- Create an account or sign in
- Generate a new API key
- Copy the API key for later use
- Visit Deepgram Console
- Create an account or sign in
- Generate a new API key
- Copy the API key for later use
Update the .env
file in the project root directory and add your API keys (replace if already exists):
GROQ_API_KEY=your_groq_api_key_here
DEEPGRAM_API_KEY=your_deepgram_api_key_here
Important: Replace your_groq_api_key_here
and your_deepgram_api_key_here
with your actual API keys.
-
Make sure your virtual environment is activated:
myenv\Scripts\activate
-
Run the main voice bot application:
python Voice_Bot.py
-
Start talking! The bot will:
- Listen to your voice input
- Process it through Groq LLaMA3
- Respond with natural speech
To customize the bot's behavior, such as naming the model and defining its function, edit the Bot_prompt.txt
file.
To run any other Python file in the project:
python <filename>.py
When you're done working with the project, deactivate the virtual environment:
deactivate
- Ensure your API keys are correctly set in the
.env
file - Make sure your virtual environment is activated before running any scripts
- Check that all dependencies are installed with
pip list
- Verify your internet connection for API services
- FFmpeg Issues: If you encounter audio-related errors, verify FFmpeg installation with
ffmpeg --version
Voice-Chat-Bot/
├── .env # Environment variables (API keys)
├── Chat_Bot.py # Chat bot implementation
├── llm.py # Language model integration
├── Voice_Bot.py # Main voice bot application
├── README.md # This documentation
├── requirements.txt # Python dependencies
├── speech_to_text.py # Speech-to-text streaming functionality
├── Bot_prompt.txt # System prompt configuration
├── text_to_speech.py # Text-to-speech functionality
└── myenv/ # Virtual environment folder (created during setup)
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
In case of any queries, please leave a message or contact me via the email provided in my profile.
⭐ Star this repository if you found it helpful!