@dxos/plugin-transcription 0.8.2-main.fbd8ed0 → 0.8.2-staging.7ac8446
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/lib/browser/{TranscriptContainer-CXA4ZBHW.mjs → TranscriptContainer-JQ3HFHLQ.mjs} +2 -3
- package/dist/lib/browser/app-graph-builder-VDQOVX7P.mjs +191 -0
- package/dist/lib/browser/app-graph-builder-VDQOVX7P.mjs.map +7 -0
- package/dist/lib/browser/chunk-G4B6CPC2.mjs +253 -0
- package/dist/lib/browser/chunk-G4B6CPC2.mjs.map +7 -0
- package/dist/lib/browser/{chunk-KLD7O5GJ.mjs → chunk-GU2BNYKZ.mjs} +12 -2
- package/dist/lib/browser/chunk-GU2BNYKZ.mjs.map +7 -0
- package/dist/lib/browser/chunk-K7FOYAXO.mjs +8 -0
- package/dist/lib/browser/chunk-K7FOYAXO.mjs.map +7 -0
- package/dist/lib/browser/chunk-OGNXNGJB.mjs +73 -0
- package/dist/lib/browser/chunk-OGNXNGJB.mjs.map +7 -0
- package/dist/lib/browser/{chunk-3TKXI6TQ.mjs → chunk-YCZISX63.mjs} +81 -108
- package/dist/lib/browser/chunk-YCZISX63.mjs.map +7 -0
- package/dist/lib/browser/{chunk-LTIQFX4W.mjs → chunk-YEPT334A.mjs} +1 -1
- package/dist/lib/browser/chunk-YEPT334A.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +210 -47
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-DZ62CJPC.mjs → intent-resolver-4R66ZCKT.mjs} +8 -8
- package/dist/lib/browser/intent-resolver-4R66ZCKT.mjs.map +7 -0
- package/dist/lib/browser/{meeting-transcription-state-MNA2XROE.mjs → meeting-transcription-state-DLFHQK72.mjs} +4 -4
- package/dist/lib/browser/meeting-transcription-state-DLFHQK72.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-PUXZNAZL.mjs → react-surface-FQUHU5G7.mjs} +6 -18
- package/dist/lib/browser/react-surface-FQUHU5G7.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-YWWIV6KP.mjs → transcriber-LGMIWDYI.mjs} +7 -8
- package/dist/lib/browser/{transcriber-YWWIV6KP.mjs.map → transcriber-LGMIWDYI.mjs.map} +3 -3
- package/dist/lib/browser/types/index.mjs +3 -3
- package/dist/lib/node/{TranscriptContainer-SSJVLRM6.cjs → TranscriptContainer-QEYTTT2V.cjs} +7 -8
- package/dist/lib/node/TranscriptContainer-QEYTTT2V.cjs.map +7 -0
- package/dist/lib/node/app-graph-builder-IFSIVNUR.cjs +200 -0
- package/dist/lib/node/app-graph-builder-IFSIVNUR.cjs.map +7 -0
- package/dist/lib/node/{chunk-J72PUQ3C.cjs → chunk-3KHUSQNW.cjs} +15 -6
- package/dist/lib/node/chunk-3KHUSQNW.cjs.map +7 -0
- package/dist/lib/node/{chunk-JUGOXWES.cjs → chunk-CZMLKKWT.cjs} +4 -4
- package/dist/lib/node/chunk-CZMLKKWT.cjs.map +7 -0
- package/dist/lib/node/{chunk-WKZLGVEJ.cjs → chunk-FCCJALOT.cjs} +83 -111
- package/dist/lib/node/chunk-FCCJALOT.cjs.map +7 -0
- package/dist/lib/node/{chunk-L27AK6FQ.cjs → chunk-LP4FG423.cjs} +8 -23
- package/dist/lib/node/chunk-LP4FG423.cjs.map +7 -0
- package/dist/lib/node/{chunk-EJWB53WK.cjs → chunk-P4VVD6ZO.cjs} +34 -24
- package/dist/lib/node/chunk-P4VVD6ZO.cjs.map +7 -0
- package/dist/lib/node/chunk-UOFHT4GZ.cjs +280 -0
- package/dist/lib/node/chunk-UOFHT4GZ.cjs.map +7 -0
- package/dist/lib/node/index.cjs +238 -66
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/{intent-resolver-TRBKI24D.cjs → intent-resolver-WMMCOUEH.cjs} +10 -11
- package/dist/lib/node/intent-resolver-WMMCOUEH.cjs.map +7 -0
- package/dist/lib/node/{meeting-transcription-state-5XLTMWPA.cjs → meeting-transcription-state-URIYILEQ.cjs} +7 -7
- package/dist/lib/node/meeting-transcription-state-URIYILEQ.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-SZAMHCX7.cjs → react-surface-WI2MGWCC.cjs} +10 -20
- package/dist/lib/node/react-surface-WI2MGWCC.cjs.map +7 -0
- package/dist/lib/node/{transcriber-AFUXFHCR.cjs → transcriber-QG5WPKX4.cjs} +13 -14
- package/dist/lib/node/{transcriber-AFUXFHCR.cjs.map → transcriber-QG5WPKX4.cjs.map} +3 -3
- package/dist/lib/node/types/index.cjs +8 -8
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{TranscriptContainer-M53LI2TX.mjs → TranscriptContainer-ZXUCOWGY.mjs} +2 -3
- package/dist/lib/node-esm/app-graph-builder-UL6XLIZY.mjs +192 -0
- package/dist/lib/node-esm/app-graph-builder-UL6XLIZY.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6X7X2UZF.mjs +254 -0
- package/dist/lib/node-esm/chunk-6X7X2UZF.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-GIO6J6FE.mjs +74 -0
- package/dist/lib/node-esm/chunk-GIO6J6FE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-QMHMEKB3.mjs → chunk-HKATMD34.mjs} +12 -2
- package/dist/lib/node-esm/chunk-HKATMD34.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-J4D2RBBH.mjs +10 -0
- package/dist/lib/node-esm/chunk-J4D2RBBH.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-5E2MR5XK.mjs → chunk-PTZHDZ36.mjs} +1 -1
- package/dist/lib/node-esm/chunk-PTZHDZ36.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-V5IWBPYO.mjs → chunk-YQYBLFNI.mjs} +81 -108
- package/dist/lib/node-esm/chunk-YQYBLFNI.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +210 -47
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-HFVAL274.mjs → intent-resolver-QN2LO5TX.mjs} +8 -8
- package/dist/lib/node-esm/intent-resolver-QN2LO5TX.mjs.map +7 -0
- package/dist/lib/node-esm/{meeting-transcription-state-3WOZ52BQ.mjs → meeting-transcription-state-ZYVRAW6Y.mjs} +4 -4
- package/dist/lib/node-esm/meeting-transcription-state-ZYVRAW6Y.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-UEJELL7I.mjs → react-surface-PCH6NTVB.mjs} +6 -18
- package/dist/lib/node-esm/react-surface-PCH6NTVB.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-7RJEFPDI.mjs → transcriber-TMPYZ5L4.mjs} +7 -8
- package/dist/lib/node-esm/{transcriber-7RJEFPDI.mjs.map → transcriber-TMPYZ5L4.mjs.map} +3 -3
- package/dist/lib/node-esm/types/index.mjs +3 -3
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +179 -2
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +7 -5
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +182 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/meeting-transcription-state.d.ts +4 -2
- package/dist/types/src/capabilities/meeting-transcription-state.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.d.ts +4 -14
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +4 -19
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +0 -1
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/transcription.stories.d.ts +3 -6
- package/dist/types/src/components/transcription.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts +1 -1
- package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
- package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts +2 -2
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.test.d.ts +2 -0
- package/dist/types/src/transcriber/transcriber.test.d.ts.map +1 -0
- package/dist/types/src/transcriber/transcription-manager.d.ts +15 -17
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +18 -3
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +40 -26
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +7 -18
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/dist/types/src/util/array.d.ts.map +1 -1
- package/dist/types/src/util/get-time-str.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +1 -0
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
- package/dist/types/src/util/random-queue-dxn.d.ts +3 -0
- package/dist/types/src/util/random-queue-dxn.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +40 -57
- package/src/TranscriptionPlugin.tsx +13 -30
- package/src/capabilities/app-graph-builder.ts +111 -192
- package/src/capabilities/capabilities.ts +3 -4
- package/src/capabilities/index.ts +0 -1
- package/src/capabilities/intent-resolver.ts +7 -8
- package/src/capabilities/meeting-transcription-state.ts +2 -2
- package/src/capabilities/react-surface.tsx +4 -12
- package/src/capabilities/transcriber.ts +1 -2
- package/src/components/Transcript/Transcript.stories.tsx +43 -201
- package/src/components/Transcript/Transcript.tsx +208 -83
- package/src/components/TranscriptContainer.tsx +6 -11
- package/src/components/index.ts +0 -1
- package/src/components/transcription.stories.tsx +65 -164
- package/src/hooks/index.ts +0 -1
- package/src/hooks/useTranscriber.ts +2 -3
- package/src/transcriber/{transcriber.browser.test.ts → transcriber.test.ts} +3 -3
- package/src/transcriber/transcriber.ts +11 -20
- package/src/transcriber/transcription-manager.ts +58 -67
- package/src/translations.ts +0 -2
- package/src/types/schema.ts +32 -11
- package/src/types/types.ts +9 -19
- package/src/util/index.ts +1 -0
- package/src/util/random-queue-dxn.ts +9 -0
- package/dist/lib/browser/app-graph-builder-REQZ5SC5.mjs +0 -351
- package/dist/lib/browser/app-graph-builder-REQZ5SC5.mjs.map +0 -7
- package/dist/lib/browser/chunk-3TKXI6TQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-JHWEZRWC.mjs +0 -63
- package/dist/lib/browser/chunk-JHWEZRWC.mjs.map +0 -7
- package/dist/lib/browser/chunk-K2LS2QOM.mjs +0 -720
- package/dist/lib/browser/chunk-K2LS2QOM.mjs.map +0 -7
- package/dist/lib/browser/chunk-KLD7O5GJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-LCTMCTYY.mjs +0 -27
- package/dist/lib/browser/chunk-LCTMCTYY.mjs.map +0 -7
- package/dist/lib/browser/chunk-LTIQFX4W.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-DZ62CJPC.mjs.map +0 -7
- package/dist/lib/browser/meeting-transcription-state-MNA2XROE.mjs.map +0 -7
- package/dist/lib/browser/react-surface-PUXZNAZL.mjs.map +0 -7
- package/dist/lib/browser/settings-JWDS4J3F.mjs +0 -24
- package/dist/lib/browser/settings-JWDS4J3F.mjs.map +0 -7
- package/dist/lib/node/TranscriptContainer-SSJVLRM6.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-OAPU4GDH.cjs +0 -352
- package/dist/lib/node/app-graph-builder-OAPU4GDH.cjs.map +0 -7
- package/dist/lib/node/chunk-EJWB53WK.cjs.map +0 -7
- package/dist/lib/node/chunk-EVE3H46F.cjs +0 -737
- package/dist/lib/node/chunk-EVE3H46F.cjs.map +0 -7
- package/dist/lib/node/chunk-J72PUQ3C.cjs.map +0 -7
- package/dist/lib/node/chunk-JUGOXWES.cjs.map +0 -7
- package/dist/lib/node/chunk-L27AK6FQ.cjs.map +0 -7
- package/dist/lib/node/chunk-WKZLGVEJ.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-TRBKI24D.cjs.map +0 -7
- package/dist/lib/node/meeting-transcription-state-5XLTMWPA.cjs.map +0 -7
- package/dist/lib/node/react-surface-SZAMHCX7.cjs.map +0 -7
- package/dist/lib/node/settings-AWWMOSCV.cjs +0 -38
- package/dist/lib/node/settings-AWWMOSCV.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-UBP6EOBR.mjs +0 -352
- package/dist/lib/node-esm/app-graph-builder-UBP6EOBR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-4KC3E5T4.mjs +0 -721
- package/dist/lib/node-esm/chunk-4KC3E5T4.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-5E2MR5XK.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MHQP2PAF.mjs +0 -28
- package/dist/lib/node-esm/chunk-MHQP2PAF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QMHMEKB3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-QYG2FOXA.mjs +0 -64
- package/dist/lib/node-esm/chunk-QYG2FOXA.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V5IWBPYO.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-HFVAL274.mjs.map +0 -7
- package/dist/lib/node-esm/meeting-transcription-state-3WOZ52BQ.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-UEJELL7I.mjs.map +0 -7
- package/dist/lib/node-esm/settings-QFNFGFJ5.mjs +0 -25
- package/dist/lib/node-esm/settings-QFNFGFJ5.mjs.map +0 -7
- package/dist/types/src/capabilities/settings.d.ts +0 -4
- package/dist/types/src/capabilities/settings.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +0 -27
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +0 -19
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +0 -1
- package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts +0 -6
- package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts.map +0 -1
- package/dist/types/src/components/TranscriptionSettings/index.d.ts +0 -2
- package/dist/types/src/components/TranscriptionSettings/index.d.ts.map +0 -1
- package/dist/types/src/entity-extraction/entity-extraction.d.ts +0 -42
- package/dist/types/src/entity-extraction/entity-extraction.d.ts.map +0 -1
- package/dist/types/src/entity-extraction/entity-extraction.test.d.ts +0 -2
- package/dist/types/src/entity-extraction/entity-extraction.test.d.ts.map +0 -1
- package/dist/types/src/entity-extraction/index.d.ts +0 -2
- package/dist/types/src/entity-extraction/index.d.ts.map +0 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +0 -7
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +0 -1
- package/dist/types/src/model/index.d.ts +0 -2
- package/dist/types/src/model/index.d.ts.map +0 -1
- package/dist/types/src/model/model.d.ts +0 -68
- package/dist/types/src/model/model.d.ts.map +0 -1
- package/dist/types/src/model/model.test.d.ts +0 -2
- package/dist/types/src/model/model.test.d.ts.map +0 -1
- package/dist/types/src/testing/index.d.ts +0 -2
- package/dist/types/src/testing/index.d.ts.map +0 -1
- package/dist/types/src/testing/testing.d.ts +0 -40
- package/dist/types/src/testing/testing.d.ts.map +0 -1
- package/dist/types/src/transcriber/transcriber.browser.test.d.ts +0 -2
- package/dist/types/src/transcriber/transcriber.browser.test.d.ts.map +0 -1
- package/src/capabilities/settings.ts +0 -20
- package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
- package/src/components/Transcript/transcript-extension.ts +0 -236
- package/src/components/TranscriptionSettings/TranscriptionSettings.tsx +0 -26
- package/src/components/TranscriptionSettings/index.ts +0 -5
- package/src/entity-extraction/entity-extraction.test.ts +0 -97
- package/src/entity-extraction/entity-extraction.ts +0 -149
- package/src/entity-extraction/index.ts +0 -5
- package/src/entity-extraction/system-prompt.tpl +0 -38
- package/src/entity-extraction/types.d.ts +0 -8
- package/src/hooks/useQueueModelAdapter.ts +0 -63
- package/src/model/index.ts +0 -5
- package/src/model/model.test.ts +0 -169
- package/src/model/model.ts +0 -229
- package/src/testing/index.ts +0 -5
- package/src/testing/testing.ts +0 -216
- /package/dist/lib/browser/{TranscriptContainer-CXA4ZBHW.mjs.map → TranscriptContainer-JQ3HFHLQ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-M53LI2TX.mjs.map → TranscriptContainer-ZXUCOWGY.mjs.map} +0 -0
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var app_graph_builder_IFSIVNUR_exports = {};
|
|
20
|
+
__export(app_graph_builder_IFSIVNUR_exports, {
|
|
21
|
+
default: () => app_graph_builder_default
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(app_graph_builder_IFSIVNUR_exports);
|
|
24
|
+
var import_chunk_FCCJALOT = require("./chunk-FCCJALOT.cjs");
|
|
25
|
+
var import_chunk_3KHUSQNW = require("./chunk-3KHUSQNW.cjs");
|
|
26
|
+
var import_chunk_CZMLKKWT = require("./chunk-CZMLKKWT.cjs");
|
|
27
|
+
var import_chunk_P4VVD6ZO = require("./chunk-P4VVD6ZO.cjs");
|
|
28
|
+
var import_chunk_NVZWGFJL = require("./chunk-NVZWGFJL.cjs");
|
|
29
|
+
var import_app_framework = require("@dxos/app-framework");
|
|
30
|
+
var import_echo = require("@dxos/client/echo");
|
|
31
|
+
var import_display_name = require("@dxos/display-name");
|
|
32
|
+
var import_echo_schema = require("@dxos/echo-schema");
|
|
33
|
+
var import_invariant = require("@dxos/invariant");
|
|
34
|
+
var import_plugin_client = require("@dxos/plugin-client");
|
|
35
|
+
var import_types = require("@dxos/plugin-deck/types");
|
|
36
|
+
var import_plugin_graph = require("@dxos/plugin-graph");
|
|
37
|
+
var import_plugin_meeting = require("@dxos/plugin-meeting");
|
|
38
|
+
var import_types2 = require("@dxos/plugin-meeting/types");
|
|
39
|
+
var import_buf = require("@dxos/protocols/buf");
|
|
40
|
+
var import_calls_pb = require("@dxos/protocols/buf/dxos/edge/calls_pb");
|
|
41
|
+
var import_util = require("@dxos/util");
|
|
42
|
+
var __dxlog_file = "/home/runner/work/dxos/dxos/packages/plugins/plugin-transcription/src/capabilities/app-graph-builder.ts";
|
|
43
|
+
var codec = {
|
|
44
|
+
encode: (message) => {
|
|
45
|
+
return import_buf.buf.toBinary(import_calls_pb.TranscriptionPayloadSchema, import_buf.buf.create(import_calls_pb.TranscriptionPayloadSchema, message));
|
|
46
|
+
},
|
|
47
|
+
decode: (message) => {
|
|
48
|
+
return import_buf.buf.fromBinary(import_calls_pb.TranscriptionPayloadSchema, message);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
var getMeetingTranscript = async (context, meeting) => {
|
|
52
|
+
const { dispatchPromise: dispatch } = context.requestCapability(import_app_framework.Capabilities.IntentDispatcher);
|
|
53
|
+
const typename = (0, import_echo_schema.getSchemaTypename)(import_chunk_P4VVD6ZO.TranscriptType);
|
|
54
|
+
const existing = await meeting.artifacts[typename]?.load();
|
|
55
|
+
if (existing instanceof import_chunk_P4VVD6ZO.TranscriptType) {
|
|
56
|
+
return existing;
|
|
57
|
+
}
|
|
58
|
+
const space = (0, import_echo.getSpace)(meeting);
|
|
59
|
+
(0, import_invariant.invariant)(space, void 0, {
|
|
60
|
+
F: __dxlog_file,
|
|
61
|
+
L: 52,
|
|
62
|
+
S: void 0,
|
|
63
|
+
A: [
|
|
64
|
+
"space",
|
|
65
|
+
""
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
const { data } = await dispatch((0, import_app_framework.createIntent)(import_chunk_P4VVD6ZO.TranscriptionAction.Create, {
|
|
69
|
+
spaceId: space.id
|
|
70
|
+
}));
|
|
71
|
+
meeting.artifacts[typename] = (0, import_echo.makeRef)(data.object);
|
|
72
|
+
return data?.object;
|
|
73
|
+
};
|
|
74
|
+
var app_graph_builder_default = (context) => (0, import_app_framework.contributes)(import_app_framework.Capabilities.AppGraphBuilder, [
|
|
75
|
+
(0, import_plugin_graph.createExtension)({
|
|
76
|
+
id: `${import_chunk_NVZWGFJL.TRANSCRIPTION_PLUGIN}/meeting-transcript`,
|
|
77
|
+
filter: (node) => (0, import_echo_schema.isInstanceOf)(import_types2.MeetingType, node.data) && node.type !== import_types.PLANK_COMPANION_TYPE,
|
|
78
|
+
actions: ({ node }) => {
|
|
79
|
+
const meeting = node.data;
|
|
80
|
+
const state = context.requestCapability(import_chunk_CZMLKKWT.TranscriptionCapabilities.MeetingTranscriptionState);
|
|
81
|
+
return [
|
|
82
|
+
{
|
|
83
|
+
id: `${(0, import_echo.fullyQualifiedId)(meeting)}/action/start-stop-transcription`,
|
|
84
|
+
data: async () => {
|
|
85
|
+
const call = context.requestCapability(import_plugin_meeting.MeetingCapabilities.CallManager);
|
|
86
|
+
(0, import_invariant.invariant)(state.transcriptionManager, void 0, {
|
|
87
|
+
F: __dxlog_file,
|
|
88
|
+
L: 73,
|
|
89
|
+
S: void 0,
|
|
90
|
+
A: [
|
|
91
|
+
"state.transcriptionManager",
|
|
92
|
+
""
|
|
93
|
+
]
|
|
94
|
+
});
|
|
95
|
+
state.enabled = !state.enabled;
|
|
96
|
+
void state.transcriptionManager.setEnabled(state.enabled);
|
|
97
|
+
const transcript = await getMeetingTranscript(context, meeting);
|
|
98
|
+
(0, import_invariant.invariant)(transcript, "Failed to create transcript", {
|
|
99
|
+
F: __dxlog_file,
|
|
100
|
+
L: 77,
|
|
101
|
+
S: void 0,
|
|
102
|
+
A: [
|
|
103
|
+
"transcript",
|
|
104
|
+
"'Failed to create transcript'"
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
call.setActivity((0, import_echo_schema.getSchemaTypename)(import_chunk_P4VVD6ZO.TranscriptType), {
|
|
108
|
+
value: codec.encode({
|
|
109
|
+
enabled: state.enabled,
|
|
110
|
+
queueDxn: transcript.queue.dxn.toString()
|
|
111
|
+
})
|
|
112
|
+
});
|
|
113
|
+
},
|
|
114
|
+
properties: {
|
|
115
|
+
label: state.enabled ? [
|
|
116
|
+
"stop transcription label",
|
|
117
|
+
{
|
|
118
|
+
ns: import_chunk_NVZWGFJL.TRANSCRIPTION_PLUGIN
|
|
119
|
+
}
|
|
120
|
+
] : [
|
|
121
|
+
"start transcription label",
|
|
122
|
+
{
|
|
123
|
+
ns: import_chunk_NVZWGFJL.TRANSCRIPTION_PLUGIN
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
icon: "ph--record--regular",
|
|
127
|
+
disposition: "toolbar",
|
|
128
|
+
classNames: state.enabled ? "text-activeInCall" : ""
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
];
|
|
132
|
+
},
|
|
133
|
+
connector: ({ node }) => {
|
|
134
|
+
const meeting = node.data;
|
|
135
|
+
const client = context.requestCapability(import_plugin_client.ClientCapabilities.Client);
|
|
136
|
+
const state = context.requestCapability(import_chunk_CZMLKKWT.TranscriptionCapabilities.MeetingTranscriptionState);
|
|
137
|
+
return [
|
|
138
|
+
{
|
|
139
|
+
id: `${(0, import_echo.fullyQualifiedId)(meeting)}${import_types.ATTENDABLE_PATH_SEPARATOR}${(0, import_echo_schema.getSchemaTypename)(import_chunk_P4VVD6ZO.TranscriptType)}`,
|
|
140
|
+
type: import_types.PLANK_COMPANION_TYPE,
|
|
141
|
+
data: meeting.artifacts[(0, import_echo_schema.getSchemaTypename)(import_chunk_P4VVD6ZO.TranscriptType)]?.target,
|
|
142
|
+
properties: {
|
|
143
|
+
label: [
|
|
144
|
+
"transcript companion label",
|
|
145
|
+
{
|
|
146
|
+
ns: import_chunk_NVZWGFJL.TRANSCRIPTION_PLUGIN
|
|
147
|
+
}
|
|
148
|
+
],
|
|
149
|
+
icon: "ph--subtitles--regular",
|
|
150
|
+
disposition: "hidden",
|
|
151
|
+
schema: import_chunk_P4VVD6ZO.TranscriptType,
|
|
152
|
+
getIntent: ({ space }) => (0, import_app_framework.createIntent)(import_chunk_P4VVD6ZO.TranscriptionAction.Create, {
|
|
153
|
+
spaceId: space.id
|
|
154
|
+
}),
|
|
155
|
+
onJoin: () => {
|
|
156
|
+
const transcriptionManager = new import_chunk_FCCJALOT.TranscriptionManager(client.edge);
|
|
157
|
+
const identity = client.halo.identity.get();
|
|
158
|
+
(0, import_invariant.invariant)(identity, void 0, {
|
|
159
|
+
F: __dxlog_file,
|
|
160
|
+
L: 116,
|
|
161
|
+
S: void 0,
|
|
162
|
+
A: [
|
|
163
|
+
"identity",
|
|
164
|
+
""
|
|
165
|
+
]
|
|
166
|
+
});
|
|
167
|
+
transcriptionManager.setName(identity.profile?.displayName ?? (0, import_display_name.generateName)(identity.identityKey.toHex()));
|
|
168
|
+
const fallbackValue = (0, import_util.keyToFallback)(identity.identityKey);
|
|
169
|
+
const userHue = identity.profile?.data?.hue || fallbackValue.hue;
|
|
170
|
+
transcriptionManager.setHue(userHue);
|
|
171
|
+
void transcriptionManager.open();
|
|
172
|
+
state.transcriptionManager = transcriptionManager;
|
|
173
|
+
},
|
|
174
|
+
onLeave: () => {
|
|
175
|
+
void state.transcriptionManager?.close();
|
|
176
|
+
state.transcriptionManager = void 0;
|
|
177
|
+
state.enabled = false;
|
|
178
|
+
},
|
|
179
|
+
onCallStateUpdated: (callState) => {
|
|
180
|
+
const typename = (0, import_echo_schema.getSchemaTypename)(import_chunk_P4VVD6ZO.TranscriptType);
|
|
181
|
+
const transcription = typename ? callState.activities?.[typename] : void 0;
|
|
182
|
+
if (!transcription?.payload?.value) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
const payload = codec.decode(transcription.payload.value);
|
|
186
|
+
state.enabled = payload.enabled;
|
|
187
|
+
void state.transcriptionManager?.setEnabled(payload.enabled);
|
|
188
|
+
void state.transcriptionManager?.setQueue(payload.queueDxn);
|
|
189
|
+
},
|
|
190
|
+
onMediaStateUpdated: ([mediaState, isSpeaking]) => {
|
|
191
|
+
void state.transcriptionManager?.setAudioTrack(mediaState.audioTrack);
|
|
192
|
+
void state.transcriptionManager?.setRecording(isSpeaking);
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
];
|
|
197
|
+
}
|
|
198
|
+
})
|
|
199
|
+
]);
|
|
200
|
+
//# sourceMappingURL=app-graph-builder-IFSIVNUR.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/app-graph-builder.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capabilities, contributes, createIntent, type PluginsContext } from '@dxos/app-framework';\nimport { fullyQualifiedId, getSpace, makeRef, type Space } from '@dxos/client/echo';\nimport { generateName } from '@dxos/display-name';\nimport { getSchemaTypename, isInstanceOf } from '@dxos/echo-schema';\nimport { invariant } from '@dxos/invariant';\nimport { ClientCapabilities } from '@dxos/plugin-client';\nimport { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-deck/types';\nimport { createExtension, type Node } from '@dxos/plugin-graph';\nimport { MeetingCapabilities, type CallState, type MediaState } from '@dxos/plugin-meeting';\nimport { MeetingType } from '@dxos/plugin-meeting/types';\nimport { buf } from '@dxos/protocols/buf';\nimport {\n TranscriptionPayloadSchema,\n type TranscriptionPayload as TranscriptionPayloadProto,\n} from '@dxos/protocols/buf/dxos/edge/calls_pb';\nimport { keyToFallback } from '@dxos/util';\n\nimport { TranscriptionCapabilities } from './capabilities';\nimport { TRANSCRIPTION_PLUGIN } from '../meta';\nimport { TranscriptionManager } from '../transcriber';\nimport { TranscriptionAction, TranscriptType } from '../types';\n\n// TODO(wittjosiah): Factor out.\n// TODO(wittjosiah): Can we stop using protobuf for this?\ntype TranscriptionPayload = buf.MessageInitShape<typeof TranscriptionPayloadSchema>;\nconst codec = {\n encode: (message: TranscriptionPayload): Uint8Array => {\n return buf.toBinary(TranscriptionPayloadSchema, buf.create(TranscriptionPayloadSchema, message));\n },\n decode: (message: Uint8Array): TranscriptionPayloadProto => {\n return buf.fromBinary(TranscriptionPayloadSchema, message);\n },\n};\n\nconst getMeetingTranscript = async (\n context: PluginsContext,\n meeting: MeetingType,\n): Promise<TranscriptType | undefined> => {\n const { dispatchPromise: dispatch } = context.requestCapability(Capabilities.IntentDispatcher);\n\n const typename = getSchemaTypename(TranscriptType)!;\n const existing = await meeting.artifacts[typename]?.load();\n if (existing instanceof TranscriptType) {\n return existing;\n }\n\n const space = getSpace(meeting);\n invariant(space);\n const { data } = await dispatch(createIntent(TranscriptionAction.Create, { spaceId: space.id }));\n meeting.artifacts[typename] = makeRef(data!.object);\n return data?.object;\n};\n\n// TODO(wittjosiah): Introduce a sound that plays when transcription is activated/deactivated.\nexport default (context: PluginsContext) =>\n contributes(Capabilities.AppGraphBuilder, [\n createExtension({\n id: `${TRANSCRIPTION_PLUGIN}/meeting-transcript`,\n filter: (node): node is Node<MeetingType> =>\n isInstanceOf(MeetingType, node.data) && node.type !== PLANK_COMPANION_TYPE,\n actions: ({ node }) => {\n const meeting = node.data;\n const state = context.requestCapability(TranscriptionCapabilities.MeetingTranscriptionState);\n return [\n {\n id: `${fullyQualifiedId(meeting)}/action/start-stop-transcription`,\n data: async () => {\n const call = context.requestCapability(MeetingCapabilities.CallManager);\n invariant(state.transcriptionManager);\n state.enabled = !state.enabled;\n void state.transcriptionManager.setEnabled(state.enabled);\n const transcript = await getMeetingTranscript(context, meeting);\n invariant(transcript, 'Failed to create transcript');\n call.setActivity(getSchemaTypename(TranscriptType)!, {\n value: codec.encode({\n enabled: state.enabled,\n queueDxn: transcript.queue.dxn.toString(),\n }),\n });\n },\n properties: {\n label: state.enabled\n ? ['stop transcription label', { ns: TRANSCRIPTION_PLUGIN }]\n : ['start transcription label', { ns: TRANSCRIPTION_PLUGIN }],\n icon: 'ph--record--regular',\n disposition: 'toolbar',\n classNames: state.enabled ? 'text-activeInCall' : '',\n },\n },\n ];\n },\n connector: ({ node }) => {\n const meeting = node.data;\n const client = context.requestCapability(ClientCapabilities.Client);\n const state = context.requestCapability(TranscriptionCapabilities.MeetingTranscriptionState);\n\n return [\n {\n id: `${fullyQualifiedId(meeting)}${ATTENDABLE_PATH_SEPARATOR}${getSchemaTypename(TranscriptType)}`,\n type: PLANK_COMPANION_TYPE,\n data: meeting.artifacts[getSchemaTypename(TranscriptType)!]?.target,\n properties: {\n label: ['transcript companion label', { ns: TRANSCRIPTION_PLUGIN }],\n icon: 'ph--subtitles--regular',\n disposition: 'hidden',\n schema: TranscriptType,\n getIntent: ({ space }: { space: Space }) =>\n createIntent(TranscriptionAction.Create, { spaceId: space.id }),\n onJoin: () => {\n const transcriptionManager = new TranscriptionManager(client.edge);\n const identity = client.halo.identity.get();\n invariant(identity);\n transcriptionManager.setName(\n identity.profile?.displayName ?? generateName(identity.identityKey.toHex()),\n );\n const fallbackValue = keyToFallback(identity!.identityKey);\n const userHue = identity!.profile?.data?.hue || fallbackValue.hue;\n transcriptionManager.setHue(userHue);\n void transcriptionManager.open();\n state.transcriptionManager = transcriptionManager;\n },\n onLeave: () => {\n void state.transcriptionManager?.close();\n state.transcriptionManager = undefined;\n state.enabled = false;\n },\n onCallStateUpdated: (callState: CallState) => {\n const typename = getSchemaTypename(TranscriptType);\n const transcription = typename ? callState.activities?.[typename] : undefined;\n if (!transcription?.payload?.value) {\n return;\n }\n\n const payload = codec.decode(transcription.payload.value);\n state.enabled = payload.enabled;\n void state.transcriptionManager?.setEnabled(payload.enabled);\n void state.transcriptionManager?.setQueue(payload.queueDxn);\n },\n onMediaStateUpdated: ([mediaState, isSpeaking]: [MediaState, boolean]) => {\n void state.transcriptionManager?.setAudioTrack(mediaState.audioTrack);\n void state.transcriptionManager?.setRecording(isSpeaking);\n },\n },\n },\n ];\n },\n }),\n ]);\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["import_types", "codec", "encode", "message", "buf", "toBinary", "TranscriptionPayloadSchema", "create", "decode", "fromBinary", "getMeetingTranscript", "context", "meeting", "dispatchPromise", "dispatch", "requestCapability", "Capabilities", "IntentDispatcher", "typename", "getSchemaTypename", "TranscriptType", "existing", "artifacts", "load", "space", "getSpace", "invariant", "data", "createIntent", "TranscriptionAction", "Create", "spaceId", "id", "makeRef", "object", "contributes", "AppGraphBuilder", "createExtension", "TRANSCRIPTION_PLUGIN", "filter", "node", "isInstanceOf", "MeetingType", "type", "PLANK_COMPANION_TYPE", "actions", "state", "TranscriptionCapabilities", "MeetingTranscriptionState", "fullyQualifiedId", "call", "MeetingCapabilities", "CallManager", "transcriptionManager", "enabled", "setEnabled", "transcript", "setActivity", "value", "queueDxn", "queue", "dxn", "toString", "properties", "label", "ns", "icon", "disposition", "classNames", "connector", "client", "ClientCapabilities", "Client", "ATTENDABLE_PATH_SEPARATOR", "target", "schema", "getIntent", "onJoin", "TranscriptionManager", "edge", "identity", "halo", "get", "setName", "profile", "displayName", "generateName", "identityKey", "toHex", "fallbackValue", "keyToFallback", "userHue", "hue", "setHue", "open", "onLeave", "close", "undefined", "onCallStateUpdated", "callState", "transcription", "activities", "payload", "setQueue", "onMediaStateUpdated", "mediaState", "isSpeaking", "setAudioTrack", "audioTrack", "setRecording"]
|
|
7
|
+
}
|
|
@@ -16,12 +16,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_3KHUSQNW_exports = {};
|
|
20
|
+
__export(chunk_3KHUSQNW_exports, {
|
|
21
21
|
getTimeStr: () => getTimeStr,
|
|
22
|
-
mergeFloat64Arrays: () => mergeFloat64Arrays
|
|
22
|
+
mergeFloat64Arrays: () => mergeFloat64Arrays,
|
|
23
|
+
randomQueueDxn: () => randomQueueDxn
|
|
23
24
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
+
module.exports = __toCommonJS(chunk_3KHUSQNW_exports);
|
|
26
|
+
var import_echo_schema = require("@dxos/echo-schema");
|
|
27
|
+
var import_keys = require("@dxos/keys");
|
|
25
28
|
var getTimeStr = (timestamp) => new Date(timestamp ?? Date.now()).toLocaleTimeString("en-US", {
|
|
26
29
|
timeZone: "UTC",
|
|
27
30
|
hour12: true,
|
|
@@ -29,6 +32,11 @@ var getTimeStr = (timestamp) => new Date(timestamp ?? Date.now()).toLocaleTimeSt
|
|
|
29
32
|
minute: "2-digit",
|
|
30
33
|
second: "2-digit"
|
|
31
34
|
});
|
|
35
|
+
var randomQueueDxn = (spaceId) => new import_keys.DXN(import_keys.DXN.kind.QUEUE, [
|
|
36
|
+
import_keys.QueueSubspaceTags.DATA,
|
|
37
|
+
spaceId ?? import_keys.SpaceId.random(),
|
|
38
|
+
import_echo_schema.ObjectId.random()
|
|
39
|
+
]);
|
|
32
40
|
var mergeFloat64Arrays = (arrays) => {
|
|
33
41
|
const newArray = new Float64Array(arrays.reduce((acc, array) => array.length + acc, 0));
|
|
34
42
|
let offset = 0;
|
|
@@ -41,6 +49,7 @@ var mergeFloat64Arrays = (arrays) => {
|
|
|
41
49
|
// Annotate the CommonJS export names for ESM import in node:
|
|
42
50
|
0 && (module.exports = {
|
|
43
51
|
getTimeStr,
|
|
44
|
-
mergeFloat64Arrays
|
|
52
|
+
mergeFloat64Arrays,
|
|
53
|
+
randomQueueDxn
|
|
45
54
|
});
|
|
46
|
-
//# sourceMappingURL=chunk-
|
|
55
|
+
//# sourceMappingURL=chunk-3KHUSQNW.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/util/get-time-str.ts", "../../../src/util/random-queue-dxn.ts", "../../../src/util/array.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nexport const getTimeStr = (timestamp?: number) =>\n new Date(timestamp ?? Date.now()).toLocaleTimeString('en-US', {\n timeZone: 'UTC',\n hour12: true,\n hour: 'numeric',\n minute: '2-digit',\n second: '2-digit',\n });\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ObjectId } from '@dxos/echo-schema';\nimport { DXN, QueueSubspaceTags, SpaceId } from '@dxos/keys';\n\nexport const randomQueueDxn = (spaceId?: SpaceId) =>\n new DXN(DXN.kind.QUEUE, [QueueSubspaceTags.DATA, spaceId ?? SpaceId.random(), ObjectId.random()]);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport const mergeFloat64Arrays = (arrays: Float64Array[]) => {\n const newArray = new Float64Array(arrays.reduce((acc, array) => array.length + acc, 0));\n let offset = 0;\n for (const array of arrays) {\n newArray.set(array, offset);\n offset += array.length;\n }\n\n return newArray;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;ACIA,yBAAyB;AACzB,kBAAgD;ADDzC,IAAMA,aAAa,CAACC,cACzB,IAAIC,KAAKD,aAAaC,KAAKC,IAAG,CAAA,EAAIC,mBAAmB,SAAS;EAC5DC,UAAU;EACVC,QAAQ;EACRC,MAAM;EACNC,QAAQ;EACRC,QAAQ;AACV,CAAA;ACJK,IAAMC,iBAAiB,CAACC,YAC7B,IAAIC,gBAAIA,gBAAIC,KAAKC,OAAO;EAACC,8BAAkBC;EAAML,WAAWM,oBAAQC,OAAM;EAAIC,4BAASD,OAAM;CAAG;ACJ3F,IAAME,qBAAqB,CAACC,WAAAA;AACjC,QAAMC,WAAW,IAAIC,aAAaF,OAAOG,OAAO,CAACC,KAAKC,UAAUA,MAAMC,SAASF,KAAK,CAAA,CAAA;AACpF,MAAIG,SAAS;AACb,aAAWF,SAASL,QAAQ;AAC1BC,aAASO,IAAIH,OAAOE,MAAAA;AACpBA,cAAUF,MAAMC;EAClB;AAEA,SAAOL;AACT;",
|
|
6
|
+
"names": ["getTimeStr", "timestamp", "Date", "now", "toLocaleTimeString", "timeZone", "hour12", "hour", "minute", "second", "randomQueueDxn", "spaceId", "DXN", "kind", "QUEUE", "QueueSubspaceTags", "DATA", "SpaceId", "random", "ObjectId", "mergeFloat64Arrays", "arrays", "newArray", "Float64Array", "reduce", "acc", "array", "length", "offset", "set"]
|
|
7
|
+
}
|
|
@@ -16,11 +16,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_CZMLKKWT_exports = {};
|
|
20
|
+
__export(chunk_CZMLKKWT_exports, {
|
|
21
21
|
TranscriptionCapabilities: () => TranscriptionCapabilities
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_CZMLKKWT_exports);
|
|
24
24
|
var import_chunk_NVZWGFJL = require("./chunk-NVZWGFJL.cjs");
|
|
25
25
|
var import_app_framework = require("@dxos/app-framework");
|
|
26
26
|
var TranscriptionCapabilities;
|
|
@@ -32,4 +32,4 @@ var TranscriptionCapabilities;
|
|
|
32
32
|
0 && (module.exports = {
|
|
33
33
|
TranscriptionCapabilities
|
|
34
34
|
});
|
|
35
|
-
//# sourceMappingURL=chunk-
|
|
35
|
+
//# sourceMappingURL=chunk-CZMLKKWT.cjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type ReactiveObject } from '@dxos/live-object';\n\nimport { TRANSCRIPTION_PLUGIN } from '../meta';\nimport { type TranscriberParams, type Transcriber, type TranscriptionManager } from '../transcriber';\n\nexport namespace TranscriptionCapabilities {\n export type GetTranscriberProps = {\n audioStreamTrack: MediaStreamTrack;\n onSegments: TranscriberParams['onSegments'];\n };\n export type GetTranscriber = (props: GetTranscriberProps) => Transcriber;\n export const Transcriber = defineCapability<GetTranscriber>(`${TRANSCRIPTION_PLUGIN}/capability/transcriber`);\n\n export type MeetingTranscriptionState = ReactiveObject<{\n enabled: boolean;\n transcriptionManager?: TranscriptionManager;\n }>;\n export const MeetingTranscriptionState = defineCapability<MeetingTranscriptionState>(\n `${TRANSCRIPTION_PLUGIN}/capability/meeting-transcription-state`,\n );\n}\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAIA,2BAAiC;;UAMhBA,4BAAAA;6BAMFC,kBAAcC,uCAAiC,GAAGC,0CAAAA,yBAA6C;6BAM/FC,gCAA4BF,uCACvC,GAAGC,0CAAAA,yCAA6D;AAEpE,GAfiBH,8BAAAA,4BAAAA,CAAAA,EAAAA;",
|
|
6
|
+
"names": ["TranscriptionCapabilities", "Transcriber", "defineCapability", "TRANSCRIPTION_PLUGIN", "MeetingTranscriptionState"]
|
|
7
|
+
}
|
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_FCCJALOT_exports = {};
|
|
30
|
+
__export(chunk_FCCJALOT_exports, {
|
|
31
31
|
MediaStreamRecorder: () => MediaStreamRecorder,
|
|
32
32
|
Transcriber: () => Transcriber,
|
|
33
33
|
TranscriptionManager: () => TranscriptionManager
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
36
|
-
var
|
|
37
|
-
var
|
|
35
|
+
module.exports = __toCommonJS(chunk_FCCJALOT_exports);
|
|
36
|
+
var import_chunk_3KHUSQNW = require("./chunk-3KHUSQNW.cjs");
|
|
37
|
+
var import_chunk_P4VVD6ZO = require("./chunk-P4VVD6ZO.cjs");
|
|
38
38
|
var import_extendable_media_recorder = require("extendable-media-recorder");
|
|
39
39
|
var import_wavefile = require("wavefile");
|
|
40
40
|
var import_async = require("@dxos/async");
|
|
@@ -50,8 +50,8 @@ var import_async3 = require("@dxos/async");
|
|
|
50
50
|
var import_context2 = require("@dxos/context");
|
|
51
51
|
var import_echo_db = require("@dxos/echo-db");
|
|
52
52
|
var import_echo_schema = require("@dxos/echo-schema");
|
|
53
|
-
var
|
|
54
|
-
var
|
|
53
|
+
var import_invariant2 = require("@dxos/invariant");
|
|
54
|
+
var import_keys = require("@dxos/keys");
|
|
55
55
|
function _ts_decorate(decorators, target, key, desc) {
|
|
56
56
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
57
57
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
@@ -182,35 +182,17 @@ var Transcriber = class extends import_context.Resource {
|
|
|
182
182
|
this._onSegments = onSegments;
|
|
183
183
|
}
|
|
184
184
|
async _open(ctx) {
|
|
185
|
-
import_log2.log.info("opening", void 0, {
|
|
186
|
-
F: __dxlog_file2,
|
|
187
|
-
L: 97,
|
|
188
|
-
S: this,
|
|
189
|
-
C: (f, a) => f(...a)
|
|
190
|
-
});
|
|
191
185
|
this._recorder.setOnChunk((chunk) => this._saveAudioChunk(chunk));
|
|
192
186
|
await this._recorder.start();
|
|
193
187
|
this._transcribeTask = new import_async2.DeferredTask(ctx, async () => this._transcribe());
|
|
194
188
|
this._openTrigger.wake();
|
|
195
189
|
}
|
|
196
190
|
async _close() {
|
|
197
|
-
import_log2.log.info("closing", void 0, {
|
|
198
|
-
F: __dxlog_file2,
|
|
199
|
-
L: 105,
|
|
200
|
-
S: this,
|
|
201
|
-
C: (f, a) => f(...a)
|
|
202
|
-
});
|
|
203
191
|
this._recording = false;
|
|
204
192
|
this._transcribeTask = void 0;
|
|
205
193
|
await this._recorder.stop();
|
|
206
194
|
}
|
|
207
195
|
startChunksRecording() {
|
|
208
|
-
import_log2.log.info("starting", void 0, {
|
|
209
|
-
F: __dxlog_file2,
|
|
210
|
-
L: 112,
|
|
211
|
-
S: this,
|
|
212
|
-
C: (f, a) => f(...a)
|
|
213
|
-
});
|
|
214
196
|
if (this._lifecycleState !== import_context.LifecycleState.OPEN) {
|
|
215
197
|
return;
|
|
216
198
|
}
|
|
@@ -222,19 +204,13 @@ var Transcriber = class extends import_context.Resource {
|
|
|
222
204
|
}
|
|
223
205
|
this._recording = false;
|
|
224
206
|
this._transcribeTask?.schedule();
|
|
225
|
-
import_log2.log.info("stopped", void 0, {
|
|
226
|
-
F: __dxlog_file2,
|
|
227
|
-
L: 127,
|
|
228
|
-
S: this,
|
|
229
|
-
C: (f, a) => f(...a)
|
|
230
|
-
});
|
|
231
207
|
}
|
|
232
208
|
_saveAudioChunk(chunk) {
|
|
233
209
|
(0, import_log2.log)("saving audio chunk", {
|
|
234
210
|
chunk
|
|
235
211
|
}, {
|
|
236
212
|
F: __dxlog_file2,
|
|
237
|
-
L:
|
|
213
|
+
L: 124,
|
|
238
214
|
S: this,
|
|
239
215
|
C: (f, a) => f(...a)
|
|
240
216
|
});
|
|
@@ -250,7 +226,7 @@ var Transcriber = class extends import_context.Resource {
|
|
|
250
226
|
chunks: this._audioChunks.length
|
|
251
227
|
}, {
|
|
252
228
|
F: __dxlog_file2,
|
|
253
|
-
L:
|
|
229
|
+
L: 140,
|
|
254
230
|
S: this,
|
|
255
231
|
C: (f, a) => f(...a)
|
|
256
232
|
});
|
|
@@ -275,7 +251,7 @@ var Transcriber = class extends import_context.Resource {
|
|
|
275
251
|
async _mergeAudioChunks(chunks) {
|
|
276
252
|
const file = new import_wavefile2.WaveFile();
|
|
277
253
|
const wavConfig = this._recorder.wavConfig;
|
|
278
|
-
file.fromScratch(wavConfig.channels, wavConfig.sampleRate, wavConfig.bitDepthCode, (0,
|
|
254
|
+
file.fromScratch(wavConfig.channels, wavConfig.sampleRate, wavConfig.bitDepthCode, (0, import_chunk_3KHUSQNW.mergeFloat64Arrays)(chunks.map(({ data }) => data)));
|
|
279
255
|
return file.toBase64();
|
|
280
256
|
}
|
|
281
257
|
async _fetchTranscription(audio) {
|
|
@@ -283,7 +259,7 @@ var Transcriber = class extends import_context.Resource {
|
|
|
283
259
|
this._audioChunks = [];
|
|
284
260
|
throw new Error("No audio to send for transcribing");
|
|
285
261
|
}
|
|
286
|
-
const response = await fetch(`${
|
|
262
|
+
const response = await fetch(`${import_chunk_P4VVD6ZO.TRANSCRIPTION_URL}/transcribe`, {
|
|
287
263
|
method: "POST",
|
|
288
264
|
body: JSON.stringify({
|
|
289
265
|
audio
|
|
@@ -294,15 +270,15 @@ var Transcriber = class extends import_context.Resource {
|
|
|
294
270
|
});
|
|
295
271
|
if (!response.ok) {
|
|
296
272
|
this._audioChunks = [];
|
|
297
|
-
throw new Error(
|
|
273
|
+
throw new Error("Failed to transcribe");
|
|
298
274
|
}
|
|
299
275
|
const { segments } = await response.json();
|
|
300
276
|
import_log2.log.info("transcription response", {
|
|
301
|
-
segments
|
|
277
|
+
segments,
|
|
302
278
|
string: segments.map((segments2) => segments2.text).join(" ")
|
|
303
279
|
}, {
|
|
304
280
|
F: __dxlog_file2,
|
|
305
|
-
L:
|
|
281
|
+
L: 206,
|
|
306
282
|
S: this,
|
|
307
283
|
C: (f, a) => f(...a)
|
|
308
284
|
});
|
|
@@ -324,9 +300,8 @@ var Transcriber = class extends import_context.Resource {
|
|
|
324
300
|
}
|
|
325
301
|
this._lastUsedTimestamp = zeroTimestamp + filteredSegments.at(-1).end * 1e3;
|
|
326
302
|
return filteredSegments.map((segment) => ({
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
text: segment.text.trim()
|
|
303
|
+
started: new Date(zeroTimestamp + segment.start * 1e3),
|
|
304
|
+
text: segment.text
|
|
330
305
|
}));
|
|
331
306
|
}
|
|
332
307
|
};
|
|
@@ -351,16 +326,16 @@ var RECORD_INTERVAL = 200;
|
|
|
351
326
|
var PREFIXED_CHUNKS_AMOUNT = 10;
|
|
352
327
|
var TRANSCRIBE_AFTER_CHUNKS_AMOUNT = 50;
|
|
353
328
|
var TranscriptionManager = class extends import_context2.Resource {
|
|
354
|
-
constructor(
|
|
329
|
+
constructor(edgeClient) {
|
|
355
330
|
super();
|
|
356
331
|
this._audioStreamTrack = void 0;
|
|
357
|
-
this.
|
|
332
|
+
this._name = void 0;
|
|
333
|
+
this._hue = void 0;
|
|
358
334
|
this._mediaRecorder = void 0;
|
|
359
335
|
this._transcriber = void 0;
|
|
360
|
-
this._queue = void 0;
|
|
361
336
|
this._enabled = false;
|
|
362
|
-
this.
|
|
363
|
-
this.
|
|
337
|
+
this._queue = void 0;
|
|
338
|
+
this._edgeClient = edgeClient;
|
|
364
339
|
}
|
|
365
340
|
async _open() {
|
|
366
341
|
await this._toggleTranscriber();
|
|
@@ -368,36 +343,15 @@ var TranscriptionManager = class extends import_context2.Resource {
|
|
|
368
343
|
async _close() {
|
|
369
344
|
void this._transcriber?.close();
|
|
370
345
|
}
|
|
371
|
-
setQueue(queueDxn) {
|
|
372
|
-
if (this._queue?.dxn.toString() !== queueDxn.toString()) {
|
|
373
|
-
import_log3.log.info("setQueue", {
|
|
374
|
-
queueDxn: queueDxn.toString()
|
|
375
|
-
}, {
|
|
376
|
-
F: __dxlog_file3,
|
|
377
|
-
L: 73,
|
|
378
|
-
S: this,
|
|
379
|
-
C: (f, a) => f(...a)
|
|
380
|
-
});
|
|
381
|
-
this._queue = new import_echo_db.QueueImpl(this._edgeClient, queueDxn);
|
|
382
|
-
}
|
|
383
|
-
return this;
|
|
384
|
-
}
|
|
385
|
-
setIdentityDid(did) {
|
|
386
|
-
if (this._identityDid !== did) {
|
|
387
|
-
this._identityDid = did;
|
|
388
|
-
}
|
|
389
|
-
return this;
|
|
390
|
-
}
|
|
391
346
|
setRecording(recording) {
|
|
392
347
|
if (!this.isOpen || !this._enabled) {
|
|
393
|
-
return
|
|
348
|
+
return;
|
|
394
349
|
}
|
|
395
350
|
if (recording) {
|
|
396
351
|
this._transcriber?.startChunksRecording();
|
|
397
352
|
} else {
|
|
398
353
|
this._transcriber?.stopChunksRecording();
|
|
399
354
|
}
|
|
400
|
-
return this;
|
|
401
355
|
}
|
|
402
356
|
/**
|
|
403
357
|
* Enable or disable transcription.
|
|
@@ -417,45 +371,56 @@ var TranscriptionManager = class extends import_context2.Resource {
|
|
|
417
371
|
this._audioStreamTrack = track;
|
|
418
372
|
this.isOpen && await this._toggleTranscriber();
|
|
419
373
|
}
|
|
420
|
-
|
|
374
|
+
/**
|
|
375
|
+
* Set the queue to save the transcription to.
|
|
376
|
+
* @param queue - The queue to save the transcription to or the DXN of the queue.
|
|
377
|
+
*/
|
|
378
|
+
setQueue(queue) {
|
|
379
|
+
switch (typeof queue) {
|
|
380
|
+
case "string":
|
|
381
|
+
if (this._queue?.dxn.toString() === queue) {
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
this._queue = new import_echo_db.QueueImpl(this._edgeClient, import_keys.DXN.parse(queue));
|
|
385
|
+
break;
|
|
386
|
+
case "object":
|
|
387
|
+
if (this._queue === queue) {
|
|
388
|
+
return;
|
|
389
|
+
}
|
|
390
|
+
(0, import_invariant2.invariant)(queue instanceof import_echo_db.QueueImpl, void 0, {
|
|
391
|
+
F: __dxlog_file3,
|
|
392
|
+
L: 113,
|
|
393
|
+
S: this,
|
|
394
|
+
A: [
|
|
395
|
+
"queue instanceof QueueImpl",
|
|
396
|
+
""
|
|
397
|
+
]
|
|
398
|
+
});
|
|
399
|
+
this._queue = queue;
|
|
400
|
+
break;
|
|
401
|
+
case "undefined":
|
|
402
|
+
this._queue = void 0;
|
|
403
|
+
break;
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
setName(name) {
|
|
407
|
+
if (this._name === name) {
|
|
408
|
+
return;
|
|
409
|
+
}
|
|
410
|
+
this._name = name;
|
|
411
|
+
}
|
|
412
|
+
setHue(hue) {
|
|
413
|
+
if (this._hue === hue) {
|
|
414
|
+
return;
|
|
415
|
+
}
|
|
416
|
+
this._hue = hue;
|
|
417
|
+
}
|
|
421
418
|
async _toggleTranscriber() {
|
|
422
419
|
await this._maybeReinitTranscriber();
|
|
423
420
|
if (this._enabled) {
|
|
424
421
|
await this._transcriber?.open();
|
|
425
|
-
const block = (0, import_echo_schema.create)(import_schema.DataType.Message, {
|
|
426
|
-
created: (/* @__PURE__ */ new Date()).toISOString(),
|
|
427
|
-
blocks: [
|
|
428
|
-
{
|
|
429
|
-
type: "transcription",
|
|
430
|
-
text: "Started",
|
|
431
|
-
started: (/* @__PURE__ */ new Date()).toISOString()
|
|
432
|
-
}
|
|
433
|
-
],
|
|
434
|
-
sender: {
|
|
435
|
-
role: "assistant"
|
|
436
|
-
}
|
|
437
|
-
});
|
|
438
|
-
this._queue?.append([
|
|
439
|
-
block
|
|
440
|
-
]);
|
|
441
422
|
} else {
|
|
442
423
|
await this._transcriber?.close();
|
|
443
|
-
const block = (0, import_echo_schema.create)(import_schema.DataType.Message, {
|
|
444
|
-
created: (/* @__PURE__ */ new Date()).toISOString(),
|
|
445
|
-
blocks: [
|
|
446
|
-
{
|
|
447
|
-
type: "transcription",
|
|
448
|
-
text: "Stopped",
|
|
449
|
-
started: (/* @__PURE__ */ new Date()).toISOString()
|
|
450
|
-
}
|
|
451
|
-
],
|
|
452
|
-
sender: {
|
|
453
|
-
role: "assistant"
|
|
454
|
-
}
|
|
455
|
-
});
|
|
456
|
-
this._queue?.append([
|
|
457
|
-
block
|
|
458
|
-
]);
|
|
459
424
|
}
|
|
460
425
|
}
|
|
461
426
|
async _maybeReinitTranscriber() {
|
|
@@ -486,31 +451,38 @@ var TranscriptionManager = class extends import_context2.Resource {
|
|
|
486
451
|
if (!this.isOpen || !this._queue) {
|
|
487
452
|
return;
|
|
488
453
|
}
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
identityDid: this._identityDid
|
|
494
|
-
}
|
|
454
|
+
const block = (0, import_echo_schema.createStatic)(import_chunk_P4VVD6ZO.TranscriptBlock, {
|
|
455
|
+
authorName: this._name,
|
|
456
|
+
authorHue: this._hue,
|
|
457
|
+
segments
|
|
495
458
|
});
|
|
496
|
-
if (this._messageEnricher) {
|
|
497
|
-
block = await this._messageEnricher(block);
|
|
498
|
-
}
|
|
499
459
|
this._queue.append([
|
|
500
460
|
block
|
|
501
461
|
]);
|
|
502
462
|
}
|
|
503
463
|
};
|
|
464
|
+
_ts_decorate3([
|
|
465
|
+
import_async3.synchronized
|
|
466
|
+
], TranscriptionManager.prototype, "setRecording", null);
|
|
504
467
|
_ts_decorate3([
|
|
505
468
|
import_async3.synchronized
|
|
506
469
|
], TranscriptionManager.prototype, "setEnabled", null);
|
|
507
470
|
_ts_decorate3([
|
|
508
471
|
import_async3.synchronized
|
|
509
472
|
], TranscriptionManager.prototype, "setAudioTrack", null);
|
|
473
|
+
_ts_decorate3([
|
|
474
|
+
import_async3.synchronized
|
|
475
|
+
], TranscriptionManager.prototype, "setQueue", null);
|
|
476
|
+
_ts_decorate3([
|
|
477
|
+
import_async3.synchronized
|
|
478
|
+
], TranscriptionManager.prototype, "setName", null);
|
|
479
|
+
_ts_decorate3([
|
|
480
|
+
import_async3.synchronized
|
|
481
|
+
], TranscriptionManager.prototype, "setHue", null);
|
|
510
482
|
// Annotate the CommonJS export names for ESM import in node:
|
|
511
483
|
0 && (module.exports = {
|
|
512
484
|
MediaStreamRecorder,
|
|
513
485
|
Transcriber,
|
|
514
486
|
TranscriptionManager
|
|
515
487
|
});
|
|
516
|
-
//# sourceMappingURL=chunk-
|
|
488
|
+
//# sourceMappingURL=chunk-FCCJALOT.cjs.map
|