{"_id":"@mintplex-labs/piper-tts-web","_rev":"8-dbed79f986da31d41c5403bfe3d81fce","name":"@mintplex-labs/piper-tts-web","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@mintplex-labs/piper-tts-web","version":"1.0.0","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn","piperTTS","AnythingLLM"],"author":{"name":"team@mintplexlabs.com"},"license":"MIT","_id":"@mintplex-labs/piper-tts-web@1.0.0","maintainers":[{"name":"tcarambat","email":"tim@mintplex.xyz"}],"homepage":"https://github.com/Mintplex-Labs/piper-tts-web#readme","dist":{"shasum":"6e9746dba3fe063bcf9559d028e4fc6f9107b069","tarball":"https://registry.npmjs.org/@mintplex-labs/piper-tts-web/-/piper-tts-web-1.0.0.tgz","fileCount":16,"integrity":"sha512-6P3jvM30VAVeHkYnzNA9O/xmQcROb7kj7CyPv8KtvwbE4tigYKU2GzlZ6z5PlzyTWvBWIHFmOEjkF03qKd2d9w==","signatures":[{"sig":"MEUCIDoPTM6nskbujOxJ6mzVvQ7xBgfMgCNjN5smTxukNJ5uAiEAjXAKdvT8431qDnPgpVwnjP8d3bPeFaFpZCJ3DdOY0+c=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":174536},"type":"module","types":"./dist/index.d.ts","module":"./dist/vits-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/vits-web.js"}},"private":false,"scripts":{"dev":"vite","test":"npx playwright test --project=chromium","build":"rm -r -f ./dist && tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"tcarambat","email":"tim@mintplex.xyz"},"repository":{"url":"git@github.com:Mintplex-Labs/piper-tts-web.git","type":"git"},"description":"Fork of @diffusion-studio/vits-web for easier built-in PiperTTS use.","directories":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.1","typescript":"^5.2.2","vite-plugin-dts":"^3.9.1","@playwright/test":"^1.35.1"},"peerDependencies":{"onnxruntime-web":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/piper-tts-web_1.0.0_1722897146097_0.9927304182579684","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@mintplex-labs/piper-tts-web","version":"1.0.1","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn","piperTTS","AnythingLLM"],"author":{"name":"team@mintplexlabs.com"},"license":"MIT","_id":"@mintplex-labs/piper-tts-web@1.0.1","maintainers":[{"name":"tcarambat","email":"tim@mintplex.xyz"}],"homepage":"https://github.com/Mintplex-Labs/piper-tts-web#readme","dist":{"shasum":"5bb1590cc2b5902e82cf75eeb862f0f25d7fdfb0","tarball":"https://registry.npmjs.org/@mintplex-labs/piper-tts-web/-/piper-tts-web-1.0.1.tgz","fileCount":16,"integrity":"sha512-fKTh0PoR7DxUTVD3pMWgoVTQOudfssg82UuHhdM10EhvBTPiwu6gLGee9S8CDP4KQwwae8Aae/czY0ECbHv2Xw==","signatures":[{"sig":"MEYCIQCHgbJmHWhrsVlANXiayKMaRzGO+htnoA5VoEMN2o9h/AIhAOAZKYE66JD8PRnYNcRv+CDSpjdJP8InQLg16Z9Gs8VT","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":174537},"type":"module","types":"./dist/index.d.ts","module":"./dist/vits-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/vits-web.js"}},"private":false,"scripts":{"dev":"vite","test":"npx playwright test --project=chromium","build":"rm -r -f ./dist && tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"tcarambat","email":"tim@mintplex.xyz"},"repository":{"url":"git@github.com:Mintplex-Labs/piper-tts-web.git","type":"git"},"description":"Fork of @diffusion-studio/vits-web for easier built-in PiperTTS use.","directories":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.1","typescript":"^5.2.2","vite-plugin-dts":"^3.9.1","@playwright/test":"^1.35.1"},"peerDependencies":{"onnxruntime-web":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/piper-tts-web_1.0.1_1722966700247_0.18273592326460286","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@mintplex-labs/piper-tts-web","version":"1.0.2","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn","piperTTS","AnythingLLM"],"author":{"name":"team@mintplexlabs.com"},"license":"MIT","_id":"@mintplex-labs/piper-tts-web@1.0.2","maintainers":[{"name":"tcarambat","email":"tim@mintplex.xyz"}],"homepage":"https://github.com/Mintplex-Labs/piper-tts-web#readme","dist":{"shasum":"ae8431382316d71444a9f2984eafb374795fbbee","tarball":"https://registry.npmjs.org/@mintplex-labs/piper-tts-web/-/piper-tts-web-1.0.2.tgz","fileCount":16,"integrity":"sha512-mbduUQdxqi+AQi01iNVsETz+4IdmhGyfGlqh2sV1ciV4WqelMExkmQapVQ/zlQEeE0wIf7pRM+19q+MUClkUcg==","signatures":[{"sig":"MEQCIDd0oA3DFCvJlLt1WEprNuU5ib7Je6BfPTkxXSzyjL5MAiAIfaHUeFPIm4GFIaNmEH533Mu3M+wI5yOy8vVNYHNhFQ==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":174537},"type":"module","types":"./dist/index.d.ts","module":"./dist/vits-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/vits-web.js"}},"private":false,"scripts":{"dev":"vite","test":"npx playwright test --project=chromium","build":"rm -r -f ./dist && tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"tcarambat","email":"tim@mintplex.xyz"},"repository":{"url":"git@github.com:Mintplex-Labs/piper-tts-web.git","type":"git"},"description":"Fork of @diffusion-studio/vits-web for easier built-in PiperTTS use.","directories":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.1","typescript":"^5.2.2","vite-plugin-dts":"^3.9.1","@playwright/test":"^1.35.1"},"peerDependencies":{"onnxruntime-web":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/piper-tts-web_1.0.2_1722966780486_0.9784157987061775","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@mintplex-labs/piper-tts-web","version":"1.0.3","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn","piperTTS","AnythingLLM"],"author":{"name":"team@mintplexlabs.com"},"license":"MIT","_id":"@mintplex-labs/piper-tts-web@1.0.3","maintainers":[{"name":"tcarambat","email":"tim@mintplex.xyz"}],"homepage":"https://github.com/Mintplex-Labs/piper-tts-web#readme","dist":{"shasum":"4440621a675c16485bd6369cb7cb36bb41e52243","tarball":"https://registry.npmjs.org/@mintplex-labs/piper-tts-web/-/piper-tts-web-1.0.3.tgz","fileCount":18,"integrity":"sha512-vjYiEgigm0JHt9yKxj0euQd2eHIhtbGgWyeySLTPG+CdCH9RMf10WtczpeslboUYAvX5Eaxh6RMK+IuHU2rNhw==","signatures":[{"sig":"MEUCIEVXe73kt5gwS4NKi0CG7h7S1QYP/SXs2WtZjxBtLqe6AiEA4ig4NQ41oYlcRImuTl375JsiQAINfcDhIE7HgbZ7x8k=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":444694},"type":"module","types":"./dist/index.d.ts","module":"./dist/piper-tts-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/piper-tts-web.js"}},"private":false,"scripts":{"dev":"vite","test":"npx playwright test --project=chromium","build":"rm -r -f ./dist && tsc && vite build","verify":"yarn build && cd scripts && node refresh-and-validate.mjs && cd ..","preview":"vite preview"},"_npmUser":{"name":"tcarambat","email":"tim@mintplex.xyz"},"repository":{"url":"git@github.com:Mintplex-Labs/piper-tts-web.git","type":"git"},"description":"Fork of @diffusion-studio/vits-web for easier built-in PiperTTS use.","directories":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.1","typescript":"^5.2.2","vite-plugin-dts":"^3.9.1","@playwright/test":"^1.35.1","object-deep-compare":"^1.2.0"},"peerDependencies":{"onnxruntime-web":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/piper-tts-web_1.0.3_1722969910117_0.1552457207797635","host":"s3://npm-registry-packages"}},"1.0.4":{"name":"@mintplex-labs/piper-tts-web","version":"1.0.4","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn","piperTTS","AnythingLLM"],"author":{"name":"team@mintplexlabs.com"},"license":"MIT","_id":"@mintplex-labs/piper-tts-web@1.0.4","maintainers":[{"name":"tcarambat","email":"tim@mintplex.xyz"}],"homepage":"https://github.com/Mintplex-Labs/piper-tts-web#readme","dist":{"shasum":"016b196fa86dc8b616691dd381f3ca1939196444","tarball":"https://registry.npmjs.org/@mintplex-labs/piper-tts-web/-/piper-tts-web-1.0.4.tgz","fileCount":18,"integrity":"sha512-Y24X+CJaGXoY5HFPSstHvJI6408OAtw3Pmq2OIYwpRpcwLLbgadWg8l1ODHNkgpB0Ps5fS9PAAQB60fHA3Bdag==","signatures":[{"sig":"MEQCIAuxEBaGIRm3aFeiuAelSeOxtANJREuqriJsWZwRmExeAiBXxWTtzaU8z74tTSiTg3xHf9jQqtODFy2O2wOg0iQBQg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":492295},"type":"module","types":"./dist/index.d.ts","module":"./dist/piper-tts-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/piper-tts-web.js"}},"private":false,"scripts":{"dev":"vite","test":"npx playwright test --project=chromium","build":"rm -r -f ./dist && tsc && vite build","verify":"yarn build && cd scripts && node refresh-and-validate.mjs && cd ..","preview":"vite preview"},"_npmUser":{"name":"tcarambat","email":"tim@mintplex.xyz"},"repository":{"url":"git@github.com:Mintplex-Labs/piper-tts-web.git","type":"git"},"description":"Fork of @diffusion-studio/vits-web for easier built-in PiperTTS use.","directories":{},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.1","typescript":"^5.2.2","vite-plugin-dts":"^3.9.1","@playwright/test":"^1.35.1","object-deep-compare":"^1.2.0"},"peerDependencies":{"onnxruntime-web":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/piper-tts-web_1.0.4_1722988221571_0.8084857813775395","host":"s3://npm-registry-packages"}},"1.0.5":{"name":"@mintplex-labs/piper-tts-web","version":"1.0.5","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn","piperTTS","AnythingLLM"],"author":{"name":"team@mintplexlabs.com"},"license":"MIT","_id":"@mintplex-labs/piper-tts-web@1.0.5","maintainers":[{"name":"tcarambat","email":"tim@mintplex.xyz"},{"name":"kevinolearysoulfulguitarsolo","email":"marcello@mintplex.xyz"}],"homepage":"https://github.com/Mintplex-Labs/piper-tts-web#readme","bugs":{"url":"https://github.com/Mintplex-Labs/piper-tts-web/issues"},"dist":{"shasum":"d7f831e73ebb64b5d2a412eb8f1fc27c68c3f742","tarball":"https://registry.npmjs.org/@mintplex-labs/piper-tts-web/-/piper-tts-web-1.0.5.tgz","fileCount":16,"integrity":"sha512-1TtpoY562U7isDJdCBVcVNQjsyryWLRZYuUxyCNswsbPkaN3hMScJeG4d8AAwMkoCrkmrskSuD+5AsXpa16TUg==","signatures":[{"sig":"MEUCIQDyyXZPOORMwxDnVl8E409luuGYDEhwXH89fAgu9hr3JwIgab60HNFiBcbZFSOPrxiiqY1Zm1Jscx9Py1MyzofZJyI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":495515},"type":"module","types":"./dist/index.d.ts","module":"./dist/piper-tts-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/piper-tts-web.js"}},"gitHead":"dda33d6d8404960f57f5f1957d5c32e6dd16cd09","private":false,"scripts":{"dev":"vite","test":"npx playwright test --project=chromium","build":"rm -r -f ./dist && tsc && vite build","verify":"yarn build && cd scripts && node refresh-and-validate.mjs && cd ..","preview":"vite preview"},"_npmUser":{"name":"tcarambat","email":"tim@mintplex.xyz"},"repository":{"url":"git+ssh://git@github.com/Mintplex-Labs/piper-tts-web.git","type":"git"},"_npmVersion":"10.7.0","description":"Fork of @diffusion-studio/vits-web for easier built-in PiperTTS use.","directories":{},"_nodeVersion":"20.14.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.3.1","typescript":"^5.2.2","vite-plugin-dts":"^3.9.1","@playwright/test":"^1.35.1","object-deep-compare":"^1.2.0"},"peerDependencies":{"onnxruntime-web":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/piper-tts-web_1.0.5_1786488042769_0.4536901245700502","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2024-08-05T22:32:26.023Z","modified":"2026-08-17T17:38:37.405Z","1.0.0":"2024-08-05T22:32:26.249Z","1.0.1":"2024-08-06T17:51:40.430Z","1.0.2":"2024-08-06T17:53:00.968Z","1.0.3":"2024-08-06T18:45:10.388Z","1.0.4":"2024-08-06T23:50:21.748Z","1.0.5":"2026-08-11T22:40:42.936Z"},"bugs":{"url":"https://github.com/Mintplex-Labs/piper-tts-web/issues"},"author":{"name":"team@mintplexlabs.com"},"license":"MIT","homepage":"https://github.com/Mintplex-Labs/piper-tts-web#readme","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn","piperTTS","AnythingLLM"],"repository":{"url":"git+ssh://git@github.com/Mintplex-Labs/piper-tts-web.git","type":"git"},"description":"Fork of @diffusion-studio/vits-web for easier built-in PiperTTS use.","maintainers":[{"email":"tim@mintplex.xyz","name":"tcarambat"}],"readme":"> This is a fork of [@diffusion-studio/vits-web](https://github.com/diffusion-studio/vits-web) for use\n> of PiperTTS modules inside of a browser/Electron for AnythingLLM.\n> A big shout-out goes to [Rhasspy Piper](https://github.com/rhasspy/piper), who open-sourced all the currently available models > (MIT License) and to [@jozefchutka](https://github.com/jozefchutka) who came up with the wasm build steps.\n\n# Run PiperTTS based text-to-speech in the browser powered by the [ONNX Runtime](https://onnxruntime.ai/)\n\n## Difference from the original\n\n### Caching for client\n\nYou can leverage `TTSSessions` for a faster inference. (see index.js for implementation)\nCredit to [this PR](https://github.com/diffusion-studio/vits-web/pull/5) for the starting point.\n\n### Local WASM/Loading\n\nYou can define local WASM paths for the `ort` wasm as well as the phenomizer wasm and data file for faster local loading\nsince the client could be offline.\n\n### Note:\n\nThis is a frontend library and will not work with NodeJS.\n\n## Usage\nFirst of all, you need to install the library:\n```bash\nyarn add @mintplex-labs/piper-tts-web\n```\n\nThen you're able to import the library like this (ES only)\n```typescript\nimport * as tts from '@mintplex-labs/piper-tts-web';\n```\n\nNow you can start synthesizing speech!\n```typescript\nconst wav = await tts.predict({\n  text: \"Text to speech in the browser is amazing!\",\n  voiceId: 'en_US-hfc_female-medium',\n});\n\nconst audio = new Audio();\naudio.src = URL.createObjectURL(wav);\naudio.play();\n\n// as seen in /example with Web Worker\n```\n\n\nWith the initial run of the predict function you will download the model which will then be stored in your [Origin private file system](https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system). You can also do this manually in advance *(recommended)*, as follows:\n```typescript\nawait tts.download('en_US-hfc_female-medium', (progress) => {\n  console.log(`Downloading ${progress.url} - ${Math.round(progress.loaded * 100 / progress.total)}%`);\n});\n```\n\nThe predict function also accepts a download progress callback as the second argument (`tts.predict(..., console.log)`). <br>\n\nIf you want to know which models have already been stored, do the following\n```typescript\nconsole.log(await tts.stored());\n\n// will log ['en_US-hfc_female-medium']\n```\n\nYou can remove models from opfs by calling\n```typescript\nawait tts.remove('en_US-hfc_female-medium');\n\n// alternatively delete all\n\nawait tts.flush();\n```\n\nAnd last but not least use this snippet if you would like to retrieve all available voices:\n```typescript\nconsole.log(await tts.voices());\n\n// Hint: the key can be used as voiceId\n```\n\n### **That's it!** Happy coding :)\n","readmeFilename":"README.md"}