Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate porting some of the engines to run in the browser #29

Open
rotemdan opened this issue Aug 25, 2023 · 0 comments
Open

Investigate porting some of the engines to run in the browser #29

rotemdan opened this issue Aug 25, 2023 · 0 comments
Labels
feature Issue proposes a new feature future Planned for a future time

Comments

@rotemdan
Copy link
Member

rotemdan commented Aug 25, 2023

It is technically possible, overall, since the core components: espeak-ng and onnxruntime both fully support running in the browser. Actually, onnxruntime-web, unlike onnxruntime-node (the currently used package), can also make use of the GPU via WebGL and WebGPU, which may give a performance boost for some users.

However, it is a lot of work, and only a subset of the engines can be supported (no cloud engines, in particular). There are several reasons why the web may not be the most effective platform for Echogarden:

  • Significantly slower inference when using CPU for ONNX models
  • No cross-domain network connectivity - can't connect to Google Cloud, Microsoft, Amazon etc. without a proxy
  • Large initial download size would make it too heavy and slow to load as part of a standard web page directly, especially for Whisper models which are several hundred megabytes to gigabytes in size
  • Large memory requirement for the VITS models, starting at about 800MB - 1GB, which is a bit too much for a browser
  • Due to the high code complexity, data size, and memory consumption, it is unlikely that a browser extension, internally bundling some of the models, would be accepted to the Chrome and Firefox web stores
  • Will require a virtual file system to store models and make use of downloadable packages
  • Requires duplicating a lot of prior work, porting many node.js-only APIs, and increasing code complexity
  • Possibly lots of issues with inconsistent browser support and browser security constraints
  • Not future-proof. Due to changing restrictions of browsers, the runtime environment is not guaranteed be reliably reproducible in the future, meaning that it may need continuous maintenance to ensure it keeps working on the newest browsers

Currently, getting a working web-based UI client is a higher priority, so work on this is not likely to start any time soon.

@rotemdan rotemdan added feature Issue proposes a new feature future Planned for a future time labels Aug 25, 2023
@rotemdan rotemdan mentioned this issue May 2, 2024
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue proposes a new feature future Planned for a future time
Projects
None yet
Development

No branches or pull requests

1 participant