@dxos/plugin-transcription 0.8.4-main.c4373fc → 0.8.4-main.c85a9c8dae
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/TranscriptionContainer-RBFHP2AV.mjs +41 -0
- package/dist/lib/browser/TranscriptionContainer-RBFHP2AV.mjs.map +7 -0
- package/dist/lib/browser/blueprint-definition-C6XA2SVZ.mjs +18 -0
- package/dist/lib/browser/blueprint-definition-C6XA2SVZ.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +9 -0
- package/dist/lib/browser/chunk-2B74LZZD.mjs +22 -0
- package/dist/lib/browser/chunk-2B74LZZD.mjs.map +7 -0
- package/dist/lib/browser/{chunk-COBQIZ6B.mjs → chunk-EV5ZYKET.mjs} +60 -86
- package/dist/lib/browser/chunk-EV5ZYKET.mjs.map +7 -0
- package/dist/lib/browser/chunk-GH4IIQ6C.mjs +54 -0
- package/dist/lib/browser/chunk-GH4IIQ6C.mjs.map +7 -0
- package/dist/lib/browser/chunk-HOOPZ7EM.mjs +35 -0
- package/dist/lib/browser/chunk-HOOPZ7EM.mjs.map +7 -0
- package/dist/lib/browser/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/browser/{blueprint-definition-GO6GTEBT.mjs → chunk-O7ILGNBZ.mjs} +39 -41
- package/dist/lib/browser/chunk-O7ILGNBZ.mjs.map +7 -0
- package/dist/lib/browser/{chunk-ZS2FXKEF.mjs → chunk-XLMRCOQN.mjs} +383 -470
- package/dist/lib/browser/chunk-XLMRCOQN.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +62 -77
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-5BLRH4XE.mjs +23 -0
- package/dist/lib/browser/operation-resolver-5BLRH4XE.mjs.map +7 -0
- package/dist/lib/browser/react-surface-U2SI74JK.mjs +36 -0
- package/dist/lib/browser/react-surface-U2SI74JK.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-NG5MRCP6.mjs → transcriber-WCPHHJYY.mjs} +19 -14
- package/dist/lib/browser/transcriber-WCPHHJYY.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -5
- package/dist/lib/node-esm/TranscriptionContainer-3OOID5KH.mjs +42 -0
- package/dist/lib/node-esm/TranscriptionContainer-3OOID5KH.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-TLXDUXIQ.mjs +19 -0
- package/dist/lib/node-esm/blueprint-definition-TLXDUXIQ.mjs.map +7 -0
- package/dist/lib/node-esm/blueprints/index.mjs +10 -0
- package/dist/lib/node-esm/blueprints/index.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-6GW5NZYG.mjs +55 -0
- package/dist/lib/node-esm/chunk-6GW5NZYG.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-A6SB234F.mjs → chunk-7UE7G6DE.mjs} +60 -86
- package/dist/lib/node-esm/chunk-7UE7G6DE.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PEZRQYKO.mjs → chunk-DYUGYQCB.mjs} +383 -470
- package/dist/lib/node-esm/chunk-DYUGYQCB.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-KLTPFUKN.mjs → chunk-F47HK7GT.mjs} +7 -8
- package/dist/lib/node-esm/chunk-F47HK7GT.mjs.map +7 -0
- package/dist/lib/node-esm/{blueprint-definition-6SU7GLBR.mjs → chunk-H3MXHMQL.mjs} +39 -41
- package/dist/lib/node-esm/chunk-H3MXHMQL.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +11 -0
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-NVM2QUMX.mjs +37 -0
- package/dist/lib/node-esm/chunk-NVM2QUMX.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +62 -77
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/operation-resolver-CVZB7BF4.mjs +24 -0
- package/dist/lib/node-esm/operation-resolver-CVZB7BF4.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-2ICJPBPX.mjs +37 -0
- package/dist/lib/node-esm/react-surface-2ICJPBPX.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-SMU7HD6F.mjs → transcriber-2RIHUEX4.mjs} +19 -14
- package/dist/lib/node-esm/transcriber-2RIHUEX4.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -5
- package/dist/types/src/TranscriptionPlugin.d.ts +2 -1
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/blueprints/index.d.ts +2 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/transcription-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +6 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +3 -0
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +4 -5
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +5 -0
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +3 -0
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +5 -0
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts +3 -0
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts +5 -0
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/transcriber/index.d.ts +3 -0
- package/dist/types/src/capabilities/transcriber/index.d.ts.map +1 -0
- package/dist/types/src/capabilities/transcriber/transcriber.d.ts +9 -0
- package/dist/types/src/capabilities/transcriber/transcriber.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/Transcription.d.ts +17 -0
- package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -0
- package/dist/types/src/components/{Transcript/Transcript.stories.d.ts → Transcription/Transcription.stories.d.ts} +7 -6
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/index.d.ts +2 -0
- package/dist/types/src/components/Transcription/index.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/transcription-extension.d.ts +15 -0
- package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -3
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts +3 -6
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +0 -3
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +3 -6
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +2 -2
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +6 -0
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +1 -0
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts +3 -0
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +3 -0
- package/dist/types/src/containers/index.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +17 -2
- package/dist/types/src/functions/index.d.ts.map +1 -1
- package/dist/types/src/functions/open.d.ts +6 -2
- package/dist/types/src/functions/open.d.ts.map +1 -1
- package/dist/types/src/functions/summarize.d.ts +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.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/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/message-normalizer.d.ts +5 -5
- package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/normalization.d.ts +515 -448
- package/dist/types/src/segments-normalization/normalization.d.ts.map +1 -1
- package/dist/types/src/segments-normalization/utils.d.ts +2 -2
- package/dist/types/src/segments-normalization/utils.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +9 -9
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +2 -2
- package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts +4 -4
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +9 -6
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/types/TranscriptAction.d.ts +22 -20
- package/dist/types/src/types/TranscriptAction.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +18 -0
- package/dist/types/src/types/capabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -1
- package/dist/types/src/types/index.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/render-byline.d.ts +4 -0
- package/dist/types/src/util/render-byline.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +84 -69
- package/src/TranscriptionPlugin.tsx +35 -57
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/transcription-blueprint.ts +33 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +17 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/index.ts +4 -8
- package/src/capabilities/operation-handler/index.ts +7 -0
- package/src/capabilities/operation-handler/operation-handler.ts +25 -0
- package/src/capabilities/operation-resolver/index.ts +7 -0
- package/src/capabilities/operation-resolver/operation-resolver.ts +25 -0
- package/src/capabilities/react-surface/index.ts +7 -0
- package/src/capabilities/react-surface/react-surface.tsx +28 -0
- package/src/capabilities/transcriber/index.ts +7 -0
- package/src/capabilities/transcriber/transcriber.ts +85 -0
- package/src/components/{Transcript/Transcript.stories.tsx → Transcription/Transcription.stories.tsx} +42 -41
- package/src/components/Transcription/Transcription.tsx +63 -0
- package/src/components/{Transcript → Transcription}/index.ts +1 -1
- package/src/components/{Transcript/transcript-extension.ts → Transcription/transcription-extension.ts} +13 -9
- package/src/components/index.ts +1 -6
- package/src/components/stories/FileTranscription.stories.tsx +30 -36
- package/src/components/stories/KeyWordRecognition.stories.tsx +5 -8
- package/src/components/stories/MicrophoneTranscription.stories.tsx +50 -55
- package/src/components/stories/TranscriptionStory.tsx +7 -11
- package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +33 -0
- package/src/containers/TranscriptionContainer/index.ts +7 -0
- package/src/containers/index.ts +7 -0
- package/src/functions/index.ts +7 -2
- package/src/functions/open.ts +9 -11
- package/src/hooks/useQueueModelAdapter.ts +1 -1
- package/src/hooks/useTranscriber.ts +8 -3
- package/src/hooks/useVoiceInput.ts +2 -2
- package/src/index.ts +1 -1
- package/src/meta.ts +8 -3
- package/src/model/model.test.ts +20 -14
- package/src/segments-normalization/message-normalizer.ts +18 -13
- package/src/segments-normalization/normalization.test.ts +6 -11
- package/src/segments-normalization/normalization.ts +6 -6
- package/src/segments-normalization/utils.ts +2 -2
- package/src/testing/testing.ts +28 -18
- package/src/transcriber/media-stream-recorder.ts +3 -3
- package/src/transcriber/transcriber.browser.test.ts +4 -4
- package/src/transcriber/transcriber.ts +6 -6
- package/src/transcriber/transcription-manager.ts +21 -15
- package/src/types/TranscriptAction.ts +21 -13
- package/src/{capabilities → types}/capabilities.ts +8 -8
- package/src/types/index.ts +2 -1
- package/src/util/index.ts +1 -0
- package/src/util/render-byline.ts +33 -0
- package/dist/lib/browser/TranscriptContainer-QN5WUMWJ.mjs +0 -11
- package/dist/lib/browser/blueprint-definition-GO6GTEBT.mjs.map +0 -7
- package/dist/lib/browser/chunk-77NWYLC6.mjs +0 -8
- package/dist/lib/browser/chunk-77NWYLC6.mjs.map +0 -7
- package/dist/lib/browser/chunk-7LNCQDTT.mjs +0 -24
- package/dist/lib/browser/chunk-7LNCQDTT.mjs.map +0 -7
- package/dist/lib/browser/chunk-COBQIZ6B.mjs.map +0 -7
- package/dist/lib/browser/chunk-GGHMOEKZ.mjs +0 -63
- package/dist/lib/browser/chunk-GGHMOEKZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-LCK3YRQF.mjs +0 -16
- package/dist/lib/browser/chunk-LCK3YRQF.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZS2FXKEF.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-52EPFRMR.mjs +0 -25
- package/dist/lib/browser/intent-resolver-52EPFRMR.mjs.map +0 -7
- package/dist/lib/browser/react-surface-LCP2D2MF.mjs +0 -34
- package/dist/lib/browser/react-surface-LCP2D2MF.mjs.map +0 -7
- package/dist/lib/browser/transcriber-NG5MRCP6.mjs.map +0 -7
- package/dist/lib/node-esm/TranscriptContainer-WCUWVVSD.mjs +0 -12
- package/dist/lib/node-esm/blueprint-definition-6SU7GLBR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-A6SB234F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FTTZ4YSX.mjs +0 -64
- package/dist/lib/node-esm/chunk-FTTZ4YSX.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-KLTPFUKN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-N5Z4SKPH.mjs +0 -10
- package/dist/lib/node-esm/chunk-N5Z4SKPH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PEZRQYKO.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-RWRG3S2O.mjs +0 -17
- package/dist/lib/node-esm/chunk-RWRG3S2O.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-DZBQQRHN.mjs +0 -26
- package/dist/lib/node-esm/intent-resolver-DZBQQRHN.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-7UC2YXX2.mjs +0 -35
- package/dist/lib/node-esm/react-surface-7UC2YXX2.mjs.map +0 -7
- package/dist/lib/node-esm/transcriber-SMU7HD6F.mjs.map +0 -7
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -5
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/capabilities.d.ts +0 -17
- package/dist/types/src/capabilities/capabilities.d.ts.map +0 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +0 -4
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface.d.ts +0 -4
- package/dist/types/src/capabilities/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/transcriber.d.ts +0 -8
- package/dist/types/src/capabilities/transcriber.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/Transcript.d.ts +0 -20
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +0 -28
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/index.d.ts +0 -2
- package/dist/types/src/components/Transcript/index.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +0 -15
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +0 -1
- package/dist/types/src/components/TranscriptContainer.d.ts +0 -9
- package/dist/types/src/components/TranscriptContainer.d.ts.map +0 -1
- package/dist/types/src/types/Transcript.d.ts +0 -30
- package/dist/types/src/types/Transcript.d.ts.map +0 -1
- package/src/capabilities/blueprint-definition.ts +0 -31
- package/src/capabilities/intent-resolver.ts +0 -18
- package/src/capabilities/react-surface.tsx +0 -22
- package/src/capabilities/transcriber.ts +0 -77
- package/src/components/Transcript/Transcript.tsx +0 -93
- package/src/components/Transcript/deprecated/OldTranscript.tsx +0 -260
- package/src/components/TranscriptContainer.tsx +0 -36
- package/src/types/Transcript.ts +0 -44
- /package/dist/lib/browser/{TranscriptContainer-QN5WUMWJ.mjs.map → blueprints/index.mjs.map} +0 -0
- /package/dist/lib/{node-esm/TranscriptContainer-WCUWVVSD.mjs.map → browser/chunk-J5LGTIGS.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,29 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transcription",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.c85a9c8dae",
|
|
4
4
|
"description": "Voice transcription.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "https://github.com/dxos/dxos"
|
|
10
|
+
},
|
|
7
11
|
"license": "MIT",
|
|
8
12
|
"author": "DXOS.org",
|
|
9
13
|
"type": "module",
|
|
10
14
|
"exports": {
|
|
11
15
|
".": {
|
|
12
16
|
"source": "./src/index.ts",
|
|
13
|
-
"types": "./dist/types/src/index.d.ts",
|
|
14
17
|
"browser": "./dist/lib/browser/index.mjs",
|
|
15
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
18
|
+
"node": "./dist/lib/node-esm/index.mjs",
|
|
19
|
+
"types": "./dist/types/src/index.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./blueprints": {
|
|
22
|
+
"source": "./src/blueprints/index.ts",
|
|
23
|
+
"browser": "./dist/lib/browser/blueprints/index.mjs",
|
|
24
|
+
"node": "./dist/lib/node-esm/blueprints/index.mjs",
|
|
25
|
+
"types": "./dist/types/src/blueprints/index.d.ts"
|
|
16
26
|
},
|
|
17
27
|
"./types": {
|
|
18
28
|
"source": "./src/types/index.ts",
|
|
19
|
-
"types": "./dist/types/src/types/index.d.ts",
|
|
20
29
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
21
|
-
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
30
|
+
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
31
|
+
"types": "./dist/types/src/types/index.d.ts"
|
|
22
32
|
}
|
|
23
33
|
},
|
|
24
34
|
"types": "dist/types/src/index.d.ts",
|
|
25
35
|
"typesVersions": {
|
|
26
36
|
"*": {
|
|
37
|
+
"blueprints": [
|
|
38
|
+
"dist/types/src/blueprints/index.d.ts"
|
|
39
|
+
],
|
|
27
40
|
"types": [
|
|
28
41
|
"dist/types/src/types/index.d.ts"
|
|
29
42
|
]
|
|
@@ -36,82 +49,84 @@
|
|
|
36
49
|
"dependencies": {
|
|
37
50
|
"@codemirror/state": "^6.5.2",
|
|
38
51
|
"@codemirror/view": "^6.38.4",
|
|
39
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
40
|
-
"@preact/signals-core": "^1.12.1",
|
|
41
52
|
"date-fns": "^3.3.1",
|
|
42
53
|
"extendable-media-recorder": "^9.2.19",
|
|
43
54
|
"extendable-media-recorder-wav-encoder": "^7.0.123",
|
|
44
55
|
"main-thread-scheduling": "^14.1.1",
|
|
45
56
|
"react-resize-detector": "^11.0.1",
|
|
46
|
-
"react-router-dom": "^6.
|
|
57
|
+
"react-router-dom": "^6.30.3",
|
|
47
58
|
"react-use": "^17.5.1",
|
|
48
59
|
"wavefile": "^11.0.0",
|
|
49
|
-
"@dxos/ai": "0.8.4-main.
|
|
50
|
-
"@dxos/app-framework": "0.8.4-main.
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/blueprints": "0.8.4-main.
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/echo": "0.8.4-main.
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/plugin-
|
|
69
|
-
"@dxos/plugin-
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/plugin-
|
|
72
|
-
"@dxos/plugin-
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/react-client": "0.8.4-main.
|
|
76
|
-
"@dxos/react-
|
|
77
|
-
"@dxos/react-ui-
|
|
78
|
-
"@dxos/react-ui-
|
|
79
|
-
"@dxos/react-ui-
|
|
80
|
-
"@dxos/react-ui-
|
|
81
|
-
"@dxos/react-ui-
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
60
|
+
"@dxos/ai": "0.8.4-main.c85a9c8dae",
|
|
61
|
+
"@dxos/app-framework": "0.8.4-main.c85a9c8dae",
|
|
62
|
+
"@dxos/app-toolkit": "0.8.4-main.c85a9c8dae",
|
|
63
|
+
"@dxos/assistant": "0.8.4-main.c85a9c8dae",
|
|
64
|
+
"@dxos/blueprints": "0.8.4-main.c85a9c8dae",
|
|
65
|
+
"@dxos/client": "0.8.4-main.c85a9c8dae",
|
|
66
|
+
"@dxos/async": "0.8.4-main.c85a9c8dae",
|
|
67
|
+
"@dxos/codec-protobuf": "0.8.4-main.c85a9c8dae",
|
|
68
|
+
"@dxos/context": "0.8.4-main.c85a9c8dae",
|
|
69
|
+
"@dxos/debug": "0.8.4-main.c85a9c8dae",
|
|
70
|
+
"@dxos/display-name": "0.8.4-main.c85a9c8dae",
|
|
71
|
+
"@dxos/echo": "0.8.4-main.c85a9c8dae",
|
|
72
|
+
"@dxos/echo-db": "0.8.4-main.c85a9c8dae",
|
|
73
|
+
"@dxos/functions": "0.8.4-main.c85a9c8dae",
|
|
74
|
+
"@dxos/invariant": "0.8.4-main.c85a9c8dae",
|
|
75
|
+
"@dxos/functions-runtime": "0.8.4-main.c85a9c8dae",
|
|
76
|
+
"@dxos/log": "0.8.4-main.c85a9c8dae",
|
|
77
|
+
"@dxos/operation": "0.8.4-main.c85a9c8dae",
|
|
78
|
+
"@dxos/keys": "0.8.4-main.c85a9c8dae",
|
|
79
|
+
"@dxos/plugin-client": "0.8.4-main.c85a9c8dae",
|
|
80
|
+
"@dxos/plugin-deck": "0.8.4-main.c85a9c8dae",
|
|
81
|
+
"@dxos/plugin-graph": "0.8.4-main.c85a9c8dae",
|
|
82
|
+
"@dxos/plugin-markdown": "0.8.4-main.c85a9c8dae",
|
|
83
|
+
"@dxos/plugin-space": "0.8.4-main.c85a9c8dae",
|
|
84
|
+
"@dxos/plugin-thread": "0.8.4-main.c85a9c8dae",
|
|
85
|
+
"@dxos/protocols": "0.8.4-main.c85a9c8dae",
|
|
86
|
+
"@dxos/react-client": "0.8.4-main.c85a9c8dae",
|
|
87
|
+
"@dxos/react-edge-client": "0.8.4-main.c85a9c8dae",
|
|
88
|
+
"@dxos/react-ui-components": "0.8.4-main.c85a9c8dae",
|
|
89
|
+
"@dxos/react-ui-form": "0.8.4-main.c85a9c8dae",
|
|
90
|
+
"@dxos/react-ui-grid": "0.8.4-main.c85a9c8dae",
|
|
91
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.c85a9c8dae",
|
|
92
|
+
"@dxos/react-ui-sfx": "0.8.4-main.c85a9c8dae",
|
|
93
|
+
"@dxos/react-ui-editor": "0.8.4-main.c85a9c8dae",
|
|
94
|
+
"@dxos/schema": "0.8.4-main.c85a9c8dae",
|
|
95
|
+
"@dxos/react-ui-stack": "0.8.4-main.c85a9c8dae",
|
|
96
|
+
"@dxos/tracing": "0.8.4-main.c85a9c8dae",
|
|
97
|
+
"@dxos/types": "0.8.4-main.c85a9c8dae",
|
|
98
|
+
"@dxos/ui-editor": "0.8.4-main.c85a9c8dae",
|
|
99
|
+
"@dxos/util": "0.8.4-main.c85a9c8dae",
|
|
100
|
+
"@dxos/react-ui-attention": "0.8.4-main.c85a9c8dae"
|
|
86
101
|
},
|
|
87
102
|
"devDependencies": {
|
|
88
|
-
"@effect-
|
|
89
|
-
"@effect/platform": "0.
|
|
103
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
104
|
+
"@effect/platform": "0.94.4",
|
|
90
105
|
"@types/dom-speech-recognition": "^0.0.6",
|
|
91
|
-
"@types/react": "~19.2.
|
|
92
|
-
"effect": "3.
|
|
93
|
-
"react": "~19.2.
|
|
94
|
-
"react-dom": "~19.2.
|
|
95
|
-
"tailwindcss": "
|
|
96
|
-
"@dxos/plugin-preview": "0.8.4-main.
|
|
97
|
-
"@dxos/plugin-
|
|
98
|
-
"@dxos/plugin-theme": "0.8.4-main.
|
|
99
|
-
"@dxos/random": "0.8.4-main.
|
|
100
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
101
|
-
"@dxos/react-ui-form": "0.8.4-main.
|
|
102
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/
|
|
106
|
+
"@types/react": "~19.2.7",
|
|
107
|
+
"effect": "3.19.16",
|
|
108
|
+
"react": "~19.2.3",
|
|
109
|
+
"react-dom": "~19.2.3",
|
|
110
|
+
"tailwindcss": "^4.2.0",
|
|
111
|
+
"@dxos/plugin-preview": "0.8.4-main.c85a9c8dae",
|
|
112
|
+
"@dxos/plugin-testing": "0.8.4-main.c85a9c8dae",
|
|
113
|
+
"@dxos/plugin-theme": "0.8.4-main.c85a9c8dae",
|
|
114
|
+
"@dxos/random": "0.8.4-main.c85a9c8dae",
|
|
115
|
+
"@dxos/react-ui": "0.8.4-main.c85a9c8dae",
|
|
116
|
+
"@dxos/react-ui-form": "0.8.4-main.c85a9c8dae",
|
|
117
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.c85a9c8dae",
|
|
118
|
+
"@dxos/storybook-utils": "0.8.4-main.c85a9c8dae",
|
|
119
|
+
"@dxos/test-utils": "0.8.4-main.c85a9c8dae",
|
|
120
|
+
"@dxos/ui-theme": "0.8.4-main.c85a9c8dae"
|
|
106
121
|
},
|
|
107
122
|
"peerDependencies": {
|
|
108
|
-
"@effect-
|
|
109
|
-
"@effect/platform": "
|
|
110
|
-
"effect": "
|
|
111
|
-
"react": "
|
|
112
|
-
"react-dom": "
|
|
113
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
114
|
-
"@dxos/
|
|
123
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
124
|
+
"@effect/platform": "0.94.4",
|
|
125
|
+
"effect": "3.19.16",
|
|
126
|
+
"react": "~19.2.3",
|
|
127
|
+
"react-dom": "~19.2.3",
|
|
128
|
+
"@dxos/react-ui": "0.8.4-main.c85a9c8dae",
|
|
129
|
+
"@dxos/ui-theme": "0.8.4-main.c85a9c8dae"
|
|
115
130
|
},
|
|
116
131
|
"publishConfig": {
|
|
117
132
|
"access": "public"
|
|
@@ -2,70 +2,48 @@
|
|
|
2
2
|
// Copyright 2023 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
6
7
|
import { Obj } from '@dxos/echo';
|
|
7
|
-
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
8
8
|
import { getSpace } from '@dxos/react-client/echo';
|
|
9
|
-
import {
|
|
9
|
+
import { Message, Transcript } from '@dxos/types';
|
|
10
10
|
|
|
11
|
-
import { BlueprintDefinition,
|
|
12
|
-
import { renderByline } from './components';
|
|
11
|
+
import { BlueprintDefinition, OperationResolver, ReactSurface, Transcriber } from './capabilities';
|
|
13
12
|
import { meta } from './meta';
|
|
14
13
|
import { translations } from './translations';
|
|
15
|
-
import {
|
|
14
|
+
import { renderByline } from './util';
|
|
16
15
|
|
|
17
|
-
export const TranscriptionPlugin =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
await queue?.refresh();
|
|
37
|
-
const content = queue?.objects
|
|
38
|
-
.filter((message) => Obj.instanceOf(DataType.Message, message))
|
|
39
|
-
.flatMap((message, index) => renderByline(members)(message, index))
|
|
40
|
-
.join('\n\n');
|
|
41
|
-
return content;
|
|
42
|
-
},
|
|
16
|
+
export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
17
|
+
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
18
|
+
AppPlugin.addMetadataModule({
|
|
19
|
+
metadata: {
|
|
20
|
+
id: Transcript.Transcript.typename,
|
|
21
|
+
metadata: {
|
|
22
|
+
icon: 'ph--subtitles--regular',
|
|
23
|
+
iconHue: 'sky',
|
|
24
|
+
// TODO(wittjosiah): Factor out. Artifact? Separate capability?
|
|
25
|
+
getTextContent: async (transcript: Transcript.Transcript) => {
|
|
26
|
+
const space = getSpace(transcript);
|
|
27
|
+
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
28
|
+
const queue = space?.queues.get<Message.Message>(transcript.queue.dxn);
|
|
29
|
+
await queue?.refresh();
|
|
30
|
+
const content = queue?.objects
|
|
31
|
+
.filter((message) => Obj.instanceOf(Message.Message, message))
|
|
32
|
+
.flatMap((message, index) => renderByline(members)(message, index))
|
|
33
|
+
.join('\n\n');
|
|
34
|
+
return content;
|
|
43
35
|
},
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
defineModule({
|
|
47
|
-
id: `${meta.id}/module/schema`,
|
|
48
|
-
activatesOn: ClientEvents.SetupSchema,
|
|
49
|
-
activate: () => [contributes(ClientCapabilities.Schema, [Transcript.Transcript])],
|
|
50
|
-
}),
|
|
51
|
-
defineModule({
|
|
52
|
-
id: `${meta.id}/module/react-surface`,
|
|
53
|
-
activatesOn: Events.SetupReactSurface,
|
|
54
|
-
activate: ReactSurface,
|
|
36
|
+
},
|
|
37
|
+
},
|
|
55
38
|
}),
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
activatesOn: Events.SetupAppGraph,
|
|
39
|
+
AppPlugin.addOperationResolverModule({ activate: OperationResolver }),
|
|
40
|
+
AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),
|
|
41
|
+
AppPlugin.addSurfaceModule({ activate: ReactSurface }),
|
|
42
|
+
AppPlugin.addTranslationsModule({ translations }),
|
|
43
|
+
Plugin.addModule({
|
|
44
|
+
id: 'transcription',
|
|
45
|
+
activatesOn: AppActivationEvents.SetupAppGraph,
|
|
64
46
|
activate: Transcriber,
|
|
65
47
|
}),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
activatesOn: Events.SetupArtifactDefinition,
|
|
69
|
-
activate: BlueprintDefinition,
|
|
70
|
-
}),
|
|
71
|
-
]);
|
|
48
|
+
Plugin.make,
|
|
49
|
+
);
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { type AppCapabilities } from '@dxos/app-toolkit';
|
|
6
|
+
import { Blueprint, Template } from '@dxos/blueprints';
|
|
7
|
+
import { trim } from '@dxos/util';
|
|
8
|
+
|
|
9
|
+
import { TranscriptionFunctions } from '../functions';
|
|
10
|
+
|
|
11
|
+
const BLUEPRINT_KEY = 'dxos.org/blueprint/transcription';
|
|
12
|
+
|
|
13
|
+
const functions = Object.values(TranscriptionFunctions);
|
|
14
|
+
|
|
15
|
+
const make = () =>
|
|
16
|
+
Blueprint.make({
|
|
17
|
+
key: BLUEPRINT_KEY,
|
|
18
|
+
name: 'Transcription',
|
|
19
|
+
tools: Blueprint.toolDefinitions({ functions }),
|
|
20
|
+
instructions: Template.make({
|
|
21
|
+
source: trim`
|
|
22
|
+
You can open and summarize a meeting transcript.
|
|
23
|
+
`,
|
|
24
|
+
}),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const blueprint: AppCapabilities.BlueprintDefinition = {
|
|
28
|
+
key: BLUEPRINT_KEY,
|
|
29
|
+
functions,
|
|
30
|
+
make,
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export default blueprint;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
|
|
10
|
+
import { TranscriptionBlueprint } from '../../blueprints';
|
|
11
|
+
|
|
12
|
+
const blueprintDefinition = Capability.makeModule<
|
|
13
|
+
[],
|
|
14
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]
|
|
15
|
+
>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, TranscriptionBlueprint)]));
|
|
16
|
+
|
|
17
|
+
export default blueprintDefinition;
|
|
@@ -2,11 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
10
|
-
export const Transcriber = lazy(() => import('./transcriber'));
|
|
11
|
-
|
|
12
|
-
export * from './capabilities';
|
|
5
|
+
export * from './blueprint-definition';
|
|
6
|
+
export * from './operation-resolver';
|
|
7
|
+
export * from './react-surface';
|
|
8
|
+
export * from './transcriber';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { OperationResolver } from '@dxos/operation';
|
|
9
|
+
import { Transcript } from '@dxos/types';
|
|
10
|
+
|
|
11
|
+
import { TranscriptOperation } from '../../types';
|
|
12
|
+
|
|
13
|
+
export default Capability.makeModule(() =>
|
|
14
|
+
Effect.succeed(
|
|
15
|
+
Capability.contributes(Capabilities.OperationResolver, [
|
|
16
|
+
OperationResolver.make({
|
|
17
|
+
operation: TranscriptOperation.Create,
|
|
18
|
+
handler: ({ space }) =>
|
|
19
|
+
Effect.succeed({
|
|
20
|
+
object: Transcript.make(space.queues.create().dxn),
|
|
21
|
+
}),
|
|
22
|
+
}),
|
|
23
|
+
]),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { OperationResolver } from '@dxos/operation';
|
|
9
|
+
import { Transcript } from '@dxos/types';
|
|
10
|
+
|
|
11
|
+
import { TranscriptOperation } from '../../types';
|
|
12
|
+
|
|
13
|
+
export default Capability.makeModule(() =>
|
|
14
|
+
Effect.succeed(
|
|
15
|
+
Capability.contributes(Capabilities.OperationResolver, [
|
|
16
|
+
OperationResolver.make({
|
|
17
|
+
operation: TranscriptOperation.Create,
|
|
18
|
+
handler: ({ space }) =>
|
|
19
|
+
Effect.succeed({
|
|
20
|
+
object: Transcript.make(space.queues.create().dxn),
|
|
21
|
+
}),
|
|
22
|
+
}),
|
|
23
|
+
]),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
import React from 'react';
|
|
7
|
+
|
|
8
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
9
|
+
import { Surface } from '@dxos/app-framework/ui';
|
|
10
|
+
import { Obj } from '@dxos/echo';
|
|
11
|
+
import { Transcript } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
import { TranscriptionContainer } from '../../containers';
|
|
14
|
+
import { meta } from '../../meta';
|
|
15
|
+
|
|
16
|
+
export default Capability.makeModule(() =>
|
|
17
|
+
Effect.succeed(
|
|
18
|
+
Capability.contributes(Capabilities.ReactSurface, [
|
|
19
|
+
Surface.create({
|
|
20
|
+
id: `${meta.id}/article/transcript`,
|
|
21
|
+
role: ['article', 'section'],
|
|
22
|
+
filter: (data): data is { subject: Transcript.Transcript } =>
|
|
23
|
+
Obj.instanceOf(Transcript.Transcript, data.subject),
|
|
24
|
+
component: ({ data, role }) => <TranscriptionContainer role={role} subject={data.subject} />,
|
|
25
|
+
}),
|
|
26
|
+
]),
|
|
27
|
+
),
|
|
28
|
+
);
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
+
import { ClientCapabilities } from '@dxos/plugin-client';
|
|
9
|
+
|
|
10
|
+
import { MediaStreamRecorder, Transcriber, TranscriptionManager } from '../../transcriber';
|
|
11
|
+
import { TranscriptionCapabilities } from '../../types';
|
|
12
|
+
|
|
13
|
+
// TODO(burdon): Move to config?
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Length of the chunk in ms.
|
|
17
|
+
*/
|
|
18
|
+
const RECORD_INTERVAL = 200;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Number of chunks to save before the user starts speaking.
|
|
22
|
+
*/
|
|
23
|
+
const PREFIXED_CHUNKS_AMOUNT = 10;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Number of chunks to transcribe automatically after.
|
|
27
|
+
* Combined should be mess than 25MB or whisper would fail.
|
|
28
|
+
*/
|
|
29
|
+
const TRANSCRIBE_AFTER_CHUNKS_AMOUNT = 50;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Records audio while user is speaking and transcribes it after user is done speaking.
|
|
33
|
+
*/
|
|
34
|
+
export default Capability.makeModule(
|
|
35
|
+
Effect.fnUntraced(function* () {
|
|
36
|
+
// Get context for lazy capability access in callbacks.
|
|
37
|
+
const capabilities = yield* Capability.Service;
|
|
38
|
+
const registry = yield* Capability.get(Capabilities.AtomRegistry);
|
|
39
|
+
|
|
40
|
+
const getTranscriber: TranscriptionCapabilities.GetTranscriber = ({
|
|
41
|
+
audioStreamTrack,
|
|
42
|
+
onSegments,
|
|
43
|
+
transcriberConfig,
|
|
44
|
+
recorderConfig,
|
|
45
|
+
}) => {
|
|
46
|
+
// Initialize audio transcription.
|
|
47
|
+
return new Transcriber({
|
|
48
|
+
config: {
|
|
49
|
+
transcribeAfterChunksAmount: TRANSCRIBE_AFTER_CHUNKS_AMOUNT,
|
|
50
|
+
prefixBufferChunksAmount: PREFIXED_CHUNKS_AMOUNT,
|
|
51
|
+
...transcriberConfig,
|
|
52
|
+
},
|
|
53
|
+
recorder: new MediaStreamRecorder({
|
|
54
|
+
mediaStreamTrack: audioStreamTrack,
|
|
55
|
+
config: {
|
|
56
|
+
interval: RECORD_INTERVAL,
|
|
57
|
+
...recorderConfig,
|
|
58
|
+
},
|
|
59
|
+
}),
|
|
60
|
+
onSegments,
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const getTranscriptionManager: TranscriptionCapabilities.GetTranscriptionManager = ({ messageEnricher }) => {
|
|
65
|
+
const client = capabilities.get(ClientCapabilities.Client);
|
|
66
|
+
const transcriptionManager = new TranscriptionManager({
|
|
67
|
+
edgeClient: client.edge.http,
|
|
68
|
+
messageEnricher,
|
|
69
|
+
registry,
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
const identity = client.halo.identity.get();
|
|
73
|
+
if (identity) {
|
|
74
|
+
transcriptionManager.setIdentityDid(identity.did);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
return transcriptionManager;
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
return [
|
|
81
|
+
Capability.contributes(TranscriptionCapabilities.Transcriber, getTranscriber),
|
|
82
|
+
Capability.contributes(TranscriptionCapabilities.TranscriptionManager, getTranscriptionManager),
|
|
83
|
+
];
|
|
84
|
+
}),
|
|
85
|
+
);
|