Skip to content

stevetsim/ChatGPT-Voice-Driven-Chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatGPT Voice Driven Chatbot

Node.js Express Whisper ChatGPT


This is a backend application that allows users to chat with ChatGPT with their voice. It integrates the Whisper API for automatic speech recognition (ASR) and the ChatGPT API for generating responses.

Features

  • Voice-based interaction with ChatGPT.
  • ASR integration using Whisper for accurate speech recognition.
  • Seamless conversation flow with persistent context.
  • Easy to integrated to any web application.
  • Provided Frontend Demo

Prerequisites

Before running this application, make sure you have the following installed:

  • Node.js (v14.16.1 or higher)
  • NPM (Node Package Manager)

Installation

  1. Clone this repository to your local machine:
git clone https://github.com/stevetsim/ChatGPT-Voice-Driven-Chatbot.git
  1. Change into the project's directory:
cd ChatGPT-Voice-Driven-Chatbot
  1. Install the dependencies:
npm install

Configuration

To use the Whisper and ChatGPT APIs, you need to provide your Open AI API key. Follow the steps below to configure the application:

  1. Rename the .env.example file to .env.

  2. Open the .env file and replace OPENAI_TOKEN with your actual Open AI API Key.

Usage

  1. Start the server:
node index.js
  1. The server will be running at http://localhost:3000.

  2. Use an API testing tool or a client application to send POST requests to http://localhost:3000/api/send with the following curl example:

curl --location --request POST 'localhost:3000/api/send' \
--form 'file=@"testing.mp3"'
  1. The response will be returned as a JSON object:
{
  "success": true,
  "message": "Get ChatGPT Response Success",
  "data": {
    "response": "I'm doing great. How can I assist you today?"
  }
}

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

MIT License

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published