Skip to content

Latest commit

 

History

History
70 lines (42 loc) · 3.17 KB

INSTALL.md

File metadata and controls

70 lines (42 loc) · 3.17 KB

Introduction

This is a Node.js application that uses the Elevenlabs API, Twitch API, OpenAI API, and various Node modules to create a text-to-speech bot that can communicate with users on Twitch. The bot will respond to user input using an AI model trained by OpenAI, and it will speak the response using a custom voice generated by Elevenlabs.

Prerequisites

Before running this application, you will need to make sure that you have the following prerequisites installed:

  • Node.js (v12.0.0 or later)
  • npm (v6.0.0 or later)

You will also need to create accounts with the following services and obtain their respective API keys:

  • Elevenlabs
  • OpenAI
  • Twitch

Installation

  1. Clone the repository or download the code and extract it to a directory of your choice.
  2. Open a terminal or command prompt in the directory where the code is located.
  3. Run the following command to install the required packages:

bash

`npm install` 

Configuration

Before running the application, you will need to configure the following variables in the code:

  • ffmpeg_path: Path to the FFmpeg executable on your system.
  • openai_apiKey: Your OpenAI API key.
  • elapiKey: Your Elevenlabs API key.
  • voiceID: The ID of the voice you want to use for text-to-speech.
  • fileName: The name of the output file where the text-to-speech audio will be saved.
  • client.identity.username: Your Twitch bot's username.
  • client.identity.password: Your Twitch bot's OAuth token.
  • client.channels: An array of the Twitch channels where you want your bot to operate.

Running the Application

To run the application, open a terminal or command prompt in the directory where the code is located and run the following command:

bash

`node app.js` 

This will start the application and connect your bot to the Twitch channels specified in the configuration.

Usage

Once the application is running, your bot will respond to messages in the Twitch channels it is connected to. It will use an AI model trained by OpenAI to generate responses, and it will use a custom voice generated by Elevenlabs to speak the responses.

To use the bot, simply send a message to one of the Twitch channels where the bot is connected. The bot will respond with a message generated by OpenAI, and it will speak the response using the custom voice generated by Elevenlabs.

You can also test the text-to-speech functionality by running the following command in the terminal or command prompt:

bash

`node app.js` 

This will prompt you to enter a message that you want the bot to speak. The bot will speak the message using the custom voice generated by Elevenlabs.

Notes

  • This application requires an internet connection to operate, as it relies on external APIs and services to generate responses and speak them.
  • The application will save the text-to-speech audio to a file on your system. Make sure you have sufficient disk space available and that you have permission to write to the directory where the file is saved.
  • The application is configured to use a custom voice generated by Elevenlabs, but you can modify the code to use a different voice or a different text-to-speech service if you prefer.