Skip to content

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.

License

Notifications You must be signed in to change notification settings

En3rGy/STT-TTS-ChatBot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

59 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published