-
Notifications
You must be signed in to change notification settings - Fork 465
NEW: Orpheus Speech JavaScript library #107
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
base: main
Are you sure you want to change the base?
Conversation
Would you be able to deploy a sample website on Vercel/Netlify/etc. to try this? thanks |
Loading the onnx model gives me the same error reported here:
I got the error from a simple React bundle. Do we need to run it via node or web workers? |
Indeed, this is due to a memory error, meaning the 3B model is currently slightly too large to run in-browser. We do have some optimizations we can apply to try get this working, but to achieve real-time performance on more devices, I think a smaller model would be better! |
Thanks for this PR - this looks great - will look to merge shortly! |
keeping our hopes up for a release date of the smaller models, eh? :) |
This PR introduces the
orpheus-speech
JavaScript library (NPM), enabling natural speech synthesis 100% locally in your browser (or any other JS environment like Node, Deno, Electron, Bun, etc.). The library uses Transformers.js for inference, enabling WebGPU acceleration where possible. Since only the 3B model has been released, it may not immediately be accessible to most users (mainly due to out-of-memory errors), but we're releasing this in preparation for the upcoming smaller variants so that others can review it early!I've done my best to align with the python API (taking some creative liberty to make it work with all JavaScript's quirks). I've also got a simple
.play()
function working which enables playback in-browser using the web audio API, although, I'll show how to use this better when I put out a full demo... something similar to this.Example usage
Sample output:
orpheus.mp4