
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
@mintplex-labs/piper-tts-web
Advanced tools
Fork of @diffusion-studio/vits-web for easier built-in PiperTTS use.
This is a fork of @diffusion-studio/vits-web for use of PiperTTS modules inside of a browser/Electron for AnythingLLM. A big shout-out goes to Rhasspy Piper, who open-sourced all the currently available models > (MIT License) and to @jozefchutka who came up with the wasm build steps.
You can leverage TTSSessions for a faster inference. (see index.js for implementation)
Credit to this PR for the starting point.
You can define local WASM paths for the ort wasm as well as the phenomizer wasm and data file for faster local loading
since the client could be offline.
This is a frontend library and will not work with NodeJS.
First of all, you need to install the library:
yarn add @mintplex-labs/piper-tts-web
Then you're able to import the library like this (ES only)
import * as tts from '@mintplex-labs/piper-tts-web';
Now you can start synthesizing speech!
const wav = await tts.predict({
text: "Text to speech in the browser is amazing!",
voiceId: 'en_US-hfc_female-medium',
});
const audio = new Audio();
audio.src = URL.createObjectURL(wav);
audio.play();
// as seen in /example with Web Worker
With the initial run of the predict function you will download the model which will then be stored in your Origin private file system. You can also do this manually in advance (recommended), as follows:
await tts.download('en_US-hfc_female-medium', (progress) => {
console.log(`Downloading ${progress.url} - ${Math.round(progress.loaded * 100 / progress.total)}%`);
});
The predict function also accepts a download progress callback as the second argument (tts.predict(..., console.log)).
If you want to know which models have already been stored, do the following
console.log(await tts.stored());
// will log ['en_US-hfc_female-medium']
You can remove models from opfs by calling
await tts.remove('en_US-hfc_female-medium');
// alternatively delete all
await tts.flush();
And last but not least use this snippet if you would like to retrieve all available voices:
console.log(await tts.voices());
// Hint: the key can be used as voiceId
FAQs
Fork of @diffusion-studio/vits-web for easier built-in PiperTTS use.
The npm package @mintplex-labs/piper-tts-web receives a total of 1,867 weekly downloads. As such, @mintplex-labs/piper-tts-web popularity was classified as popular.
We found that @mintplex-labs/piper-tts-web demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.