Skip to content

Commit c64ae47

Browse files
committed
1.2.1
1 parent 9dd980c commit c64ae47

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Examples/fromFile.html

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://cdn.jsdelivr.net/gh/msqr1/[email protected].0/Examples/Vosklet.js" async defer></script>
4+
<script src="https://cdn.jsdelivr.net/gh/msqr1/[email protected].1/Examples/Vosklet.js" async defer></script>
55
<script>
66
async function start() {
77
// All data is collected and transfered to the main thread so the AudioContext won't output anything. Set sinkId type to none to save power
88
let ctx = new AudioContext({sinkId: {type: "none"}});
99
let module = await loadVosklet();
10-
let model = await module.createModel("https://ccoreilly.github.io/vosk-browser/models/vosk-model-small-en-us-0.15.tar.gz", "English", "vosk-model-small-en-us-0.15")
10+
let model = await module.createModel("https://ccoreilly.github.io/vosk-browser/models/vosk-model-small-en-us-0.15.tar.gz", "English", "vosk-model-small-en-us-0.15");
1111
let recognizer = await module.createRecognizer(model, ctx.sampleRate);
1212

1313
// Listen for result and partial result
14-
recognizer.addEventListener("result", ev => console.log("Result: ", ev.detail))
14+
recognizer.addEventListener("result", ev => console.log("Result: ", ev.detail));
1515
recognizer.addEventListener("partialResult", ev => console.log("Partial result: ", ev.detail));
1616

1717
// Fetch, decode, and recognize the .wav

Examples/fromMic.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<script src="https://cdn.jsdelivr.net/gh/msqr1/[email protected].0/Examples/Vosklet.js" async defer></script>
4+
<script src="https://cdn.jsdelivr.net/gh/msqr1/[email protected].1/Examples/Vosklet.js" async defer></script>
55
<script>
66
async function start() {
77
// All data is collected and transfered to the main thread so the AudioContext won't output anything. Set sinkId type to none to save power

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Overview
2-
- A lightweight, up to date speech recognizer in the browser with total brotlied (used by JSDelivr) size of **under a megabyte** (616 KB)
2+
- A fast, lightweight, actively maintained speech recognizer in the browser with total brotlied (used by JSDelivr) size of **under a megabyte** (614 KB)
33
- Live Demo (ASR in 20 languages): https://msqr1-github-io.pages.dev/Vosklet
44
- Inspired by [vosk-browser](https://github.com/ccoreilly/vosk-browser)
55

@@ -12,7 +12,7 @@
1212
- Include model cache path management
1313
- Include model cache ID management (for updates)
1414
- Wraps all Vosk's functionaly
15-
- Faster than vosk-browser
15+
- Faster and lighter than vosk-browser
1616

1717
# Basic usage (microphone recognition in English)
1818
- Using JsDelivr CDN
@@ -23,7 +23,7 @@
2323
<!DOCTYPE html>
2424
<html>
2525
<head>
26-
<script src="https://cdn.jsdelivr.net/gh/msqr1/[email protected].0/Examples/Vosklet.js" async defer></script>
26+
<script src="https://cdn.jsdelivr.net/gh/msqr1/[email protected].1/Examples/Vosklet.js" async defer></script>
2727
<script>
2828
async function start() {
2929
// All data is collected and transfered to the main thread so the AudioContext won't output anything. Set sinkId type to none to save power
@@ -41,11 +41,11 @@
4141
4242
// Load Vosklet module, model and recognizer
4343
let module = await loadVosklet();
44-
let model = await module.createModel("https://ccoreilly.github.io/vosk-browser/models/vosk-model-small-en-us-0.15.tar.gz","English","vosk-model-small-en-us-0.15")
44+
let model = await module.createModel("https://ccoreilly.github.io/vosk-browser/models/vosk-model-small-en-us-0.15.tar.gz","English","vosk-model-small-en-us-0.15");
4545
let recognizer = await module.createRecognizer(model, ctx.sampleRate);
4646
4747
// Listen for result and partial result
48-
recognizer.addEventListener("result", ev => console.log("Result: ", ev.detail))
48+
recognizer.addEventListener("result", ev => console.log("Result: ", ev.detail));
4949
recognizer.addEventListener("partialResult", ev => console.log("Partial result: ", ev.detail));
5050
5151
// Create a transferer node to get audio data on the main thread

0 commit comments

Comments
 (0)