@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.cjs
CHANGED
|
@@ -11,6 +11,7 @@ var chunkWNJRS7Y7_cjs = require('./chunk-WNJRS7Y7.cjs');
|
|
|
11
11
|
var chunkUCGUA3QV_cjs = require('./chunk-UCGUA3QV.cjs');
|
|
12
12
|
var chunkRR2MJBGV_cjs = require('./chunk-RR2MJBGV.cjs');
|
|
13
13
|
var chunkUVSODK6V_cjs = require('./chunk-UVSODK6V.cjs');
|
|
14
|
+
var chunkOGNADPM4_cjs = require('./chunk-OGNADPM4.cjs');
|
|
14
15
|
var chunkJID7AZTO_cjs = require('./chunk-JID7AZTO.cjs');
|
|
15
16
|
var chunkVTKXM7IE_cjs = require('./chunk-VTKXM7IE.cjs');
|
|
16
17
|
var chunkFYAKUU2A_cjs = require('./chunk-FYAKUU2A.cjs');
|
|
@@ -3916,21 +3917,27 @@ function endsWithDone(text) {
|
|
|
3916
3917
|
);
|
|
3917
3918
|
}
|
|
3918
3919
|
function useSpeakerVerify(opts = {}) {
|
|
3919
|
-
const { enabled = true } = opts;
|
|
3920
|
+
const { enabled = true, voiceprintNamespace } = opts;
|
|
3920
3921
|
const [ready, setReady] = React13__namespace.useState(false);
|
|
3922
|
+
const [loadedNamespace, setLoadedNamespace] = React13__namespace.useState();
|
|
3921
3923
|
const [error, setError] = React13__namespace.useState(null);
|
|
3922
3924
|
const svRef = React13__namespace.useRef(null);
|
|
3923
3925
|
React13__namespace.useEffect(() => {
|
|
3924
3926
|
if (!enabled) return;
|
|
3927
|
+
setReady(false);
|
|
3928
|
+
setError(null);
|
|
3929
|
+
svRef.current = null;
|
|
3925
3930
|
let cancelled = false;
|
|
3926
3931
|
(async () => {
|
|
3927
3932
|
try {
|
|
3928
|
-
await import('./speaker-verify-
|
|
3933
|
+
await import('./speaker-verify-4NEJAK6C.cjs');
|
|
3929
3934
|
const sv = window.SpeakerVerify;
|
|
3930
3935
|
if (!sv) throw new Error("SpeakerVerify failed to initialize");
|
|
3931
3936
|
await sv.ready();
|
|
3937
|
+
await sv.loadNamespace(voiceprintNamespace);
|
|
3932
3938
|
if (cancelled) return;
|
|
3933
3939
|
svRef.current = sv;
|
|
3940
|
+
setLoadedNamespace(voiceprintNamespace);
|
|
3934
3941
|
console.log("[speaker] TitaNet ready");
|
|
3935
3942
|
setReady(true);
|
|
3936
3943
|
} catch (e) {
|
|
@@ -3940,21 +3947,22 @@ function useSpeakerVerify(opts = {}) {
|
|
|
3940
3947
|
return () => {
|
|
3941
3948
|
cancelled = true;
|
|
3942
3949
|
};
|
|
3943
|
-
}, [enabled]);
|
|
3950
|
+
}, [enabled, voiceprintNamespace]);
|
|
3951
|
+
const scopedApi = enabled && ready && loadedNamespace === voiceprintNamespace ? svRef.current : null;
|
|
3944
3952
|
return {
|
|
3945
|
-
ready,
|
|
3953
|
+
ready: scopedApi !== null,
|
|
3946
3954
|
error,
|
|
3947
|
-
enroll: (phrase, utterances, opts2) =>
|
|
3948
|
-
verify: (phrase, samples, sampleRate) =>
|
|
3949
|
-
conditionCount: (phrase) =>
|
|
3950
|
-
embed: (samples, sampleRate) =>
|
|
3951
|
-
identify: (samples, sampleRate) =>
|
|
3952
|
-
listVoices: () =>
|
|
3953
|
-
removeVoice: (voiceId) =>
|
|
3954
|
-
renameVoice: (voiceId, label) =>
|
|
3955
|
-
clear: () =>
|
|
3955
|
+
enroll: (phrase, utterances, opts2) => scopedApi?.enroll(phrase, utterances, opts2, voiceprintNamespace) ?? null,
|
|
3956
|
+
verify: (phrase, samples, sampleRate) => scopedApi?.verify(phrase, samples, sampleRate, voiceprintNamespace) ?? null,
|
|
3957
|
+
conditionCount: (phrase) => scopedApi?.conditionCount(phrase, voiceprintNamespace) ?? 0,
|
|
3958
|
+
embed: (samples, sampleRate) => scopedApi?.embed(samples, sampleRate) ?? null,
|
|
3959
|
+
identify: (samples, sampleRate) => scopedApi?.identify(samples, sampleRate, voiceprintNamespace) ?? null,
|
|
3960
|
+
listVoices: () => scopedApi?.listVoices(voiceprintNamespace) ?? [],
|
|
3961
|
+
removeVoice: (voiceId) => scopedApi?.removeVoice(voiceId, voiceprintNamespace),
|
|
3962
|
+
renameVoice: (voiceId, label) => scopedApi?.renameVoice(voiceId, label, voiceprintNamespace),
|
|
3963
|
+
clear: () => scopedApi?.clearEnrollment(voiceprintNamespace),
|
|
3956
3964
|
setGates: (g) => {
|
|
3957
|
-
const sv =
|
|
3965
|
+
const sv = scopedApi;
|
|
3958
3966
|
if (!sv) return;
|
|
3959
3967
|
if (g.cosine != null) sv.threshold = g.cosine;
|
|
3960
3968
|
if (g.znorm != null) sv.znormThreshold = g.znorm;
|
|
@@ -4137,11 +4145,14 @@ function useDiarization(options = {}) {
|
|
|
4137
4145
|
merge = true,
|
|
4138
4146
|
inferRoles = false,
|
|
4139
4147
|
enabled = true,
|
|
4140
|
-
minSegmentSeconds = 1
|
|
4148
|
+
minSegmentSeconds = 1,
|
|
4149
|
+
voiceprintNamespace
|
|
4141
4150
|
} = options;
|
|
4142
|
-
const sv = useSpeakerVerify({ enabled });
|
|
4151
|
+
const sv = useSpeakerVerify({ enabled, voiceprintNamespace });
|
|
4143
4152
|
const svRef = React13__namespace.useRef(sv);
|
|
4144
4153
|
svRef.current = sv;
|
|
4154
|
+
const nsRef = React13__namespace.useRef(voiceprintNamespace);
|
|
4155
|
+
nsRef.current = voiceprintNamespace;
|
|
4145
4156
|
const [busy, setBusy] = React13__namespace.useState(false);
|
|
4146
4157
|
const [error, setError] = React13__namespace.useState(null);
|
|
4147
4158
|
const [result, setResult] = React13__namespace.useState(null);
|
|
@@ -4154,10 +4165,16 @@ function useDiarization(options = {}) {
|
|
|
4154
4165
|
setError(null);
|
|
4155
4166
|
try {
|
|
4156
4167
|
const svh = svRef.current;
|
|
4168
|
+
const passNamespace = nsRef.current;
|
|
4169
|
+
const assertNamespace = () => {
|
|
4170
|
+
if (nsRef.current !== passNamespace)
|
|
4171
|
+
throw new Error("voiceprint namespace changed during diarization");
|
|
4172
|
+
};
|
|
4157
4173
|
const [segments, samples] = await Promise.all([
|
|
4158
4174
|
transcribeSegments(blob),
|
|
4159
4175
|
decodeTo16kMono(blob)
|
|
4160
4176
|
]);
|
|
4177
|
+
assertNamespace();
|
|
4161
4178
|
if (!segments.length) {
|
|
4162
4179
|
setResult([]);
|
|
4163
4180
|
return [];
|
|
@@ -4212,6 +4229,7 @@ function useDiarization(options = {}) {
|
|
|
4212
4229
|
}
|
|
4213
4230
|
}
|
|
4214
4231
|
if (merge) out = mergeTurns(out);
|
|
4232
|
+
assertNamespace();
|
|
4215
4233
|
setResult(out);
|
|
4216
4234
|
return out;
|
|
4217
4235
|
} catch (e) {
|
|
@@ -4234,158 +4252,6 @@ function useDiarization(options = {}) {
|
|
|
4234
4252
|
return { ready: sv.ready, busy, error, result, diarize };
|
|
4235
4253
|
}
|
|
4236
4254
|
|
|
4237
|
-
// src/components/AI/voiceprintStore.ts
|
|
4238
|
-
var DB_NAME = "ozwell-voice";
|
|
4239
|
-
var STORE = "voiceprints";
|
|
4240
|
-
var DB_VERSION = 1;
|
|
4241
|
-
function openDb() {
|
|
4242
|
-
return new Promise((resolve, reject) => {
|
|
4243
|
-
const req = indexedDB.open(DB_NAME, DB_VERSION);
|
|
4244
|
-
req.onupgradeneeded = () => {
|
|
4245
|
-
if (!req.result.objectStoreNames.contains(STORE))
|
|
4246
|
-
req.result.createObjectStore(STORE);
|
|
4247
|
-
};
|
|
4248
|
-
req.onsuccess = () => resolve(req.result);
|
|
4249
|
-
req.onerror = () => reject(req.error);
|
|
4250
|
-
req.onblocked = () => reject(
|
|
4251
|
-
new Error("IndexedDB open blocked (another tab holds an upgrade lock)")
|
|
4252
|
-
);
|
|
4253
|
-
});
|
|
4254
|
-
}
|
|
4255
|
-
function idbGet(key) {
|
|
4256
|
-
return openDb().then(
|
|
4257
|
-
(db) => new Promise((resolve, reject) => {
|
|
4258
|
-
const req = db.transaction(STORE, "readonly").objectStore(STORE).get(key);
|
|
4259
|
-
req.onsuccess = () => {
|
|
4260
|
-
resolve(req.result);
|
|
4261
|
-
db.close();
|
|
4262
|
-
};
|
|
4263
|
-
req.onerror = () => {
|
|
4264
|
-
reject(req.error);
|
|
4265
|
-
db.close();
|
|
4266
|
-
};
|
|
4267
|
-
})
|
|
4268
|
-
);
|
|
4269
|
-
}
|
|
4270
|
-
function idbSet(key, value) {
|
|
4271
|
-
return openDb().then(
|
|
4272
|
-
(db) => new Promise((resolve, reject) => {
|
|
4273
|
-
const tx = db.transaction(STORE, "readwrite");
|
|
4274
|
-
tx.objectStore(STORE).put(value, key);
|
|
4275
|
-
tx.oncomplete = () => {
|
|
4276
|
-
resolve();
|
|
4277
|
-
db.close();
|
|
4278
|
-
};
|
|
4279
|
-
tx.onerror = () => {
|
|
4280
|
-
reject(tx.error);
|
|
4281
|
-
db.close();
|
|
4282
|
-
};
|
|
4283
|
-
tx.onabort = () => {
|
|
4284
|
-
reject(tx.error);
|
|
4285
|
-
db.close();
|
|
4286
|
-
};
|
|
4287
|
-
})
|
|
4288
|
-
);
|
|
4289
|
-
}
|
|
4290
|
-
function idbDel(key) {
|
|
4291
|
-
return openDb().then(
|
|
4292
|
-
(db) => new Promise((resolve, reject) => {
|
|
4293
|
-
const tx = db.transaction(STORE, "readwrite");
|
|
4294
|
-
tx.objectStore(STORE).delete(key);
|
|
4295
|
-
tx.oncomplete = () => {
|
|
4296
|
-
resolve();
|
|
4297
|
-
db.close();
|
|
4298
|
-
};
|
|
4299
|
-
tx.onerror = () => {
|
|
4300
|
-
reject(tx.error);
|
|
4301
|
-
db.close();
|
|
4302
|
-
};
|
|
4303
|
-
tx.onabort = () => {
|
|
4304
|
-
reject(tx.error);
|
|
4305
|
-
db.close();
|
|
4306
|
-
};
|
|
4307
|
-
})
|
|
4308
|
-
);
|
|
4309
|
-
}
|
|
4310
|
-
async function getVoiceprints(key, migrateLegacy) {
|
|
4311
|
-
try {
|
|
4312
|
-
const existing = await idbGet(key);
|
|
4313
|
-
if (existing !== void 0) return existing;
|
|
4314
|
-
if (migrateLegacy) {
|
|
4315
|
-
let raw = null;
|
|
4316
|
-
try {
|
|
4317
|
-
raw = localStorage.getItem(key);
|
|
4318
|
-
} catch {
|
|
4319
|
-
}
|
|
4320
|
-
if (raw != null) {
|
|
4321
|
-
let migrated;
|
|
4322
|
-
try {
|
|
4323
|
-
migrated = migrateLegacy(raw);
|
|
4324
|
-
} catch {
|
|
4325
|
-
try {
|
|
4326
|
-
localStorage.removeItem(key);
|
|
4327
|
-
} catch {
|
|
4328
|
-
}
|
|
4329
|
-
return void 0;
|
|
4330
|
-
}
|
|
4331
|
-
try {
|
|
4332
|
-
await idbSet(key, migrated);
|
|
4333
|
-
} catch {
|
|
4334
|
-
}
|
|
4335
|
-
try {
|
|
4336
|
-
localStorage.removeItem(key);
|
|
4337
|
-
} catch {
|
|
4338
|
-
}
|
|
4339
|
-
return migrated;
|
|
4340
|
-
}
|
|
4341
|
-
}
|
|
4342
|
-
return void 0;
|
|
4343
|
-
} catch {
|
|
4344
|
-
return void 0;
|
|
4345
|
-
}
|
|
4346
|
-
}
|
|
4347
|
-
async function setVoiceprints(key, value) {
|
|
4348
|
-
try {
|
|
4349
|
-
await idbSet(key, value);
|
|
4350
|
-
} catch {
|
|
4351
|
-
}
|
|
4352
|
-
}
|
|
4353
|
-
async function clearVoiceprints(key) {
|
|
4354
|
-
try {
|
|
4355
|
-
await idbDel(key);
|
|
4356
|
-
} catch {
|
|
4357
|
-
}
|
|
4358
|
-
try {
|
|
4359
|
-
localStorage.removeItem(key);
|
|
4360
|
-
} catch {
|
|
4361
|
-
}
|
|
4362
|
-
}
|
|
4363
|
-
var WHAT_KEY = "ozwellWhatPrints";
|
|
4364
|
-
function parseLegacyWhat(raw) {
|
|
4365
|
-
let o;
|
|
4366
|
-
try {
|
|
4367
|
-
o = JSON.parse(raw || "{}") || {};
|
|
4368
|
-
} catch {
|
|
4369
|
-
return {};
|
|
4370
|
-
}
|
|
4371
|
-
const out = /* @__PURE__ */ Object.create(null);
|
|
4372
|
-
for (const k of Object.keys(o))
|
|
4373
|
-
out[k] = (o[k] || []).map((a) => Float32Array.from(a));
|
|
4374
|
-
return out;
|
|
4375
|
-
}
|
|
4376
|
-
function loadWhatPrints() {
|
|
4377
|
-
return getVoiceprints(
|
|
4378
|
-
WHAT_KEY,
|
|
4379
|
-
parseLegacyWhat
|
|
4380
|
-
).then((v) => v ?? {});
|
|
4381
|
-
}
|
|
4382
|
-
function saveWhatPrints(map) {
|
|
4383
|
-
return setVoiceprints(WHAT_KEY, map);
|
|
4384
|
-
}
|
|
4385
|
-
function clearWhatPrints() {
|
|
4386
|
-
return clearVoiceprints(WHAT_KEY);
|
|
4387
|
-
}
|
|
4388
|
-
|
|
4389
4255
|
// src/components/AI/HeyOzwell/audio.ts
|
|
4390
4256
|
function openRollingRecorder(stream, maxSeconds = 2) {
|
|
4391
4257
|
const Ctx = window.AudioContext || window.webkitAudioContext;
|
|
@@ -4553,6 +4419,7 @@ function useRoomLevel(getStream, ready) {
|
|
|
4553
4419
|
}
|
|
4554
4420
|
function useHeyOzwell(options = {}) {
|
|
4555
4421
|
const {
|
|
4422
|
+
voiceprintNamespace,
|
|
4556
4423
|
autoDictateOnWake = false,
|
|
4557
4424
|
closeChatOnDone = false,
|
|
4558
4425
|
transcription = "browser",
|
|
@@ -4612,13 +4479,14 @@ function useHeyOzwell(options = {}) {
|
|
|
4612
4479
|
setLiveText("");
|
|
4613
4480
|
}, []);
|
|
4614
4481
|
const wakeRef = React13__namespace.useRef(null);
|
|
4615
|
-
const sv = useSpeakerVerify({ enabled: requireDoctor });
|
|
4482
|
+
const sv = useSpeakerVerify({ enabled: requireDoctor, voiceprintNamespace });
|
|
4616
4483
|
const svRef = React13__namespace.useRef(sv);
|
|
4617
4484
|
svRef.current = sv;
|
|
4618
4485
|
const rollRef = React13__namespace.useRef(null);
|
|
4619
4486
|
const diar = useDiarization({
|
|
4620
4487
|
...diarizationOptions,
|
|
4621
|
-
enabled: conversationMode
|
|
4488
|
+
enabled: conversationMode,
|
|
4489
|
+
voiceprintNamespace
|
|
4622
4490
|
});
|
|
4623
4491
|
const diarRef = React13__namespace.useRef(diar);
|
|
4624
4492
|
diarRef.current = diar;
|
|
@@ -4626,6 +4494,7 @@ function useHeyOzwell(options = {}) {
|
|
|
4626
4494
|
(name) => {
|
|
4627
4495
|
if (!requireDoctor) return true;
|
|
4628
4496
|
const svh = svRef.current;
|
|
4497
|
+
if (!svh.ready) return false;
|
|
4629
4498
|
const enrolled = svh.conditionCount(name) > 0;
|
|
4630
4499
|
if (!enrolled) return true;
|
|
4631
4500
|
const roll = rollRef.current;
|
|
@@ -4830,9 +4699,14 @@ function useHeyOzwell(options = {}) {
|
|
|
4830
4699
|
if (!requireDoctor || !active || !wake.ready) return;
|
|
4831
4700
|
let cancelled = false;
|
|
4832
4701
|
let tries = 0;
|
|
4833
|
-
|
|
4702
|
+
const applied = /* @__PURE__ */ new Set(["hey-ozwell", "ozwell-i'm-done"]);
|
|
4703
|
+
for (const k of applied) wakeRef.current?.setVoiceprint(k, []);
|
|
4704
|
+
void chunkOGNADPM4_cjs.loadWhatPrints(voiceprintNamespace).then((loaded) => {
|
|
4834
4705
|
if (cancelled) return;
|
|
4835
|
-
for (const k in loaded)
|
|
4706
|
+
for (const k in loaded) {
|
|
4707
|
+
applied.add(k);
|
|
4708
|
+
wakeRef.current?.setVoiceprint(k, loaded[k]);
|
|
4709
|
+
}
|
|
4836
4710
|
});
|
|
4837
4711
|
const tryOpen = () => {
|
|
4838
4712
|
if (cancelled || rollRef.current) return;
|
|
@@ -4843,10 +4717,11 @@ function useHeyOzwell(options = {}) {
|
|
|
4843
4717
|
tryOpen();
|
|
4844
4718
|
return () => {
|
|
4845
4719
|
cancelled = true;
|
|
4720
|
+
for (const k of applied) wakeRef.current?.setVoiceprint(k, []);
|
|
4846
4721
|
rollRef.current?.close();
|
|
4847
4722
|
rollRef.current = null;
|
|
4848
4723
|
};
|
|
4849
|
-
}, [requireDoctor, active, wake.ready]);
|
|
4724
|
+
}, [requireDoctor, active, wake.ready, voiceprintNamespace]);
|
|
4850
4725
|
const hasListenedRef = React13__namespace.useRef(false);
|
|
4851
4726
|
React13__namespace.useEffect(() => {
|
|
4852
4727
|
if (listening) hasListenedRef.current = true;
|
|
@@ -5138,11 +5013,11 @@ var REPS = 3;
|
|
|
5138
5013
|
var TIMEOUT_MS = 5e3;
|
|
5139
5014
|
var delay = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
5140
5015
|
function useVoiceSetup(options = {}) {
|
|
5141
|
-
const { startAdding = false, voiceId, label } = options;
|
|
5016
|
+
const { startAdding = false, voiceId, label, voiceprintNamespace } = options;
|
|
5142
5017
|
const [enrollVoiceId] = React13__namespace.useState(
|
|
5143
5018
|
() => voiceId || (startAdding ? `voice-${Date.now()}-${Math.floor(Math.random() * 1e4)}` : "you")
|
|
5144
5019
|
);
|
|
5145
|
-
const sv = useSpeakerVerify();
|
|
5020
|
+
const sv = useSpeakerVerify({ voiceprintNamespace });
|
|
5146
5021
|
const expectRef = React13__namespace.useRef(null);
|
|
5147
5022
|
const resolveRef = React13__namespace.useRef(null);
|
|
5148
5023
|
const whatRef = React13__namespace.useRef({});
|
|
@@ -5164,10 +5039,19 @@ function useVoiceSetup(options = {}) {
|
|
|
5164
5039
|
const total = PHRASES2.length * REPS;
|
|
5165
5040
|
React13__namespace.useEffect(() => {
|
|
5166
5041
|
warmWhisper();
|
|
5167
|
-
|
|
5168
|
-
|
|
5042
|
+
let cancelled = false;
|
|
5043
|
+
whatRef.current = {};
|
|
5044
|
+
void chunkOGNADPM4_cjs.loadWhatPrints(voiceprintNamespace).then((w) => {
|
|
5045
|
+
if (!cancelled) whatRef.current = w;
|
|
5169
5046
|
});
|
|
5170
|
-
|
|
5047
|
+
return () => {
|
|
5048
|
+
cancelled = true;
|
|
5049
|
+
abortRef.current = true;
|
|
5050
|
+
resolveRef.current?.("__cancelled__");
|
|
5051
|
+
setPhase("intro");
|
|
5052
|
+
setStep(0);
|
|
5053
|
+
};
|
|
5054
|
+
}, [voiceprintNamespace]);
|
|
5171
5055
|
React13__namespace.useEffect(() => {
|
|
5172
5056
|
if (!wake.ready) {
|
|
5173
5057
|
setLevel(0);
|
|
@@ -5279,10 +5163,10 @@ function useVoiceSetup(options = {}) {
|
|
|
5279
5163
|
whatRef.current[ph.key] = merged;
|
|
5280
5164
|
wakeRef.current.setVoiceprint(ph.key, merged);
|
|
5281
5165
|
}
|
|
5282
|
-
void saveWhatPrints(whatRef.current);
|
|
5166
|
+
void chunkOGNADPM4_cjs.saveWhatPrints(whatRef.current, voiceprintNamespace);
|
|
5283
5167
|
setAdding(false);
|
|
5284
5168
|
setPhase("done");
|
|
5285
|
-
}, [bothReady, phase, adding, sv, enrollVoiceId, label]);
|
|
5169
|
+
}, [bothReady, phase, adding, sv, enrollVoiceId, label, voiceprintNamespace]);
|
|
5286
5170
|
const addAnotherSpot = React13__namespace.useCallback(() => {
|
|
5287
5171
|
setAdding(true);
|
|
5288
5172
|
setPhase("intro");
|
|
@@ -5315,6 +5199,7 @@ var SUCCESS = "var(--mieweb-success, hsl(142.1 76.2% 36.3%))";
|
|
|
5315
5199
|
var ozA2 = (pct) => `color-mix(in srgb, ${OZ2} ${pct}%, transparent)`;
|
|
5316
5200
|
var ozBtn = "bg-ozwell hover:bg-ozwell active:bg-ozwell text-ozwell-foreground hover:brightness-95 active:brightness-90";
|
|
5317
5201
|
function VoiceSetup({
|
|
5202
|
+
voiceprintNamespace,
|
|
5318
5203
|
mode = "enroll",
|
|
5319
5204
|
voiceId,
|
|
5320
5205
|
label,
|
|
@@ -5322,7 +5207,12 @@ function VoiceSetup({
|
|
|
5322
5207
|
onDone,
|
|
5323
5208
|
onCancel
|
|
5324
5209
|
}) {
|
|
5325
|
-
const oz = useVoiceSetup({
|
|
5210
|
+
const oz = useVoiceSetup({
|
|
5211
|
+
startAdding: mode === "add",
|
|
5212
|
+
voiceId,
|
|
5213
|
+
label,
|
|
5214
|
+
voiceprintNamespace
|
|
5215
|
+
});
|
|
5326
5216
|
const { phase, phrase, step, total, adding, level, ready, error } = oz;
|
|
5327
5217
|
const octoScale = 1 + Math.min(0.32, level * 2.2);
|
|
5328
5218
|
const glowOpacity = 0.35 + Math.min(0.6, level * 4);
|
|
@@ -5533,8 +5423,11 @@ function VoiceSetup({
|
|
|
5533
5423
|
var OZ3 = "var(--mieweb-ozwell, #0BA0E0)";
|
|
5534
5424
|
var ozBtn2 = "bg-ozwell hover:bg-ozwell active:bg-ozwell text-ozwell-foreground hover:brightness-95 active:brightness-90";
|
|
5535
5425
|
var dangerOutline = "border-destructive text-destructive hover:bg-destructive/10 hover:text-destructive";
|
|
5536
|
-
function VoiceManager({
|
|
5537
|
-
|
|
5426
|
+
function VoiceManager({
|
|
5427
|
+
logoSrc,
|
|
5428
|
+
voiceprintNamespace
|
|
5429
|
+
}) {
|
|
5430
|
+
const sv = useSpeakerVerify({ voiceprintNamespace });
|
|
5538
5431
|
const [inSetup, setInSetup] = React13__namespace.useState(null);
|
|
5539
5432
|
const [, setTick] = React13__namespace.useState(0);
|
|
5540
5433
|
const [addName, setAddName] = React13__namespace.useState("");
|
|
@@ -5546,6 +5439,7 @@ function VoiceManager({ logoSrc }) {
|
|
|
5546
5439
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5547
5440
|
VoiceSetup,
|
|
5548
5441
|
{
|
|
5442
|
+
voiceprintNamespace,
|
|
5549
5443
|
mode: inSetup.mode,
|
|
5550
5444
|
voiceId: inSetup.voiceId,
|
|
5551
5445
|
label: inSetup.label,
|
|
@@ -5577,7 +5471,7 @@ function VoiceManager({ logoSrc }) {
|
|
|
5577
5471
|
};
|
|
5578
5472
|
const clearAll = () => {
|
|
5579
5473
|
sv.clear();
|
|
5580
|
-
void clearWhatPrints();
|
|
5474
|
+
void chunkOGNADPM4_cjs.clearWhatPrints(voiceprintNamespace);
|
|
5581
5475
|
setTick((t) => t + 1);
|
|
5582
5476
|
};
|
|
5583
5477
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "bg-background text-foreground flex min-h-full flex-col items-center justify-center p-6 text-center", children: [
|
|
@@ -5727,6 +5621,7 @@ function VoiceManager({ logoSrc }) {
|
|
|
5727
5621
|
] });
|
|
5728
5622
|
}
|
|
5729
5623
|
function HandsFreeChat({
|
|
5624
|
+
voiceprintNamespace,
|
|
5730
5625
|
title = "Ozwell Assistant \u2014 hands-free",
|
|
5731
5626
|
suggestions,
|
|
5732
5627
|
userName,
|
|
@@ -5739,6 +5634,7 @@ function HandsFreeChat({
|
|
|
5739
5634
|
autoDictateOnWake = true
|
|
5740
5635
|
}) {
|
|
5741
5636
|
const oz = useHeyOzwell({
|
|
5637
|
+
voiceprintNamespace,
|
|
5742
5638
|
autoStart: true,
|
|
5743
5639
|
// always listening while mounted
|
|
5744
5640
|
autoDictateOnWake,
|
|
@@ -5817,7 +5713,13 @@ function HandsFreeChat({
|
|
|
5817
5713
|
/* @__PURE__ */ jsxRuntime.jsx(chunk7ZDPD5ZX_cjs.ModalTitle, { children: "Your voice" }),
|
|
5818
5714
|
/* @__PURE__ */ jsxRuntime.jsx(chunk7ZDPD5ZX_cjs.ModalClose, {})
|
|
5819
5715
|
] }),
|
|
5820
|
-
/* @__PURE__ */ jsxRuntime.jsx(chunk7ZDPD5ZX_cjs.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5716
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunk7ZDPD5ZX_cjs.ModalBody, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5717
|
+
VoiceManager,
|
|
5718
|
+
{
|
|
5719
|
+
logoSrc,
|
|
5720
|
+
voiceprintNamespace
|
|
5721
|
+
}
|
|
5722
|
+
) })
|
|
5821
5723
|
] })
|
|
5822
5724
|
] });
|
|
5823
5725
|
}
|
|
@@ -44468,6 +44370,30 @@ Object.defineProperty(exports, "ozwellBrand", {
|
|
|
44468
44370
|
enumerable: true,
|
|
44469
44371
|
get: function () { return chunkRR2MJBGV_cjs.ozwellBrand; }
|
|
44470
44372
|
});
|
|
44373
|
+
Object.defineProperty(exports, "clearVoiceprints", {
|
|
44374
|
+
enumerable: true,
|
|
44375
|
+
get: function () { return chunkOGNADPM4_cjs.clearVoiceprints; }
|
|
44376
|
+
});
|
|
44377
|
+
Object.defineProperty(exports, "clearWhatPrints", {
|
|
44378
|
+
enumerable: true,
|
|
44379
|
+
get: function () { return chunkOGNADPM4_cjs.clearWhatPrints; }
|
|
44380
|
+
});
|
|
44381
|
+
Object.defineProperty(exports, "getVoiceprints", {
|
|
44382
|
+
enumerable: true,
|
|
44383
|
+
get: function () { return chunkOGNADPM4_cjs.getVoiceprints; }
|
|
44384
|
+
});
|
|
44385
|
+
Object.defineProperty(exports, "loadWhatPrints", {
|
|
44386
|
+
enumerable: true,
|
|
44387
|
+
get: function () { return chunkOGNADPM4_cjs.loadWhatPrints; }
|
|
44388
|
+
});
|
|
44389
|
+
Object.defineProperty(exports, "saveWhatPrints", {
|
|
44390
|
+
enumerable: true,
|
|
44391
|
+
get: function () { return chunkOGNADPM4_cjs.saveWhatPrints; }
|
|
44392
|
+
});
|
|
44393
|
+
Object.defineProperty(exports, "setVoiceprints", {
|
|
44394
|
+
enumerable: true,
|
|
44395
|
+
get: function () { return chunkOGNADPM4_cjs.setVoiceprints; }
|
|
44396
|
+
});
|
|
44471
44397
|
Object.defineProperty(exports, "ThemeProvider", {
|
|
44472
44398
|
enumerable: true,
|
|
44473
44399
|
get: function () { return chunkJID7AZTO_cjs.ThemeProvider; }
|
|
@@ -46916,8 +46842,6 @@ exports.attributeSegments = attributeSegments;
|
|
|
46916
46842
|
exports.calculateDateRange = calculateDateRange;
|
|
46917
46843
|
exports.centroid = centroid;
|
|
46918
46844
|
exports.chime = chime;
|
|
46919
|
-
exports.clearVoiceprints = clearVoiceprints;
|
|
46920
|
-
exports.clearWhatPrints = clearWhatPrints;
|
|
46921
46845
|
exports.clusterEmbeddings = clusterEmbeddings;
|
|
46922
46846
|
exports.concernGroupKey = concernGroupKey;
|
|
46923
46847
|
exports.concernHistoryContent = concernHistoryContent;
|
|
@@ -46944,7 +46868,6 @@ exports.getExtendedPresets = getExtendedPresets;
|
|
|
46944
46868
|
exports.getGoogleMapsSearchUrl = getGoogleMapsSearchUrl;
|
|
46945
46869
|
exports.getGoogleMapsUrl = getGoogleMapsUrl;
|
|
46946
46870
|
exports.getOzwellConfig = getOzwellConfig;
|
|
46947
|
-
exports.getVoiceprints = getVoiceprints;
|
|
46948
46871
|
exports.getWakeWarm = getWakeWarm;
|
|
46949
46872
|
exports.inferSpeakerRoles = inferSpeakerRoles;
|
|
46950
46873
|
exports.isConditionCodetype = isConditionCodetype;
|
|
@@ -46952,7 +46875,6 @@ exports.isOzwellConfigured = isOzwellConfigured;
|
|
|
46952
46875
|
exports.isValidUrl = isValidUrl;
|
|
46953
46876
|
exports.isWhisperLoaded = isWhisperLoaded;
|
|
46954
46877
|
exports.labelClusters = labelClusters;
|
|
46955
|
-
exports.loadWhatPrints = loadWhatPrints;
|
|
46956
46878
|
exports.medicationToOrder = medicationToOrder;
|
|
46957
46879
|
exports.mergeTurns = mergeTurns;
|
|
46958
46880
|
exports.normalizeConditionCodingSystem = normalizeConditionCodingSystem;
|
|
@@ -46960,8 +46882,6 @@ exports.openRollingRecorder = openRollingRecorder;
|
|
|
46960
46882
|
exports.orderToMedication = orderToMedication;
|
|
46961
46883
|
exports.orderTypeForCodetype = orderTypeForCodetype;
|
|
46962
46884
|
exports.reconciliationPanelVariants = panelVariants;
|
|
46963
|
-
exports.saveWhatPrints = saveWhatPrints;
|
|
46964
|
-
exports.setVoiceprints = setVoiceprints;
|
|
46965
46885
|
exports.stripStopPhrase = stripStopPhrase;
|
|
46966
46886
|
exports.subscribeDictationLoad = subscribeDictationLoad;
|
|
46967
46887
|
exports.subscribeWakeWarm = subscribeWakeWarm;
|