Skip to content

Commit

Permalink
demo
Browse files Browse the repository at this point in the history
  • Loading branch information
laves committed Nov 22, 2023
1 parent 0cc1747 commit 32f7554
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
7 changes: 6 additions & 1 deletion demo/web/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@
<th>startSec</th>
<th>endSec</th>
<th>confidence</th>
<th>speaker tag</th>
</tr>
`;
words.forEach(obj => {
Expand All @@ -128,6 +129,7 @@
<td>${obj.startSec.toFixed(3)}</td>
<td>${obj.endSec.toFixed(3)}</td>
<td>${obj.confidence.toFixed(3)}</td>
<td>${obj.speakerTag}</td>
</tr>
`
});
Expand All @@ -140,7 +142,10 @@
leopard = await LeopardWeb.LeopardWorker.create(
accessKey,
leopardModel,
{enableAutomaticPunctuation: true}
{
enableAutomaticPunctuation: true,
enableDiarization: true
}
);
document.getElementById("control").style.display = "block";
writeMessage("Leopard worker ready!");
Expand Down
4 changes: 2 additions & 2 deletions demo/web/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "leopard-web-demo",
"version": "1.0.0",
"version": "2.0.0",
"description": "A basic demo to show how to use Leopard for web browsers, using the IIFE version of the library",
"main": "index.js",
"private": true,
Expand All @@ -17,7 +17,7 @@
"author": "Picovoice Inc",
"license": "Apache-2.0",
"dependencies": {
"@picovoice/leopard-web": "~1.2.2",
"@picovoice/leopard-web": "file:../../binding/web",
"@picovoice/web-voice-processor": "~4.0.8"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion demo/web/scripts/run_demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const fs = require("fs");
const path = require("path");
const testData = require("../../../resources/.test/test_data.json");

availableLanguages = testData["tests"]["parameters"].map((x) => x["language"]);
availableLanguages = testData["tests"]["language_tests"].map((x) => x["language"]);

const language = process.argv.slice(2)[0];
if (!language) {
Expand Down
6 changes: 2 additions & 4 deletions demo/web/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@
# yarn lockfile v1


"@picovoice/leopard-web@~1.2.2":
version "1.2.2"
resolved "https://registry.yarnpkg.com/@picovoice/leopard-web/-/leopard-web-1.2.2.tgz#6759ca4333a28d356b6a9fa4cb7c964bd8928363"
integrity sha512-/YzFi5O+j+qx4+3vVXPA8hpjaN/Z3ozUkv50GN2NgmVb7VXaLqrAs3Yr+zgFRzejJSzJ8Uu8edn6f4GHp6+n7g==
"@picovoice/leopard-web@file:../../binding/web":
version "2.0.0"
dependencies:
"@picovoice/web-utils" "=1.3.1"

Expand Down

0 comments on commit 32f7554

Please sign in to comment.