Skip to content

Voice Assistant powered by LangChain and OpenAI Whisper. Features real-time speech recognition, multi-LLM support (OpenAI, Google), and computer vision capabilities via OpenCV. Enables natural voice interactions with advanced AI responses.

Notifications You must be signed in to change notification settings

LohiyaH/Voice-Assistant

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Voice Assistant

This project is a sample AI assistant that uses OpenAI and Google Generative AI models to provide responses based on user prompts and webcam images. The assistant can also convert text responses to speech.

Prerequisites

  1. API Keys: You need an OPENAI_API_KEY and a GOOGLE_API_KEY to run this code. Store them in a .env file in the root directory of the project, or set them as environment variables.

  2. Apple Silicon Users: If you are running the code on Apple Silicon, install portaudio by running the following command:

    brew install portaudio

Setup

  1. Create a Virtual Environment:

    python3 -m venv .venv
  2. Activate the Virtual Environment:

    source .venv/bin/activate
  3. Update pip and Install Required Packages:

    pip install -U pip
    pip install -r requirements.txt

Running the Assistant

To start the assistant, run the following command:

python3 assistant.py

Usage

  1. Webcam Stream: The assistant uses your webcam to capture images.
  2. Voice Input: Speak into your microphone to provide prompts.
  3. Text-to-Speech: The assistant will respond with synthesized speech.

Stopping the Assistant

To stop the assistant, close the webcam window or press Esc or q.

License

This project is licensed under the MIT License.

About

Voice Assistant powered by LangChain and OpenAI Whisper. Features real-time speech recognition, multi-LLM support (OpenAI, Google), and computer vision capabilities via OpenCV. Enables natural voice interactions with advanced AI responses.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages