Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.59 KB

Readme.md

File metadata and controls

38 lines (26 loc) · 1.59 KB

Voice-Activated Chatbot

This repository contains a voice-activated chatbot that utilizes the Vosk and OpenAI APIs to recognize speech, transcribe audio, and generate responses using a pre-trained language model.

Features

  • Listens for a trigger phrase to start processing user input
  • Transcribes user speech using the Vosk speech recognition library
  • Generates responses to user questions or statements using the OpenAI API
  • Uses the pyttsx3 library for text-to-speech output
  • Continues listening and responding until a termination phrase is detected

Dependencies

Installation

  1. Clone this repository
  2. Install the required dependencies:
    pip install vosk pyaudio pyttsx3 openai
  3. Create a credentials file at ./etc/credentials.txt and add your open ai API key to
    {"openai_api": OPEN_AI_API_KEY}.
  4. Store the voks model at ./etc/models and set the path as value of MODEL_PATH in stt.py
  5. Check the constants in stt.py

Usage

Run the main script: python main.py

The chatbot will listen for the trigger phrase (e.g., "Hey, computer") before processing user input. It will continue listening and responding until the termination phrase (e.g., "Ende") is detected.

License

This project is licensed under the MIT License. See the LICENSE file for details.