From 9313c022ac14244b53c3e3c55a0652350d067375 Mon Sep 17 00:00:00 2001 From: DrJJ <52052458+DrJJ@users.noreply.github.com> Date: Thu, 23 Sep 2021 16:07:04 -0500 Subject: [PATCH] updated some packages to new versions and added more info to README --- .../microphone-websocket-node-js-v2/README.md | 16 +++++++++++++++ .../package-lock.json | 20 +++++++++---------- .../package.json | 3 +-- 3 files changed, 27 insertions(+), 12 deletions(-) diff --git a/examples/microphone-websocket-node-js-v2/README.md b/examples/microphone-websocket-node-js-v2/README.md index 3b48d301..0f9b460b 100644 --- a/examples/microphone-websocket-node-js-v2/README.md +++ b/examples/microphone-websocket-node-js-v2/README.md @@ -39,3 +39,19 @@ For Firefox you need to read the actual sample rate and pass it in the body of t
![Screenshot of the microphone capture app running.](./mic-capture.PNG) *Screenshot of the microphone capture app running.* + +## Tweaks ## + +You can control the delay and the amount of corrections by modifying the `minimumDelay` parameter in file microphone-capture.js + +``` +websocket: { adHoc: true, minimumDelay: 175, useSTOMP: false }, +``` + +`minimumDelay` = 0 will give fastest response but also most corrections. You can increase the value of `minimumDelay` if you do not mind some delay but would like to see fewer rewrites of the text. + +## API ## + +The core API used is documented here: https://console.voicegain.ai/api-documentation#operation/asrTranscribeAsyncPost + +If you want to know the format of the messages sent over webscoket look here: https://console.voicegain.ai/api-documentation#operation/wsTranscribeWords diff --git a/examples/microphone-websocket-node-js-v2/package-lock.json b/examples/microphone-websocket-node-js-v2/package-lock.json index 4467c648..7ba557a9 100644 --- a/examples/microphone-websocket-node-js-v2/package-lock.json +++ b/examples/microphone-websocket-node-js-v2/package-lock.json @@ -1,7 +1,7 @@ { "name": "microphone-websocket", "version": "1.0.0", - "lockfileVersion": 1, + "lockfileVersion": 2, "requires": true, "dependencies": { "@sindresorhus/is": { @@ -285,18 +285,18 @@ } }, "got": { - "version": "11.5.0", - "resolved": "https://registry.npmjs.org/got/-/got-11.5.0.tgz", - "integrity": "sha512-vOZEcEaK0b6x11uniY0HcblZObKPRO75Jvz53VKuqGSaKCM/zEt0sj2LGYVdqDYJzO3wYdG+FPQQ1hsgoXy7vQ==", + "version": "11.8.2", + "resolved": "https://registry.npmjs.org/got/-/got-11.8.2.tgz", + "integrity": "sha512-D0QywKgIe30ODs+fm8wMZiAcZjypcCodPNuMz5H9Mny7RJ+IjJ10BdmGW7OM7fHXP+O7r6ZwapQ/YQmMSvB0UQ==", "requires": { - "@sindresorhus/is": "^3.0.0", + "@sindresorhus/is": "^4.0.0", "@szmarczak/http-timer": "^4.0.5", "@types/cacheable-request": "^6.0.1", "@types/responselike": "^1.0.0", "cacheable-lookup": "^5.0.3", "cacheable-request": "^7.0.1", "decompress-response": "^6.0.0", - "http2-wrapper": "^1.0.0-beta.4.8", + "http2-wrapper": "^1.0.0-beta.5.2", "lowercase-keys": "^2.0.0", "p-cancelable": "^2.0.0", "responselike": "^2.0.0" @@ -413,9 +413,9 @@ "integrity": "sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw==" }, "normalize-url": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.0.tgz", - "integrity": "sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==" + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/normalize-url/-/normalize-url-4.5.1.tgz", + "integrity": "sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==" }, "object-assign": { "version": "4.1.1", @@ -603,4 +603,4 @@ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" } } -} +} \ No newline at end of file diff --git a/examples/microphone-websocket-node-js-v2/package.json b/examples/microphone-websocket-node-js-v2/package.json index 47770c22..65354ca3 100644 --- a/examples/microphone-websocket-node-js-v2/package.json +++ b/examples/microphone-websocket-node-js-v2/package.json @@ -6,9 +6,8 @@ "dependencies": { "cors": "^2.8.5", "express": "^4.17.1", - "got": "^11.5.0" + "got": "^11.8.2" }, - "devDependencies": {}, "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node server.js"