Evade CORS restriction in examples, and put note on self-hosting file.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
<html>
|
||||
<head>
|
||||
<script src="https://cdn.jsdelivr.net/gh/msqr1/Vosklet@1.0.2/Vosklet.js" async defer></script>
|
||||
<script src="Vosklet.js" async defer>
|
||||
// Has to host this file on your own server, because Worker constructor doesn't allow CDN
|
||||
</script>
|
||||
<script>
|
||||
async function start() {
|
||||
// Make sure sample rate matches that in the training data
|
||||
@@ -17,7 +19,7 @@
|
||||
}))
|
||||
// Load Vosklet module, model and recognizer
|
||||
let module = await loadVosklet()
|
||||
let model = await module.createModel("https://github.com/msqr1/Vosklet/raw/main/examples/en-model.tgz","model","ID")
|
||||
let model = await module.createModel("https://raw.githubusercontent.com/msqr1/Vosklet/main/examples/en-model.tgz","model","ID")
|
||||
let recognizer = await module.createRecognizer(model, 16000)
|
||||
// Listen for result and partial result
|
||||
recognizer.addEventListener("result", ev => {
|
||||
|
||||
Reference in New Issue
Block a user