Update example on readme

This commit is contained in:
msqr1
2024-05-15 12:18:46 -07:00
parent 79956b1300
commit d4f0504e8c
2 changed files with 3 additions and 4 deletions

View File

@@ -19,10 +19,9 @@
- Result are logged to the console. - Result are logged to the console.
- Copied from *examples/fromMic.html* - Copied from *examples/fromMic.html*
```html ```html
<!DOCTYPE html>
<html> <html>
<head> <head>
<script src="https://cdn.jsdelivr.net/gh/msqr1/Vosklet@1.0.3/Vosklet.min.js"></script> <script src="https://cdn.jsdelivr.net/gh/msqr1/Vosklet@1.0.3/Vosklet.min.js" async defer></script>
<script> <script>
async function start() { async function start() {
// Make sure sample rate matches that in the training data // Make sure sample rate matches that in the training data
@@ -39,7 +38,7 @@
})) }))
// Load Vosklet module, model and recognizer // Load Vosklet module, model and recognizer
let module = await loadVosklet() 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) let recognizer = await module.createRecognizer(model, 16000)
// Listen for result and partial result // Listen for result and partial result
recognizer.addEventListener("result", ev => { recognizer.addEventListener("result", ev => {

View File

@@ -1,6 +1,6 @@
{ {
"name": "vosklet", "name": "vosklet",
"version": "1.0.2", "version": "1.0.3",
"description": "A speech recognizer that can run on the browser, inspired by vosk-browser", "description": "A speech recognizer that can run on the browser, inspired by vosk-browser",
"main": "Vosklet.js", "main": "Vosklet.js",
"directories": { "directories": {