feat: Enable setting of wasmPaths via kokoro-js #5361

Closed
opened 2025-11-11 16:18:45 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @xenova on GitHub (May 27, 2025).

Check Existing Issues

  • I have searched the existing issues and discussions.

Problem Description

Hi there, creator of Transformers.js and kokoro-js here 👋 It's really great to see both libraries being used in this amazing project! I noticed this TODO in the code, as it seems like you want to set the wasmPaths to be a custom location:

https://github.com/open-webui/open-webui/blob/737dc7797ce5eb0f3dbe08bd1ab6778ea59f538e/src/lib/workers/kokoro.worker.ts#L4-L5

This is now possible with the latest version of kokoro-js (PR), as follows:

Desired Solution you'd like

import { env, KokoroTTS } from "kokoro-js";
env.wasmPaths = '/wasm/';
// continue normally

or even something more complex like:

env.wasmPaths = { wasm: new URL("/path/to/ort-wasm-simd-threaded.jsep.wasm", import.meta.url).href };

Alternatives Considered

n/a

Additional Context

n/a

Originally created by @xenova on GitHub (May 27, 2025). ### Check Existing Issues - [x] I have searched the existing issues and discussions. ### Problem Description Hi there, creator of Transformers.js and kokoro-js here 👋 It's really great to see both libraries being used in this amazing project! I noticed this TODO in the code, as it seems like you want to set the wasmPaths to be a custom location: https://github.com/open-webui/open-webui/blob/737dc7797ce5eb0f3dbe08bd1ab6778ea59f538e/src/lib/workers/kokoro.worker.ts#L4-L5 This is now possible with the latest version of kokoro-js ([PR](https://github.com/hexgrad/kokoro/pull/190)), as follows: ### Desired Solution you'd like ```js import { env, KokoroTTS } from "kokoro-js"; env.wasmPaths = '/wasm/'; // continue normally ``` or even something more complex like: ```js env.wasmPaths = { wasm: new URL("/path/to/ort-wasm-simd-threaded.jsep.wasm", import.meta.url).href }; ``` ### Alternatives Considered n/a ### Additional Context n/a
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#5361