# ποΈ Voice-to-Voice AI Assistant (Cohere Arabic)
An interactive Arabic Voice-to-Voice AI Assistant designed to listen to spoken user queries via microphone, process natural language context using Cohere's state-of-the-art LLM (command-r7b-arabic-02-2025), and deliver real-time spoken responses.
---
## π Key Features
- Speech-to-Text (STT Integration): Captures live microphone audio input and transcribes it accurately using Google Speech Recognition API with Arabic language support (ar-SA).
- Advanced LLM Reasoning: Integrates Cohere's dedicated Arabic model (command-r7b-arabic-02-2025) for contextual, clear, and natural language understanding.
- Text-to-Speech (TTS Engine): Converts the model's textual outputs back into natural-sounding audio using pyttsx3.
- Dynamic Background Noise Calibration: Automatically adjusts microphone energy thresholds to minimize ambient noise interference before listening.
- Robust Error Handling: Handles timeouts, unrecognized audio inputs, and API exceptions gracefully without crashing.
---
## π Repository Structure
- main.py : Core application integrating STT, Cohere API, and TTS engines.
- check_mic.py : Script to test microphone connectivity and audio device index before running the app.
- requirements.txt : List of dependencies required to run the application.
- .gitignore : Specifies intentionally untracked files to exclude from Git.
- README.md : Comprehensive project documentation.
---
## π Installation & Setup
1. Prerequisites
- Python 3.9 or higher installed on your local environment.
- A functioning built-in or external laptop microphone.
2. Clone the Repository
git clone
github.com
cd Voice-AI-Assistant
3. Install Dependencies
pip install -r requirements.txt
4. Configure Cohere API Key
Open main.py in your text editor and insert your valid Cohere API key:
COHERE_API_KEY = "YOUR_COHERE_API_KEY"
5. Test Microphone (Optional)
Before starting the main application, test your m β¦