This repository contains a real-time speech recognition system powered by Groq and ElevenLabs. It listens for audio input 🎧, processes it using an AI personality 🤖, and responds via speech synthesis 🎙️.
- 🛠️ Custom Trigger Word: Set your own trigger word for AI activation.
- 🧠 AI Personality: Customize the AI's personality and response style.
- 🔊 Speech Synthesis: Uses ElevenLabs API to convert text responses into speech.
-
📥 Clone the Repository:
https://github.com/official-alex/AI-Assistant.git cd AI-Assistant
-
📦 Install Dependencies: Ensure Python 3.8+ is installed, then run:
pip install -r requirements.txt
-
🔑 Set Up Environment Variables: Edit the
.env
file in the project root and add the following:GROQ_API_KEY=your_groq_api_key_here ELEVENLABS_API_KEY=your_elevenlabs_api_key_here
- For the Groq API key, go to Groq Console 🔗.
- For the ElevenLabs API key, log in to ElevenLabs, click your profile (bottom left), and navigate to "API Keys" 🔑.
-
▶️ Run the Application: Start the live speech recognition system with:python main.py
-
⚙️ Modify AI Personality & Trigger Word: Change the
trigger_word
andpersonality
in theLiveSpeechRecognition
class to customize how the AI interacts with you.
▶️ Start Listening: The system will start listening for your input.- 🗣️ Trigger Word: Say the trigger word (default:
bob
) to activate AI processing. - 🛑 Stop: You can say "stop" to halt the recognition.
Upon termination, the system saves a transcript of recognized speech to transcription_history.txt
and logs any errors in error_log.txt
.