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

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chatgodapp's Issues

No bike lanes

Public transport is alright, but special lanes for bicycles would be appreciated.

Use `dotenv` to enable easier environment variable modification

The pip package is python-dotenv. Its usage is very simple - whenever we need to access environment variables, we can load them from an external file called .env. Sample code has been provided on this package's PyPI page, but to summarize:

from dotenv import load_dotenv

load_dotenv()  # This will allow os.getenv to access these variables

The actual file will look something like this:

KEY1=VALUE1
KEY2=VALUE2

Integration should add a .gitignore file for .env to prevent leaks. The README also has implications that this has not been tested on non-Windows OSes - this is OS-agnostic.

API KEY LEAKED

⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢉⢤⣢⡢⣉⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⠿⢋⢋⠛⠻⣿⣿⣿⣿⣿⣿⣿⣿⢡⡫⡣⡢⢫⢺⡂⣹⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⠃⣜⢮⢳⠹⣕⠜⣿⡿⠿⠟⢛⢛⠛⡂⢯⣪⡸⡸⠕⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣷⡈⢮⡣⡱⡱⡸⣕⢤⡲⡺⣪⡳⡳⣝⢮⡳⡵⣝⢮⡢⣌⢍⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣷⡄⠉⣚⢮⡺⣪⡳⣝⣝⢮⢎⢯⣪⡳⣝⢞⢼⢕⣝⢮⡳⣝⢖⢤⡉⠻⢿⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⡿⠋⣠⡺⣪⡳⣝⢮⡺⡪⡮⡳⣝⢵⢕⣝⢮⡫⡮⡳⣕⢗⣝⢮⣫⢳⢝⢵⢄⠙⢿⣿⣿⣿⣿⣿
⣿⣿⣿⠟⢁⡜⡮⣺⡪⣺⡪⡳⣝⢵⢝⢞⢮⡳⣣⡳⡳⣝⢮⡫⡮⡳⣕⢗⢵⢝⢵⢝⢕⣗⢄⠙⣿⣿⣿⣿
⣿⣿⠏⠀⡅⣆⢥⡳⣝⢮⢎⢯⣪⡳⣝⡕⣗⢝⢮⢎⢯⣪⡳⣝⢮⡫⡮⡫⡮⡫⡮⣔⢔⢌⢗⢥⠈⢻⣿⣿
⣿⠇⢠⢯⡺⣪⡳⣝⢮⡳⣝⢵⢕⢝⢎⣎⣎⢭⢕⣍⣇⢳⢹⢪⡳⣝⢮⡫⡮⣫⡺⡪⡯⣪⣫⡳⣕⠄⢻⣿
⡏⢀⡗⣕⣭⣮⣼⣸⠱⣝⠮⡣⣣⣳⣳⡳⡳⣝⣗⣗⢽⣕⢷⢕⢝⠼⣕⣝⢞⢜⣼⣼⣮⣎⡎⣞⢮⡣⠀⢿
⠁⢰⣱⣿⣿⣿⣿⣿⣷⢕⢵⢝⣞⣞⢞⢮⣻⣺⣺⣪⡳⡽⣝⣝⢷⢕⢕⢕⣵⣿⣿⣿⣿⣿⣿⡎⡧⣫⡃⠸
⠂⢱⣿⣿⠁⠉⣿⣿⡟⣕⣝⣗⢗⠁⠄⡑⣗⣗⣕⠇⡉⢉⠺⡪⡯⣯⢪⢱⣿⣿⣿⣿⡇⠀⣸⣿⢸⡪⣎⠀
⠀⢊⢿⣿⣷⣿⣿⣿⡇⣞⢞⢮⢇⠠⠁⡀⣗⣕⣗⠅⠐⡀⠂⡯⡯⡮⡇⡣⡻⣿⣿⣿⣿⣿⣿⢏⢪⡺⡜⠀
⡇⠨⡪⡹⠻⠿⠿⡻⡱⡸⡽⣝⣗⣄⣅⣔⣗⣗⣗⣗⢥⢤⢯⡫⡯⡯⡪⡺⣜⢌⢻⠻⡻⡫⡱⡸⣕⡝⡎⢠
⣧⠀⢣⢫⣹⡸⣱⡱⡵⣕⢝⢞⣞⢞⣞⢮⡺⣮⣺⡪⡯⡯⡳⡽⡽⡱⣕⣝⢮⡳⡵⡱⣕⢵⢝⢞⢮⡪⠀⣼
⣿⣧⡀⠣⡳⣝⢮⡺⡪⡮⡳⣕⢕⡓⡗⡗⡝⡞⡮⠯⡫⡫⡫⡹⣜⢞⣜⢮⡳⣝⢮⡫⡮⡳⣝⢕⠳⠀⣼⣿
⣿⣿⣷⣄⠈⠎⡗⡽⣕⣝⢞⢮⡳⡵⣱⢱⡱⡱⡪⡣⡳⡱⣝⢞⢮⡳⣕⢗⣝⢮⡳⣝⢮⡫⡪⠃⣠⣾⣿⣿
⣿⣿⣿⣿⣷⣄⠈⠊⢎⢎⢯⢳⢝⢞⢮⡳⣝⢞⢮⡫⡮⡫⡮⣫⡺⡪⡮⡳⣕⢗⢝⠎⠎⠈⣠⣶⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣦⣄⡈⠘⠘⠕⢍⢗⢝⢎⢯⢚⢎⢯⢪⢫⢪⢪⢫⠪⠪⠊⠊⣀⣤⣶⣿⣿⣿⣿⣿⣿⣿
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣦⣤⣠⣀⣁⣈⢈⢈⢈⢈⣀⣁⣠⣠⣤⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿

I think i already said this here but im trying to make this work for youtube but need a little(a lot of) help

Like the title said im trying to make this work for youtube as well but im a coding novice who's basically just learned by watching your streams and looking at the code. I figure i can use pytchat to get the pool of youtube users but the issue is idk how to make them combine into the same pool. If you cant help and i cant figure it out the other thing i figured i could probably do is change 1 of the users to only choose from the youtube side, its not what i want but i figure it can be done in a much easier way, i only mention this cause i figure you might wanna use that for your own stuff so youtube can get some inclusion.

Wont let me pick random

so, I got it to connect to my twitch account, and connected to azure aswell but when testing it, it wont allow me to pick a random user even if people do !player1 2 or 3, i am not getting any errors so im just confused on whats going on

:3

I don't have any issues with this I just think it's amazing meal pipe falling sound

Move OBS plugin

Hello, could you explain how to use the Move OBS plugin to make the images move according to who is speaking.

Example: There are three users with three different images, I would like to move the image corresponding to the user who is currently speaking.

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.