siri-voice-llama3

SAā€¢View on GitHubā€¢August 14, 2024

Siri Voice LLAMA-3 šŸ§™ā€ā™‚ļøšŸŖ„

šŸ‘€ Check Out My Blog Post on this Project!

I have a complete blog post explaining the project here.

šŸ“š Overview

The AI Assistant Automation is a Python application that uses Llama3, gTTS, OpenAI, Groq, and Faster-Whisper to create an intelligent assistant similar to Siri, with integrated image recognition support. This project allows users to interact with the assistant through voice commands and receive responses in audio format.

šŸ˜Ž Features

  • Voice Interaction: Communicate with the assistant using voice prompts.
  • Audio Response: The assistant responds with audio outputs generated by gTTS/OpenAI/pyttsx3.
  • Image Recognition: Analyze and respond to images using advanced recognition techniques.
  • Chat History Logging: Maintain a log of user interactions for better context and history tracking.

āš ļø Limitations

This application may have limitations based on the performance of the underlying AI models and available computing resources. Ensure that the necessary libraries are properly installed and the system is configured to handle audio and image processing efficiently.

šŸŒ³ Project Structure

siri-voice-llama3/
ā”œā”€ā”€ .git/
ā”œā”€ā”€ (gitignored) .venv/
ā”œā”€ā”€ logs/
ā”œā”€ā”€ data/
ā”‚   ā”œā”€ā”€ ai_response/
ā”‚   ā”‚   ā””ā”€ā”€ .gitkeep
ā”‚   ā”‚   ā””ā”€ā”€ (gitignored) ai_response_audio.mp3
ā”‚   ā”œā”€ā”€ chat_history/
ā”‚   ā”‚   ā””ā”€ā”€ 2024/
ā”‚   ā”‚      ā””ā”€ā”€ 10/
ā”‚   ā”‚         ā”œā”€ā”€ (gitignored) 04.log
ā”‚   ā”‚         ā””ā”€ā”€ (gitignored) 05.log
ā”‚   ā””ā”€ā”€ .gitkeep
ā”‚   ā””ā”€ā”€ (gitignored) user_audio_prompt.wav
ā”œā”€ā”€ main.py
ā”œā”€ā”€ README.md
ā”œā”€ā”€ requirements.txt
ā””ā”€ā”€ src/
    ā”œā”€ā”€ __pycache__/
    ā”œā”€ā”€ setup.py
    ā”œā”€ā”€ siri.py
    ā”œā”€ā”€ utils.py
    ā””ā”€ā”€ webcam.py

šŸ› ļø Installation

  • Clone the Repository

šŸ’¬ If you are using HTTPS protocol instead of SSH, change the git clone command accordingly.

git clone git@github.com:shricodev/siri-voice-llama3.git
cd siri-voice-llama3
  • Set Up Environment Variables
GROQ_API_KEY=
GOOGLE_GENERATIVE_AI_API_KEY=

# Optional
OPENAI_API_KEY=

You can use the .env.example file as a template.

  • Create, Activate Virtual Environment and Run (Automatically)
{shell} src/scripts/start_siri_llama3.{sh/fish} main.py

Change the placeholder {shell} to the shell you are using. It can either be bash or fish.

  • Create and Activate Virtual Environment (Manually)
python3 -m venv .venv
source .venv/bin/activate.fish # or .venv/bin/activate if you are not using the fish shell

Install Dependencies

pip3 install -r requirements.txt

šŸ’» Usage

  • Run the Assistant

To start the assistant, execute the following command:

python main.py

This command initializes the assistant, allowing you to interact via voice commands.

OR

{shell} src/scripts/start_siri_llama3.{sh/fish} main.py

Change the placeholder {shell} to the shell you are using. It can either be bash or fish.

šŸ’¬ Logging

The application logs all interactions in the data/chat_history/ directory. You can review past interactions in the log files to understand the context of your conversations.

Any ERRORS when running with the shell script will be logged in the logs/ directory.

Show your support

Give a ā­ļø if this project helped you!