Skip to content

Using Google Translate API to Generate Audio from Twitch Chat

License

Notifications You must be signed in to change notification settings

blusewill/TwitchChatTTS

Repository files navigation

TwitchChatTTS

Super-Linter

English 繁體中文

TwitchChatTTSLogo

Using pyTwitchAPI and gTTS to transcript Twitch Chat Messages.

Installation

Download this repository.

Install Python in your Computer.

Open the current folder in terminal and create a virtual enviroment.

python -m venv .virtualenv

And Source the virtualenviroment

Windows : .\.virtualenv\Scripts\Activate.ps1

Linux : source ./.virtualenv/bin/acitvate

And install the requirement for the application to run

pip install -r requirements.txt

Optional

If you want to change the talking speed.

Download ffmpeg and put into current directory.

Setting Up!

Go to Twitch Developer Panel

Click on Register a new application

Register A New Application Twitch

You can name the Application whatever you want.

But the redirect URLs Must set to

http://localhost:17563

To make the Twitch authenticator working.

After Register the Application Paste the Client ID and Client Secret into conifg.json

    "APP_ID": "Client ID here",
    "APP_SECRET": "Client Secret Here",

Now Execucte the command python start.py should be starting the bot.

You will seeing the Bot is asking permission to read the chat.

Twitch Authcating the Application

Click on Authrize! and the bot should be greeting you for using the Bot!

General Settings

    "TARGET_CHANNEL": "blusewill",
    "Language": "zh-TW",
    "Speed": "1.2"
    "Ignored_user": ["Nightbot", "Moobot", "StreamElements", "Streamlabs", "Fossabot"],
    "TTS_Username": "true"

TARGET_CHANNEL

The Channel you're going to join to read the Chat

Language

The language you're going to use for TTS

Check the gTTS Documentation for the language you can currently use

Speed

The TTS Talking Speed.

Note : Require ffmpeg to work

Ignored_user

The user that is going to be ignored in TTS function.

TTS_Username

Whether read out the Username or not. Option: true or false

About

Using Google Translate API to Generate Audio from Twitch Chat

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages