mirror of
https://github.com/neodyland/sbv2-api.git
synced 2025-12-28 01:52:59 +00:00
small fix
This commit is contained in:
@@ -1,51 +0,0 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Style Bert VITS2 Web</title>
|
||||
<script type="importmap">
|
||||
{
|
||||
"imports": {
|
||||
"onnxruntime-web": "https://cdn.jsdelivr.net/npm/onnxruntime-web@1.19.2/dist/ort.all.min.mjs",
|
||||
"sbv2": "https://cdn.jsdelivr.net/npm/sbv2@0.1.1+esm"
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<script type="module" async defer>
|
||||
import { ModelHolder } from "sbv2";
|
||||
await ModelHolder.globalInit(
|
||||
await (
|
||||
await fetch("https://esm.sh/sbv2@0.1.1/dist/sbv2_wasm_bg.wasm", { cache: "force-cache" })
|
||||
).arrayBuffer(),
|
||||
);
|
||||
const holder = await ModelHolder.create(
|
||||
await (
|
||||
await fetch("/models/tokenizer.json", { cache: "force-cache" })
|
||||
).text(),
|
||||
await (
|
||||
await fetch("/models/deberta.onnx", { cache: "force-cache" })
|
||||
).arrayBuffer(),
|
||||
);
|
||||
if (typeof window.onready == "function") {
|
||||
window.onready(holder);
|
||||
}
|
||||
</script>
|
||||
<script type="module" async defer>
|
||||
window.onready = async function (holder) {
|
||||
await holder.load(
|
||||
"amitaro",
|
||||
await (await fetch("/models/amitaro.sbv2")).arrayBuffer(),
|
||||
);
|
||||
const wave = await holder.synthesize("amitaro", "おはよう");
|
||||
console.log(wave);
|
||||
};
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in New Issue
Block a user