Git Product home page Git Product logo

livetl / kanatran Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 2.0 256 KB

Kanatran has been discontinued. Please read our announcement post.

Home Page: https://www.reddit.com/r/Hololive/comments/n9fvye/regarding_automatic_translations_livetl/

License: GNU Affero General Public License v3.0

Dockerfile 5.12% Makefile 2.60% JavaScript 59.91% HTML 1.87% Shell 3.46% Python 27.04%
vtubers translations youtube-livestream live-translations hololive

kanatran's Introduction

LiveTL - Translation Filter for Streams

Tests E2E Tests License: AGPL v3 js-semistandard-style Contributors Issues Total Lines Commit Activity Discord

Demo

Feedback and Contributing

We have a Discord server for those who would like to give feedback or discuss new features! Here is the invite.

If you are interested in helping us solve any issues and/or add features, please let us know in the Discord server and submit a Pull Request!

Development

Note: The repo expects a Linux or Unix-like environment. If you are on Windows, use WSL.

Setup

ℹ LiveTL uses submodules. Make sure to clone the repo with the --recursive flag!

ℹ When pulling, you should also use git pull --recurse.

yarn # use yarn, not npm

Commands

yarn start # devServer
yarn build:production # production
yarn package # package extension zips
yarn build:android # android
yarn test # jest
yarn test:watch # autotest
yarn format # lint
yarn e2e # run e2e tests

Load the build directory in Chrome developer mode.

Hot Reload

Enable chrome://flags/#allow-insecure-localhost to use hot module and UI component reloading.

Developers

LiveTL is developed by these fine people!

kanatran's People

Contributors

candygoblen123 avatar dependabot[bot] avatar github-actions[bot] avatar grumpybear57 avatar kentonishi avatar r2dev2 avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

kanatran's Issues

Container stops processing after a period of time

After ~10 minutes of running, I get this, then nothing else. I encountered this on 3 different containers processing 3 different streams. I'm assuming (based on timing) this is something to do with how you send a keep alive ping to the API.

INFO:     127.0.0.1:50234 - "POST /logs HTTP/1.1" 200 OK
{"timestamp":880.738,"text":"やばいこと言ってた。","translation":"I was saying something bad."}
INFO:     127.0.0.1:50264 - "POST /logs HTTP/1.1" 200 OK

INFO:     127.0.0.1:50264 - "POST /logs HTTP/1.1" 200 OK
INFO:     127.0.0.1:50300 - "GET /static/index.html HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50300 - "GET /static/index.js HTTP/1.1" 304 Not Modified
INFO:     127.0.0.1:50300 - "GET /env HTTP/1.1" 200 OK
{SESSION KEY}
INFO:     127.0.0.1:50300 - "POST /logs HTTP/1.1" 200 OK

I don't know if the session key that was printed here is the same key as the one that was obtained before or not.

Allow limiting system resource usage

I'd like to be able to limit how many system resources the KT runner is allowed to consume. Something like MAX_CPU and MAX_MEM where mem accepts a percent or a unit. I also would like a system variant (MAX_SYS_CPU and MAX_SYS_MEM) that prevents the runner from starting new containers if the system wide utilization would exceed those values.
The runner should also probably default to some sane values (i.e. 50% for runner specific, and 80% for system wide)and check to ensure that there is enough to run a single container (i.e. > 5% CPU, > 500MB memory).

A network utilization limit may also be nice for other people hosting the runner on slower connections, but this is probably lower priority since the network utilization seems rather low anyways.

example:

MAX_CPU=60%
MAX_SYS_CPU=90%
MAX_MEM=50%
MAX_SYS_MEM=80%

or

MAX_MEM=8192MB
MAX_SYS_MEM=80%

or

MAX_MEM=8GB
MAX_SYS_MEM=16GB

Allow specifying what API URl to post to

As far as I understand, currently the API URL is hardcoded to api.livetl.app, however I'd like to be able to run Kanatran to test my local development instance of the API.
Something as simple as API_URL='localhost' in .env, then fallback to api.livetl.app when not present would be good enough for me.

Container won't run when kanatran.bash uses CRLF

Environment is purely Docker on Windows (no WSL), cloned using Git for Windows (which presumably defaults to CRLF). Potentially more issues present when other files are also using CRLF.

PS > docker --version ; docker-compose --version
Docker version 19.03.8, build afacb8b
docker-compose version 1.25.5, build 8a1c60f6
PS > docker-compose run -d -e VIDEO=xHP6lpOepk4 --name KTest watcher
KTest
PS > docker ps -a -f "name=KTest"
IMAGE       COMMAND                  CREATED             STATUS                     NAMES
watcher     "bash /usr/src/watch…"   4 minutes ago       Exited (2) 4 minutes ago   KTest
PS > docker logs KTest
/usr/src/watcher/kanatran.bash: line 2: $'\r': command not found
/usr/src/watcher/kanatran.bash: line 4: syntax error near unexpected token `$'{\r''
'usr/src/watcher/kanatran.bash: line 4: `function log() {

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.