@dxos/plugin-transcription 0.8.1 → 0.8.2-main.f081794
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-JQ3HFHLQ.mjs → TranscriptContainer-4D4BHE7G.mjs} +3 -2
- package/dist/lib/browser/{app-graph-builder-VDQOVX7P.mjs → app-graph-builder-I4SSIQMW.mjs} +18 -41
- package/dist/lib/browser/app-graph-builder-I4SSIQMW.mjs.map +7 -0
- package/dist/lib/browser/{chunk-YEPT334A.mjs → chunk-5BE6RTNC.mjs} +1 -1
- package/dist/lib/browser/chunk-5BE6RTNC.mjs.map +7 -0
- package/dist/lib/browser/{chunk-OGNXNGJB.mjs → chunk-5Q3R53U3.mjs} +8 -8
- package/dist/lib/browser/chunk-5Q3R53U3.mjs.map +7 -0
- package/dist/lib/browser/{chunk-YCZISX63.mjs → chunk-DR3NBV6Q.mjs} +6 -6
- package/dist/lib/browser/{chunk-YCZISX63.mjs.map → chunk-DR3NBV6Q.mjs.map} +3 -3
- package/dist/lib/browser/{chunk-K7FOYAXO.mjs → chunk-GI5LZ4SV.mjs} +2 -2
- package/dist/lib/browser/{chunk-GU2BNYKZ.mjs → chunk-KLD7O5GJ.mjs} +2 -12
- package/dist/lib/browser/chunk-KLD7O5GJ.mjs.map +7 -0
- package/dist/lib/browser/chunk-RHHJZQPM.mjs +702 -0
- package/dist/lib/browser/chunk-RHHJZQPM.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +22 -197
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-4R66ZCKT.mjs → intent-resolver-ZQQEH27F.mjs} +7 -7
- package/dist/lib/browser/intent-resolver-ZQQEH27F.mjs.map +7 -0
- package/dist/lib/browser/{meeting-transcription-state-DLFHQK72.mjs → meeting-transcription-state-5D52VTHU.mjs} +4 -4
- package/dist/lib/browser/meeting-transcription-state-5D52VTHU.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-FQUHU5G7.mjs → react-surface-HETJ5XY6.mjs} +5 -4
- package/dist/lib/browser/{transcriber-LGMIWDYI.mjs → transcriber-SMRLU2KY.mjs} +8 -7
- package/dist/lib/browser/{transcriber-LGMIWDYI.mjs.map → transcriber-SMRLU2KY.mjs.map} +3 -3
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/{TranscriptContainer-QEYTTT2V.cjs → TranscriptContainer-ZWP6UKY6.cjs} +8 -7
- package/dist/lib/node/TranscriptContainer-ZWP6UKY6.cjs.map +7 -0
- package/dist/lib/node/{app-graph-builder-IFSIVNUR.cjs → app-graph-builder-WWC4WNTG.cjs} +31 -54
- package/dist/lib/node/app-graph-builder-WWC4WNTG.cjs.map +7 -0
- package/dist/lib/node/{chunk-P4VVD6ZO.cjs → chunk-3QEJ5EBO.cjs} +10 -10
- package/dist/lib/node/chunk-3QEJ5EBO.cjs.map +7 -0
- package/dist/lib/node/{chunk-CZMLKKWT.cjs → chunk-HYGDHS6X.cjs} +4 -4
- package/dist/lib/node/chunk-HYGDHS6X.cjs.map +7 -0
- package/dist/lib/node/{chunk-3KHUSQNW.cjs → chunk-J72PUQ3C.cjs} +6 -15
- package/dist/lib/node/chunk-J72PUQ3C.cjs.map +7 -0
- package/dist/lib/node/chunk-KO6MKCED.cjs +718 -0
- package/dist/lib/node/chunk-KO6MKCED.cjs.map +7 -0
- package/dist/lib/node/{chunk-FCCJALOT.cjs → chunk-LA73IHCB.cjs} +10 -10
- package/dist/lib/node/{chunk-FCCJALOT.cjs.map → chunk-LA73IHCB.cjs.map} +3 -3
- package/dist/lib/node/{chunk-LP4FG423.cjs → chunk-WXG4Z2EZ.cjs} +5 -5
- package/dist/lib/node/index.cjs +49 -233
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/{intent-resolver-WMMCOUEH.cjs → intent-resolver-VY3XWYAA.cjs} +11 -10
- package/dist/lib/node/intent-resolver-VY3XWYAA.cjs.map +7 -0
- package/dist/lib/node/{meeting-transcription-state-URIYILEQ.cjs → meeting-transcription-state-OYWCY5XE.cjs} +7 -7
- package/dist/lib/node/meeting-transcription-state-OYWCY5XE.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-WI2MGWCC.cjs → react-surface-M2JQIIDY.cjs} +10 -9
- package/dist/lib/node/{react-surface-WI2MGWCC.cjs.map → react-surface-M2JQIIDY.cjs.map} +1 -1
- package/dist/lib/node/{transcriber-QG5WPKX4.cjs → transcriber-E6AAB4SU.cjs} +14 -13
- package/dist/lib/node/{transcriber-QG5WPKX4.cjs.map → transcriber-E6AAB4SU.cjs.map} +3 -3
- package/dist/lib/node/types/index.cjs +7 -7
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{TranscriptContainer-ZXUCOWGY.mjs → TranscriptContainer-3HJ752CP.mjs} +3 -2
- package/dist/lib/node-esm/{app-graph-builder-UL6XLIZY.mjs → app-graph-builder-PPJQAFSI.mjs} +18 -41
- package/dist/lib/node-esm/app-graph-builder-PPJQAFSI.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-GIO6J6FE.mjs → chunk-54HDN33F.mjs} +8 -8
- package/dist/lib/node-esm/chunk-54HDN33F.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YQYBLFNI.mjs → chunk-K3R3YK3S.mjs} +6 -6
- package/dist/lib/node-esm/{chunk-YQYBLFNI.mjs.map → chunk-K3R3YK3S.mjs.map} +3 -3
- package/dist/lib/node-esm/{chunk-HKATMD34.mjs → chunk-QMHMEKB3.mjs} +2 -12
- package/dist/lib/node-esm/chunk-QMHMEKB3.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-SDMGJZLN.mjs +703 -0
- package/dist/lib/node-esm/chunk-SDMGJZLN.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-J4D2RBBH.mjs → chunk-XY22OP6H.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-PTZHDZ36.mjs → chunk-YXZOLOFT.mjs} +1 -1
- package/dist/lib/node-esm/chunk-YXZOLOFT.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +22 -197
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-QN2LO5TX.mjs → intent-resolver-FCTNJPWY.mjs} +7 -7
- package/dist/lib/node-esm/intent-resolver-FCTNJPWY.mjs.map +7 -0
- package/dist/lib/node-esm/{meeting-transcription-state-ZYVRAW6Y.mjs → meeting-transcription-state-XMZJ45P4.mjs} +4 -4
- package/dist/lib/node-esm/meeting-transcription-state-XMZJ45P4.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-PCH6NTVB.mjs → react-surface-PXFSIM6V.mjs} +5 -4
- package/dist/lib/{browser/react-surface-FQUHU5G7.mjs.map → node-esm/react-surface-PXFSIM6V.mjs.map} +1 -1
- package/dist/lib/node-esm/{transcriber-TMPYZ5L4.mjs → transcriber-REAGRCPY.mjs} +8 -7
- package/dist/lib/node-esm/{transcriber-TMPYZ5L4.mjs.map → transcriber-REAGRCPY.mjs.map} +3 -3
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +4 -6
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/meeting-transcription-state.d.ts +2 -4
- package/dist/types/src/capabilities/meeting-transcription-state.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 +12 -4
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +15 -4
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts +13 -0
- package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/testings.d.ts +51 -0
- package/dist/types/src/components/Transcript/testings.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +19 -0
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +1 -0
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/transcription.stories.d.ts.map +1 -1
- package/dist/types/src/entity-extraction/entity-extraction.d.ts +16 -0
- package/dist/types/src/entity-extraction/entity-extraction.d.ts.map +1 -0
- package/dist/types/src/entity-extraction/entity-extraction.test.d.ts +2 -0
- package/dist/types/src/entity-extraction/entity-extraction.test.d.ts.map +1 -0
- package/dist/types/src/entity-extraction/index.d.ts +2 -0
- package/dist/types/src/entity-extraction/index.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +7 -0
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +1 -0
- 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/model/index.d.ts +2 -0
- package/dist/types/src/model/index.d.ts.map +1 -0
- package/dist/types/src/model/model.d.ts +68 -0
- package/dist/types/src/model/model.d.ts.map +1 -0
- package/dist/types/src/model/model.test.d.ts +2 -0
- package/dist/types/src/model/model.test.d.ts.map +1 -0
- package/dist/types/src/testing/test-data.d.ts +73 -0
- package/dist/types/src/testing/test-data.d.ts.map +1 -0
- package/dist/types/src/transcriber/transcriber.browser.test.d.ts +2 -0
- package/dist/types/src/transcriber/transcriber.browser.test.d.ts.map +1 -0
- package/dist/types/src/types/schema.d.ts +9 -9
- package/dist/types/src/util/index.d.ts +0 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/package.json +47 -39
- package/src/capabilities/app-graph-builder.ts +15 -26
- package/src/capabilities/capabilities.ts +3 -2
- package/src/capabilities/intent-resolver.ts +4 -4
- package/src/capabilities/meeting-transcription-state.ts +2 -2
- package/src/capabilities/transcriber.ts +2 -1
- package/src/components/Transcript/Transcript.stories.tsx +165 -43
- package/src/components/Transcript/Transcript.tsx +78 -210
- package/src/components/Transcript/deprecated/Transcript.tsx +231 -0
- package/src/components/Transcript/testings.ts +182 -0
- package/src/components/Transcript/transcript-extension.ts +233 -0
- package/src/components/TranscriptContainer.tsx +6 -3
- package/src/components/transcription.stories.tsx +97 -48
- package/src/entity-extraction/entity-extraction.test.ts +32 -0
- package/src/entity-extraction/entity-extraction.ts +94 -0
- package/src/entity-extraction/index.ts +5 -0
- package/src/entity-extraction/system-prompt.tpl +9 -0
- package/src/entity-extraction/types.d.ts +8 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useQueueModelAdapter.ts +30 -0
- package/src/hooks/useTranscriber.ts +3 -2
- package/src/model/index.ts +5 -0
- package/src/model/model.test.ts +123 -0
- package/src/model/model.ts +229 -0
- package/src/testing/test-data.ts +314 -0
- package/src/transcriber/transcriber.ts +1 -1
- package/src/transcriber/transcription-manager.ts +2 -2
- package/src/types/schema.ts +7 -7
- package/src/types/types.ts +2 -2
- package/src/util/index.ts +0 -1
- package/dist/lib/browser/app-graph-builder-VDQOVX7P.mjs.map +0 -7
- package/dist/lib/browser/chunk-G4B6CPC2.mjs +0 -253
- package/dist/lib/browser/chunk-G4B6CPC2.mjs.map +0 -7
- package/dist/lib/browser/chunk-GU2BNYKZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-OGNXNGJB.mjs.map +0 -7
- package/dist/lib/browser/chunk-YEPT334A.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-4R66ZCKT.mjs.map +0 -7
- package/dist/lib/browser/meeting-transcription-state-DLFHQK72.mjs.map +0 -7
- package/dist/lib/node/TranscriptContainer-QEYTTT2V.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-IFSIVNUR.cjs.map +0 -7
- package/dist/lib/node/chunk-3KHUSQNW.cjs.map +0 -7
- package/dist/lib/node/chunk-CZMLKKWT.cjs.map +0 -7
- package/dist/lib/node/chunk-P4VVD6ZO.cjs.map +0 -7
- package/dist/lib/node/chunk-UOFHT4GZ.cjs +0 -280
- package/dist/lib/node/chunk-UOFHT4GZ.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-WMMCOUEH.cjs.map +0 -7
- package/dist/lib/node/meeting-transcription-state-URIYILEQ.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-UL6XLIZY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6X7X2UZF.mjs +0 -254
- package/dist/lib/node-esm/chunk-6X7X2UZF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GIO6J6FE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HKATMD34.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PTZHDZ36.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-QN2LO5TX.mjs.map +0 -7
- package/dist/lib/node-esm/meeting-transcription-state-ZYVRAW6Y.mjs.map +0 -7
- package/dist/types/src/transcriber/transcriber.test.d.ts +0 -2
- package/dist/types/src/transcriber/transcriber.test.d.ts.map +0 -1
- package/dist/types/src/util/random-queue-dxn.d.ts +0 -3
- package/dist/types/src/util/random-queue-dxn.d.ts.map +0 -1
- package/src/util/random-queue-dxn.ts +0 -9
- /package/dist/lib/browser/{TranscriptContainer-JQ3HFHLQ.mjs.map → TranscriptContainer-4D4BHE7G.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-K7FOYAXO.mjs.map → chunk-GI5LZ4SV.mjs.map} +0 -0
- /package/dist/lib/{node-esm/react-surface-PCH6NTVB.mjs.map → browser/react-surface-HETJ5XY6.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-LP4FG423.cjs.map → chunk-WXG4Z2EZ.cjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-ZXUCOWGY.mjs.map → TranscriptContainer-3HJ752CP.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-J4D2RBBH.mjs.map → chunk-XY22OP6H.mjs.map} +0 -0
- /package/src/transcriber/{transcriber.test.ts → transcriber.browser.test.ts} +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { S } from '@dxos/echo-schema';
|
|
2
|
+
import { type Space } from '@dxos/react-client/echo';
|
|
3
|
+
import { TranscriptBlock } from '../../types';
|
|
4
|
+
export declare const TestItem: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
|
|
5
|
+
title: S.SchemaClass<string, string, never>;
|
|
6
|
+
description: S.SchemaClass<string, string, never>;
|
|
7
|
+
}>>;
|
|
8
|
+
/**
|
|
9
|
+
* Generator of transcript blocks.
|
|
10
|
+
*/
|
|
11
|
+
export declare class BlockBuilder {
|
|
12
|
+
private readonly _space?;
|
|
13
|
+
static readonly singleton: BlockBuilder;
|
|
14
|
+
users: {
|
|
15
|
+
authorName: string;
|
|
16
|
+
authorHue: string;
|
|
17
|
+
}[];
|
|
18
|
+
start: Date;
|
|
19
|
+
constructor(_space?: Space | undefined);
|
|
20
|
+
createBlock(numSegments?: number): TranscriptBlock;
|
|
21
|
+
createSegment(): {
|
|
22
|
+
started: string;
|
|
23
|
+
text: string;
|
|
24
|
+
};
|
|
25
|
+
next(): Date;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Test transcriptionqueue.
|
|
29
|
+
*/
|
|
30
|
+
export declare const useTestTranscriptionQueue: (space: Space | undefined, running?: boolean, interval?: number) => import("@dxos/echo-db").Queue<{
|
|
31
|
+
readonly id: string;
|
|
32
|
+
authorName?: string | undefined;
|
|
33
|
+
authorHue?: string | undefined;
|
|
34
|
+
segments: {
|
|
35
|
+
readonly started: string;
|
|
36
|
+
readonly text: string;
|
|
37
|
+
}[];
|
|
38
|
+
}> | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Test transcription queue.
|
|
41
|
+
*/
|
|
42
|
+
export declare const useTestTranscriptionQueueWithEntityExtraction: (space: Space | undefined, running?: boolean, interval?: number) => import("@dxos/echo-db").Queue<{
|
|
43
|
+
readonly id: string;
|
|
44
|
+
authorName?: string | undefined;
|
|
45
|
+
authorHue?: string | undefined;
|
|
46
|
+
segments: {
|
|
47
|
+
readonly started: string;
|
|
48
|
+
readonly text: string;
|
|
49
|
+
}[];
|
|
50
|
+
}> | undefined;
|
|
51
|
+
//# sourceMappingURL=testings.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"testings.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcript/testings.ts"],"names":[],"mappings":"AAUA,OAAO,EAAqC,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAGzE,OAAO,EAA2B,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAO9E,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAG9C,eAAO,MAAM,QAAQ;;;GASoD,CAAC;AAE1E;;GAEG;AACH,qBAAa,YAAY;IAUX,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC;IATpC,MAAM,CAAC,QAAQ,CAAC,SAAS,eAAsB;IAE/C,KAAK;;;QAGD;IAEJ,KAAK,OAAgD;gBAExB,MAAM,CAAC,EAAE,KAAK,YAAA;IAE3C,WAAW,CAAC,WAAW,SAAI,GAAG,eAAe;IAQ7C,aAAa;;;;IAiBb,IAAI;CAIL;AAED;;GAEG;AACH,eAAO,MAAM,yBAAyB,UAAW,KAAK,GAAG,SAAS;;;;;;;;cAoBjE,CAAC;AAyCF;;GAEG;AACH,eAAO,MAAM,6CAA6C,UACjD,KAAK,GAAG,SAAS;;;;;;;;cAiCzB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type Extension } from '@codemirror/state';
|
|
2
|
+
import { type RenderCallback } from '@dxos/react-ui-editor';
|
|
3
|
+
import { type BlockModel } from '../../model';
|
|
4
|
+
import { type TranscriptBlock } from '../../types';
|
|
5
|
+
/**
|
|
6
|
+
* Data structure that maps Blocks queue to lines with transcript state.
|
|
7
|
+
*/
|
|
8
|
+
export type TranscriptOptions = {
|
|
9
|
+
model: BlockModel<TranscriptBlock>;
|
|
10
|
+
started?: Date;
|
|
11
|
+
renderButton?: RenderCallback<{
|
|
12
|
+
onClick: () => void;
|
|
13
|
+
}>;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Scrolling transcript with timestamps.
|
|
17
|
+
*/
|
|
18
|
+
export declare const transcript: ({ model, started, renderButton }: TranscriptOptions) => Extension;
|
|
19
|
+
//# sourceMappingURL=transcript-extension.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-extension.d.ts","sourceRoot":"","sources":["../../../../../src/components/Transcript/transcript-extension.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,mBAAmB,CAAC;AAMpE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAAmB,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC;AAC/D,OAAO,EAAE,KAAK,eAAe,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG;IAC9B,KAAK,EAAE,UAAU,CAAC,eAAe,CAAC,CAAC;IACnC,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,YAAY,CAAC,EAAE,cAAc,CAAC;QAAE,OAAO,EAAE,MAAM,IAAI,CAAA;KAAE,CAAC,CAAC;CACxD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,qCAAsC,iBAAiB,KAAG,SAuJhF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TranscriptContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/TranscriptContainer.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"TranscriptContainer.d.ts","sourceRoot":"","sources":["../../../../src/components/TranscriptContainer.tsx"],"names":[],"mappings":"AAIA,OAAc,EAAE,KAAK,EAAE,EAAE,MAAM,OAAO,CAAC;AAQvC,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC;AAErE,eAAO,MAAM,sBAAsB,EAAE,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,cAAc,CAAA;CAAE,CAWnF,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcription.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/transcription.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KASN,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"transcription.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/transcription.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KASN,MAAM,OAAO,CAAC;AAMf,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AA+FtC,QAAA,MAAM,SAAS,2BAA4B;IAAE,QAAQ,EAAE,GAAG,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,aAAa,EAAE,MAAM,CAAA;CAAE,sBAgEpG,CAAC;AAEF,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,SAAS,CA2ChC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,SAAS,CAAC,CAAC;AAExC,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAQlB,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { AIServiceClient } from '@dxos/assistant';
|
|
2
|
+
import type { BaseEchoObject } from '@dxos/echo-schema';
|
|
3
|
+
import type { TranscriptBlock } from '../types';
|
|
4
|
+
type ProcessTranscriptBlockParams = {
|
|
5
|
+
block: TranscriptBlock;
|
|
6
|
+
aiService: AIServiceClient;
|
|
7
|
+
context: {
|
|
8
|
+
objects?: BaseEchoObject[];
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
type ProcessTranscriptBlockResult = {
|
|
12
|
+
block: TranscriptBlock;
|
|
13
|
+
};
|
|
14
|
+
export declare const processTranscriptBlock: (params: ProcessTranscriptBlockParams) => Promise<ProcessTranscriptBlockResult>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=entity-extraction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-extraction.d.ts","sourceRoot":"","sources":["../../../../src/entity-extraction/entity-extraction.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAC;AAIvD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE,eAAe,CAAC;IACvB,SAAS,EAAE,eAAe,CAAC;IAC3B,OAAO,EAAE;QACP,OAAO,CAAC,EAAE,cAAc,EAAE,CAAC;KAC5B,CAAC;CACH,CAAC;AAEF,KAAK,4BAA4B,GAAG;IAClC,KAAK,EAAE,eAAe,CAAC;CACxB,CAAC;AAUF,eAAO,MAAM,sBAAsB,WACzB,4BAA4B,KACnC,OAAO,CAAC,4BAA4B,CA6CtC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"entity-extraction.test.d.ts","sourceRoot":"","sources":["../../../../src/entity-extraction/entity-extraction.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/entity-extraction/index.ts"],"names":[],"mappings":"AAIA,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/hooks/index.ts"],"names":[],"mappings":"AAIA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Queue } from '@dxos/react-client/echo';
|
|
2
|
+
import { type Block, BlockModel, type BlockRenderer } from '../model';
|
|
3
|
+
/**
|
|
4
|
+
* Model adapter for a queue.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useQueueModelAdapter: <T extends Block>(renderer: BlockRenderer<T>, queue: Queue<T> | undefined, initialBlocks?: T[]) => BlockModel<T>;
|
|
7
|
+
//# sourceMappingURL=useQueueModelAdapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useQueueModelAdapter.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useQueueModelAdapter.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,KAAK,KAAK,EAAE,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,UAAU,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAAI,CAAC,SAAS,KAAK,YACxC,aAAa,CAAC,CAAC,CAAC,SACnB,KAAK,CAAC,CAAC,CAAC,GAAG,SAAS,kBACZ,CAAC,EAAE,KACjB,UAAU,CAAC,CAAC,CAYd,CAAC"}
|
|
@@ -3,5 +3,5 @@ import { type Transcriber } from '../transcriber';
|
|
|
3
3
|
/**
|
|
4
4
|
* Records audio while user is speaking and transcribes it after user is done speaking.
|
|
5
5
|
*/
|
|
6
|
-
export declare const useTranscriber: ({ audioStreamTrack, onSegments, }: Partial<TranscriptionCapabilities.GetTranscriberProps>) => Transcriber | undefined;
|
|
6
|
+
export declare const useTranscriber: ({ audioStreamTrack, onSegments, config, }: Partial<TranscriptionCapabilities.GetTranscriberProps>) => Transcriber | undefined;
|
|
7
7
|
//# sourceMappingURL=useTranscriber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTranscriber.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTranscriber.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"useTranscriber.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTranscriber.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,cAAc,8CAIxB,OAAO,CAAC,yBAAyB,CAAC,mBAAmB,CAAC,4BAmBxD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/model/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC"}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { Text } from '@codemirror/state';
|
|
2
|
+
import { type EditorView } from '@codemirror/view';
|
|
3
|
+
import { Event } from '@dxos/async';
|
|
4
|
+
export type Block = {
|
|
5
|
+
id: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Covert block to a set of markdown lines.
|
|
9
|
+
*/
|
|
10
|
+
export type BlockRenderer<T extends Block> = (block: T, debug?: boolean) => string[];
|
|
11
|
+
/**
|
|
12
|
+
* Abstract representation of the document model.
|
|
13
|
+
*/
|
|
14
|
+
export interface BlockDocument {
|
|
15
|
+
lineCount(): number;
|
|
16
|
+
replaceLines(from: number, remove: number, insert: string[]): void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Codemirror document adapter.
|
|
20
|
+
*/
|
|
21
|
+
export declare class DocumentAdapter implements BlockDocument {
|
|
22
|
+
private readonly _view;
|
|
23
|
+
constructor(_view: EditorView);
|
|
24
|
+
/** The document must always have at least one line. */
|
|
25
|
+
lineCount(): number;
|
|
26
|
+
replaceLines(from: number, remove: number, insert: string[]): void;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Each Block can be converted into a set of lines.
|
|
30
|
+
* Blocks can be added, updated or deleted from the Queue.
|
|
31
|
+
* A Document is an immutable projection that represents a flat list of lines corresponding to the Queue.
|
|
32
|
+
*
|
|
33
|
+
* Ideally we would implement a custom virtual Text model for the View, but this currently isn't possible in Codemirror.
|
|
34
|
+
* Instead this model tracks changes and syncs them with the BlockDocument.
|
|
35
|
+
*/
|
|
36
|
+
export declare class BlockModel<T extends Block> {
|
|
37
|
+
private readonly _renderer;
|
|
38
|
+
/** Ordered set of blocks. */
|
|
39
|
+
private readonly _blocks;
|
|
40
|
+
/** Map of block IDs to their current line counts. */
|
|
41
|
+
private readonly _blockLineCounts;
|
|
42
|
+
/** Map of line numbers to block IDs. */
|
|
43
|
+
private readonly _lineToBlock;
|
|
44
|
+
/** Track block changes since last sync. */
|
|
45
|
+
private readonly _changes;
|
|
46
|
+
/** Emits when the document is updated. */
|
|
47
|
+
readonly update: Event<void>;
|
|
48
|
+
constructor(_renderer: BlockRenderer<T>, initialBlocks?: T[]);
|
|
49
|
+
toJSON(): {
|
|
50
|
+
blocks: number;
|
|
51
|
+
changes: number;
|
|
52
|
+
};
|
|
53
|
+
get doc(): Text;
|
|
54
|
+
get blocks(): T[];
|
|
55
|
+
/**
|
|
56
|
+
* Get the block ID at the given line number.
|
|
57
|
+
*/
|
|
58
|
+
getBlockAtLine(line: number): T | undefined;
|
|
59
|
+
reset(): this;
|
|
60
|
+
appendBlock(block: T): this;
|
|
61
|
+
updateBlock(block: T): this;
|
|
62
|
+
deleteBlock(id: string): this;
|
|
63
|
+
/**
|
|
64
|
+
* Syncs the tracked changes with the BlockDocument.
|
|
65
|
+
*/
|
|
66
|
+
sync(document: BlockDocument): this;
|
|
67
|
+
}
|
|
68
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../../../src/model/model.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AAIpC,MAAM,MAAM,KAAK,GAAG;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnC;;GAEG;AACH,MAAM,MAAM,aAAa,CAAC,CAAC,SAAS,KAAK,IAAI,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,MAAM,EAAE,CAAC;AAErF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,SAAS,IAAI,MAAM,CAAC;IACpB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CACpE;AAED;;GAEG;AACH,qBAAa,eAAgB,YAAW,aAAa;IACvC,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,UAAU;IAE9C,uDAAuD;IACvD,SAAS,IAAI,MAAM;IAInB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,IAAI;CAiBnE;AAmBD;;;;;;;GAOG;AACH,qBAAa,UAAU,CAAC,CAAC,SAAS,KAAK;IAiBnC,OAAO,CAAC,QAAQ,CAAC,SAAS;IAhB5B,6BAA6B;IAC7B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAW;IAEnC,qDAAqD;IACrD,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAA6B;IAE9D,wCAAwC;IACxC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAwB;IAErD,2CAA2C;IAC3C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAA6B;IAEtD,0CAA0C;IAC1C,SAAgB,MAAM,cAAqB;gBAGxB,SAAS,EAAE,aAAa,CAAC,CAAC,CAAC,EAC5C,aAAa,GAAE,CAAC,EAAO;IAOzB,MAAM;;;;IAON,IAAI,GAAG,SAEN;IAED,IAAI,MAAM,QAET;IAED;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAI3C,KAAK,IAAI,IAAI;IAQb,WAAW,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAQ3B,WAAW,CAAC,KAAK,EAAE,CAAC,GAAG,IAAI;IAS3B,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI;IAS7B;;OAEG;IACH,IAAI,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;CA+DpC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.test.d.ts","sourceRoot":"","sources":["../../../../src/model/model.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import { TranscriptBlock } from '../types';
|
|
3
|
+
export declare const DocumentType: import("@dxos/echo-schema").EchoObjectSchema<Schema.Struct<{
|
|
4
|
+
id: import("@dxos/echo-schema").ObjectIdClass;
|
|
5
|
+
name: typeof Schema.String;
|
|
6
|
+
content: typeof Schema.String;
|
|
7
|
+
}>>;
|
|
8
|
+
export type DocumentType = typeof DocumentType.Type;
|
|
9
|
+
export declare const contacts: {
|
|
10
|
+
john: {
|
|
11
|
+
readonly id: string;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
identifiers: {
|
|
14
|
+
readonly value: string;
|
|
15
|
+
readonly type: string;
|
|
16
|
+
}[];
|
|
17
|
+
};
|
|
18
|
+
sarah: {
|
|
19
|
+
readonly id: string;
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
identifiers: {
|
|
22
|
+
readonly value: string;
|
|
23
|
+
readonly type: string;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
26
|
+
michael: {
|
|
27
|
+
readonly id: string;
|
|
28
|
+
name?: string | undefined;
|
|
29
|
+
identifiers: {
|
|
30
|
+
readonly value: string;
|
|
31
|
+
readonly type: string;
|
|
32
|
+
}[];
|
|
33
|
+
};
|
|
34
|
+
emma: {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
name?: string | undefined;
|
|
37
|
+
identifiers: {
|
|
38
|
+
readonly value: string;
|
|
39
|
+
readonly type: string;
|
|
40
|
+
}[];
|
|
41
|
+
};
|
|
42
|
+
david: {
|
|
43
|
+
readonly id: string;
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
identifiers: {
|
|
46
|
+
readonly value: string;
|
|
47
|
+
readonly type: string;
|
|
48
|
+
}[];
|
|
49
|
+
};
|
|
50
|
+
unknown1: {
|
|
51
|
+
readonly id: string;
|
|
52
|
+
name?: string | undefined;
|
|
53
|
+
identifiers: {
|
|
54
|
+
readonly value: string;
|
|
55
|
+
readonly type: string;
|
|
56
|
+
}[];
|
|
57
|
+
};
|
|
58
|
+
unknown2: {
|
|
59
|
+
readonly id: string;
|
|
60
|
+
name?: string | undefined;
|
|
61
|
+
identifiers: {
|
|
62
|
+
readonly value: string;
|
|
63
|
+
readonly type: string;
|
|
64
|
+
}[];
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
export declare const documents: {
|
|
68
|
+
readonly id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
content: string;
|
|
71
|
+
}[];
|
|
72
|
+
export declare const transcriptBlocks: TranscriptBlock[];
|
|
73
|
+
//# sourceMappingURL=test-data.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-data.d.ts","sourceRoot":"","sources":["../../../../src/testing/test-data.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAKhC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAkB3C,eAAO,MAAM,YAAY;;;;GAIuD,CAAC;AACjF,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAC;AASpD,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAQpB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;GA0CrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,EA0N7C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcriber.browser.test.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/transcriber.browser.test.ts"],"names":[],"mappings":""}
|
|
@@ -4,8 +4,8 @@ import { Expando, S } from '@dxos/echo-schema';
|
|
|
4
4
|
*/
|
|
5
5
|
export declare const TranscriptSchema: S.Struct<{
|
|
6
6
|
name: typeof S.String;
|
|
7
|
-
started: S.optional<typeof S.
|
|
8
|
-
ended: S.optional<typeof S.
|
|
7
|
+
started: S.optional<typeof S.String>;
|
|
8
|
+
ended: S.optional<typeof S.String>;
|
|
9
9
|
/**
|
|
10
10
|
* Queue containing TranscriptBlock objects.
|
|
11
11
|
*/
|
|
@@ -13,13 +13,13 @@ export declare const TranscriptSchema: S.Struct<{
|
|
|
13
13
|
}>;
|
|
14
14
|
declare const TranscriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
15
15
|
readonly name: typeof S.String;
|
|
16
|
-
readonly started: S.optional<typeof S.
|
|
17
|
-
readonly ended: S.optional<typeof S.
|
|
16
|
+
readonly started: S.optional<typeof S.String>;
|
|
17
|
+
readonly ended: S.optional<typeof S.String>;
|
|
18
18
|
readonly queue: import("@dxos/echo-schema").Ref$<Expando>;
|
|
19
19
|
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
20
20
|
readonly name: typeof S.String;
|
|
21
|
-
readonly started: S.optional<typeof S.
|
|
22
|
-
readonly ended: S.optional<typeof S.
|
|
21
|
+
readonly started: S.optional<typeof S.String>;
|
|
22
|
+
readonly ended: S.optional<typeof S.String>;
|
|
23
23
|
readonly queue: import("@dxos/echo-schema").Ref$<Expando>;
|
|
24
24
|
}>>;
|
|
25
25
|
export declare class TranscriptType extends TranscriptType_base {
|
|
@@ -29,14 +29,14 @@ export declare class TranscriptType extends TranscriptType_base {
|
|
|
29
29
|
* Contains metadata for the recording and transcript.
|
|
30
30
|
*/
|
|
31
31
|
declare const TranscriptHeader: S.Struct<{
|
|
32
|
-
started: S.optional<typeof S.
|
|
32
|
+
started: S.optional<typeof S.String>;
|
|
33
33
|
}>;
|
|
34
34
|
export type TranscriptHeader = S.Schema.Type<typeof TranscriptHeader>;
|
|
35
35
|
/**
|
|
36
36
|
* Transcription fragment.
|
|
37
37
|
*/
|
|
38
38
|
declare const TranscriptSegment: S.Struct<{
|
|
39
|
-
started: typeof S.
|
|
39
|
+
started: typeof S.String;
|
|
40
40
|
text: typeof S.String;
|
|
41
41
|
}>;
|
|
42
42
|
export type TranscriptSegment = S.Schema.Type<typeof TranscriptSegment>;
|
|
@@ -48,7 +48,7 @@ export declare const TranscriptBlock: import("@dxos/echo-schema").EchoObjectSche
|
|
|
48
48
|
authorName: S.optional<typeof S.String>;
|
|
49
49
|
authorHue: S.optional<typeof S.String>;
|
|
50
50
|
segments: S.Array$<S.Struct<{
|
|
51
|
-
started: typeof S.
|
|
51
|
+
started: typeof S.String;
|
|
52
52
|
text: typeof S.String;
|
|
53
53
|
}>>;
|
|
54
54
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transcription",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2-main.f081794",
|
|
4
4
|
"description": "Voice transcription.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -32,6 +32,8 @@
|
|
|
32
32
|
"src"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
+
"@codemirror/state": "^6.4.1",
|
|
36
|
+
"@codemirror/view": "^6.34.1",
|
|
35
37
|
"@preact/signals-core": "^1.6.0",
|
|
36
38
|
"date-fns": "^3.3.1",
|
|
37
39
|
"effect": "3.13.3",
|
|
@@ -42,54 +44,60 @@
|
|
|
42
44
|
"react-router-dom": "^6.4.0",
|
|
43
45
|
"react-use": "^17.5.1",
|
|
44
46
|
"wavefile": "^11.0.0",
|
|
45
|
-
"@dxos/app-framework": "0.8.
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/async": "0.8.
|
|
49
|
-
"@dxos/client": "0.8.
|
|
50
|
-
"@dxos/context": "0.8.
|
|
51
|
-
"@dxos/codec-protobuf": "0.8.
|
|
52
|
-
"@dxos/debug": "0.8.
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/echo-
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/invariant": "0.8.
|
|
57
|
-
"@dxos/keys": "0.8.
|
|
58
|
-
"@dxos/live-object": "0.8.
|
|
59
|
-
"@dxos/log": "0.8.
|
|
60
|
-
"@dxos/plugin-client": "0.8.
|
|
61
|
-
"@dxos/plugin-
|
|
62
|
-
"@dxos/plugin-
|
|
63
|
-
"@dxos/plugin-meeting": "0.8.
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/plugin-space": "0.8.
|
|
67
|
-
"@dxos/react-
|
|
68
|
-
"@dxos/react-ui-
|
|
69
|
-
"@dxos/react-ui-
|
|
70
|
-
"@dxos/react-ui-grid": "0.8.
|
|
71
|
-
"@dxos/react-ui-
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/react-
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
47
|
+
"@dxos/app-framework": "0.8.2-main.f081794",
|
|
48
|
+
"@dxos/assistant": "0.8.2-main.f081794",
|
|
49
|
+
"@dxos/artifact": "0.8.2-main.f081794",
|
|
50
|
+
"@dxos/async": "0.8.2-main.f081794",
|
|
51
|
+
"@dxos/client": "0.8.2-main.f081794",
|
|
52
|
+
"@dxos/context": "0.8.2-main.f081794",
|
|
53
|
+
"@dxos/codec-protobuf": "0.8.2-main.f081794",
|
|
54
|
+
"@dxos/debug": "0.8.2-main.f081794",
|
|
55
|
+
"@dxos/echo-db": "0.8.2-main.f081794",
|
|
56
|
+
"@dxos/echo-schema": "0.8.2-main.f081794",
|
|
57
|
+
"@dxos/display-name": "0.8.2-main.f081794",
|
|
58
|
+
"@dxos/invariant": "0.8.2-main.f081794",
|
|
59
|
+
"@dxos/keys": "0.8.2-main.f081794",
|
|
60
|
+
"@dxos/live-object": "0.8.2-main.f081794",
|
|
61
|
+
"@dxos/log": "0.8.2-main.f081794",
|
|
62
|
+
"@dxos/plugin-client": "0.8.2-main.f081794",
|
|
63
|
+
"@dxos/plugin-deck": "0.8.2-main.f081794",
|
|
64
|
+
"@dxos/plugin-graph": "0.8.2-main.f081794",
|
|
65
|
+
"@dxos/plugin-meeting": "0.8.2-main.f081794",
|
|
66
|
+
"@dxos/protocols": "0.8.2-main.f081794",
|
|
67
|
+
"@dxos/react-client": "0.8.2-main.f081794",
|
|
68
|
+
"@dxos/plugin-space": "0.8.2-main.f081794",
|
|
69
|
+
"@dxos/react-edge-client": "0.8.2-main.f081794",
|
|
70
|
+
"@dxos/react-ui-components": "0.8.2-main.f081794",
|
|
71
|
+
"@dxos/react-ui-editor": "0.8.2-main.f081794",
|
|
72
|
+
"@dxos/react-ui-grid": "0.8.2-main.f081794",
|
|
73
|
+
"@dxos/react-ui-attention": "0.8.2-main.f081794",
|
|
74
|
+
"@dxos/react-ui-sfx": "0.8.2-main.f081794",
|
|
75
|
+
"@dxos/react-ui-stack": "0.8.2-main.f081794",
|
|
76
|
+
"@dxos/schema": "0.8.2-main.f081794",
|
|
77
|
+
"@dxos/tracing": "0.8.2-main.f081794",
|
|
78
|
+
"@dxos/util": "0.8.2-main.f081794"
|
|
76
79
|
},
|
|
77
80
|
"devDependencies": {
|
|
78
81
|
"@types/react": "~18.2.0",
|
|
79
82
|
"react": "~18.2.0",
|
|
80
83
|
"react-dom": "~18.2.0",
|
|
81
84
|
"tailwindcss": "~3.4.1",
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/storybook-
|
|
86
|
-
"@dxos/
|
|
85
|
+
"@dxos/plugin-preview": "0.8.2-main.f081794",
|
|
86
|
+
"@dxos/plugin-theme": "0.8.2-main.f081794",
|
|
87
|
+
"@dxos/random": "0.8.2-main.f081794",
|
|
88
|
+
"@dxos/plugin-storybook-layout": "0.8.2-main.f081794",
|
|
89
|
+
"@dxos/react-ui": "0.8.2-main.f081794",
|
|
90
|
+
"@dxos/react-ui-form": "0.8.2-main.f081794",
|
|
91
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.2-main.f081794",
|
|
92
|
+
"@dxos/storybook-utils": "0.8.2-main.f081794",
|
|
93
|
+
"@dxos/react-ui-theme": "0.8.2-main.f081794",
|
|
94
|
+
"@dxos/test-utils": "0.8.2-main.f081794"
|
|
87
95
|
},
|
|
88
96
|
"optionalDependencies": {
|
|
89
97
|
"react": "~18.2.0",
|
|
90
98
|
"react-dom": "~18.2.0",
|
|
91
|
-
"@dxos/react-ui": "0.8.
|
|
92
|
-
"@dxos/react-ui-theme": "0.8.
|
|
99
|
+
"@dxos/react-ui": "0.8.2-main.f081794",
|
|
100
|
+
"@dxos/react-ui-theme": "0.8.2-main.f081794"
|
|
93
101
|
},
|
|
94
102
|
"publishConfig": {
|
|
95
103
|
"access": "public"
|
|
@@ -12,11 +12,8 @@ import { PLANK_COMPANION_TYPE, ATTENDABLE_PATH_SEPARATOR } from '@dxos/plugin-de
|
|
|
12
12
|
import { createExtension, type Node } from '@dxos/plugin-graph';
|
|
13
13
|
import { MeetingCapabilities, type CallState, type MediaState } from '@dxos/plugin-meeting';
|
|
14
14
|
import { MeetingType } from '@dxos/plugin-meeting/types';
|
|
15
|
-
import { buf } from '@dxos/protocols/buf';
|
|
16
|
-
import {
|
|
17
|
-
TranscriptionPayloadSchema,
|
|
18
|
-
type TranscriptionPayload as TranscriptionPayloadProto,
|
|
19
|
-
} from '@dxos/protocols/buf/dxos/edge/calls_pb';
|
|
15
|
+
import { type buf } from '@dxos/protocols/buf';
|
|
16
|
+
import { type TranscriptionPayloadSchema } from '@dxos/protocols/buf/dxos/edge/calls_pb';
|
|
20
17
|
import { keyToFallback } from '@dxos/util';
|
|
21
18
|
|
|
22
19
|
import { TranscriptionCapabilities } from './capabilities';
|
|
@@ -27,14 +24,6 @@ import { TranscriptionAction, TranscriptType } from '../types';
|
|
|
27
24
|
// TODO(wittjosiah): Factor out.
|
|
28
25
|
// TODO(wittjosiah): Can we stop using protobuf for this?
|
|
29
26
|
type TranscriptionPayload = buf.MessageInitShape<typeof TranscriptionPayloadSchema>;
|
|
30
|
-
const codec = {
|
|
31
|
-
encode: (message: TranscriptionPayload): Uint8Array => {
|
|
32
|
-
return buf.toBinary(TranscriptionPayloadSchema, buf.create(TranscriptionPayloadSchema, message));
|
|
33
|
-
},
|
|
34
|
-
decode: (message: Uint8Array): TranscriptionPayloadProto => {
|
|
35
|
-
return buf.fromBinary(TranscriptionPayloadSchema, message);
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
27
|
|
|
39
28
|
const getMeetingTranscript = async (
|
|
40
29
|
context: PluginsContext,
|
|
@@ -69,26 +58,26 @@ export default (context: PluginsContext) =>
|
|
|
69
58
|
{
|
|
70
59
|
id: `${fullyQualifiedId(meeting)}/action/start-stop-transcription`,
|
|
71
60
|
data: async () => {
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
61
|
+
// NOTE: We are not saving the state of the transcription manager here.
|
|
62
|
+
// We expect the state to be updated through `onCallStateUpdated` once it is propagated through Swarm.
|
|
63
|
+
// This is done to avoid race conditions and to not handle optimistic updates.
|
|
64
|
+
|
|
76
65
|
const transcript = await getMeetingTranscript(context, meeting);
|
|
77
66
|
invariant(transcript, 'Failed to create transcript');
|
|
67
|
+
|
|
68
|
+
const call = context.requestCapability(MeetingCapabilities.CallManager);
|
|
78
69
|
call.setActivity(getSchemaTypename(TranscriptType)!, {
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
queueDxn: transcript.queue.dxn.toString(),
|
|
82
|
-
}),
|
|
70
|
+
enabled: !state.enabled,
|
|
71
|
+
queueDxn: transcript.queue.dxn.toString(),
|
|
83
72
|
});
|
|
84
73
|
},
|
|
85
74
|
properties: {
|
|
86
75
|
label: state.enabled
|
|
87
76
|
? ['stop transcription label', { ns: TRANSCRIPTION_PLUGIN }]
|
|
88
77
|
: ['start transcription label', { ns: TRANSCRIPTION_PLUGIN }],
|
|
89
|
-
icon: 'ph--
|
|
78
|
+
icon: 'ph--subtitles--regular',
|
|
90
79
|
disposition: 'toolbar',
|
|
91
|
-
classNames: state.enabled ? '
|
|
80
|
+
classNames: state.enabled ? 'bg-callAlert' : '',
|
|
92
81
|
},
|
|
93
82
|
},
|
|
94
83
|
];
|
|
@@ -131,12 +120,12 @@ export default (context: PluginsContext) =>
|
|
|
131
120
|
onCallStateUpdated: (callState: CallState) => {
|
|
132
121
|
const typename = getSchemaTypename(TranscriptType);
|
|
133
122
|
const transcription = typename ? callState.activities?.[typename] : undefined;
|
|
134
|
-
if (!transcription?.payload
|
|
123
|
+
if (!transcription?.payload) {
|
|
135
124
|
return;
|
|
136
125
|
}
|
|
137
126
|
|
|
138
|
-
const payload =
|
|
139
|
-
state.enabled = payload.enabled;
|
|
127
|
+
const payload: TranscriptionPayload = transcription.payload;
|
|
128
|
+
state.enabled = !!payload.enabled;
|
|
140
129
|
void state.transcriptionManager?.setEnabled(payload.enabled);
|
|
141
130
|
void state.transcriptionManager?.setQueue(payload.queueDxn);
|
|
142
131
|
},
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
-
import { type
|
|
6
|
+
import { type Live } from '@dxos/live-object';
|
|
7
7
|
|
|
8
8
|
import { TRANSCRIPTION_PLUGIN } from '../meta';
|
|
9
9
|
import { type TranscriberParams, type Transcriber, type TranscriptionManager } from '../transcriber';
|
|
@@ -12,11 +12,12 @@ export namespace TranscriptionCapabilities {
|
|
|
12
12
|
export type GetTranscriberProps = {
|
|
13
13
|
audioStreamTrack: MediaStreamTrack;
|
|
14
14
|
onSegments: TranscriberParams['onSegments'];
|
|
15
|
+
config?: TranscriberParams['config'];
|
|
15
16
|
};
|
|
16
17
|
export type GetTranscriber = (props: GetTranscriberProps) => Transcriber;
|
|
17
18
|
export const Transcriber = defineCapability<GetTranscriber>(`${TRANSCRIPTION_PLUGIN}/capability/transcriber`);
|
|
18
19
|
|
|
19
|
-
export type MeetingTranscriptionState =
|
|
20
|
+
export type MeetingTranscriptionState = Live<{
|
|
20
21
|
enabled: boolean;
|
|
21
22
|
transcriptionManager?: TranscriptionManager;
|
|
22
23
|
}>;
|