@dxos/plugin-transcription 0.8.4-main.9be5663bfe → 0.8.4-main.abd8ff62ef
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/blueprints/index.mjs +1 -1
- package/dist/lib/browser/blueprints/index.mjs.map +3 -3
- package/dist/lib/browser/{chunk-5LWSJZTZ.mjs → chunk-3L623EVL.mjs} +2 -2
- package/dist/lib/browser/chunk-3L623EVL.mjs.map +7 -0
- package/dist/lib/browser/{chunk-HOOPZ7EM.mjs → chunk-KAEXRX3Y.mjs} +1 -1
- package/dist/lib/browser/{chunk-RIUSFL62.mjs → chunk-L4HW35L6.mjs} +4 -5
- package/dist/lib/browser/chunk-L4HW35L6.mjs.map +7 -0
- package/dist/lib/browser/chunk-MLRJWAQH.mjs +179 -0
- package/dist/lib/browser/chunk-MLRJWAQH.mjs.map +7 -0
- package/dist/lib/browser/chunk-NQQK7UZQ.mjs +244 -0
- package/dist/lib/browser/chunk-NQQK7UZQ.mjs.map +7 -0
- package/dist/lib/browser/components/index.mjs +207 -0
- package/dist/lib/browser/components/index.mjs.map +7 -0
- package/dist/lib/browser/{create-IZPB7VZW.mjs → create-ULR5DPJZ.mjs} +6 -4
- package/dist/lib/browser/create-ULR5DPJZ.mjs.map +7 -0
- package/dist/lib/browser/hooks/index.mjs +17 -0
- package/dist/lib/browser/hooks/index.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +93 -831
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/open-SFMPLZVW.mjs +27 -0
- package/dist/lib/browser/open-SFMPLZVW.mjs.map +7 -0
- package/dist/lib/browser/operations/index.mjs +3 -3
- package/dist/lib/browser/operations/index.mjs.map +3 -3
- package/dist/lib/browser/{summarize-5MZENAU5.mjs → summarize-BDFX4APN.mjs} +15 -8
- package/dist/lib/browser/summarize-BDFX4APN.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node-esm/blueprints/index.mjs +1 -1
- package/dist/lib/node-esm/blueprints/index.mjs.map +3 -3
- package/dist/lib/node-esm/{chunk-3GSFEN4L.mjs → chunk-7UIZWCD4.mjs} +4 -5
- package/dist/lib/node-esm/chunk-7UIZWCD4.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-C3AE2NYJ.mjs +181 -0
- package/dist/lib/node-esm/chunk-C3AE2NYJ.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-X74WYCCE.mjs → chunk-KO3IOD2O.mjs} +2 -2
- package/dist/lib/node-esm/chunk-KO3IOD2O.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-MQK4R6GT.mjs +245 -0
- package/dist/lib/node-esm/chunk-MQK4R6GT.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-NVM2QUMX.mjs → chunk-O533NBMK.mjs} +1 -1
- package/dist/lib/node-esm/components/index.mjs +208 -0
- package/dist/lib/node-esm/components/index.mjs.map +7 -0
- package/dist/lib/node-esm/{create-TQDGXQBL.mjs → create-A5QHNWRF.mjs} +6 -4
- package/dist/lib/node-esm/create-A5QHNWRF.mjs.map +7 -0
- package/dist/lib/node-esm/hooks/index.mjs +18 -0
- package/dist/lib/node-esm/hooks/index.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +93 -831
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/open-OI24QNTO.mjs +28 -0
- package/dist/lib/node-esm/open-OI24QNTO.mjs.map +7 -0
- package/dist/lib/node-esm/operations/index.mjs +3 -3
- package/dist/lib/node-esm/operations/index.mjs.map +3 -3
- package/dist/lib/node-esm/{summarize-RVOSRHEC.mjs → summarize-3UNN24I2.mjs} +15 -8
- package/dist/lib/node-esm/summarize-3UNN24I2.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/TranscriptionPlugin.d.ts +1 -0
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/TranscriptionPlugin.node.d.ts +4 -0
- package/dist/types/src/TranscriptionPlugin.node.d.ts.map +1 -0
- package/dist/types/src/TranscriptionPlugin.test.d.ts +2 -0
- package/dist/types/src/TranscriptionPlugin.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/transcription-blueprint.d.ts +2 -2
- package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +2 -2
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -2
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
- package/dist/types/src/components/Transcription/Transcription.d.ts +1 -1
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts +7 -7
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -1
- package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
- package/dist/types/src/hooks/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/hooks/useVoiceInput.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +3 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/model/model.d.ts +2 -2
- package/dist/types/src/model/model.d.ts.map +1 -1
- package/dist/types/src/{segments-normalization → normalization}/index.d.ts +1 -1
- package/dist/types/src/normalization/index.d.ts.map +1 -0
- package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -0
- package/dist/types/src/{segments-normalization → normalization}/normalization.d.ts +155 -153
- package/dist/types/src/normalization/normalization.d.ts.map +1 -0
- package/dist/types/src/normalization/normalization.test.d.ts.map +1 -0
- package/dist/types/src/normalization/utils.d.ts.map +1 -0
- package/dist/types/src/operations/create.d.ts +1 -1
- package/dist/types/src/operations/create.d.ts.map +1 -1
- package/dist/types/src/operations/definitions.d.ts +394 -382
- package/dist/types/src/operations/definitions.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -1
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open.d.ts +1 -1
- package/dist/types/src/operations/open.d.ts.map +1 -1
- package/dist/types/src/operations/summarize.d.ts +1 -1
- package/dist/types/src/operations/summarize.d.ts.map +1 -1
- package/dist/types/src/{components/stories → stories}/FileTranscription.stories.d.ts +3 -3
- package/dist/types/src/stories/FileTranscription.stories.d.ts.map +1 -0
- package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +1 -0
- package/dist/types/src/{components/stories → stories}/MicrophoneTranscription.stories.d.ts +1 -1
- package/dist/types/src/stories/MicrophoneTranscription.stories.d.ts.map +1 -0
- package/dist/types/src/stories/TranscriptionStory.d.ts +23 -0
- package/dist/types/src/stories/TranscriptionStory.d.ts.map +1 -0
- package/dist/types/src/stories/useIsSpeaking.d.ts.map +1 -0
- 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.map +1 -1
- package/dist/types/src/transcriber/transcriber.d.ts +57 -2
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.test.d.ts +2 -0
- package/dist/types/src/transcriber/transcriber.test.d.ts.map +1 -0
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +7 -8
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/capabilities.d.ts +2 -1
- package/dist/types/src/types/capabilities.d.ts.map +1 -1
- package/dist/types/src/types/{types.d.ts → defs.d.ts} +1 -1
- package/dist/types/src/types/defs.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -1
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/array.d.ts.map +1 -1
- package/dist/types/src/util/get-time-str.d.ts.map +1 -1
- package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
- package/dist/types/src/util/render-byline.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +76 -67
- package/src/TranscriptionPlugin.node.ts +48 -0
- package/src/TranscriptionPlugin.test.ts +31 -0
- package/src/TranscriptionPlugin.tsx +7 -3
- package/src/blueprints/transcription-blueprint.ts +2 -3
- package/src/capabilities/blueprint-definition.ts +2 -0
- package/src/capabilities/index.ts +2 -1
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +4 -2
- package/src/capabilities/transcriber.ts +2 -0
- package/src/components/Transcription/Transcription.stories.tsx +3 -5
- package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +4 -2
- package/src/hooks/useTranscriber.ts +3 -1
- package/src/index.ts +9 -4
- package/src/model/model.test.ts +3 -3
- package/src/model/model.ts +3 -3
- package/src/{segments-normalization → normalization}/message-normalizer.ts +1 -5
- package/src/{segments-normalization → normalization}/normalization.ts +5 -5
- package/src/operations/create.ts +4 -2
- package/src/operations/definitions.ts +3 -4
- package/src/operations/index.ts +1 -1
- package/src/operations/open.ts +5 -8
- package/src/operations/summarize.ts +11 -7
- package/src/{components/stories → stories}/FileTranscription.stories.tsx +24 -5
- package/src/{components/stories → stories}/KeyWordRecognition.stories.tsx +30 -28
- package/src/{components/stories → stories}/MicrophoneTranscription.stories.tsx +3 -3
- package/src/stories/TranscriptionStory.tsx +93 -0
- package/src/transcriber/index.ts +1 -1
- package/src/transcriber/transcriber.test.ts +104 -0
- package/src/transcriber/transcriber.ts +92 -51
- package/src/types/capabilities.ts +6 -1
- package/src/types/index.ts +1 -1
- package/dist/lib/browser/chunk-5LWSJZTZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-RIUSFL62.mjs.map +0 -7
- package/dist/lib/browser/create-IZPB7VZW.mjs.map +0 -7
- package/dist/lib/browser/open-SN5O5I6X.mjs +0 -29
- package/dist/lib/browser/open-SN5O5I6X.mjs.map +0 -7
- package/dist/lib/browser/summarize-5MZENAU5.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-3GSFEN4L.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-X74WYCCE.mjs.map +0 -7
- package/dist/lib/node-esm/create-TQDGXQBL.mjs.map +0 -7
- package/dist/lib/node-esm/open-4GAAWWKJ.mjs +0 -30
- package/dist/lib/node-esm/open-4GAAWWKJ.mjs.map +0 -7
- package/dist/lib/node-esm/summarize-RVOSRHEC.mjs.map +0 -7
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +0 -1
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +0 -1
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +0 -1
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +0 -12
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +0 -1
- package/dist/types/src/components/stories/useIsSpeaking.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/index.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/normalization.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/normalization.test.d.ts.map +0 -1
- package/dist/types/src/segments-normalization/utils.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/components/stories/TranscriptionStory.tsx +0 -43
- package/dist/lib/browser/{chunk-HOOPZ7EM.mjs.map → chunk-KAEXRX3Y.mjs.map} +0 -0
- package/dist/lib/node-esm/{chunk-NVM2QUMX.mjs.map → chunk-O533NBMK.mjs.map} +0 -0
- package/dist/types/src/{segments-normalization → normalization}/message-normalizer.d.ts +0 -0
- package/dist/types/src/{segments-normalization → normalization}/normalization.test.d.ts +0 -0
- package/dist/types/src/{segments-normalization → normalization}/utils.d.ts +0 -0
- package/dist/types/src/{components/stories → stories}/KeyWordRecognition.stories.d.ts +0 -0
- package/dist/types/src/{components/stories → stories}/useIsSpeaking.d.ts +0 -0
- package/src/{segments-normalization → normalization}/index.ts +1 -1
- /package/src/{segments-normalization → normalization}/normalization.test.ts +0 -0
- /package/src/{segments-normalization → normalization}/utils.ts +0 -0
- /package/src/{components/stories → stories}/useIsSpeaking.tsx +0 -0
- /package/src/types/{types.ts → defs.ts} +0 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transcription",
|
|
3
|
-
"version": "0.8.4-main.
|
|
3
|
+
"version": "0.8.4-main.abd8ff62ef",
|
|
4
4
|
"description": "Voice transcription.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -19,7 +19,13 @@
|
|
|
19
19
|
"#hooks": "./src/hooks/index.ts",
|
|
20
20
|
"#meta": "./src/meta.ts",
|
|
21
21
|
"#operations": "./src/operations/index.ts",
|
|
22
|
+
"#plugin": {
|
|
23
|
+
"browser": "./src/TranscriptionPlugin.tsx",
|
|
24
|
+
"node": "./src/TranscriptionPlugin.node.ts",
|
|
25
|
+
"default": "./src/TranscriptionPlugin.tsx"
|
|
26
|
+
},
|
|
22
27
|
"#testing": "./src/testing/index.ts",
|
|
28
|
+
"#translations": "./src/translations.ts",
|
|
23
29
|
"#types": "./src/types/index.ts"
|
|
24
30
|
},
|
|
25
31
|
"exports": {
|
|
@@ -29,6 +35,18 @@
|
|
|
29
35
|
"node": "./dist/lib/node-esm/index.mjs",
|
|
30
36
|
"types": "./dist/types/src/index.d.ts"
|
|
31
37
|
},
|
|
38
|
+
"./components": {
|
|
39
|
+
"source": "./src/components/index.ts",
|
|
40
|
+
"browser": "./dist/lib/browser/components/index.mjs",
|
|
41
|
+
"node": "./dist/lib/node-esm/components/index.mjs",
|
|
42
|
+
"types": "./dist/types/src/components/index.d.ts"
|
|
43
|
+
},
|
|
44
|
+
"./hooks": {
|
|
45
|
+
"source": "./src/hooks/index.ts",
|
|
46
|
+
"browser": "./dist/lib/browser/hooks/index.mjs",
|
|
47
|
+
"node": "./dist/lib/node-esm/hooks/index.mjs",
|
|
48
|
+
"types": "./dist/types/src/hooks/index.d.ts"
|
|
49
|
+
},
|
|
32
50
|
"./blueprints": {
|
|
33
51
|
"source": "./src/blueprints/index.ts",
|
|
34
52
|
"browser": "./dist/lib/browser/blueprints/index.mjs",
|
|
@@ -41,6 +59,12 @@
|
|
|
41
59
|
"node": "./dist/lib/node-esm/operations/index.mjs",
|
|
42
60
|
"types": "./dist/types/src/operations/index.d.ts"
|
|
43
61
|
},
|
|
62
|
+
"./translations": {
|
|
63
|
+
"source": "./src/translations.ts",
|
|
64
|
+
"types": "./dist/types/src/translations.d.ts",
|
|
65
|
+
"browser": "./dist/lib/browser/translations.mjs",
|
|
66
|
+
"node": "./dist/lib/node-esm/translations.mjs"
|
|
67
|
+
},
|
|
44
68
|
"./types": {
|
|
45
69
|
"source": "./src/types/index.ts",
|
|
46
70
|
"browser": "./dist/lib/browser/types/index.mjs",
|
|
@@ -49,19 +73,6 @@
|
|
|
49
73
|
}
|
|
50
74
|
},
|
|
51
75
|
"types": "dist/types/src/index.d.ts",
|
|
52
|
-
"typesVersions": {
|
|
53
|
-
"*": {
|
|
54
|
-
"blueprints": [
|
|
55
|
-
"dist/types/src/blueprints/index.d.ts"
|
|
56
|
-
],
|
|
57
|
-
"operations": [
|
|
58
|
-
"dist/types/src/operations/index.d.ts"
|
|
59
|
-
],
|
|
60
|
-
"types": [
|
|
61
|
-
"dist/types/src/types/index.d.ts"
|
|
62
|
-
]
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
76
|
"files": [
|
|
66
77
|
"dist",
|
|
67
78
|
"src"
|
|
@@ -77,47 +88,45 @@
|
|
|
77
88
|
"react-router-dom": "^6.30.3",
|
|
78
89
|
"react-use": "^17.5.1",
|
|
79
90
|
"wavefile": "^11.0.0",
|
|
80
|
-
"@dxos/ai": "0.8.4-main.
|
|
81
|
-
"@dxos/
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/
|
|
87
|
-
"@dxos/
|
|
88
|
-
"@dxos/
|
|
89
|
-
"@dxos/
|
|
90
|
-
"@dxos/
|
|
91
|
-
"@dxos/echo
|
|
92
|
-
"@dxos/echo": "0.8.4-main.
|
|
93
|
-
"@dxos/functions": "0.8.4-main.
|
|
94
|
-
"@dxos/
|
|
95
|
-
"@dxos/invariant": "0.8.4-main.
|
|
96
|
-
"@dxos/
|
|
97
|
-
"@dxos/
|
|
98
|
-
"@dxos/
|
|
99
|
-
"@dxos/plugin-
|
|
100
|
-
"@dxos/plugin-
|
|
101
|
-
"@dxos/
|
|
102
|
-
"@dxos/plugin-
|
|
103
|
-
"@dxos/
|
|
104
|
-
"@dxos/
|
|
105
|
-
"@dxos/
|
|
106
|
-
"@dxos/react-
|
|
107
|
-
"@dxos/
|
|
108
|
-
"@dxos/react-ui-
|
|
109
|
-
"@dxos/react-ui-form": "0.8.4-main.
|
|
110
|
-
"@dxos/react-ui-
|
|
111
|
-
"@dxos/react-ui-
|
|
112
|
-
"@dxos/react-ui-grid": "0.8.4-main.
|
|
113
|
-
"@dxos/
|
|
114
|
-
"@dxos/
|
|
115
|
-
"@dxos/
|
|
116
|
-
"@dxos/
|
|
117
|
-
"@dxos/
|
|
118
|
-
"@dxos/
|
|
119
|
-
"@dxos/react-ui-stack": "0.8.4-main.9be5663bfe",
|
|
120
|
-
"@dxos/util": "0.8.4-main.9be5663bfe"
|
|
91
|
+
"@dxos/ai": "0.8.4-main.abd8ff62ef",
|
|
92
|
+
"@dxos/app-toolkit": "0.8.4-main.abd8ff62ef",
|
|
93
|
+
"@dxos/app-framework": "0.8.4-main.abd8ff62ef",
|
|
94
|
+
"@dxos/assistant": "0.8.4-main.abd8ff62ef",
|
|
95
|
+
"@dxos/client": "0.8.4-main.abd8ff62ef",
|
|
96
|
+
"@dxos/compute": "0.8.4-main.abd8ff62ef",
|
|
97
|
+
"@dxos/async": "0.8.4-main.abd8ff62ef",
|
|
98
|
+
"@dxos/codec-protobuf": "0.8.4-main.abd8ff62ef",
|
|
99
|
+
"@dxos/context": "0.8.4-main.abd8ff62ef",
|
|
100
|
+
"@dxos/debug": "0.8.4-main.abd8ff62ef",
|
|
101
|
+
"@dxos/display-name": "0.8.4-main.abd8ff62ef",
|
|
102
|
+
"@dxos/echo": "0.8.4-main.abd8ff62ef",
|
|
103
|
+
"@dxos/echo-db": "0.8.4-main.abd8ff62ef",
|
|
104
|
+
"@dxos/functions-runtime": "0.8.4-main.abd8ff62ef",
|
|
105
|
+
"@dxos/keys": "0.8.4-main.abd8ff62ef",
|
|
106
|
+
"@dxos/invariant": "0.8.4-main.abd8ff62ef",
|
|
107
|
+
"@dxos/log": "0.8.4-main.abd8ff62ef",
|
|
108
|
+
"@dxos/plugin-client": "0.8.4-main.abd8ff62ef",
|
|
109
|
+
"@dxos/plugin-deck": "0.8.4-main.abd8ff62ef",
|
|
110
|
+
"@dxos/plugin-markdown": "0.8.4-main.abd8ff62ef",
|
|
111
|
+
"@dxos/plugin-space": "0.8.4-main.abd8ff62ef",
|
|
112
|
+
"@dxos/protocols": "0.8.4-main.abd8ff62ef",
|
|
113
|
+
"@dxos/plugin-graph": "0.8.4-main.abd8ff62ef",
|
|
114
|
+
"@dxos/react-client": "0.8.4-main.abd8ff62ef",
|
|
115
|
+
"@dxos/react-ui-components": "0.8.4-main.abd8ff62ef",
|
|
116
|
+
"@dxos/react-edge-client": "0.8.4-main.abd8ff62ef",
|
|
117
|
+
"@dxos/react-ui-attention": "0.8.4-main.abd8ff62ef",
|
|
118
|
+
"@dxos/plugin-thread": "0.8.4-main.abd8ff62ef",
|
|
119
|
+
"@dxos/react-ui-editor": "0.8.4-main.abd8ff62ef",
|
|
120
|
+
"@dxos/react-ui-form": "0.8.4-main.abd8ff62ef",
|
|
121
|
+
"@dxos/react-ui-mosaic": "0.8.4-main.abd8ff62ef",
|
|
122
|
+
"@dxos/react-ui-sfx": "0.8.4-main.abd8ff62ef",
|
|
123
|
+
"@dxos/react-ui-grid": "0.8.4-main.abd8ff62ef",
|
|
124
|
+
"@dxos/schema": "0.8.4-main.abd8ff62ef",
|
|
125
|
+
"@dxos/tracing": "0.8.4-main.abd8ff62ef",
|
|
126
|
+
"@dxos/types": "0.8.4-main.abd8ff62ef",
|
|
127
|
+
"@dxos/ui-editor": "0.8.4-main.abd8ff62ef",
|
|
128
|
+
"@dxos/util": "0.8.4-main.abd8ff62ef",
|
|
129
|
+
"@dxos/react-ui-stack": "0.8.4-main.abd8ff62ef"
|
|
121
130
|
},
|
|
122
131
|
"devDependencies": {
|
|
123
132
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -128,16 +137,16 @@
|
|
|
128
137
|
"react": "~19.2.3",
|
|
129
138
|
"react-dom": "~19.2.3",
|
|
130
139
|
"tailwindcss": "^4.2.0",
|
|
131
|
-
"@dxos/plugin-
|
|
132
|
-
"@dxos/plugin-
|
|
133
|
-
"@dxos/plugin-theme": "0.8.4-main.
|
|
134
|
-
"@dxos/
|
|
135
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
136
|
-
"@dxos/
|
|
137
|
-
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.
|
|
138
|
-
"@dxos/storybook-utils": "0.8.4-main.
|
|
139
|
-
"@dxos/test-utils": "0.8.4-main.
|
|
140
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
140
|
+
"@dxos/plugin-preview": "0.8.4-main.abd8ff62ef",
|
|
141
|
+
"@dxos/plugin-testing": "0.8.4-main.abd8ff62ef",
|
|
142
|
+
"@dxos/plugin-theme": "0.8.4-main.abd8ff62ef",
|
|
143
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
144
|
+
"@dxos/react-ui-form": "0.8.4-main.abd8ff62ef",
|
|
145
|
+
"@dxos/random": "0.8.4-main.abd8ff62ef",
|
|
146
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.4-main.abd8ff62ef",
|
|
147
|
+
"@dxos/storybook-utils": "0.8.4-main.abd8ff62ef",
|
|
148
|
+
"@dxos/test-utils": "0.8.4-main.abd8ff62ef",
|
|
149
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
|
|
141
150
|
},
|
|
142
151
|
"peerDependencies": {
|
|
143
152
|
"@effect-atom/atom-react": "^0.5.0",
|
|
@@ -145,8 +154,8 @@
|
|
|
145
154
|
"effect": "3.20.0",
|
|
146
155
|
"react": "~19.2.3",
|
|
147
156
|
"react-dom": "~19.2.3",
|
|
148
|
-
"@dxos/react-ui": "0.8.4-main.
|
|
149
|
-
"@dxos/ui-theme": "0.8.4-main.
|
|
157
|
+
"@dxos/react-ui": "0.8.4-main.abd8ff62ef",
|
|
158
|
+
"@dxos/ui-theme": "0.8.4-main.abd8ff62ef"
|
|
150
159
|
},
|
|
151
160
|
"publishConfig": {
|
|
152
161
|
"access": "public"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2023 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Option from 'effect/Option';
|
|
6
|
+
|
|
7
|
+
import { Plugin } from '@dxos/app-framework';
|
|
8
|
+
import { AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
+
import { Annotation, Feed, Obj } from '@dxos/echo';
|
|
10
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
11
|
+
import { Message, Transcript } from '@dxos/types';
|
|
12
|
+
|
|
13
|
+
import { BlueprintDefinition, OperationHandler } from '#capabilities';
|
|
14
|
+
import { meta } from '#meta';
|
|
15
|
+
|
|
16
|
+
import { renderByline } from './util';
|
|
17
|
+
|
|
18
|
+
export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
19
|
+
AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),
|
|
20
|
+
AppPlugin.addMetadataModule({
|
|
21
|
+
metadata: {
|
|
22
|
+
id: Transcript.Transcript.typename,
|
|
23
|
+
metadata: {
|
|
24
|
+
icon: Annotation.IconAnnotation.get(Transcript.Transcript).pipe(Option.getOrThrow).icon,
|
|
25
|
+
iconHue: Annotation.IconAnnotation.get(Transcript.Transcript).pipe(Option.getOrThrow).hue ?? 'white',
|
|
26
|
+
// TODO(wittjosiah): Factor out. Artifact? Separate capability?
|
|
27
|
+
getTextContent: async (transcript: Transcript.Transcript) => {
|
|
28
|
+
const space = getSpace(transcript);
|
|
29
|
+
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
30
|
+
const feed = await transcript.feed.load();
|
|
31
|
+
const queueDxn = Feed.getQueueDxn(feed);
|
|
32
|
+
const queue = queueDxn ? space?.queues.get<Message.Message>(queueDxn) : undefined;
|
|
33
|
+
await queue?.refresh();
|
|
34
|
+
const content = queue?.objects
|
|
35
|
+
.filter((message) => Obj.instanceOf(Message.Message, message))
|
|
36
|
+
.flatMap((message, index) => renderByline(members)(message, index))
|
|
37
|
+
.join('\n\n');
|
|
38
|
+
return content;
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
}),
|
|
43
|
+
AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),
|
|
44
|
+
AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),
|
|
45
|
+
Plugin.make,
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
export default TranscriptionPlugin;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { describe, test } from 'vitest';
|
|
6
|
+
|
|
7
|
+
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
8
|
+
import { ClientPlugin } from '@dxos/plugin-client';
|
|
9
|
+
import { createComposerTestApp } from '@dxos/plugin-testing/harness';
|
|
10
|
+
|
|
11
|
+
import { meta } from '#meta';
|
|
12
|
+
import { TranscriptionPlugin } from '#plugin';
|
|
13
|
+
|
|
14
|
+
const moduleId = (name: string) => `${meta.id}.module.${name}`;
|
|
15
|
+
|
|
16
|
+
describe('TranscriptionPlugin', () => {
|
|
17
|
+
test('modules activate on the expected events', async ({ expect }) => {
|
|
18
|
+
await using harness = await createComposerTestApp({
|
|
19
|
+
plugins: [ClientPlugin({}), TranscriptionPlugin()],
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
// After autoStart: metadata, schema, OperationHandler all auto-cascade.
|
|
23
|
+
expect(harness.manager.getActive()).toEqual(
|
|
24
|
+
expect.arrayContaining([moduleId('metadata'), moduleId('schema'), moduleId('OperationHandler')]),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
// SetupArtifactDefinition is fired by AssistantPlugin, which can't be included here due to a workspace cycle.
|
|
28
|
+
await harness.fire(AppActivationEvents.SetupArtifactDefinition);
|
|
29
|
+
expect(harness.manager.getActive()).toContain(moduleId('BlueprintDefinition'));
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -6,14 +6,14 @@ import * as Option from 'effect/Option';
|
|
|
6
6
|
|
|
7
7
|
import { Plugin } from '@dxos/app-framework';
|
|
8
8
|
import { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';
|
|
9
|
-
import { Annotation, Obj } from '@dxos/echo';
|
|
9
|
+
import { Annotation, Feed, Obj } from '@dxos/echo';
|
|
10
10
|
import { getSpace } from '@dxos/react-client/echo';
|
|
11
11
|
import { Message, Transcript } from '@dxos/types';
|
|
12
12
|
|
|
13
13
|
import { BlueprintDefinition, OperationHandler, ReactSurface, Transcriber } from '#capabilities';
|
|
14
14
|
import { meta } from '#meta';
|
|
15
|
+
import { translations } from '#translations';
|
|
15
16
|
|
|
16
|
-
import { translations } from './translations';
|
|
17
17
|
import { renderByline } from './util';
|
|
18
18
|
|
|
19
19
|
export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
@@ -28,7 +28,9 @@ export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
|
28
28
|
getTextContent: async (transcript: Transcript.Transcript) => {
|
|
29
29
|
const space = getSpace(transcript);
|
|
30
30
|
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
31
|
-
const
|
|
31
|
+
const feed = await transcript.feed.load();
|
|
32
|
+
const queueDxn = Feed.getQueueDxn(feed);
|
|
33
|
+
const queue = queueDxn ? space?.queues.get<Message.Message>(queueDxn) : undefined;
|
|
32
34
|
await queue?.refresh();
|
|
33
35
|
const content = queue?.objects
|
|
34
36
|
.filter((message) => Obj.instanceOf(Message.Message, message))
|
|
@@ -50,3 +52,5 @@ export const TranscriptionPlugin = Plugin.define(meta).pipe(
|
|
|
50
52
|
}),
|
|
51
53
|
Plugin.make,
|
|
52
54
|
);
|
|
55
|
+
|
|
56
|
+
export default TranscriptionPlugin;
|
|
@@ -2,8 +2,7 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
import {
|
|
6
|
-
import { Blueprint, Template } from '@dxos/blueprints';
|
|
5
|
+
import { Blueprint, Template } from '@dxos/compute';
|
|
7
6
|
import { trim } from '@dxos/util';
|
|
8
7
|
|
|
9
8
|
import { TranscriptOperation } from '#operations';
|
|
@@ -22,7 +21,7 @@ const make = () =>
|
|
|
22
21
|
}),
|
|
23
22
|
});
|
|
24
23
|
|
|
25
|
-
const blueprint:
|
|
24
|
+
const blueprint: Blueprint.Definition = {
|
|
26
25
|
key: BLUEPRINT_KEY,
|
|
27
26
|
make,
|
|
28
27
|
};
|
|
@@ -6,6 +6,8 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Capability } from '@dxos/app-framework';
|
|
8
8
|
import { AppCapabilities } from '@dxos/app-toolkit';
|
|
9
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
10
|
+
import type { Blueprint } from '@dxos/compute';
|
|
9
11
|
|
|
10
12
|
import { TranscriptionBlueprint } from '#blueprints';
|
|
11
13
|
|
|
@@ -3,7 +3,8 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Capability } from '@dxos/app-framework';
|
|
6
|
-
|
|
6
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
7
|
+
import type { Blueprint, OperationHandlerSet } from '@dxos/compute';
|
|
7
8
|
|
|
8
9
|
export const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));
|
|
9
10
|
export const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
7
|
import { Capabilities, Capability } from '@dxos/app-framework';
|
|
8
|
-
import type { OperationHandlerSet } from '@dxos/
|
|
8
|
+
import type { OperationHandlerSet } from '@dxos/compute';
|
|
9
9
|
|
|
10
10
|
import { TranscriptionOperationHandlerSet } from '#operations';
|
|
11
11
|
|
|
@@ -18,8 +18,10 @@ export default Capability.makeModule(() =>
|
|
|
18
18
|
Surface.create({
|
|
19
19
|
id: 'article.transcript',
|
|
20
20
|
// TODO(wittjosiah): Split into multiple surfaces if this filter proves too strict for non-article roles.
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
filter: AppSurface.oneOf(
|
|
22
|
+
AppSurface.object(AppSurface.Article, Transcript.Transcript),
|
|
23
|
+
AppSurface.object(AppSurface.Section, Transcript.Transcript),
|
|
24
|
+
),
|
|
23
25
|
component: ({ data, role }) => (
|
|
24
26
|
<TranscriptionContainer role={role} subject={data.subject} attendableId={data.attendableId} />
|
|
25
27
|
),
|
|
@@ -43,6 +43,7 @@ export default Capability.makeModule(
|
|
|
43
43
|
onSegments,
|
|
44
44
|
transcriberConfig,
|
|
45
45
|
recorderConfig,
|
|
46
|
+
transcribe,
|
|
46
47
|
}) => {
|
|
47
48
|
// Initialize audio transcription.
|
|
48
49
|
return new Transcriber({
|
|
@@ -59,6 +60,7 @@ export default Capability.makeModule(
|
|
|
59
60
|
},
|
|
60
61
|
}),
|
|
61
62
|
onSegments,
|
|
63
|
+
transcribe,
|
|
62
64
|
});
|
|
63
65
|
};
|
|
64
66
|
|
|
@@ -16,7 +16,7 @@ import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
|
16
16
|
import { random } from '@dxos/random';
|
|
17
17
|
import { useMembers, useSpaces } from '@dxos/react-client/echo';
|
|
18
18
|
import { IconButton, Toolbar } from '@dxos/react-ui';
|
|
19
|
-
import {
|
|
19
|
+
import { JsonHighlighter } from '@dxos/react-ui-syntax-highlighter';
|
|
20
20
|
import { withLayout } from '@dxos/react-ui/testing';
|
|
21
21
|
import { TestSchema } from '@dxos/schema/testing';
|
|
22
22
|
import { type ContentBlock, type Message, Organization, Person } from '@dxos/types';
|
|
@@ -28,9 +28,9 @@ import {
|
|
|
28
28
|
useTestTranscriptionQueue,
|
|
29
29
|
useTestTranscriptionQueueWithEntityExtraction,
|
|
30
30
|
} from '#testing';
|
|
31
|
+
import { translations } from '#translations';
|
|
31
32
|
|
|
32
33
|
import { SerializationModel } from '../../model';
|
|
33
|
-
import { translations } from '../../translations';
|
|
34
34
|
import { renderByline } from '../../util';
|
|
35
35
|
import { Transcription, type TranscriptionProps } from './Transcription';
|
|
36
36
|
|
|
@@ -51,9 +51,7 @@ const TranscriptContainer: FC<
|
|
|
51
51
|
<Transcription model={model} />
|
|
52
52
|
<div className='grid grid-cols-[1fr_16rem] overflow-hidden'>
|
|
53
53
|
<div className='flex items-center'>
|
|
54
|
-
<
|
|
55
|
-
{JSON.stringify(model.toJSON())}
|
|
56
|
-
</SyntaxHighlighter>
|
|
54
|
+
<JsonHighlighter data={model.toJSON()} indent={0} classNames='text-sm' />
|
|
57
55
|
</div>
|
|
58
56
|
<Toolbar.Root classNames='justify-end'>
|
|
59
57
|
<IconButton
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
import React from 'react';
|
|
6
6
|
|
|
7
7
|
import { type AppSurface } from '@dxos/app-toolkit/ui';
|
|
8
|
-
import { Obj } from '@dxos/echo';
|
|
8
|
+
import { Feed, Obj } from '@dxos/echo';
|
|
9
9
|
import { useMembers, useQueue } from '@dxos/react-client/echo';
|
|
10
10
|
import { Panel } from '@dxos/react-ui';
|
|
11
11
|
import { type Message, type Transcript } from '@dxos/types';
|
|
@@ -20,7 +20,9 @@ export type TranscriptionContainerProps = AppSurface.ObjectArticleProps<Transcri
|
|
|
20
20
|
export const TranscriptionContainer = ({ role, subject: transcript, attendableId }: TranscriptionContainerProps) => {
|
|
21
21
|
const db = Obj.getDatabase(transcript);
|
|
22
22
|
const members = useMembers(db?.spaceId).map((member) => member.identity);
|
|
23
|
-
const
|
|
23
|
+
const feed = transcript.feed.target;
|
|
24
|
+
const queueDxn = feed ? Feed.getQueueDxn(feed) : undefined;
|
|
25
|
+
const queue = useQueue<Message.Message>(queueDxn, { pollInterval: 1_000 });
|
|
24
26
|
const model = useQueueModelAdapter(renderByline(members), queue);
|
|
25
27
|
|
|
26
28
|
return (
|
|
@@ -18,6 +18,7 @@ export const useTranscriber = ({
|
|
|
18
18
|
recorderConfig,
|
|
19
19
|
transcriberConfig,
|
|
20
20
|
onSegments,
|
|
21
|
+
transcribe,
|
|
21
22
|
}: Partial<TranscriptionCapabilities.GetTranscriberProps>) => {
|
|
22
23
|
const [getTranscriber] = useCapabilities(TranscriptionCapabilities.Transcriber);
|
|
23
24
|
|
|
@@ -32,8 +33,9 @@ export const useTranscriber = ({
|
|
|
32
33
|
recorderConfig,
|
|
33
34
|
transcriberConfig,
|
|
34
35
|
onSegments,
|
|
36
|
+
transcribe,
|
|
35
37
|
});
|
|
36
|
-
}, [getTranscriber, audioStreamTrack, recorderConfig, transcriberConfig, onSegments]);
|
|
38
|
+
}, [getTranscriber, audioStreamTrack, recorderConfig, transcriberConfig, onSegments, transcribe]);
|
|
37
39
|
|
|
38
40
|
useEffect(() => {
|
|
39
41
|
return () => {
|
package/src/index.ts
CHANGED
|
@@ -2,11 +2,16 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
+
import { Plugin } from '@dxos/app-framework';
|
|
6
|
+
|
|
7
|
+
import { meta } from './meta';
|
|
8
|
+
|
|
9
|
+
export const TranscriptionPlugin = Plugin.lazy(meta, () => import('#plugin'));
|
|
10
|
+
|
|
5
11
|
export { TranscriptionCapabilities } from './types';
|
|
6
12
|
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
// TODO(wittjosiah): Hooks should not be exported from the plugin package at all.
|
|
14
|
+
// Either refactor callers to not need them or factor them out to a shared package.
|
|
9
15
|
export * from './meta';
|
|
16
|
+
export * from './hooks';
|
|
10
17
|
export * from './transcriber';
|
|
11
|
-
|
|
12
|
-
export * from './TranscriptionPlugin';
|
package/src/model/model.test.ts
CHANGED
|
@@ -51,7 +51,7 @@ describe('SerializationModel', () => {
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
// Update message.
|
|
54
|
-
Obj.
|
|
54
|
+
Obj.update(message, (message) => {
|
|
55
55
|
message.blocks.push({ _tag: 'transcript', started: createDate(), text: 'Hello again!' });
|
|
56
56
|
});
|
|
57
57
|
model.updateChunk(message);
|
|
@@ -133,7 +133,7 @@ describe('SerializationModel', () => {
|
|
|
133
133
|
expect(view.state.doc.toString()).to.eq('###### Alice\nHello world!\n\n');
|
|
134
134
|
|
|
135
135
|
// Update message (add block).
|
|
136
|
-
Obj.
|
|
136
|
+
Obj.update(message, (message) => {
|
|
137
137
|
message.blocks.push({ _tag: 'transcript', started: createDate(), text: 'Hello again!' });
|
|
138
138
|
});
|
|
139
139
|
model.updateChunk(message);
|
|
@@ -141,7 +141,7 @@ describe('SerializationModel', () => {
|
|
|
141
141
|
expect(view.state.doc.toString()).to.eq('###### Alice\nHello world!\nHello again!\n\n');
|
|
142
142
|
|
|
143
143
|
// Update message (remove block).
|
|
144
|
-
Obj.
|
|
144
|
+
Obj.update(message, (message) => {
|
|
145
145
|
message.blocks.splice(0, 1);
|
|
146
146
|
});
|
|
147
147
|
model.updateChunk(message);
|
package/src/model/model.ts
CHANGED
|
@@ -80,6 +80,9 @@ type ChunkChange<T extends Chunk> =
|
|
|
80
80
|
* Instead this model tracks changes and syncs them with the ChunkDocument.
|
|
81
81
|
*/
|
|
82
82
|
export class SerializationModel<T extends Chunk> {
|
|
83
|
+
/** Emits when the document is updated. */
|
|
84
|
+
public readonly update = new Event<void>();
|
|
85
|
+
|
|
83
86
|
/** Ordered set of chunks. */
|
|
84
87
|
private readonly _chunks: T[] = [];
|
|
85
88
|
|
|
@@ -92,9 +95,6 @@ export class SerializationModel<T extends Chunk> {
|
|
|
92
95
|
/** Track chunk changes since last sync. */
|
|
93
96
|
private readonly _changes: Array<ChunkChange<T>> = [];
|
|
94
97
|
|
|
95
|
-
/** Emits when the document is updated. */
|
|
96
|
-
public readonly update = new Event<void>();
|
|
97
|
-
|
|
98
98
|
constructor(
|
|
99
99
|
private readonly _renderer: ChunkRenderer<T>,
|
|
100
100
|
initialChunks: T[] = [],
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
//
|
|
6
|
-
// Copyright 2025 DXOS.org
|
|
7
|
-
//
|
|
8
|
-
|
|
9
5
|
import { DeferredTask, asyncTimeout } from '@dxos/async';
|
|
10
6
|
import { LifecycleState, Resource } from '@dxos/context';
|
|
11
7
|
import { type Queue } from '@dxos/echo-db';
|
|
@@ -31,9 +27,9 @@ export type QueueCursor = {
|
|
|
31
27
|
timestamp: string;
|
|
32
28
|
};
|
|
33
29
|
|
|
34
|
-
// TODO(mykola): .
|
|
35
30
|
export class MessageNormalizer extends Resource {
|
|
36
31
|
private readonly _functionExecutor: FunctionExecutor;
|
|
32
|
+
|
|
37
33
|
private _queue: Queue<Message.Message>;
|
|
38
34
|
private _cursor: QueueCursor;
|
|
39
35
|
private _messagesToProcess: MessageWithRangeId[] = [];
|
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import * as Schema from 'effect/Schema';
|
|
7
7
|
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
8
9
|
import { log } from '@dxos/log';
|
|
9
|
-
import { Operation } from '@dxos/operation';
|
|
10
10
|
import { trim } from '@dxos/util';
|
|
11
11
|
|
|
12
12
|
import {
|
|
@@ -26,23 +26,23 @@ export type NormalizationOutput = Schema.Schema.Type<typeof SentenceNormalizatio
|
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* Sentence normalization for transcription.
|
|
29
|
-
* TODO(dmaretskyi): Reimplement using
|
|
29
|
+
* TODO(dmaretskyi): Reimplement using AiRequest.run or LanguageModel.generateObject - runStructured was removed.
|
|
30
30
|
*/
|
|
31
31
|
export const sentenceNormalization = SentenceNormalization.pipe(
|
|
32
32
|
Operation.withHandler(
|
|
33
33
|
Effect.fn(function* ({ messages }) {
|
|
34
34
|
log.info('input', { messages });
|
|
35
|
-
// TODO(dmaretskyi): runStructured was removed from
|
|
35
|
+
// TODO(dmaretskyi): runStructured was removed from AiRequest. Reimplement using new API.
|
|
36
36
|
return yield* Effect.die(
|
|
37
37
|
new Error(
|
|
38
|
-
'Sentence normalization needs to be reimplemented - runStructured was removed from
|
|
38
|
+
'Sentence normalization needs to be reimplemented - runStructured was removed from AiRequest. Use AiRequest.run or LanguageModel.generateObject.',
|
|
39
39
|
),
|
|
40
40
|
);
|
|
41
41
|
}),
|
|
42
42
|
),
|
|
43
43
|
);
|
|
44
44
|
|
|
45
|
-
const
|
|
45
|
+
const _unused = trim`
|
|
46
46
|
You are observing a real-time transcript of a single person speaking.
|
|
47
47
|
The transcription is delivered in chunks of 10 seconds or less. As a result, individual sentences may be split across multiple messages, or multiple sentences may appear within a single message. Additionally, because this is real-time transcription, punctuation and capitalization may be incorrect or missing.
|
|
48
48
|
|
package/src/operations/create.ts
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
|
|
7
|
-
import { Operation } from '@dxos/
|
|
7
|
+
import { Operation } from '@dxos/compute';
|
|
8
|
+
import { Feed, Ref } from '@dxos/echo';
|
|
8
9
|
import { Transcript } from '@dxos/types';
|
|
9
10
|
|
|
10
11
|
import { Create } from './definitions';
|
|
@@ -12,8 +13,9 @@ import { Create } from './definitions';
|
|
|
12
13
|
const handler: Operation.WithHandler<typeof Create> = Create.pipe(
|
|
13
14
|
Operation.withHandler(
|
|
14
15
|
Effect.fn(function* ({ space }) {
|
|
16
|
+
const feed = space.db.add(Feed.make());
|
|
15
17
|
return {
|
|
16
|
-
object: Transcript.make(
|
|
18
|
+
object: Transcript.make(Ref.make(feed)),
|
|
17
19
|
};
|
|
18
20
|
}),
|
|
19
21
|
),
|
|
@@ -6,9 +6,8 @@ import * as Schema from 'effect/Schema';
|
|
|
6
6
|
|
|
7
7
|
import { AiService } from '@dxos/ai';
|
|
8
8
|
import { SpaceSchema } from '@dxos/client/echo';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { Operation } from '@dxos/operation';
|
|
9
|
+
import { Operation } from '@dxos/compute';
|
|
10
|
+
import { Database, Feed, Ref } from '@dxos/echo';
|
|
12
11
|
import { Message, Transcript } from '@dxos/types';
|
|
13
12
|
|
|
14
13
|
import { meta } from '#meta';
|
|
@@ -51,7 +50,7 @@ export const Open = Operation.make({
|
|
|
51
50
|
output: Schema.Struct({
|
|
52
51
|
content: Schema.String,
|
|
53
52
|
}),
|
|
54
|
-
services: [Database.Service,
|
|
53
|
+
services: [Database.Service, Feed.FeedService],
|
|
55
54
|
});
|
|
56
55
|
|
|
57
56
|
export const Summarize = Operation.make({
|