Giter Club home page Giter Club logo

chatgodapp's Introduction

ChatGodApp

Written by DougDoug, with help from Banana! You are welcome to adapt/use this code for whatever you'd like. Credit is appreciated but not necessary.

SETUP

  1. This was written in Python 3.9.2. Install page here: https://www.python.org/downloads/release/python-392/

  2. Run "pip install -r requirements.txt" to install all modules.

  3. This uses the twitchio module to connect to your Twitch channel. First you must generate a Access Token for your account. You can do this at: https://twitchtokengenerator.com/ , just make sure the Access Token has chat:read and chat:edit enabled. Once you've generated an Access Token, set it as a windows environment variable named TWITCH_ACCESS_TOKEN. Then update the TWITCH_CHANNEL_NAME variable in chat_god_app.py to the name of the twitch channel you are connecting to.

  4. This uses Microsoft Azure's TTS service for the text-to-speech voices. First you must make an account and sign up for Microsoft Azure's services. Then use their site to generate an access key and region for the text-to-speech service. Then, set these as windows environment variables named AZURE_TTS_KEY and AZURE_TTS_REGION.

  5. Optionally, you can use OBS Websockets and an OBS plugin to make images move while talking. First open up OBS. Make sure you're running version 28.X or later. Click Tools, then WebSocket Server Settings. Make sure "Enable WebSocket server" is checked. Make sure Server Port is '4455', and set the Server Password to 'TwitchChat9'. Next install the Move OBS plugin: https://obsproject.com/forum/resources/move.913/ Now you can use the plugin to add a filter to an audio source that will change an image's transform based on the audio waveform. For example, I have a filter that will move each of the player images whenever text-to-speech audio is playing. Lastly, in the voices_manager.py code, update the OBS section so that it will turn the corresponding filters on and off when text-to-speech audio is being played. Note that OBS must be open when you're running this code, otherwise OBS WebSockets won't be able to connect. If you don't need the images to move while talking, you can just delete the OBS portions of the code.

BASIC APP USAGE

  1. Run chat_god_app.py and then open up http://127.0.0.1:5000 on a browser or as a browser source in OBS

  2. You can enter a user's name in the "Choose User" field and hit enter to manually assign them as that player. Alternatively, viewers can join the pool of potential players by typing !player1, !player2, or !player3. Then, when you hit Pick Random, it will pick one of the viewers randomly from that player pool.

  3. Once a user is picked, their twitch messages will be automatically read out loud via Azure TTS. You can change the voice and the voice style using the drop down menus on the web app. If a user starts their message with (angry), (cheerful), (excited), (hopeful), (sad), (shouting), (shout), (terrified), (unfriendly), (whispering), (whisper), or (random), it will automatically use that voice style.

chatgodapp's People

Contributors

dougdouggithub avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.