Skip to content

Commit

Permalink
install doc
Browse files Browse the repository at this point in the history
  • Loading branch information
NovaPlayzGames committed Mar 14, 2023
1 parent 66ccd2c commit 52a7e70
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 14 deletions.
70 changes: 70 additions & 0 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@

# 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.
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,8 @@ this project is in development...
![AI VTuber by DevPattarapong](https://github.com/ponlponl123/AIVTuber/blob/main/img/Screenshot.png)

# Installation
## TTS (Text-to-Speech) & OpenAI
- First, you need to install all package by running the following command: `npm install dotenv`
### Twitch
- At the variable `twitch_username` put your username as well as the variable `twitch_username`. `twitch_channel` too.
- As for `twitch_token`, here are the [Docs](https://dev.twitch.tv/docs/authentication/getting-tokens-oauth/#authorization-code-grant-flow) for this.
### FFMPEG
- The `ffmpeg_path` variable is required to use ffmpeg.exe from https://ffmpeg.org/download.html.
- example for this `c:/ffmpeg/bin/ffmpeg.exe`
### OpenAI
- [This is the source for the variables. `openai_apiKey`](https://beta.openai.com/account/api-keys)
- put the api key in the .env file
### ElevenLabs
- Go to ElevenLabs at https://elevenlabs.io and get **API key** from Your Profile

**See Install Doc**
[Install Document](https://github.com/openai/openai-node/blob/master/LICENSE)

## VTube Studio API
I'm using the [VTS Desktop Audio Plugin by Lua Lucky](https://lualucky.itch.io/vts-desktop-audio-plugin) to capture the sound and send it as Parameters so that the sides of the character can move.
Expand Down

0 comments on commit 52a7e70

Please sign in to comment.