vora-ai 0.1.30 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/wake_word/hey_vora.onnx +0 -0
- package/assets/wake_word/main.py +82 -0
- package/assets/wake_word/requirements.txt +3 -0
- package/dist/.buildstamp +1 -1
- package/dist/{agents-DOYdiGvK.js → agents-BPE9smUE.js} +1 -1
- package/dist/{agents-5LWDS5tj.js → agents-DBhc96_t.js} +1 -1
- package/dist/{auth-choice-v6MdxBj1.js → auth-choice-BTphyv_f.js} +1 -1
- package/dist/{auth-choice-PGeO3699.js → auth-choice-C0gXf2K-.js} +1 -1
- package/dist/{auth-choice-DHjtH15v.js → auth-choice-jxMlBzZ3.js} +1 -1
- package/dist/build-info.json +3 -3
- package/dist/canvas-host/a2ui/.bundle.hash +1 -1
- package/dist/canvas-host/a2ui/a2ui.bundle.js +3 -14896
- package/dist/cli-startup-metadata.json +1 -1
- package/dist/{command-registry-BvqI2M8k.js → command-registry-CCl6CbX7.js} +1 -1
- package/dist/{command-registry-B8KBasmI.js → command-registry-CE4xrLg3.js} +7 -7
- package/dist/{completion-cli-CKEuFQq8.js → completion-cli-BbCm0nYV.js} +2 -2
- package/dist/completion-cli-CynKYN3b.js +2 -0
- package/dist/{config-cli-DqAShT2l.js → config-cli-CVlcCnvy.js} +1 -1
- package/dist/{configure-CQ_21OKd.js → configure-D0riWlva.js} +1 -1
- package/dist/{configure-Cqy_19d8.js → configure-DRRMF-pT.js} +3 -3
- package/dist/{doctor-completion-C2QwvuhE.js → doctor-completion-QFB1K6sB.js} +1 -1
- package/dist/entry.js +1 -1
- package/dist/extensions/telegram/.vora-runtime-deps-stamp.json +1 -1
- package/dist/{gateway-cli-V_QjYMBR.js → gateway-cli-xqSO3pjK.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/{model-picker-DdvQOBhA.js → model-picker-DKKW4CWw.js} +1 -1
- package/dist/{model-picker-C8qr68-I.js → model-picker-DmdJ73EV.js} +1 -1
- package/dist/{model-picker.runtime-dQ3AaeYa.js → model-picker.runtime-BWZ4i5KD.js} +1 -1
- package/dist/model-picker.runtime.js +1 -1
- package/dist/{models-CrMO4Cym.js → models-Bhu5SDxd.js} +3 -3
- package/dist/{models-MAIkmFEc.js → models-DtGMepfg.js} +1 -1
- package/dist/{models-cli-C0Ys2nAa.js → models-cli-CWj3ICt6.js} +1 -1
- package/dist/{onboard-DGk--B6Q.js → onboard-Betj3xGG.js} +2 -2
- package/dist/onboard-custom-CTATFfmu.js +2 -0
- package/dist/{onboard-custom-PIVjpld1.js → onboard-custom-CvCCdk91.js} +1 -1
- package/dist/{program-BQBM0g9s.js → program-C6lUfgSY.js} +1 -1
- package/dist/{prompt-select-styled-683-Q4kE.js → prompt-select-styled-CFNgPFk1.js} +1 -1
- package/dist/{provider-auth-choice-C2X81d9L.js → provider-auth-choice-uRVlTDrY.js} +2 -2
- package/dist/{provider-auth-login.runtime-DDeOgSrL.js → provider-auth-login.runtime-ClrHAUIq.js} +1 -1
- package/dist/provider-auth-login.runtime.js +1 -1
- package/dist/{provider-oauth-flow-BIJAKHvV.js → provider-oauth-flow-DXCrl1Wj.js} +6 -2
- package/dist/{register.agent-DeaN0bxI.js → register.agent-DQ2Sga2s.js} +1 -1
- package/dist/{register.configure-BkOEE4cQ.js → register.configure-5txO3kT2.js} +1 -1
- package/dist/{register.maintenance-C5QTUgo2.js → register.maintenance-Bd4SFUq5.js} +1 -1
- package/dist/{register.onboard-Cxv3OouW.js → register.onboard-FfONEb4b.js} +1 -1
- package/dist/{register.setup-cgVf6uaI.js → register.setup-CrSujtFS.js} +1 -1
- package/dist/{register.subclis-B-yG_OWQ.js → register.subclis-DTSd6rRA.js} +5 -5
- package/dist/{register.subclis-DQPYCJib.js → register.subclis-bg8xfWgT.js} +1 -1
- package/dist/{run-main-CiW1nwJI.js → run-main-H5V-R3se.js} +9 -9
- package/dist/{setup-Bc6U01ev.js → setup-CPEBJAEL.js} +4 -4
- package/dist/{setup.finalize-Dp3qOl4N.js → setup.finalize-CmDHcwpL.js} +2 -2
- package/dist/{update-cli-cV7JEMaK.js → update-cli-DtunxrhT.js} +3 -3
- package/dist/{voice-cli-PudjLBLc.js → voice-cli-DBxi2-Ph.js} +250 -0
- package/package.json +1 -1
- package/dist/completion-cli-CYA-wuRD.js +0 -2
- package/dist/onboard-custom-MiPF3A2Q.js +0 -2
|
Binary file
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import argparse
|
|
3
|
+
import pyaudio
|
|
4
|
+
import numpy as np
|
|
5
|
+
import time
|
|
6
|
+
import sys
|
|
7
|
+
from openwakeword.model import Model
|
|
8
|
+
|
|
9
|
+
FORMAT = pyaudio.paInt16
|
|
10
|
+
CHANNELS = 1
|
|
11
|
+
RATE = 16000
|
|
12
|
+
CHUNK = 1280
|
|
13
|
+
|
|
14
|
+
def main():
|
|
15
|
+
parser = argparse.ArgumentParser(description="VORA AI Wake Word - OpenWakeWord Engine")
|
|
16
|
+
parser.add_argument("--model", type=str, default="hey_vora.onnx", help="Wake word model path or name")
|
|
17
|
+
parser.add_argument("--threshold", type=float, default=0.5, help="Detection threshold")
|
|
18
|
+
args = parser.parse_args()
|
|
19
|
+
|
|
20
|
+
# Disable stdout buffering to ensure Node.js sidecar receives events immediately
|
|
21
|
+
sys.stdout.reconfigure(line_buffering=True)
|
|
22
|
+
|
|
23
|
+
# Initialize the openWakeWord model
|
|
24
|
+
try:
|
|
25
|
+
owwModel = Model(wakeword_models=[args.model], inference_framework="onnx")
|
|
26
|
+
except Exception as e:
|
|
27
|
+
print(f"ERROR: Failed to load model {args.model}: {e}")
|
|
28
|
+
return
|
|
29
|
+
|
|
30
|
+
print("READY", flush=True)
|
|
31
|
+
|
|
32
|
+
audio = pyaudio.PyAudio()
|
|
33
|
+
|
|
34
|
+
try:
|
|
35
|
+
mic_stream = audio.open(
|
|
36
|
+
format=FORMAT,
|
|
37
|
+
channels=CHANNELS,
|
|
38
|
+
rate=RATE,
|
|
39
|
+
input=True,
|
|
40
|
+
frames_per_buffer=CHUNK
|
|
41
|
+
)
|
|
42
|
+
except Exception as e:
|
|
43
|
+
print(f"ERROR: Failed to open microphone: {e}")
|
|
44
|
+
return
|
|
45
|
+
|
|
46
|
+
last_detection_time = 0
|
|
47
|
+
loop_counter = 0
|
|
48
|
+
|
|
49
|
+
try:
|
|
50
|
+
while True:
|
|
51
|
+
# Read audio chunk
|
|
52
|
+
data = mic_stream.read(CHUNK, exception_on_overflow=False)
|
|
53
|
+
audio_data = np.frombuffer(data, dtype=np.int16)
|
|
54
|
+
|
|
55
|
+
# Predict
|
|
56
|
+
prediction = owwModel.predict(audio_data)
|
|
57
|
+
|
|
58
|
+
# Calculate and output Volume level for visual indicator (every 5 loops = ~400ms)
|
|
59
|
+
loop_counter += 1
|
|
60
|
+
if loop_counter % 5 == 0:
|
|
61
|
+
rms = np.sqrt(np.mean(np.square(audio_data, dtype=np.float32)))
|
|
62
|
+
# Int16 max is 32768. We multiply by a sensitivity factor (e.g. 15) to make standard speech visible
|
|
63
|
+
vol = min(100, int((rms / 32768.0) * 100 * 15))
|
|
64
|
+
print(f"VOLUME:{vol}", flush=True)
|
|
65
|
+
|
|
66
|
+
# Since openwakeword evaluates 80ms chunks, tracking time here guarantees latency measurement.
|
|
67
|
+
current_time = time.time()
|
|
68
|
+
for mdl, score in prediction.items():
|
|
69
|
+
if score > args.threshold:
|
|
70
|
+
if current_time - last_detection_time > 1.0: # 1 sec debounce
|
|
71
|
+
print(f"TRIGGER:{mdl}:{score:.2f}:{current_time}", flush=True)
|
|
72
|
+
last_detection_time = current_time
|
|
73
|
+
|
|
74
|
+
except KeyboardInterrupt:
|
|
75
|
+
pass
|
|
76
|
+
finally:
|
|
77
|
+
mic_stream.stop_stream()
|
|
78
|
+
mic_stream.close()
|
|
79
|
+
audio.terminate()
|
|
80
|
+
|
|
81
|
+
if __name__ == "__main__":
|
|
82
|
+
main()
|
package/dist/.buildstamp
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"builtAt":
|
|
1
|
+
{"builtAt":1776418367570,"head":"058edae2a1156174280e4ed6c3693441ef89d316"}
|
|
@@ -20,7 +20,7 @@ import { t as createClackPrompter } from "./clack-prompter-B8V1oiO-.js";
|
|
|
20
20
|
import { i as loadAgentIdentity, n as buildAgentSummaries, o as pruneAgentConfig, r as findAgentEntryIndex, t as applyAgentConfig } from "./agents.config-BGhUmYH2.js";
|
|
21
21
|
import { a as describeBinding, i as buildChannelBindings, n as requireValidConfigSnapshot, o as parseBindingSpecs, r as applyAgentBindings, s as removeAgentBindings, t as requireValidConfigFileSnapshot$1 } from "./config-validation-D7f26W3B.js";
|
|
22
22
|
import { t as promptAuthChoiceGrouped } from "./auth-choice-prompt-BcfwN3oG.js";
|
|
23
|
-
import { n as applyAuthChoice, t as warnIfModelConfigLooksOff } from "./auth-choice-
|
|
23
|
+
import { n as applyAuthChoice, t as warnIfModelConfigLooksOff } from "./auth-choice-C0gXf2K-.js";
|
|
24
24
|
import { r as setupChannels } from "./onboard-channels-DOoLRm3q.js";
|
|
25
25
|
import path from "node:path";
|
|
26
26
|
import fs from "node:fs/promises";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import "./agent-scope-Dka5AEcV.js";
|
|
2
2
|
import "./agents.config-BGhUmYH2.js";
|
|
3
3
|
import "./config-validation-D7f26W3B.js";
|
|
4
|
-
import { t as agentsListCommand } from "./agents-
|
|
4
|
+
import { t as agentsListCommand } from "./agents-BPE9smUE.js";
|
|
5
5
|
export { agentsListCommand };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { t as resolvePreferredProviderForAuthChoice } from "./provider-auth-choice-preference-BW46ClFW.js";
|
|
2
|
-
import { n as applyAuthChoice, t as warnIfModelConfigLooksOff } from "./auth-choice-
|
|
2
|
+
import { n as applyAuthChoice, t as warnIfModelConfigLooksOff } from "./auth-choice-C0gXf2K-.js";
|
|
3
3
|
export { applyAuthChoice, resolvePreferredProviderForAuthChoice, warnIfModelConfigLooksOff };
|
|
@@ -7,7 +7,7 @@ import { a as hasUsableCustomProviderApiKey } from "./model-auth-C9Gvln86.js";
|
|
|
7
7
|
import { n as loadModelCatalog } from "./model-catalog-B-qFSp6U.js";
|
|
8
8
|
import { t as buildProviderAuthRecoveryHint } from "./provider-auth-guidance-RkIjC6U4.js";
|
|
9
9
|
import { r as normalizeLegacyOnboardAuthChoice } from "./auth-choice-legacy-RZBA3P5w.js";
|
|
10
|
-
import { t as applyAuthChoiceLoadedPluginProvider } from "./provider-auth-choice-
|
|
10
|
+
import { t as applyAuthChoiceLoadedPluginProvider } from "./provider-auth-choice-uRVlTDrY.js";
|
|
11
11
|
import { n as applyAuthChoiceApiProviders, r as normalizeApiKeyTokenProviderAuthChoice } from "./provider-auth-choice-preference-BW46ClFW.js";
|
|
12
12
|
//#region src/commands/auth-choice.apply.oauth.ts
|
|
13
13
|
async function applyAuthChoiceOAuth(_params) {
|
|
@@ -17,7 +17,7 @@ import { n as isDeprecatedAuthChoice, t as formatDeprecatedNonInteractiveAuthCho
|
|
|
17
17
|
import { t as applyPrimaryModel } from "./provider-model-primary-DWLtxnP_.js";
|
|
18
18
|
import "./auth-choice.apply-helpers-DiABb6cH.js";
|
|
19
19
|
import { r as normalizeApiKeyTokenProviderAuthChoice, t as resolvePreferredProviderForAuthChoice } from "./provider-auth-choice-preference-BW46ClFW.js";
|
|
20
|
-
import { a as resolveCustomProviderId, n as applyCustomApiConfig, r as parseNonInteractiveCustomApiFlags, t as CustomApiError } from "./onboard-custom-
|
|
20
|
+
import { a as resolveCustomProviderId, n as applyCustomApiConfig, r as parseNonInteractiveCustomApiFlags, t as CustomApiError } from "./onboard-custom-CvCCdk91.js";
|
|
21
21
|
//#region src/commands/onboard-non-interactive/api-keys.ts
|
|
22
22
|
function parseEnvVarNameFromSourceLabel(source) {
|
|
23
23
|
if (!source) return;
|
package/dist/build-info.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
078bb592aa30afdbf51834f1db17e131f3ef4ce64e9313cd316d13ef66646eaf
|