{"_id":"@diffusionstudio/vits-web","_rev":"3-22b3487857fc857d9c0aee6660661b4b","name":"@diffusionstudio/vits-web","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.0":{"name":"@diffusionstudio/vits-web","version":"1.0.0","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn"],"author":{"name":"mail@konstantinpaulus.de"},"license":"MIT","_id":"@diffusionstudio/vits-web@1.0.0","maintainers":[{"name":"k9p5","email":"konstantin@diffusion.studio"}],"homepage":"https://github.com/diffusion-studio/vits-web#readme","bugs":{"url":"https://github.com/diffusion-studio/vits-web/issues"},"dist":{"shasum":"868b06aa7a84ee439ce4d07c77d76e4b2632e015","tarball":"https://registry.npmjs.org/@diffusionstudio/vits-web/-/vits-web-1.0.0.tgz","fileCount":14,"integrity":"sha512-17gI/8XX8kEJz52V9uzzkyNM5m2bYXPpm3AkP5RXgl6Ice6/Y98pUejUr4u0z6Rs21kMSCnEfPW8tmRO5nnwOg==","signatures":[{"sig":"MEYCIQCjginB/saxuJ/zy4u10iJDWMA6xfEXCn/yTDFlAhOfMAIhAIvdGe05ayIzIXuUs43W10Yu4oUCjyVcakCJhIiCpOUh","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141227},"type":"module","types":"./dist/index.d.ts","module":"./dist/vits-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/vits-web.js"}},"gitHead":"5b558c114b11fadbab8f2391e485751d511ee241","private":false,"scripts":{"dev":"vite","test":"npx playwright test --project=chromium","build":"rm -r -f ./dist && tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"k9p5","email":"konstantin@diffusion.studio"},"repository":{"url":"git+ssh://git@github.com/diffusion-studio/vits-web.git","type":"git"},"_npmVersion":"10.8.1","description":"Web api for using VITS based models in the browser!","directories":{},"_nodeVersion":"22.3.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"},"peerDependencies":{"onnxruntime-web":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/vits-web_1.0.0_1720274120659_0.01745474279956727","host":"s3://npm-registry-packages"}},"1.0.1":{"name":"@diffusionstudio/vits-web","version":"1.0.1","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn"],"author":{"name":"mail@konstantinpaulus.de"},"license":"MIT","_id":"@diffusionstudio/vits-web@1.0.1","maintainers":[{"name":"k9p5","email":"konstantin@diffusion.studio"}],"homepage":"https://github.com/diffusion-studio/vits-web#readme","bugs":{"url":"https://github.com/diffusion-studio/vits-web/issues"},"dist":{"shasum":"7d6337b384769862e8783f4993526bbe408bee3f","tarball":"https://registry.npmjs.org/@diffusionstudio/vits-web/-/vits-web-1.0.1.tgz","fileCount":13,"integrity":"sha512-ri3M410l+FvJCvQMsOL1A2Fdw5qPJnyitRdbOLJvzeH51/bJB/v7AvSoD4irakIKcs2VABPN7hankAyd3im+Ig==","signatures":[{"sig":"MEUCIEg9oxTsw5F7yWJSB640dyuzVXXmnrrQ9hg/eKfxXrwPAiEAslNupLTtxqxaV0FopXUFGcdEaoSWBp2JaVPCKYgUMpc=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141225},"type":"module","types":"./dist/index.d.ts","module":"./dist/vits-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/vits-web.js"}},"gitHead":"a159740c6fa0ffa6610ad20781fb62db0b9517c3","private":false,"scripts":{"dev":"vite","test":"npx playwright test --project=chromium","build":"rm -r -f ./dist && tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"k9p5","email":"konstantin@diffusion.studio"},"repository":{"url":"git+ssh://git@github.com/diffusion-studio/vits-web.git","type":"git"},"_npmVersion":"10.8.1","description":"Web api for using VITS based models in the browser!","directories":{},"_nodeVersion":"22.3.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"},"peerDependencies":{"onnxruntime-web":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/vits-web_1.0.1_1720384820593_0.7881999258369754","host":"s3://npm-registry-packages"}},"1.0.2":{"name":"@diffusionstudio/vits-web","version":"1.0.2","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn"],"author":{"name":"mail@konstantinpaulus.de"},"license":"MIT","_id":"@diffusionstudio/vits-web@1.0.2","maintainers":[{"name":"k9p5","email":"konstantin@diffusion.studio"}],"homepage":"https://github.com/diffusion-studio/vits-web#readme","bugs":{"url":"https://github.com/diffusion-studio/vits-web/issues"},"dist":{"shasum":"850bad96177cde6bf87d9e1209a93e333d6ed2e6","tarball":"https://registry.npmjs.org/@diffusionstudio/vits-web/-/vits-web-1.0.2.tgz","fileCount":14,"integrity":"sha512-nQKmR5gk6DsZmhf1Id7DZdMXiwnWOKZja+JfYpiVTwh0o8elMqfHu7WqZ9d5Ikd2PPzK3PqYixPKnxfhCnVpyw==","signatures":[{"sig":"MEYCIQCMycFdAnSBkxJWaFhqNfSgZzryuXOdQxPEkcEPALq3LQIhAIYqEhK7jSbJDxXM5sWNMsp+M8MnO7u+cH4kD5EJnzHV","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":141009},"type":"module","types":"./dist/index.d.ts","module":"./dist/vits-web.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/vits-web.js"}},"gitHead":"f1762b75c4811ad1d0af5fe5b82d4d5c2835c396","private":false,"scripts":{"dev":"vite","test":"npx playwright test --project=chromium","build":"rm -r -f ./dist && tsc && vite build","preview":"vite preview"},"_npmUser":{"name":"k9p5","email":"konstantin@diffusion.studio"},"repository":{"url":"git+ssh://git@github.com/diffusion-studio/vits-web.git","type":"git"},"_npmVersion":"10.8.1","description":"Web api for using VITS based models in the browser!","directories":{},"_nodeVersion":"22.3.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"},"peerDependencies":{"onnxruntime-web":"^1.18.0"},"_npmOperationalInternal":{"tmp":"tmp/vits-web_1.0.2_1720427763261_0.5964093093316427","host":"s3://npm-registry-packages"}},"1.0.3":{"name":"@diffusionstudio/vits-web","private":false,"version":"1.0.3","description":"Web api for using VITS based models in the browser!","type":"module","module":"./dist/vits-web.js","types":"./dist/index.d.ts","author":{"name":"mail@konstantinpaulus.de"},"exports":{".":{"import":"./dist/vits-web.js","types":"./dist/index.d.ts"}},"publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+ssh://git@github.com/diffusionstudio/vits-web.git"},"bugs":{"url":"https://github.com/diffusionstudio/vits-web/issues"},"homepage":"https://huggingface.co/spaces/diffusionstudio/vits-web","license":"MIT","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn"],"scripts":{"dev":"vite","build":"rm -r -f ./dist && tsc && vite build","preview":"vite preview","format":"npx @biomejs/biome format --write ./src","test":"npx playwright test --project=chromium"},"devDependencies":{"@biomejs/biome":"1.8.3","@playwright/test":"^1.35.1","typescript":"^5.2.2","vite":"^5.3.1","vite-plugin-dts":"^3.9.1"},"dependencies":{"onnxruntime-web":"1.18.0"},"_id":"@diffusionstudio/vits-web@1.0.3","gitHead":"c1509fcae36333d6c2aef08bfd0826727a0d2eea","_nodeVersion":"20.17.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-xvOmc3CTWXGKbyiLbsrMczNArm7Z0Bi0h3pij0RTX6SytY/NSqd7h5DdPNUUhBt0nSjWGbo5RIrJLoCQTUQ0nQ==","shasum":"00513a3881640100bc1f27587d3d3c2ab801d5e9","tarball":"https://registry.npmjs.org/@diffusionstudio/vits-web/-/vits-web-1.0.3.tgz","fileCount":14,"unpackedSize":154825,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHGRRC8sReOSxviHxnXWMOpFT3qYWrm+o8oz/nFRXFZrAiEAqG7hcPcjLKzxCmslFpwEj/NtsNa2A7WwCxppmrVjdqQ="}]},"_npmUser":{"name":"k9p5","email":"konstantin@diffusion.studio"},"directories":{},"maintainers":[{"name":"k9p5","email":"konstantin@diffusion.studio"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/vits-web_1.0.3_1725868339922_0.29889646794586877"},"_hasShrinkwrap":false}},"time":{"created":"2024-07-06T13:55:20.588Z","modified":"2024-09-09T07:52:20.364Z","1.0.0":"2024-07-06T13:55:20.852Z","1.0.1":"2024-07-07T20:40:20.747Z","1.0.2":"2024-07-08T08:36:03.458Z","1.0.3":"2024-09-09T07:52:20.165Z"},"bugs":{"url":"https://github.com/diffusionstudio/vits-web/issues"},"author":{"name":"mail@konstantinpaulus.de"},"license":"MIT","homepage":"https://huggingface.co/spaces/diffusionstudio/vits-web","keywords":["vits","webassembly","emscripten","audio","browser","tts","text-to-speech","speech synthesis","web ai","webnn"],"repository":{"type":"git","url":"git+ssh://git@github.com/diffusionstudio/vits-web.git"},"description":"Web api for using VITS based models in the browser!","maintainers":[{"name":"k9p5","email":"konstantin@diffusion.studio"}],"readme":"[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://github.com/diffusion-studio/ffmpeg-js/graphs/commit-activity)\n[![Website shields.io](https://img.shields.io/website-up-down-green-red/http/shields.io.svg)](https://diffusion.studio)\n[![Discord](https://badgen.net/badge/icon/discord?icon=discord&label)](https://discord.gg/n3mpzfejAb)\n[![GitHub license](https://badgen.net/github/license/Naereen/Strapdown.js)](https://github.com/diffusion-studio/ffmpeg-js/blob/main/LICENSE)\n[![TypeScript](https://badgen.net/badge/icon/typescript?icon=typescript&label)](https://typescriptlang.org)\n\n# Run VITS based text-to-speech in the browser powered by the [ONNX Runtime](https://onnxruntime.ai/)\n\nA 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## Usage\nFirst of all, you need to install the library:\n```bash\nnpm i @diffusionstudio/vits-web\n```\n\nThen you're able to import the library like this (ES only)\n```typescript\nimport * as tts from '@diffusionstudio/vits-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\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"}