Your AI companion to support you during your lows and highs, providing intelligent, real-time assistance.
The AI Companion is a cutting-edge, low-latency voice assistant that:
- Converts voice input to text using OpenAI's Whisper.
- Processes text using Hugging Face's Large Language Model (LLM).
- Converts responses back to speech with Edge-TTS.
- Features a web interface and real-time performance optimization for seamless interaction.
- Voice Activity Detection (VAD): Detects speech activity and ignores silence.
- Speech-to-Text (STT): High-accuracy transcription using the
faster-whisper
model. - Text-to-Speech (TTS): Converts text to natural speech with tunable pitch, speed, and voice type.
- LLM Integration: Generates intelligent responses with Hugging Face models.
- Streamlit Interface: Offers a user-friendly web-based interaction mode.
-
Run the following command to install Daytona:
curl -sf -L https://download.daytona.io/daytona/install.sh | sudo bash
-
Start the Daytona server:
daytona server -y && daytona
-
If the server daemon stops at any point, restart it using:
daytona serve
-
Create a workspace for the AI Companion:
daytona create https://github.com/Ankur2606/AI-Companion.git --devcontainer-path=.devcontainer/devcontainer.json
- Python 3.8+
- Git
- Hugging Face API Token
-
Clone the Repository:
git clone https://github.com/Ankur2606/AI-Companion.git cd AI-Companion
-
Set Up a Virtual Environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install Dependencies:
pip install --upgrade pip pip install -r requirements.txt
-
Configure Hugging Face Token:
- Create an account at Hugging Face and generate an API token.
- Set the token as an environment variable:
export HUGGINGFACE_API_TOKEN=your_token # On Windows: set HUGGINGFACE_API_TOKEN=your_token
Run the project through Daytona for optimized performance:
-
Start Daytona if not already running:
daytona serve
-
Launch the AI Companion:
daytona run
- Web Interface:
Launch the Streamlit web app:
streamlit run main.py
-
Daytona Server Issues:
If the server stops, restart it with:daytona serve
-
Initial Model Downloads:
Thefaster-whisper
model may take time to download (~2GB). Ensure a stable internet connection. -
Environment Variable Issues:
Verify the Hugging Face API token is correctly set in your environment.
We welcome contributions! Please feel free to:
- Open issues for bugs or suggestions.
- Submit pull requests for improvements.
This project is licensed under the MIT License.