@dxos/plugin-transcription 0.8.3 → 0.8.4-main.1068cf700f
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-MV3JBKLS.mjs +12 -0
- package/dist/lib/browser/blueprint-definition-K3E72ZBC.mjs +19 -0
- package/dist/lib/browser/blueprint-definition-K3E72ZBC.mjs.map +7 -0
- package/dist/lib/browser/blueprints/index.mjs +9 -0
- package/dist/lib/browser/chunk-AV44VISC.mjs +148 -0
- package/dist/lib/browser/chunk-AV44VISC.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/chunk-J5LGTIGS.mjs.map +7 -0
- package/dist/lib/browser/{chunk-53AXUEIQ.mjs → chunk-K3JJ46VV.mjs} +367 -433
- package/dist/lib/browser/chunk-K3JJ46VV.mjs.map +7 -0
- package/dist/lib/browser/chunk-Q5OC3WVG.mjs +72 -0
- package/dist/lib/browser/chunk-Q5OC3WVG.mjs.map +7 -0
- package/dist/lib/browser/{chunk-UDCCT32F.mjs → chunk-RUKY36XW.mjs} +3 -3
- package/dist/lib/browser/{chunk-IQ5ZRMHZ.mjs → chunk-TKFU53OZ.mjs} +70 -105
- package/dist/lib/browser/chunk-TKFU53OZ.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +68 -75
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/operation-resolver-GLEBGPKH.mjs +22 -0
- package/dist/lib/browser/operation-resolver-GLEBGPKH.mjs.map +7 -0
- package/dist/lib/browser/react-surface-AWZ2A5WZ.mjs +35 -0
- package/dist/lib/browser/react-surface-AWZ2A5WZ.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-OYPLZFG5.mjs → transcriber-SLVQP76E.mjs} +17 -13
- package/dist/lib/browser/transcriber-SLVQP76E.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +8 -8
- package/dist/lib/node-esm/{TranscriptContainer-G75LDEO5.mjs → TranscriptContainer-7M43UAZ2.mjs} +5 -4
- package/dist/lib/node-esm/TranscriptContainer-7M43UAZ2.mjs.map +7 -0
- package/dist/lib/node-esm/blueprint-definition-2WIDDA3Y.mjs +20 -0
- package/dist/lib/node-esm/blueprint-definition-2WIDDA3Y.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-4BFY6P2D.mjs +73 -0
- package/dist/lib/node-esm/chunk-4BFY6P2D.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-PRL64SRU.mjs → chunk-EPC27WWV.mjs} +70 -105
- package/dist/lib/node-esm/chunk-EPC27WWV.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/{chunk-MFJO7EKD.mjs → chunk-SNZAN34I.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-56QHOX4A.mjs → chunk-TIUYXGQN.mjs} +367 -433
- package/dist/lib/node-esm/chunk-TIUYXGQN.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-TTJBW7CY.mjs +149 -0
- package/dist/lib/node-esm/chunk-TTJBW7CY.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +68 -75
- 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-SMCFTUFM.mjs +23 -0
- package/dist/lib/node-esm/operation-resolver-SMCFTUFM.mjs.map +7 -0
- package/dist/lib/node-esm/react-surface-YBBXC4W5.mjs +36 -0
- package/dist/lib/node-esm/react-surface-YBBXC4W5.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-TVG2MBBN.mjs → transcriber-BO2N3UQ4.mjs} +17 -13
- package/dist/lib/node-esm/transcriber-BO2N3UQ4.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +8 -8
- 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 +21 -0
- package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -0
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +10 -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 -4
- 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/Transcript/Transcript.d.ts +7 -10
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +34 -18
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +12 -12
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +3 -7
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptContainer.d.ts +5 -6
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/index.d.ts +1 -4
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts +8 -7
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +10 -6
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +10 -9
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +4 -3
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -1
- package/dist/types/src/functions/index.d.ts +3 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/open.d.ts +11 -0
- package/dist/types/src/functions/open.d.ts.map +1 -0
- package/dist/types/src/functions/summarize.d.ts +11 -0
- package/dist/types/src/functions/summarize.d.ts.map +1 -0
- package/dist/types/src/hooks/useAudioFile.d.ts.map +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 +2 -2
- 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/index.d.ts +1 -1
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +2 -3
- 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 +503 -311
- 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 +10 -10
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/transcriber/index.d.ts +1 -1
- package/dist/types/src/transcriber/index.d.ts.map +1 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +3 -3
- 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 +12 -13
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +11 -11
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/TranscriptAction.d.ts +25 -0
- package/dist/types/src/types/TranscriptAction.d.ts.map +1 -0
- 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 +3 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +0 -26
- package/dist/types/src/types/types.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 +88 -72
- package/src/TranscriptionPlugin.tsx +40 -58
- package/src/blueprints/index.ts +5 -0
- package/src/blueprints/transcription-blueprint.ts +25 -0
- package/src/capabilities/blueprint-definition/blueprint-definition.ts +24 -0
- package/src/capabilities/blueprint-definition/index.ts +7 -0
- package/src/capabilities/index.ts +4 -7
- 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 +61 -57
- package/src/components/Transcript/Transcript.tsx +25 -59
- package/src/components/Transcript/deprecated/OldTranscript.tsx +11 -11
- package/src/components/Transcript/transcript-extension.ts +13 -46
- package/src/components/TranscriptContainer.tsx +19 -15
- package/src/components/stories/FileTranscription.stories.tsx +80 -70
- package/src/components/stories/KeyWordRecognition.stories.tsx +17 -13
- package/src/components/stories/MicrophoneTranscription.stories.tsx +89 -87
- package/src/components/stories/TranscriptionStory.tsx +14 -14
- package/src/functions/index.ts +6 -0
- package/src/functions/open.ts +37 -0
- package/src/functions/summarize.ts +103 -0
- package/src/hooks/useAudioFile.ts +49 -53
- package/src/hooks/useQueueModelAdapter.ts +1 -1
- package/src/hooks/useTranscriber.ts +12 -7
- package/src/hooks/useVoiceInput.ts +4 -3
- package/src/index.ts +1 -1
- package/src/meta.ts +9 -6
- package/src/model/model.test.ts +27 -21
- package/src/segments-normalization/message-normalizer.ts +19 -14
- package/src/segments-normalization/normalization.test.ts +25 -32
- package/src/segments-normalization/normalization.ts +59 -49
- package/src/segments-normalization/utils.ts +2 -2
- package/src/testing/testing.ts +42 -32
- package/src/transcriber/index.ts +1 -1
- package/src/transcriber/media-stream-recorder.ts +4 -4
- package/src/transcriber/transcriber.browser.test.ts +6 -5
- package/src/transcriber/transcriber.ts +9 -11
- package/src/transcriber/transcription-manager.ts +37 -52
- package/src/translations.ts +6 -4
- package/src/types/TranscriptAction.ts +32 -0
- package/src/types/capabilities.ts +33 -0
- package/src/types/index.ts +3 -1
- package/src/types/types.ts +0 -23
- package/src/util/index.ts +1 -0
- package/src/util/render-byline.ts +33 -0
- package/dist/lib/browser/TranscriptContainer-H3AZQ4CQ.mjs +0 -11
- package/dist/lib/browser/chunk-53AXUEIQ.mjs.map +0 -7
- package/dist/lib/browser/chunk-GOF7MJNV.mjs +0 -19
- package/dist/lib/browser/chunk-GOF7MJNV.mjs.map +0 -7
- package/dist/lib/browser/chunk-IQ5ZRMHZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-OSISJM2F.mjs +0 -55
- package/dist/lib/browser/chunk-OSISJM2F.mjs.map +0 -7
- package/dist/lib/browser/chunk-W2KNYJD6.mjs +0 -16
- package/dist/lib/browser/chunk-W2KNYJD6.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-BGADCHVM.mjs +0 -30
- package/dist/lib/browser/intent-resolver-BGADCHVM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-HMJS5FSS.mjs +0 -34
- package/dist/lib/browser/react-surface-HMJS5FSS.mjs.map +0 -7
- package/dist/lib/browser/transcriber-OYPLZFG5.mjs.map +0 -7
- package/dist/lib/node/TranscriptContainer-KIG3GMAB.cjs +0 -32
- package/dist/lib/node/TranscriptContainer-KIG3GMAB.cjs.map +0 -7
- package/dist/lib/node/chunk-3PYT3BDM.cjs +0 -40
- package/dist/lib/node/chunk-3PYT3BDM.cjs.map +0 -7
- package/dist/lib/node/chunk-6LW5RA3K.cjs +0 -75
- package/dist/lib/node/chunk-6LW5RA3K.cjs.map +0 -7
- package/dist/lib/node/chunk-AFUZI63A.cjs +0 -42
- package/dist/lib/node/chunk-AFUZI63A.cjs.map +0 -7
- package/dist/lib/node/chunk-CVUN3UO7.cjs +0 -778
- package/dist/lib/node/chunk-CVUN3UO7.cjs.map +0 -7
- package/dist/lib/node/chunk-FKDJNJ57.cjs +0 -35
- package/dist/lib/node/chunk-FKDJNJ57.cjs.map +0 -7
- package/dist/lib/node/chunk-ZFAUMZXE.cjs +0 -518
- package/dist/lib/node/chunk-ZFAUMZXE.cjs.map +0 -7
- package/dist/lib/node/index.cjs +0 -133
- package/dist/lib/node/index.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-LL3TTI4H.cjs +0 -45
- package/dist/lib/node/intent-resolver-LL3TTI4H.cjs.map +0 -7
- package/dist/lib/node/meta.json +0 -1
- package/dist/lib/node/react-surface-N25TBBG4.cjs +0 -56
- package/dist/lib/node/react-surface-N25TBBG4.cjs.map +0 -7
- package/dist/lib/node/transcriber-6J4FVFSZ.cjs +0 -68
- package/dist/lib/node/transcriber-6J4FVFSZ.cjs.map +0 -7
- package/dist/lib/node/types/index.cjs +0 -36
- package/dist/lib/node/types/index.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-56QHOX4A.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FH75X4JC.mjs +0 -56
- package/dist/lib/node-esm/chunk-FH75X4JC.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-MFJPEIVB.mjs +0 -17
- package/dist/lib/node-esm/chunk-MFJPEIVB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PRL64SRU.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-TXMDLLBR.mjs +0 -21
- package/dist/lib/node-esm/chunk-TXMDLLBR.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-5LVCYSJS.mjs +0 -31
- package/dist/lib/node-esm/intent-resolver-5LVCYSJS.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-JGQSYGRR.mjs +0 -35
- package/dist/lib/node-esm/react-surface-JGQSYGRR.mjs.map +0 -7
- package/dist/lib/node-esm/transcriber-TVG2MBBN.mjs.map +0 -7
- 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/types/schema.d.ts +0 -41
- package/dist/types/src/types/schema.d.ts.map +0 -1
- package/src/capabilities/capabilities.ts +0 -33
- package/src/capabilities/intent-resolver.ts +0 -24
- package/src/capabilities/react-surface.tsx +0 -22
- package/src/capabilities/transcriber.ts +0 -76
- package/src/types/schema.ts +0 -41
- /package/dist/lib/browser/{TranscriptContainer-H3AZQ4CQ.mjs.map → TranscriptContainer-MV3JBKLS.mjs.map} +0 -0
- /package/dist/lib/{node-esm/TranscriptContainer-G75LDEO5.mjs.map → browser/blueprints/index.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-UDCCT32F.mjs.map → chunk-RUKY36XW.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-MFJO7EKD.mjs.map → chunk-SNZAN34I.mjs.map} +0 -0
package/package.json
CHANGED
|
@@ -1,27 +1,42 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transcription",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-main.1068cf700f",
|
|
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
|
-
"types": "./dist/types/src/index.d.ts",
|
|
13
16
|
"browser": "./dist/lib/browser/index.mjs",
|
|
14
|
-
"node": "./dist/lib/node-esm/index.mjs"
|
|
17
|
+
"node": "./dist/lib/node-esm/index.mjs",
|
|
18
|
+
"source": "./src/index.ts",
|
|
19
|
+
"types": "./dist/types/src/index.d.ts"
|
|
20
|
+
},
|
|
21
|
+
"./blueprints": {
|
|
22
|
+
"browser": "./dist/lib/browser/blueprints/index.mjs",
|
|
23
|
+
"node": "./dist/lib/node-esm/blueprints/index.mjs",
|
|
24
|
+
"source": "./src/blueprints/index.ts",
|
|
25
|
+
"types": "./dist/types/src/blueprints/index.d.ts"
|
|
15
26
|
},
|
|
16
27
|
"./types": {
|
|
17
|
-
"types": "./dist/types/src/types/index.d.ts",
|
|
18
28
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
19
|
-
"node": "./dist/lib/node-esm/types/index.mjs"
|
|
29
|
+
"node": "./dist/lib/node-esm/types/index.mjs",
|
|
30
|
+
"source": "./src/types/index.ts",
|
|
31
|
+
"types": "./dist/types/src/types/index.d.ts"
|
|
20
32
|
}
|
|
21
33
|
},
|
|
22
34
|
"types": "dist/types/src/index.d.ts",
|
|
23
35
|
"typesVersions": {
|
|
24
36
|
"*": {
|
|
37
|
+
"blueprints": [
|
|
38
|
+
"dist/types/src/blueprints/index.d.ts"
|
|
39
|
+
],
|
|
25
40
|
"types": [
|
|
26
41
|
"dist/types/src/types/index.d.ts"
|
|
27
42
|
]
|
|
@@ -32,85 +47,86 @@
|
|
|
32
47
|
"src"
|
|
33
48
|
],
|
|
34
49
|
"dependencies": {
|
|
35
|
-
"@codemirror/state": "^6.
|
|
36
|
-
"@codemirror/view": "^6.
|
|
37
|
-
"@preact-signals/safe-react": "^0.9.0",
|
|
38
|
-
"@preact/signals-core": "^1.9.0",
|
|
50
|
+
"@codemirror/state": "^6.5.2",
|
|
51
|
+
"@codemirror/view": "^6.38.4",
|
|
39
52
|
"date-fns": "^3.3.1",
|
|
40
53
|
"extendable-media-recorder": "^9.2.19",
|
|
41
54
|
"extendable-media-recorder-wav-encoder": "^7.0.123",
|
|
42
55
|
"main-thread-scheduling": "^14.1.1",
|
|
43
|
-
"react-resize-detector": "^
|
|
56
|
+
"react-resize-detector": "^11.0.1",
|
|
44
57
|
"react-router-dom": "^6.4.0",
|
|
45
58
|
"react-use": "^17.5.1",
|
|
46
59
|
"wavefile": "^11.0.0",
|
|
47
|
-
"@dxos/ai": "0.8.
|
|
48
|
-
"@dxos/app-framework": "0.8.
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/echo
|
|
59
|
-
"@dxos/echo-
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/functions": "0.8.
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/plugin-client": "0.8.
|
|
67
|
-
"@dxos/plugin-deck": "0.8.
|
|
68
|
-
"@dxos/plugin-graph": "0.8.
|
|
69
|
-
"@dxos/plugin-markdown": "0.8.
|
|
70
|
-
"@dxos/plugin-
|
|
71
|
-
"@dxos/
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/react-
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/react-ui-attention": "0.8.
|
|
76
|
-
"@dxos/react-ui-
|
|
77
|
-
"@dxos/react-ui-
|
|
78
|
-
"@dxos/react-ui-
|
|
79
|
-
"@dxos/react-ui-grid": "0.8.
|
|
80
|
-
"@dxos/
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/react-ui-
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
60
|
+
"@dxos/ai": "0.8.4-main.1068cf700f",
|
|
61
|
+
"@dxos/app-framework": "0.8.4-main.1068cf700f",
|
|
62
|
+
"@dxos/assistant": "0.8.4-main.1068cf700f",
|
|
63
|
+
"@dxos/async": "0.8.4-main.1068cf700f",
|
|
64
|
+
"@dxos/app-toolkit": "0.8.4-main.1068cf700f",
|
|
65
|
+
"@dxos/blueprints": "0.8.4-main.1068cf700f",
|
|
66
|
+
"@dxos/client": "0.8.4-main.1068cf700f",
|
|
67
|
+
"@dxos/codec-protobuf": "0.8.4-main.1068cf700f",
|
|
68
|
+
"@dxos/context": "0.8.4-main.1068cf700f",
|
|
69
|
+
"@dxos/debug": "0.8.4-main.1068cf700f",
|
|
70
|
+
"@dxos/display-name": "0.8.4-main.1068cf700f",
|
|
71
|
+
"@dxos/echo": "0.8.4-main.1068cf700f",
|
|
72
|
+
"@dxos/echo-db": "0.8.4-main.1068cf700f",
|
|
73
|
+
"@dxos/functions": "0.8.4-main.1068cf700f",
|
|
74
|
+
"@dxos/functions-runtime": "0.8.4-main.1068cf700f",
|
|
75
|
+
"@dxos/invariant": "0.8.4-main.1068cf700f",
|
|
76
|
+
"@dxos/log": "0.8.4-main.1068cf700f",
|
|
77
|
+
"@dxos/operation": "0.8.4-main.1068cf700f",
|
|
78
|
+
"@dxos/keys": "0.8.4-main.1068cf700f",
|
|
79
|
+
"@dxos/plugin-client": "0.8.4-main.1068cf700f",
|
|
80
|
+
"@dxos/plugin-deck": "0.8.4-main.1068cf700f",
|
|
81
|
+
"@dxos/plugin-graph": "0.8.4-main.1068cf700f",
|
|
82
|
+
"@dxos/plugin-markdown": "0.8.4-main.1068cf700f",
|
|
83
|
+
"@dxos/plugin-space": "0.8.4-main.1068cf700f",
|
|
84
|
+
"@dxos/plugin-thread": "0.8.4-main.1068cf700f",
|
|
85
|
+
"@dxos/protocols": "0.8.4-main.1068cf700f",
|
|
86
|
+
"@dxos/react-client": "0.8.4-main.1068cf700f",
|
|
87
|
+
"@dxos/react-edge-client": "0.8.4-main.1068cf700f",
|
|
88
|
+
"@dxos/react-ui-attention": "0.8.4-main.1068cf700f",
|
|
89
|
+
"@dxos/react-ui-components": "0.8.4-main.1068cf700f",
|
|
90
|
+
"@dxos/react-ui-form": "0.8.4-main.1068cf700f",
|
|
91
|
+
"@dxos/react-ui-editor": "0.8.4-main.1068cf700f",
|
|
92
|
+
"@dxos/react-ui-grid": "0.8.4-main.1068cf700f",
|
|
93
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.1068cf700f",
|
|
94
|
+
"@dxos/react-ui-sfx": "0.8.4-main.1068cf700f",
|
|
95
|
+
"@dxos/react-ui-stack": "0.8.4-main.1068cf700f",
|
|
96
|
+
"@dxos/schema": "0.8.4-main.1068cf700f",
|
|
97
|
+
"@dxos/tracing": "0.8.4-main.1068cf700f",
|
|
98
|
+
"@dxos/ui-editor": "0.8.4-main.1068cf700f",
|
|
99
|
+
"@dxos/types": "0.8.4-main.1068cf700f",
|
|
100
|
+
"@dxos/util": "0.8.4-main.1068cf700f"
|
|
85
101
|
},
|
|
86
102
|
"devDependencies": {
|
|
87
|
-
"@effect-
|
|
88
|
-
"@effect/platform": "0.
|
|
103
|
+
"@effect-atom/atom-react": "^0.5.0",
|
|
104
|
+
"@effect/platform": "0.94.4",
|
|
89
105
|
"@types/dom-speech-recognition": "^0.0.6",
|
|
90
|
-
"@types/react": "~
|
|
91
|
-
"effect": "3.
|
|
92
|
-
"react": "~
|
|
93
|
-
"react-dom": "~
|
|
106
|
+
"@types/react": "~19.2.7",
|
|
107
|
+
"effect": "3.19.16",
|
|
108
|
+
"react": "~19.2.3",
|
|
109
|
+
"react-dom": "~19.2.3",
|
|
94
110
|
"tailwindcss": "~3.4.1",
|
|
95
|
-
"@dxos/plugin-preview": "0.8.
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/react-ui
|
|
100
|
-
"@dxos/react-ui-
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/
|
|
111
|
+
"@dxos/plugin-preview": "0.8.4-main.1068cf700f",
|
|
112
|
+
"@dxos/plugin-testing": "0.8.4-main.1068cf700f",
|
|
113
|
+
"@dxos/plugin-theme": "0.8.4-main.1068cf700f",
|
|
114
|
+
"@dxos/random": "0.8.4-main.1068cf700f",
|
|
115
|
+
"@dxos/react-ui": "0.8.4-main.1068cf700f",
|
|
116
|
+
"@dxos/react-ui-form": "0.8.4-main.1068cf700f",
|
|
117
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.1068cf700f",
|
|
118
|
+
"@dxos/storybook-utils": "0.8.4-main.1068cf700f",
|
|
119
|
+
"@dxos/test-utils": "0.8.4-main.1068cf700f",
|
|
120
|
+
"@dxos/ui-theme": "0.8.4-main.1068cf700f"
|
|
105
121
|
},
|
|
106
|
-
"
|
|
107
|
-
"@effect-
|
|
108
|
-
"@effect/platform": "0.
|
|
109
|
-
"effect": "
|
|
110
|
-
"react": "~
|
|
111
|
-
"react-dom": "~
|
|
112
|
-
"@dxos/react-ui
|
|
113
|
-
"@dxos/
|
|
122
|
+
"peerDependencies": {
|
|
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.1068cf700f",
|
|
129
|
+
"@dxos/ui-theme": "0.8.4-main.1068cf700f"
|
|
114
130
|
},
|
|
115
131
|
"publishConfig": {
|
|
116
132
|
"access": "public"
|
|
@@ -2,66 +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 {
|
|
12
|
-
import { renderMarkdown } from './components';
|
|
11
|
+
import { BlueprintDefinition, OperationResolver, ReactSurface, Transcriber } from './capabilities';
|
|
13
12
|
import { meta } from './meta';
|
|
14
|
-
import translations from './translations';
|
|
15
|
-
import {
|
|
13
|
+
import { translations } from './translations';
|
|
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
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
}),
|
|
52
|
-
defineModule({
|
|
53
|
-
id: `${meta.id}/module/react-surface`,
|
|
54
|
-
activatesOn: Events.SetupReactSurface,
|
|
55
|
-
activate: ReactSurface,
|
|
56
|
-
}),
|
|
57
|
-
defineModule({
|
|
58
|
-
id: `${meta.id}/module/intent-resolver`,
|
|
59
|
-
activatesOn: Events.SetupIntentResolver,
|
|
60
|
-
activate: IntentResolver,
|
|
61
|
-
}),
|
|
62
|
-
defineModule({
|
|
63
|
-
id: `${meta.id}/module/transcription`,
|
|
64
|
-
activatesOn: Events.SetupAppGraph,
|
|
65
|
-
activate: Transcriber,
|
|
66
|
-
}),
|
|
67
|
-
]);
|
|
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;
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
}),
|
|
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,
|
|
46
|
+
activate: Transcriber,
|
|
47
|
+
}),
|
|
48
|
+
Plugin.make,
|
|
49
|
+
);
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Blueprint, Template } from '@dxos/blueprints';
|
|
6
|
+
import { type FunctionDefinition } from '@dxos/functions';
|
|
7
|
+
import { trim } from '@dxos/util';
|
|
8
|
+
|
|
9
|
+
import { open, summarize } from '../functions';
|
|
10
|
+
|
|
11
|
+
export const functions: FunctionDefinition[] = [open, summarize];
|
|
12
|
+
|
|
13
|
+
export const Key = 'dxos.org/blueprint/transcription';
|
|
14
|
+
|
|
15
|
+
export const make = () =>
|
|
16
|
+
Blueprint.make({
|
|
17
|
+
key: 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
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
export type BlueprintCapabilities = [
|
|
13
|
+
Capability.Capability<typeof AppCapabilities.Functions>,
|
|
14
|
+
Capability.Capability<typeof AppCapabilities.BlueprintDefinition>,
|
|
15
|
+
];
|
|
16
|
+
|
|
17
|
+
const blueprintDefinition = Capability.makeModule<[], BlueprintCapabilities>(() =>
|
|
18
|
+
Effect.succeed([
|
|
19
|
+
Capability.contributes(AppCapabilities.Functions, TranscriptionBlueprint.functions),
|
|
20
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, TranscriptionBlueprint.make()),
|
|
21
|
+
]),
|
|
22
|
+
);
|
|
23
|
+
|
|
24
|
+
export default blueprintDefinition;
|
|
@@ -2,10 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export const Transcriber = lazy(() => import('./transcriber'));
|
|
10
|
-
|
|
11
|
-
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 '../../components';
|
|
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,
|
|
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
|
+
);
|