@mieweb/ui 0.10.0-dev.2 → 0.10.0-dev.3
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/dist/chunk-74ENCTIK.js +162 -0
- package/dist/chunk-74ENCTIK.js.map +1 -0
- package/dist/chunk-OGNADPM4.cjs +170 -0
- package/dist/chunk-OGNADPM4.cjs.map +1 -0
- package/dist/index.cjs +111 -191
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -20
- package/dist/index.d.ts +47 -20
- package/dist/index.js +89 -186
- package/dist/index.js.map +1 -1
- package/dist/{speaker-verify-5GTWAN5Y.cjs → speaker-verify-4NEJAK6C.cjs} +57 -90
- package/dist/speaker-verify-4NEJAK6C.cjs.map +1 -0
- package/dist/{speaker-verify-R67P433H.js → speaker-verify-AWSKI6DI.js} +57 -90
- package/dist/speaker-verify-AWSKI6DI.js.map +1 -0
- package/package.json +1 -1
- package/dist/speaker-verify-5GTWAN5Y.cjs.map +0 -1
- package/dist/speaker-verify-R67P433H.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -9,6 +9,8 @@ export { bluehiveBrand } from './chunk-3T7QGLNB.js';
|
|
|
9
9
|
export { ccmeBrand } from './chunk-SCQRJPSV.js';
|
|
10
10
|
export { ozwellBrand } from './chunk-5YUBQIC7.js';
|
|
11
11
|
import { getModelBytes } from './chunk-6I7IDZ4A.js';
|
|
12
|
+
import { loadWhatPrints, saveWhatPrints, clearWhatPrints } from './chunk-74ENCTIK.js';
|
|
13
|
+
export { clearVoiceprints, clearWhatPrints, getVoiceprints, loadWhatPrints, saveWhatPrints, setVoiceprints } from './chunk-74ENCTIK.js';
|
|
12
14
|
export { ThemeProvider, ThemeProviderContext, ThemeToggle, themeToggleIconVariants, themeToggleVariants, useThemeContext } from './chunk-LL6IWKI3.js';
|
|
13
15
|
export { Toggle, toggleVariants } from './chunk-PTZB2GKL.js';
|
|
14
16
|
export { TranscriptView, formatTimestampMs } from './chunk-LAEIVOIY.js';
|
|
@@ -3938,21 +3940,27 @@ function endsWithDone(text) {
|
|
|
3938
3940
|
);
|
|
3939
3941
|
}
|
|
3940
3942
|
function useSpeakerVerify(opts = {}) {
|
|
3941
|
-
const { enabled = true } = opts;
|
|
3943
|
+
const { enabled = true, voiceprintNamespace } = opts;
|
|
3942
3944
|
const [ready, setReady] = React13.useState(false);
|
|
3945
|
+
const [loadedNamespace, setLoadedNamespace] = React13.useState();
|
|
3943
3946
|
const [error, setError] = React13.useState(null);
|
|
3944
3947
|
const svRef = React13.useRef(null);
|
|
3945
3948
|
React13.useEffect(() => {
|
|
3946
3949
|
if (!enabled) return;
|
|
3950
|
+
setReady(false);
|
|
3951
|
+
setError(null);
|
|
3952
|
+
svRef.current = null;
|
|
3947
3953
|
let cancelled = false;
|
|
3948
3954
|
(async () => {
|
|
3949
3955
|
try {
|
|
3950
|
-
await import('./speaker-verify-
|
|
3956
|
+
await import('./speaker-verify-AWSKI6DI.js');
|
|
3951
3957
|
const sv = window.SpeakerVerify;
|
|
3952
3958
|
if (!sv) throw new Error("SpeakerVerify failed to initialize");
|
|
3953
3959
|
await sv.ready();
|
|
3960
|
+
await sv.loadNamespace(voiceprintNamespace);
|
|
3954
3961
|
if (cancelled) return;
|
|
3955
3962
|
svRef.current = sv;
|
|
3963
|
+
setLoadedNamespace(voiceprintNamespace);
|
|
3956
3964
|
console.log("[speaker] TitaNet ready");
|
|
3957
3965
|
setReady(true);
|
|
3958
3966
|
} catch (e) {
|
|
@@ -3962,21 +3970,22 @@ function useSpeakerVerify(opts = {}) {
|
|
|
3962
3970
|
return () => {
|
|
3963
3971
|
cancelled = true;
|
|
3964
3972
|
};
|
|
3965
|
-
}, [enabled]);
|
|
3973
|
+
}, [enabled, voiceprintNamespace]);
|
|
3974
|
+
const scopedApi = enabled && ready && loadedNamespace === voiceprintNamespace ? svRef.current : null;
|
|
3966
3975
|
return {
|
|
3967
|
-
ready,
|
|
3976
|
+
ready: scopedApi !== null,
|
|
3968
3977
|
error,
|
|
3969
|
-
enroll: (phrase, utterances, opts2) =>
|
|
3970
|
-
verify: (phrase, samples, sampleRate) =>
|
|
3971
|
-
conditionCount: (phrase) =>
|
|
3972
|
-
embed: (samples, sampleRate) =>
|
|
3973
|
-
identify: (samples, sampleRate) =>
|
|
3974
|
-
listVoices: () =>
|
|
3975
|
-
removeVoice: (voiceId) =>
|
|
3976
|
-
renameVoice: (voiceId, label) =>
|
|
3977
|
-
clear: () =>
|
|
3978
|
+
enroll: (phrase, utterances, opts2) => scopedApi?.enroll(phrase, utterances, opts2, voiceprintNamespace) ?? null,
|
|
3979
|
+
verify: (phrase, samples, sampleRate) => scopedApi?.verify(phrase, samples, sampleRate, voiceprintNamespace) ?? null,
|
|
3980
|
+
conditionCount: (phrase) => scopedApi?.conditionCount(phrase, voiceprintNamespace) ?? 0,
|
|
3981
|
+
embed: (samples, sampleRate) => scopedApi?.embed(samples, sampleRate) ?? null,
|
|
3982
|
+
identify: (samples, sampleRate) => scopedApi?.identify(samples, sampleRate, voiceprintNamespace) ?? null,
|
|
3983
|
+
listVoices: () => scopedApi?.listVoices(voiceprintNamespace) ?? [],
|
|
3984
|
+
removeVoice: (voiceId) => scopedApi?.removeVoice(voiceId, voiceprintNamespace),
|
|
3985
|
+
renameVoice: (voiceId, label) => scopedApi?.renameVoice(voiceId, label, voiceprintNamespace),
|
|
3986
|
+
clear: () => scopedApi?.clearEnrollment(voiceprintNamespace),
|
|
3978
3987
|
setGates: (g) => {
|
|
3979
|
-
const sv =
|
|
3988
|
+
const sv = scopedApi;
|
|
3980
3989
|
if (!sv) return;
|
|
3981
3990
|
if (g.cosine != null) sv.threshold = g.cosine;
|
|
3982
3991
|
if (g.znorm != null) sv.znormThreshold = g.znorm;
|
|
@@ -4159,11 +4168,14 @@ function useDiarization(options = {}) {
|
|
|
4159
4168
|
merge = true,
|
|
4160
4169
|
inferRoles = false,
|
|
4161
4170
|
enabled = true,
|
|
4162
|
-
minSegmentSeconds = 1
|
|
4171
|
+
minSegmentSeconds = 1,
|
|
4172
|
+
voiceprintNamespace
|
|
4163
4173
|
} = options;
|
|
4164
|
-
const sv = useSpeakerVerify({ enabled });
|
|
4174
|
+
const sv = useSpeakerVerify({ enabled, voiceprintNamespace });
|
|
4165
4175
|
const svRef = React13.useRef(sv);
|
|
4166
4176
|
svRef.current = sv;
|
|
4177
|
+
const nsRef = React13.useRef(voiceprintNamespace);
|
|
4178
|
+
nsRef.current = voiceprintNamespace;
|
|
4167
4179
|
const [busy, setBusy] = React13.useState(false);
|
|
4168
4180
|
const [error, setError] = React13.useState(null);
|
|
4169
4181
|
const [result, setResult] = React13.useState(null);
|
|
@@ -4176,10 +4188,16 @@ function useDiarization(options = {}) {
|
|
|
4176
4188
|
setError(null);
|
|
4177
4189
|
try {
|
|
4178
4190
|
const svh = svRef.current;
|
|
4191
|
+
const passNamespace = nsRef.current;
|
|
4192
|
+
const assertNamespace = () => {
|
|
4193
|
+
if (nsRef.current !== passNamespace)
|
|
4194
|
+
throw new Error("voiceprint namespace changed during diarization");
|
|
4195
|
+
};
|
|
4179
4196
|
const [segments, samples] = await Promise.all([
|
|
4180
4197
|
transcribeSegments(blob),
|
|
4181
4198
|
decodeTo16kMono(blob)
|
|
4182
4199
|
]);
|
|
4200
|
+
assertNamespace();
|
|
4183
4201
|
if (!segments.length) {
|
|
4184
4202
|
setResult([]);
|
|
4185
4203
|
return [];
|
|
@@ -4234,6 +4252,7 @@ function useDiarization(options = {}) {
|
|
|
4234
4252
|
}
|
|
4235
4253
|
}
|
|
4236
4254
|
if (merge) out = mergeTurns(out);
|
|
4255
|
+
assertNamespace();
|
|
4237
4256
|
setResult(out);
|
|
4238
4257
|
return out;
|
|
4239
4258
|
} catch (e) {
|
|
@@ -4256,158 +4275,6 @@ function useDiarization(options = {}) {
|
|
|
4256
4275
|
return { ready: sv.ready, busy, error, result, diarize };
|
|
4257
4276
|
}
|
|
4258
4277
|
|
|
4259
|
-
// src/components/AI/voiceprintStore.ts
|
|
4260
|
-
var DB_NAME = "ozwell-voice";
|
|
4261
|
-
var STORE = "voiceprints";
|
|
4262
|
-
var DB_VERSION = 1;
|
|
4263
|
-
function openDb() {
|
|
4264
|
-
return new Promise((resolve, reject) => {
|
|
4265
|
-
const req = indexedDB.open(DB_NAME, DB_VERSION);
|
|
4266
|
-
req.onupgradeneeded = () => {
|
|
4267
|
-
if (!req.result.objectStoreNames.contains(STORE))
|
|
4268
|
-
req.result.createObjectStore(STORE);
|
|
4269
|
-
};
|
|
4270
|
-
req.onsuccess = () => resolve(req.result);
|
|
4271
|
-
req.onerror = () => reject(req.error);
|
|
4272
|
-
req.onblocked = () => reject(
|
|
4273
|
-
new Error("IndexedDB open blocked (another tab holds an upgrade lock)")
|
|
4274
|
-
);
|
|
4275
|
-
});
|
|
4276
|
-
}
|
|
4277
|
-
function idbGet(key) {
|
|
4278
|
-
return openDb().then(
|
|
4279
|
-
(db) => new Promise((resolve, reject) => {
|
|
4280
|
-
const req = db.transaction(STORE, "readonly").objectStore(STORE).get(key);
|
|
4281
|
-
req.onsuccess = () => {
|
|
4282
|
-
resolve(req.result);
|
|
4283
|
-
db.close();
|
|
4284
|
-
};
|
|
4285
|
-
req.onerror = () => {
|
|
4286
|
-
reject(req.error);
|
|
4287
|
-
db.close();
|
|
4288
|
-
};
|
|
4289
|
-
})
|
|
4290
|
-
);
|
|
4291
|
-
}
|
|
4292
|
-
function idbSet(key, value) {
|
|
4293
|
-
return openDb().then(
|
|
4294
|
-
(db) => new Promise((resolve, reject) => {
|
|
4295
|
-
const tx = db.transaction(STORE, "readwrite");
|
|
4296
|
-
tx.objectStore(STORE).put(value, key);
|
|
4297
|
-
tx.oncomplete = () => {
|
|
4298
|
-
resolve();
|
|
4299
|
-
db.close();
|
|
4300
|
-
};
|
|
4301
|
-
tx.onerror = () => {
|
|
4302
|
-
reject(tx.error);
|
|
4303
|
-
db.close();
|
|
4304
|
-
};
|
|
4305
|
-
tx.onabort = () => {
|
|
4306
|
-
reject(tx.error);
|
|
4307
|
-
db.close();
|
|
4308
|
-
};
|
|
4309
|
-
})
|
|
4310
|
-
);
|
|
4311
|
-
}
|
|
4312
|
-
function idbDel(key) {
|
|
4313
|
-
return openDb().then(
|
|
4314
|
-
(db) => new Promise((resolve, reject) => {
|
|
4315
|
-
const tx = db.transaction(STORE, "readwrite");
|
|
4316
|
-
tx.objectStore(STORE).delete(key);
|
|
4317
|
-
tx.oncomplete = () => {
|
|
4318
|
-
resolve();
|
|
4319
|
-
db.close();
|
|
4320
|
-
};
|
|
4321
|
-
tx.onerror = () => {
|
|
4322
|
-
reject(tx.error);
|
|
4323
|
-
db.close();
|
|
4324
|
-
};
|
|
4325
|
-
tx.onabort = () => {
|
|
4326
|
-
reject(tx.error);
|
|
4327
|
-
db.close();
|
|
4328
|
-
};
|
|
4329
|
-
})
|
|
4330
|
-
);
|
|
4331
|
-
}
|
|
4332
|
-
async function getVoiceprints(key, migrateLegacy) {
|
|
4333
|
-
try {
|
|
4334
|
-
const existing = await idbGet(key);
|
|
4335
|
-
if (existing !== void 0) return existing;
|
|
4336
|
-
if (migrateLegacy) {
|
|
4337
|
-
let raw = null;
|
|
4338
|
-
try {
|
|
4339
|
-
raw = localStorage.getItem(key);
|
|
4340
|
-
} catch {
|
|
4341
|
-
}
|
|
4342
|
-
if (raw != null) {
|
|
4343
|
-
let migrated;
|
|
4344
|
-
try {
|
|
4345
|
-
migrated = migrateLegacy(raw);
|
|
4346
|
-
} catch {
|
|
4347
|
-
try {
|
|
4348
|
-
localStorage.removeItem(key);
|
|
4349
|
-
} catch {
|
|
4350
|
-
}
|
|
4351
|
-
return void 0;
|
|
4352
|
-
}
|
|
4353
|
-
try {
|
|
4354
|
-
await idbSet(key, migrated);
|
|
4355
|
-
} catch {
|
|
4356
|
-
}
|
|
4357
|
-
try {
|
|
4358
|
-
localStorage.removeItem(key);
|
|
4359
|
-
} catch {
|
|
4360
|
-
}
|
|
4361
|
-
return migrated;
|
|
4362
|
-
}
|
|
4363
|
-
}
|
|
4364
|
-
return void 0;
|
|
4365
|
-
} catch {
|
|
4366
|
-
return void 0;
|
|
4367
|
-
}
|
|
4368
|
-
}
|
|
4369
|
-
async function setVoiceprints(key, value) {
|
|
4370
|
-
try {
|
|
4371
|
-
await idbSet(key, value);
|
|
4372
|
-
} catch {
|
|
4373
|
-
}
|
|
4374
|
-
}
|
|
4375
|
-
async function clearVoiceprints(key) {
|
|
4376
|
-
try {
|
|
4377
|
-
await idbDel(key);
|
|
4378
|
-
} catch {
|
|
4379
|
-
}
|
|
4380
|
-
try {
|
|
4381
|
-
localStorage.removeItem(key);
|
|
4382
|
-
} catch {
|
|
4383
|
-
}
|
|
4384
|
-
}
|
|
4385
|
-
var WHAT_KEY = "ozwellWhatPrints";
|
|
4386
|
-
function parseLegacyWhat(raw) {
|
|
4387
|
-
let o;
|
|
4388
|
-
try {
|
|
4389
|
-
o = JSON.parse(raw || "{}") || {};
|
|
4390
|
-
} catch {
|
|
4391
|
-
return {};
|
|
4392
|
-
}
|
|
4393
|
-
const out = /* @__PURE__ */ Object.create(null);
|
|
4394
|
-
for (const k of Object.keys(o))
|
|
4395
|
-
out[k] = (o[k] || []).map((a) => Float32Array.from(a));
|
|
4396
|
-
return out;
|
|
4397
|
-
}
|
|
4398
|
-
function loadWhatPrints() {
|
|
4399
|
-
return getVoiceprints(
|
|
4400
|
-
WHAT_KEY,
|
|
4401
|
-
parseLegacyWhat
|
|
4402
|
-
).then((v) => v ?? {});
|
|
4403
|
-
}
|
|
4404
|
-
function saveWhatPrints(map) {
|
|
4405
|
-
return setVoiceprints(WHAT_KEY, map);
|
|
4406
|
-
}
|
|
4407
|
-
function clearWhatPrints() {
|
|
4408
|
-
return clearVoiceprints(WHAT_KEY);
|
|
4409
|
-
}
|
|
4410
|
-
|
|
4411
4278
|
// src/components/AI/HeyOzwell/audio.ts
|
|
4412
4279
|
function openRollingRecorder(stream, maxSeconds = 2) {
|
|
4413
4280
|
const Ctx = window.AudioContext || window.webkitAudioContext;
|
|
@@ -4575,6 +4442,7 @@ function useRoomLevel(getStream, ready) {
|
|
|
4575
4442
|
}
|
|
4576
4443
|
function useHeyOzwell(options = {}) {
|
|
4577
4444
|
const {
|
|
4445
|
+
voiceprintNamespace,
|
|
4578
4446
|
autoDictateOnWake = false,
|
|
4579
4447
|
closeChatOnDone = false,
|
|
4580
4448
|
transcription = "browser",
|
|
@@ -4634,13 +4502,14 @@ function useHeyOzwell(options = {}) {
|
|
|
4634
4502
|
setLiveText("");
|
|
4635
4503
|
}, []);
|
|
4636
4504
|
const wakeRef = React13.useRef(null);
|
|
4637
|
-
const sv = useSpeakerVerify({ enabled: requireDoctor });
|
|
4505
|
+
const sv = useSpeakerVerify({ enabled: requireDoctor, voiceprintNamespace });
|
|
4638
4506
|
const svRef = React13.useRef(sv);
|
|
4639
4507
|
svRef.current = sv;
|
|
4640
4508
|
const rollRef = React13.useRef(null);
|
|
4641
4509
|
const diar = useDiarization({
|
|
4642
4510
|
...diarizationOptions,
|
|
4643
|
-
enabled: conversationMode
|
|
4511
|
+
enabled: conversationMode,
|
|
4512
|
+
voiceprintNamespace
|
|
4644
4513
|
});
|
|
4645
4514
|
const diarRef = React13.useRef(diar);
|
|
4646
4515
|
diarRef.current = diar;
|
|
@@ -4648,6 +4517,7 @@ function useHeyOzwell(options = {}) {
|
|
|
4648
4517
|
(name) => {
|
|
4649
4518
|
if (!requireDoctor) return true;
|
|
4650
4519
|
const svh = svRef.current;
|
|
4520
|
+
if (!svh.ready) return false;
|
|
4651
4521
|
const enrolled = svh.conditionCount(name) > 0;
|
|
4652
4522
|
if (!enrolled) return true;
|
|
4653
4523
|
const roll = rollRef.current;
|
|
@@ -4852,9 +4722,14 @@ function useHeyOzwell(options = {}) {
|
|
|
4852
4722
|
if (!requireDoctor || !active || !wake.ready) return;
|
|
4853
4723
|
let cancelled = false;
|
|
4854
4724
|
let tries = 0;
|
|
4855
|
-
|
|
4725
|
+
const applied = /* @__PURE__ */ new Set(["hey-ozwell", "ozwell-i'm-done"]);
|
|
4726
|
+
for (const k of applied) wakeRef.current?.setVoiceprint(k, []);
|
|
4727
|
+
void loadWhatPrints(voiceprintNamespace).then((loaded) => {
|
|
4856
4728
|
if (cancelled) return;
|
|
4857
|
-
for (const k in loaded)
|
|
4729
|
+
for (const k in loaded) {
|
|
4730
|
+
applied.add(k);
|
|
4731
|
+
wakeRef.current?.setVoiceprint(k, loaded[k]);
|
|
4732
|
+
}
|
|
4858
4733
|
});
|
|
4859
4734
|
const tryOpen = () => {
|
|
4860
4735
|
if (cancelled || rollRef.current) return;
|
|
@@ -4865,10 +4740,11 @@ function useHeyOzwell(options = {}) {
|
|
|
4865
4740
|
tryOpen();
|
|
4866
4741
|
return () => {
|
|
4867
4742
|
cancelled = true;
|
|
4743
|
+
for (const k of applied) wakeRef.current?.setVoiceprint(k, []);
|
|
4868
4744
|
rollRef.current?.close();
|
|
4869
4745
|
rollRef.current = null;
|
|
4870
4746
|
};
|
|
4871
|
-
}, [requireDoctor, active, wake.ready]);
|
|
4747
|
+
}, [requireDoctor, active, wake.ready, voiceprintNamespace]);
|
|
4872
4748
|
const hasListenedRef = React13.useRef(false);
|
|
4873
4749
|
React13.useEffect(() => {
|
|
4874
4750
|
if (listening) hasListenedRef.current = true;
|
|
@@ -5160,11 +5036,11 @@ var REPS = 3;
|
|
|
5160
5036
|
var TIMEOUT_MS = 5e3;
|
|
5161
5037
|
var delay = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
5162
5038
|
function useVoiceSetup(options = {}) {
|
|
5163
|
-
const { startAdding = false, voiceId, label } = options;
|
|
5039
|
+
const { startAdding = false, voiceId, label, voiceprintNamespace } = options;
|
|
5164
5040
|
const [enrollVoiceId] = React13.useState(
|
|
5165
5041
|
() => voiceId || (startAdding ? `voice-${Date.now()}-${Math.floor(Math.random() * 1e4)}` : "you")
|
|
5166
5042
|
);
|
|
5167
|
-
const sv = useSpeakerVerify();
|
|
5043
|
+
const sv = useSpeakerVerify({ voiceprintNamespace });
|
|
5168
5044
|
const expectRef = React13.useRef(null);
|
|
5169
5045
|
const resolveRef = React13.useRef(null);
|
|
5170
5046
|
const whatRef = React13.useRef({});
|
|
@@ -5186,10 +5062,19 @@ function useVoiceSetup(options = {}) {
|
|
|
5186
5062
|
const total = PHRASES2.length * REPS;
|
|
5187
5063
|
React13.useEffect(() => {
|
|
5188
5064
|
warmWhisper();
|
|
5189
|
-
|
|
5190
|
-
|
|
5065
|
+
let cancelled = false;
|
|
5066
|
+
whatRef.current = {};
|
|
5067
|
+
void loadWhatPrints(voiceprintNamespace).then((w) => {
|
|
5068
|
+
if (!cancelled) whatRef.current = w;
|
|
5191
5069
|
});
|
|
5192
|
-
|
|
5070
|
+
return () => {
|
|
5071
|
+
cancelled = true;
|
|
5072
|
+
abortRef.current = true;
|
|
5073
|
+
resolveRef.current?.("__cancelled__");
|
|
5074
|
+
setPhase("intro");
|
|
5075
|
+
setStep(0);
|
|
5076
|
+
};
|
|
5077
|
+
}, [voiceprintNamespace]);
|
|
5193
5078
|
React13.useEffect(() => {
|
|
5194
5079
|
if (!wake.ready) {
|
|
5195
5080
|
setLevel(0);
|
|
@@ -5301,10 +5186,10 @@ function useVoiceSetup(options = {}) {
|
|
|
5301
5186
|
whatRef.current[ph.key] = merged;
|
|
5302
5187
|
wakeRef.current.setVoiceprint(ph.key, merged);
|
|
5303
5188
|
}
|
|
5304
|
-
void saveWhatPrints(whatRef.current);
|
|
5189
|
+
void saveWhatPrints(whatRef.current, voiceprintNamespace);
|
|
5305
5190
|
setAdding(false);
|
|
5306
5191
|
setPhase("done");
|
|
5307
|
-
}, [bothReady, phase, adding, sv, enrollVoiceId, label]);
|
|
5192
|
+
}, [bothReady, phase, adding, sv, enrollVoiceId, label, voiceprintNamespace]);
|
|
5308
5193
|
const addAnotherSpot = React13.useCallback(() => {
|
|
5309
5194
|
setAdding(true);
|
|
5310
5195
|
setPhase("intro");
|
|
@@ -5337,6 +5222,7 @@ var SUCCESS = "var(--mieweb-success, hsl(142.1 76.2% 36.3%))";
|
|
|
5337
5222
|
var ozA2 = (pct) => `color-mix(in srgb, ${OZ2} ${pct}%, transparent)`;
|
|
5338
5223
|
var ozBtn = "bg-ozwell hover:bg-ozwell active:bg-ozwell text-ozwell-foreground hover:brightness-95 active:brightness-90";
|
|
5339
5224
|
function VoiceSetup({
|
|
5225
|
+
voiceprintNamespace,
|
|
5340
5226
|
mode = "enroll",
|
|
5341
5227
|
voiceId,
|
|
5342
5228
|
label,
|
|
@@ -5344,7 +5230,12 @@ function VoiceSetup({
|
|
|
5344
5230
|
onDone,
|
|
5345
5231
|
onCancel
|
|
5346
5232
|
}) {
|
|
5347
|
-
const oz = useVoiceSetup({
|
|
5233
|
+
const oz = useVoiceSetup({
|
|
5234
|
+
startAdding: mode === "add",
|
|
5235
|
+
voiceId,
|
|
5236
|
+
label,
|
|
5237
|
+
voiceprintNamespace
|
|
5238
|
+
});
|
|
5348
5239
|
const { phase, phrase, step, total, adding, level, ready, error } = oz;
|
|
5349
5240
|
const octoScale = 1 + Math.min(0.32, level * 2.2);
|
|
5350
5241
|
const glowOpacity = 0.35 + Math.min(0.6, level * 4);
|
|
@@ -5555,8 +5446,11 @@ function VoiceSetup({
|
|
|
5555
5446
|
var OZ3 = "var(--mieweb-ozwell, #0BA0E0)";
|
|
5556
5447
|
var ozBtn2 = "bg-ozwell hover:bg-ozwell active:bg-ozwell text-ozwell-foreground hover:brightness-95 active:brightness-90";
|
|
5557
5448
|
var dangerOutline = "border-destructive text-destructive hover:bg-destructive/10 hover:text-destructive";
|
|
5558
|
-
function VoiceManager({
|
|
5559
|
-
|
|
5449
|
+
function VoiceManager({
|
|
5450
|
+
logoSrc,
|
|
5451
|
+
voiceprintNamespace
|
|
5452
|
+
}) {
|
|
5453
|
+
const sv = useSpeakerVerify({ voiceprintNamespace });
|
|
5560
5454
|
const [inSetup, setInSetup] = React13.useState(null);
|
|
5561
5455
|
const [, setTick] = React13.useState(0);
|
|
5562
5456
|
const [addName, setAddName] = React13.useState("");
|
|
@@ -5568,6 +5462,7 @@ function VoiceManager({ logoSrc }) {
|
|
|
5568
5462
|
return /* @__PURE__ */ jsx(
|
|
5569
5463
|
VoiceSetup,
|
|
5570
5464
|
{
|
|
5465
|
+
voiceprintNamespace,
|
|
5571
5466
|
mode: inSetup.mode,
|
|
5572
5467
|
voiceId: inSetup.voiceId,
|
|
5573
5468
|
label: inSetup.label,
|
|
@@ -5599,7 +5494,7 @@ function VoiceManager({ logoSrc }) {
|
|
|
5599
5494
|
};
|
|
5600
5495
|
const clearAll = () => {
|
|
5601
5496
|
sv.clear();
|
|
5602
|
-
void clearWhatPrints();
|
|
5497
|
+
void clearWhatPrints(voiceprintNamespace);
|
|
5603
5498
|
setTick((t) => t + 1);
|
|
5604
5499
|
};
|
|
5605
5500
|
return /* @__PURE__ */ jsxs("div", { className: "bg-background text-foreground flex min-h-full flex-col items-center justify-center p-6 text-center", children: [
|
|
@@ -5749,6 +5644,7 @@ function VoiceManager({ logoSrc }) {
|
|
|
5749
5644
|
] });
|
|
5750
5645
|
}
|
|
5751
5646
|
function HandsFreeChat({
|
|
5647
|
+
voiceprintNamespace,
|
|
5752
5648
|
title = "Ozwell Assistant \u2014 hands-free",
|
|
5753
5649
|
suggestions,
|
|
5754
5650
|
userName,
|
|
@@ -5761,6 +5657,7 @@ function HandsFreeChat({
|
|
|
5761
5657
|
autoDictateOnWake = true
|
|
5762
5658
|
}) {
|
|
5763
5659
|
const oz = useHeyOzwell({
|
|
5660
|
+
voiceprintNamespace,
|
|
5764
5661
|
autoStart: true,
|
|
5765
5662
|
// always listening while mounted
|
|
5766
5663
|
autoDictateOnWake,
|
|
@@ -5839,7 +5736,13 @@ function HandsFreeChat({
|
|
|
5839
5736
|
/* @__PURE__ */ jsx(ModalTitle, { children: "Your voice" }),
|
|
5840
5737
|
/* @__PURE__ */ jsx(ModalClose, {})
|
|
5841
5738
|
] }),
|
|
5842
|
-
/* @__PURE__ */ jsx(ModalBody, { children: /* @__PURE__ */ jsx(
|
|
5739
|
+
/* @__PURE__ */ jsx(ModalBody, { children: /* @__PURE__ */ jsx(
|
|
5740
|
+
VoiceManager,
|
|
5741
|
+
{
|
|
5742
|
+
logoSrc,
|
|
5743
|
+
voiceprintNamespace
|
|
5744
|
+
}
|
|
5745
|
+
) })
|
|
5843
5746
|
] })
|
|
5844
5747
|
] });
|
|
5845
5748
|
}
|
|
@@ -44442,6 +44345,6 @@ function WebsiteInputGroup({
|
|
|
44442
44345
|
}
|
|
44443
44346
|
WebsiteInputGroup.displayName = "WebsiteInputGroup";
|
|
44444
44347
|
|
|
44445
|
-
export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, ButtonGroup, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, askOzwell, askOzwellStream, attributeSegments, calculateDateRange, centroid, chime,
|
|
44348
|
+
export { AIChat, AIChatModal, AIChatTrigger, AIReconciliationPanel, AccessDeniedPage, ActionButton2 as ActionButton, ActionButtonsBar, ActiveFilters, AddContactModal, AddServiceCard, AdditionalFields, Address, AddressCard, AddressCompact, AddressDisplay, AddressForm, AddressInline, AppHeader, AppHeaderActions, AppHeaderBrand, AppHeaderDivider, AppHeaderIconButton, AppHeaderSearch, AppHeaderSection, AppHeaderTitle, AppHeaderUserMenu, Assessment, AuthButtons, AuthDialog, BookAppointmentButton, BookingDialog, BusinessHours, BusinessHoursEditor, ButtonGroup, CHANGE_TYPE_LABELS, CONCERN_STATUS_LABELS, CSVColumnMapper, CSVFileUpload, CardSkeleton, CaseContextBar, CaseManagementHeader, CheckrIntegration, ClaimListingButton, ClaimProviderForm, CodingChips, CommandPalette, CommandPaletteProvider, CommandPaletteTrigger, CompactCookieBanner, CompactFilterBar, CompactHeader, CompactHours, CompactProviderHeader, ConditionEditor, ConnectionStatusBadge, ConnectionStatusBar, ConnectionStatusOverlay, ConsentSwitch, CookieConsentBanner, CopyrightText, CountBadge, CountryDropdown, CreateInvoiceModal, CreateReferralModal, DEFAULT_ERROR_CONFIGS, DEFAULT_LANGUAGES, DEFAULT_RADIUS_OPTIONS, DEFAULT_SOCIAL_PROVIDERS, DOTBadge, DashboardWidget, DashboardWidgetActions, DashboardWidgetDataCards, DashboardWidgetInfo, DashboardWidgetTable, DateRangeFilter, DateRangePicker, DialogOverlay, DisclaimerText, DockablePanel, DocumentDetectionOverlay, DocumentScanner, DropZone, DropzoneOverlay, EditUserRoleModal, EmployeeForm, EmployeeProfileCard, EmployerContactCard, EmployerList, EmployerPricingCard, EmployerServiceModal, EmployerView, ErrorPage, FileManager, FilePreview, FloatingAIChat, FloatingInput, FooterLinkSection, SocialMediaLinks2 as FooterSocialLinks, HRISProviderSelector, HandsFreeChat, HealthSurveillance, HelpSupportPanel, HeroSearchBar, HeyOzwell, HeyOzwellToggle, HoursSummary, ImagingOrderEditor, InlineBookingForm, InventoryManager, InviteUserModal, InvoiceList, InvoicePaymentPage, InvoiceView, LabOrderEditor, LanguageSelector, LanguageSelectorInline, LanguageSelectorNative, LegalLinks, LoadingBar, LoadingDots, LoadingOverlay, LoadingPage, LoadingSkeleton, MODEL_MANIFEST, MaintenancePage, MobileBackButton, MobileMenuButton, MobileMenuPanel, ModelInfoList, NavLinks, NewsletterForm, NotFoundPage, NotificationCenter, ORDER_TYPE_META, ORDER_TYPE_SEARCH_DOMAINS, OfflinePage, OnboardingCompletion, OnboardingStepQuestion, OnboardingWizard, OpenStatusBadge, OrderCard, OrderConfirmation, OrderConfirmationWizard, OrderDetailSidebar, OrderEditor, OrderList, OrderLookupForm, OrderSidebar, OrderSidebarTabs, OzwellChat, OzwellSettingsMenu, PageHeader, PatientHeader, PaymentHistoryTable, PaymentMethodBank, PaymentMethodCard, PaymentMethodList, PendingClaimsTable, PermissionsEditor, PillSelect, PresentingProblems, ProblemList, ProcedureOrderEditor, ProductVersion, ProductVersionBadge, Breadcrumb2 as ProviderBreadcrumb, ProviderCard, ProviderCardGrid, ProviderCardSkeleton, ProviderDetailHeader, ProviderDetailHeaderSkeleton, ProviderLogo2 as ProviderLogo, ProviderOverview, ProviderSearchBar, ProviderSearchFilters, ProviderSelector, ProviderSettings, SocialMediaLinks as ProviderSocialLinks, ProviderUsersTable, QuickBookCard, QuickLinksCard, RELEVANCE_LABELS, RecurringServiceAddCard, RecurringServiceCard, RecurringServiceGrid, RecurringServiceSetupModal, ReferralEditor, RejectionModal, ReportDashboard, ReportDatePicker, ReportLink, ReportTimeRange, ResultsEntryCard, ResultsEntryForm, ResultsEntryModal, SSOConfigForm, ScheduleCalendar, SearchResultsMessage, SelectedServicesBadges, ServerErrorPage, ServiceAccordion, ServiceBadge, ServiceBadgeGroup, ServiceCard, ServiceCategoryBadge, ServiceGeneralSettings, ServiceGrid, ServiceLink, ServiceList, ServiceMultiSelect, ServicePicker, ServicePricingManager, ServiceSelect, ServiceShippingSettings, ServiceTagCloud, ServiceTagCloudBadges, SetupServiceModal, Sidebar, SidebarContent, SidebarFooter, SidebarHeader, SidebarMobileToggle, SidebarNav, SidebarNavGroup, SidebarNavItem, SidebarProvider, SidebarSearch, SidebarToggle, SimpleFooter, SiteFooter, SiteHeader, SiteLogo, StepIndicator, StripeBadge, StripeSecureBadge, SuggestedActions, TableOfContents, TimelineEventList, TimelineProgress, Toast, ToastContainer, ToastProvider, UncertaintyBadge, UpdateAvailableOverlay, UserMenu, VerifiedBadge2 as VerifiedBadge, VisitScribe, VoiceManager, VoiceSetup, WEBSITE_TYPES, WebChartReportViewer, WebcamModal, WebsiteInput, WebsiteInputGroup, askOzwell, askOzwellStream, attributeSegments, calculateDateRange, centroid, chime, clusterEmbeddings, concernGroupKey, concernHistoryContent, cosine, countBadgeVariants, countChipVariants, create24HourSchedule, createDefaultSchedule, createWeekdaySchedule, currentAssertion, decodeTo16kMono, defaultCaseManagementHeaderLabels, defaultOrderTabs, defaultReconciliationIsEqual, endsWithDone, formatAddressLines, formatAddressSingleLine, formatCityState, formatCityStateZip, generateId, getDefaultPresets, getDictationLoad, getExtendedPresets, getGoogleMapsSearchUrl, getGoogleMapsUrl, getOzwellConfig, getWakeWarm, inferSpeakerRoles, isConditionCodetype, isOzwellConfigured, isValidUrl, isWhisperLoaded, labelClusters, medicationToOrder, mergeTurns, normalizeConditionCodingSystem, openRollingRecorder, orderToMedication, orderTypeForCodetype, panelVariants as reconciliationPanelVariants, stripStopPhrase, subscribeDictationLoad, subscribeWakeWarm, toOzwellMessages, transcribeBlob, transcribeGate, transcribeSamples, transcribeSegments, transcribeServer, trimTrailingStopPhrase, useCamera, useCommandPalette, useConnectionStatus, useCookieConsent, useDiarization, useDocumentDetection, useDropzone, useFileUpload, useHeyOzwell, useOptionalToast, useSidebar, useSpeakerVerify, useToast, useVisitScribe, useVoiceSetup, useWakeWord, warmStopGate, warmWakeModels, warmWhisper, widgetVariants };
|
|
44446
44349
|
//# sourceMappingURL=index.js.map
|
|
44447
44350
|
//# sourceMappingURL=index.js.map
|