@dxos/plugin-transcription 0.9.0 → 0.9.1-staging.ee54ba693a
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/PLUGIN.mdl +25 -5
- package/dist/lib/neutral/{TranscriptionArticle-L6XANBH5.mjs → TranscriptionArticle-FEWCWG4A.mjs} +4 -7
- package/dist/lib/neutral/TranscriptionArticle-FEWCWG4A.mjs.map +7 -0
- package/dist/lib/neutral/TranscriptionPlugin.mjs +29 -6
- package/dist/lib/neutral/TranscriptionPlugin.mjs.map +4 -4
- package/dist/lib/neutral/TranscriptionPlugin.node.mjs +3 -3
- package/dist/lib/neutral/TranscriptionPlugin.node.mjs.map +3 -3
- package/dist/lib/neutral/app-graph-builder-GQRMI22E.mjs +48 -0
- package/dist/lib/neutral/app-graph-builder-GQRMI22E.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +19 -5
- package/dist/lib/neutral/capabilities/index.mjs.map +3 -3
- package/dist/lib/neutral/chunk-5BVHY75B.mjs +54 -0
- package/dist/lib/neutral/chunk-5BVHY75B.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HNXSU7HJ.mjs +8 -0
- package/dist/lib/neutral/{chunk-KXJZEYS7.mjs.map → chunk-HNXSU7HJ.mjs.map} +2 -2
- package/dist/lib/neutral/chunk-KOXLGGSL.mjs +30 -0
- package/dist/lib/neutral/chunk-KOXLGGSL.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MDV7NBFJ.mjs +182 -0
- package/dist/lib/neutral/chunk-MDV7NBFJ.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +114 -258
- package/dist/lib/neutral/components/index.mjs.map +4 -4
- package/dist/lib/neutral/containers/index.mjs +1 -1
- package/dist/lib/neutral/{create-RVR7VC33.mjs → create-HNHGCKZ4.mjs} +2 -2
- package/dist/lib/neutral/enrich-message-DSJU4TXC.mjs +24 -0
- package/dist/lib/neutral/enrich-message-DSJU4TXC.mjs.map +7 -0
- package/dist/lib/neutral/entity-lookup-PCDW7NC4.mjs +25 -0
- package/dist/lib/neutral/entity-lookup-PCDW7NC4.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +93 -15
- package/dist/lib/neutral/hooks/index.mjs.map +4 -4
- package/dist/lib/neutral/index.mjs +8 -32
- package/dist/lib/neutral/markdown-extension-CCDXXY7E.mjs +16 -0
- package/dist/lib/neutral/markdown-extension-CCDXXY7E.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -1
- package/dist/lib/neutral/meta.mjs +1 -1
- package/dist/lib/neutral/{open-A5KXKRH4.mjs → open-SNMZXXYO.mjs} +4 -6
- package/dist/lib/neutral/open-SNMZXXYO.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +1 -1
- package/dist/lib/neutral/pipeline-status-XMWMAUJY.mjs +17 -0
- package/dist/lib/neutral/pipeline-status-XMWMAUJY.mjs.map +7 -0
- package/dist/lib/neutral/plugin.mjs +2 -2
- package/dist/lib/neutral/recording-session-IADO7ATU.mjs +15 -0
- package/dist/lib/neutral/recording-session-IADO7ATU.mjs.map +7 -0
- package/dist/lib/neutral/settings-7KE4MABW.mjs +31 -0
- package/dist/lib/neutral/settings-7KE4MABW.mjs.map +7 -0
- package/dist/lib/neutral/skill-definition-DXNK324V.mjs +15 -0
- package/dist/lib/neutral/skill-definition-DXNK324V.mjs.map +7 -0
- package/dist/lib/neutral/skills/index.mjs +8 -0
- package/dist/lib/neutral/{summarize-5XPPMVTE.mjs → summarize-LBUZTOTH.mjs} +4 -4
- package/dist/lib/neutral/summarize-LBUZTOTH.mjs.map +7 -0
- package/dist/lib/neutral/{text-content-KBB37HSM.mjs → text-content-NOWR642C.mjs} +9 -9
- package/dist/lib/neutral/text-content-NOWR642C.mjs.map +7 -0
- package/dist/lib/neutral/transcriber-6XZHUUHK.mjs +174 -0
- package/dist/lib/neutral/transcriber-6XZHUUHK.mjs.map +7 -0
- package/dist/lib/neutral/transcription-driver-DN6ELQXZ.mjs +207 -0
- package/dist/lib/neutral/transcription-driver-DN6ELQXZ.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +8 -1
- package/dist/lib/neutral/translations.mjs.map +3 -3
- package/dist/lib/neutral/types/index.mjs +3 -1
- package/dist/types/dx.config.d.ts +28 -0
- package/dist/types/dx.config.d.ts.map +1 -0
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts +5 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/entity-lookup.d.ts +10 -0
- package/dist/types/src/capabilities/entity-lookup.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +11 -8
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/markdown-extension.d.ts +5 -0
- package/dist/types/src/capabilities/markdown-extension.d.ts.map +1 -0
- package/dist/types/src/capabilities/pipeline-status.d.ts +9 -0
- package/dist/types/src/capabilities/pipeline-status.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts +2 -2
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/recording-session.d.ts +5 -0
- package/dist/types/src/capabilities/recording-session.d.ts.map +1 -0
- package/dist/types/src/capabilities/settings.d.ts +5 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/capabilities/skill-definition.d.ts +5 -0
- package/dist/types/src/capabilities/skill-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/text-content.d.ts +1 -4
- package/dist/types/src/capabilities/transcriber.d.ts +4 -3
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
- package/dist/types/src/capabilities/transcription-driver.d.ts +5 -0
- package/dist/types/src/capabilities/transcription-driver.d.ts.map +1 -0
- package/dist/types/src/components/Mic/Mic.d.ts +12 -0
- package/dist/types/src/components/Mic/Mic.d.ts.map +1 -0
- package/dist/types/src/components/{Oracle/Oracle.stories.d.ts → Mic/Mic.stories.d.ts} +9 -7
- package/dist/types/src/components/Mic/Mic.stories.d.ts.map +1 -0
- package/dist/types/src/components/Mic/index.d.ts +2 -0
- package/dist/types/src/components/Mic/index.d.ts.map +1 -0
- package/dist/types/src/components/index.d.ts +1 -2
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts +7 -0
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -5
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useTranscriptionRecording.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +1 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +32 -2
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/normalization/message-normalizer.d.ts +2 -2
- package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -1
- package/dist/types/src/normalization/normalization.d.ts +98 -733
- package/dist/types/src/normalization/normalization.d.ts.map +1 -1
- package/dist/types/src/operations/enrich-message.d.ts +9 -0
- package/dist/types/src/operations/enrich-message.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open.d.ts.map +1 -1
- package/dist/types/src/operations/summarize.d.ts.map +1 -1
- package/dist/types/src/skills/index.d.ts +2 -0
- package/dist/types/src/skills/index.d.ts.map +1 -0
- package/dist/types/src/skills/transcription-skill.d.ts +4 -0
- package/dist/types/src/skills/transcription-skill.d.ts.map +1 -0
- package/dist/types/src/stories/Keyword.stories.d.ts +51 -0
- package/dist/types/src/stories/Keyword.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Pipeline.stories.d.ts +60 -0
- package/dist/types/src/stories/Pipeline.stories.d.ts.map +1 -0
- package/dist/types/src/stories/Transcription.stories.d.ts +23 -0
- package/dist/types/src/stories/Transcription.stories.d.ts.map +1 -0
- package/dist/types/src/testing/decorators.d.ts +21 -0
- package/dist/types/src/testing/decorators.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +1 -0
- package/dist/types/src/testing/index.d.ts.map +1 -1
- package/dist/types/src/testing/testing.d.ts +3 -13
- package/dist/types/src/testing/testing.d.ts.map +1 -1
- package/dist/types/src/{transcriber/transcription-manager.d.ts → transcription-manager.d.ts} +6 -5
- package/dist/types/src/transcription-manager.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +7 -0
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/Settings.d.ts +13 -0
- package/dist/types/src/types/Settings.d.ts.map +1 -0
- package/dist/types/src/types/TranscriptOperation.d.ts +114 -1564
- package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -1
- package/dist/types/src/types/TranscriptionCapabilities.d.ts +52 -11
- package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -1
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/util/index.d.ts +0 -3
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dx.config.ts +42 -0
- package/package.json +69 -69
- package/src/TranscriptionPlugin.node.ts +2 -2
- package/src/TranscriptionPlugin.test.ts +2 -2
- package/src/TranscriptionPlugin.tsx +40 -3
- package/src/capabilities/app-graph-builder.tsx +49 -0
- package/src/capabilities/entity-lookup.ts +32 -0
- package/src/capabilities/index.ts +8 -7
- package/src/capabilities/markdown-extension.ts +17 -0
- package/src/capabilities/pipeline-status.ts +23 -0
- package/src/capabilities/recording-session.ts +17 -0
- package/src/capabilities/settings.ts +34 -0
- package/src/capabilities/skill-definition.ts +15 -0
- package/src/capabilities/text-content.ts +10 -7
- package/src/capabilities/transcriber.ts +5 -48
- package/src/capabilities/transcription-driver.tsx +263 -0
- package/src/components/Mic/Mic.stories.tsx +66 -0
- package/src/components/Mic/Mic.tsx +136 -0
- package/src/components/Mic/index.ts +5 -0
- package/src/components/index.ts +1 -2
- package/src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx +4 -0
- package/src/containers/TranscriptionArticle/TranscriptionArticle.tsx +5 -6
- package/src/hooks/index.ts +0 -5
- package/src/hooks/useTranscriptionRecording.ts +27 -9
- package/src/index.ts +1 -5
- package/src/meta.ts +2 -35
- package/src/normalization/message-normalizer.ts +3 -3
- package/src/normalization/normalization.ts +3 -0
- package/src/operations/enrich-message.ts +27 -0
- package/src/operations/index.ts +1 -0
- package/src/operations/open.ts +2 -2
- package/src/operations/summarize.ts +2 -2
- package/src/skills/index.ts +5 -0
- package/src/skills/transcription-skill.ts +29 -0
- package/src/stories/Keyword.stories.tsx +98 -0
- package/src/stories/Pipeline.stories.tsx +361 -0
- package/src/stories/Transcription.stories.tsx +178 -0
- package/src/testing/decorators.ts +78 -0
- package/src/testing/index.ts +1 -0
- package/src/testing/testing.ts +14 -134
- package/src/{transcriber/transcription-manager.ts → transcription-manager.ts} +13 -12
- package/src/translations.ts +9 -1
- package/src/types/Settings.ts +59 -0
- package/src/types/TranscriptOperation.ts +22 -4
- package/src/types/TranscriptionCapabilities.ts +61 -20
- package/src/types/index.ts +1 -0
- package/src/util/index.ts +0 -3
- package/dist/lib/neutral/TranscriptionArticle-L6XANBH5.mjs.map +0 -7
- package/dist/lib/neutral/blueprint-definition-DA4QFRYJ.mjs +0 -15
- package/dist/lib/neutral/blueprint-definition-DA4QFRYJ.mjs.map +0 -7
- package/dist/lib/neutral/blueprints/index.mjs +0 -8
- package/dist/lib/neutral/chunk-FHNI26QW.mjs +0 -45
- package/dist/lib/neutral/chunk-FHNI26QW.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KAEXRX3Y.mjs +0 -35
- package/dist/lib/neutral/chunk-KAEXRX3Y.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KMT3BMMQ.mjs +0 -124
- package/dist/lib/neutral/chunk-KMT3BMMQ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-KXJZEYS7.mjs +0 -8
- package/dist/lib/neutral/chunk-MLRJWAQH.mjs +0 -179
- package/dist/lib/neutral/chunk-MLRJWAQH.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TO77KAQK.mjs +0 -298
- package/dist/lib/neutral/chunk-TO77KAQK.mjs.map +0 -7
- package/dist/lib/neutral/chunk-TX3NQISZ.mjs +0 -435
- package/dist/lib/neutral/chunk-TX3NQISZ.mjs.map +0 -7
- package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs +0 -30
- package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs.map +0 -7
- package/dist/lib/neutral/open-A5KXKRH4.mjs.map +0 -7
- package/dist/lib/neutral/summarize-5XPPMVTE.mjs.map +0 -7
- package/dist/lib/neutral/text-content-KBB37HSM.mjs.map +0 -7
- package/dist/lib/neutral/transcriber-OGSF3XO5.mjs +0 -59
- package/dist/lib/neutral/transcriber-OGSF3XO5.mjs.map +0 -7
- package/dist/types/src/blueprints/index.d.ts +0 -2
- package/dist/types/src/blueprints/index.d.ts.map +0 -1
- package/dist/types/src/blueprints/transcription-blueprint.d.ts +0 -4
- package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/components/Oracle/Oracle.d.ts +0 -24
- package/dist/types/src/components/Oracle/Oracle.d.ts.map +0 -1
- package/dist/types/src/components/Oracle/Oracle.stories.d.ts.map +0 -1
- package/dist/types/src/components/Oracle/index.d.ts +0 -2
- package/dist/types/src/components/Oracle/index.d.ts.map +0 -1
- package/dist/types/src/components/Transcription/Transcription.d.ts +0 -11
- package/dist/types/src/components/Transcription/Transcription.d.ts.map +0 -1
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts +0 -37
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +0 -1
- package/dist/types/src/components/Transcription/index.d.ts +0 -2
- package/dist/types/src/components/Transcription/index.d.ts.map +0 -1
- package/dist/types/src/components/Transcription/transcription-extension.d.ts +0 -15
- package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +0 -1
- package/dist/types/src/enrichment/conversation.test.d.ts +0 -2
- package/dist/types/src/enrichment/conversation.test.d.ts.map +0 -1
- package/dist/types/src/enrichment/operations.d.ts +0 -200
- package/dist/types/src/enrichment/operations.d.ts.map +0 -1
- package/dist/types/src/enrichment/parser.d.ts +0 -26
- package/dist/types/src/enrichment/parser.d.ts.map +0 -1
- package/dist/types/src/enrichment/stream-simulator.d.ts +0 -38
- package/dist/types/src/enrichment/stream-simulator.d.ts.map +0 -1
- package/dist/types/src/hooks/useAudioFile.d.ts +0 -7
- package/dist/types/src/hooks/useAudioFile.d.ts.map +0 -1
- package/dist/types/src/hooks/useAudioTrack.d.ts +0 -5
- package/dist/types/src/hooks/useAudioTrack.d.ts.map +0 -1
- package/dist/types/src/hooks/useFeedModelAdapter.d.ts +0 -12
- package/dist/types/src/hooks/useFeedModelAdapter.d.ts.map +0 -1
- package/dist/types/src/hooks/useTranscriber.d.ts +0 -7
- package/dist/types/src/hooks/useTranscriber.d.ts.map +0 -1
- package/dist/types/src/hooks/useVoiceInput.d.ts +0 -11
- package/dist/types/src/hooks/useVoiceInput.d.ts.map +0 -1
- package/dist/types/src/model/index.d.ts +0 -2
- package/dist/types/src/model/index.d.ts.map +0 -1
- package/dist/types/src/model/model.d.ts +0 -68
- package/dist/types/src/model/model.d.ts.map +0 -1
- package/dist/types/src/model/model.test.d.ts +0 -2
- package/dist/types/src/model/model.test.d.ts.map +0 -1
- package/dist/types/src/stories/FileTranscription.stories.d.ts +0 -20
- package/dist/types/src/stories/FileTranscription.stories.d.ts.map +0 -1
- package/dist/types/src/stories/KeyWordRecognition.stories.d.ts +0 -14
- package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +0 -1
- package/dist/types/src/stories/LiveTranscription.stories.d.ts +0 -20
- package/dist/types/src/stories/LiveTranscription.stories.d.ts.map +0 -1
- package/dist/types/src/stories/TranscriptionStory.d.ts +0 -21
- package/dist/types/src/stories/TranscriptionStory.d.ts.map +0 -1
- package/dist/types/src/stories/common.d.ts +0 -248
- package/dist/types/src/stories/common.d.ts.map +0 -1
- package/dist/types/src/transcriber/audio-recorder.d.ts +0 -47
- package/dist/types/src/transcriber/audio-recorder.d.ts.map +0 -1
- package/dist/types/src/transcriber/index.d.ts +0 -5
- package/dist/types/src/transcriber/index.d.ts.map +0 -1
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +0 -30
- package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +0 -1
- package/dist/types/src/transcriber/transcriber.browser.test.d.ts +0 -2
- package/dist/types/src/transcriber/transcriber.browser.test.d.ts.map +0 -1
- package/dist/types/src/transcriber/transcriber.d.ts +0 -105
- package/dist/types/src/transcriber/transcriber.d.ts.map +0 -1
- package/dist/types/src/transcriber/transcriber.test.d.ts +0 -2
- package/dist/types/src/transcriber/transcriber.test.d.ts.map +0 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +0 -1
- package/dist/types/src/util/array.d.ts +0 -2
- package/dist/types/src/util/array.d.ts.map +0 -1
- package/dist/types/src/util/monitor-audio-level.d.ts +0 -6
- package/dist/types/src/util/monitor-audio-level.d.ts.map +0 -1
- package/dist/types/src/util/render-byline.d.ts +0 -4
- package/dist/types/src/util/render-byline.d.ts.map +0 -1
- package/src/blueprints/index.ts +0 -5
- package/src/blueprints/transcription-blueprint.ts +0 -29
- package/src/capabilities/blueprint-definition.ts +0 -19
- package/src/components/Oracle/Oracle.stories.tsx +0 -147
- package/src/components/Oracle/Oracle.tsx +0 -142
- package/src/components/Oracle/index.ts +0 -5
- package/src/components/Transcription/Transcription.stories.tsx +0 -213
- package/src/components/Transcription/Transcription.tsx +0 -55
- package/src/components/Transcription/index.ts +0 -5
- package/src/components/Transcription/transcription-extension.ts +0 -203
- package/src/enrichment/conversation.test.ts +0 -162
- package/src/enrichment/conversation.txt +0 -23
- package/src/enrichment/operations.ts +0 -271
- package/src/enrichment/parser.ts +0 -101
- package/src/enrichment/stream-simulator.ts +0 -125
- package/src/hooks/useAudioFile.ts +0 -88
- package/src/hooks/useAudioTrack.ts +0 -35
- package/src/hooks/useFeedModelAdapter.ts +0 -46
- package/src/hooks/useTranscriber.ts +0 -47
- package/src/hooks/useVoiceInput.ts +0 -66
- package/src/model/index.ts +0 -5
- package/src/model/model.test.ts +0 -175
- package/src/model/model.ts +0 -229
- package/src/stories/FileTranscription.stories.tsx +0 -143
- package/src/stories/KeyWordRecognition.stories.tsx +0 -132
- package/src/stories/LiveTranscription.stories.tsx +0 -153
- package/src/stories/TranscriptionStory.tsx +0 -101
- package/src/stories/common.ts +0 -233
- package/src/transcriber/audio-recorder.ts +0 -56
- package/src/transcriber/index.ts +0 -8
- package/src/transcriber/media-stream-recorder.ts +0 -120
- package/src/transcriber/transcriber.browser.test.ts +0 -230
- package/src/transcriber/transcriber.test.ts +0 -104
- package/src/transcriber/transcriber.ts +0 -303
- package/src/util/array.ts +0 -14
- package/src/util/monitor-audio-level.ts +0 -58
- package/src/util/render-byline.ts +0 -33
- /package/dist/lib/neutral/{create-RVR7VC33.mjs.map → create-HNHGCKZ4.mjs.map} +0 -0
- /package/dist/lib/neutral/{blueprints → skills}/index.mjs.map +0 -0
|
@@ -5,16 +5,16 @@
|
|
|
5
5
|
import * as Effect from 'effect/Effect';
|
|
6
6
|
import { useCallback, useEffect, useState } from 'react';
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import { Feed, Obj } from '@dxos/echo';
|
|
8
|
+
import { useAtomCapability, useOperationInvoker } from '@dxos/app-framework/ui';
|
|
9
|
+
import { Database, Feed, Obj } from '@dxos/echo';
|
|
10
10
|
import { EffectEx } from '@dxos/effect';
|
|
11
11
|
import { log } from '@dxos/log';
|
|
12
12
|
import { getSpace } from '@dxos/react-client/echo';
|
|
13
13
|
import { useIdentity } from '@dxos/react-client/halo';
|
|
14
|
+
import { useAudioTrack, useTranscriber } from '@dxos/react-ui-transcription';
|
|
14
15
|
import { Message, type Transcript } from '@dxos/types';
|
|
15
16
|
|
|
16
|
-
import {
|
|
17
|
-
import { useTranscriber } from './useTranscriber';
|
|
17
|
+
import { TranscriptionCapabilities, TranscriptOperation } from '#types';
|
|
18
18
|
|
|
19
19
|
export type TranscriptionRecording = {
|
|
20
20
|
recording: boolean;
|
|
@@ -33,23 +33,41 @@ export const useTranscriptionRecording = (transcript: Transcript.Transcript): Tr
|
|
|
33
33
|
|
|
34
34
|
const [recording, setRecording] = useState(false);
|
|
35
35
|
const track = useAudioTrack(recording);
|
|
36
|
+
const { invokePromise } = useOperationInvoker();
|
|
37
|
+
const settings = useAtomCapability(TranscriptionCapabilities.Settings);
|
|
36
38
|
|
|
37
|
-
// Append a transcribed message batch to the transcript's feed
|
|
39
|
+
// Append a transcribed message batch to the transcript's feed, enriching it first (when entity
|
|
40
|
+
// extraction is enabled) with references to known entities mentioned in the transcript.
|
|
38
41
|
const handleSegments = useCallback(
|
|
39
42
|
async (blocks: Message.Message['blocks']) => {
|
|
40
43
|
if (!space || !feed || blocks.length === 0) {
|
|
41
44
|
return;
|
|
42
45
|
}
|
|
43
46
|
const sender = identity ? { identityDid: identity.did, name: identity.profile?.displayName } : {};
|
|
44
|
-
|
|
47
|
+
let message = Obj.make(Message.Message, {
|
|
45
48
|
sender,
|
|
46
49
|
created: new Date().toISOString(),
|
|
47
50
|
blocks,
|
|
48
51
|
});
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
|
|
53
|
+
// `spaceId` provides the space context required by the process-affinity AiService/Database.
|
|
54
|
+
// Fall back to the raw message if extraction fails (e.g. AI service unavailable).
|
|
55
|
+
if (settings?.entityExtraction ?? true) {
|
|
56
|
+
const { data, error } = await invokePromise(
|
|
57
|
+
TranscriptOperation.EnrichMessage,
|
|
58
|
+
{ message },
|
|
59
|
+
{ spaceId: space.id },
|
|
60
|
+
);
|
|
61
|
+
if (error) {
|
|
62
|
+
log.warn('entity extraction failed; using raw transcript', { error });
|
|
63
|
+
} else if (data?.message) {
|
|
64
|
+
message = data.message;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
await Feed.append(feed, [message]).pipe(Effect.provide(Database.layer(space.db)), EffectEx.runAndForwardErrors);
|
|
51
69
|
},
|
|
52
|
-
[space, feed, identity],
|
|
70
|
+
[space, feed, identity, invokePromise, settings],
|
|
53
71
|
);
|
|
54
72
|
|
|
55
73
|
// Drive the transcriber lifecycle off the recording flag + audio track.
|
package/src/index.ts
CHANGED
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
// TODO(wittjosiah): Hooks should not be exported from the plugin package at all.
|
|
6
|
-
// Either refactor callers to not need them or factor them out to a shared package.
|
|
7
|
-
export * from './blueprints';
|
|
8
|
-
export * from './hooks';
|
|
9
5
|
export * from './meta';
|
|
10
|
-
export * from './
|
|
6
|
+
export * from './skills';
|
|
11
7
|
export * from './types';
|
package/src/meta.ts
CHANGED
|
@@ -3,40 +3,7 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Plugin } from '@dxos/app-framework';
|
|
6
|
-
import { DXN } from '@dxos/keys';
|
|
7
|
-
import { trim } from '@dxos/util';
|
|
8
6
|
|
|
9
|
-
|
|
10
|
-
key: DXN.make('org.dxos.plugin.transcription'),
|
|
11
|
-
name: 'Transcription',
|
|
12
|
-
author: 'DXOS',
|
|
13
|
-
description: trim`
|
|
14
|
-
Real-time voice-to-text transcription for DXOS Composer.
|
|
15
|
-
Captures microphone audio in short PCM chunks, batches them into WAV payloads, and streams
|
|
16
|
-
the results to a Whisper-compatible speech-recognition endpoint.
|
|
17
|
-
Transcribed segments are timestamped, deduplicated across chunk boundaries, and persisted
|
|
18
|
-
as Message objects in an ECHO Feed so that every participant in a shared space sees the
|
|
19
|
-
live transcript without any manual sync step.
|
|
7
|
+
import config from '../dx.config';
|
|
20
8
|
|
|
21
|
-
|
|
22
|
-
The read-only editor renders messages with speaker bylines and wall-clock timestamps,
|
|
23
|
-
supporting markdown decoration and document preview.
|
|
24
|
-
An optional message enricher pipeline lets plugins annotate messages before they are
|
|
25
|
-
committed — for example, to attach speaker identity from a calls service.
|
|
26
|
-
|
|
27
|
-
The plugin ships two blueprint-compatible operations: Open (loads and formats a transcript
|
|
28
|
-
for reading by an AI assistant) and Summarize (sends the transcript text to an LLM and
|
|
29
|
-
returns a structured Markdown summary with key points, verbatim quotes, and actionable
|
|
30
|
-
tasks extracted from the conversation).
|
|
31
|
-
|
|
32
|
-
A sentence-normalization pass merges raw word-level tokens from the recognizer into
|
|
33
|
-
grammatically complete sentences, improving readability of the stored transcript without
|
|
34
|
-
altering the underlying audio timeline.
|
|
35
|
-
`,
|
|
36
|
-
icon: 'ph--microphone--regular',
|
|
37
|
-
iconHue: 'sky',
|
|
38
|
-
source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transcription',
|
|
39
|
-
spec: 'PLUGIN.mdl',
|
|
40
|
-
tags: ['labs'],
|
|
41
|
-
screenshots: [],
|
|
42
|
-
});
|
|
9
|
+
export const meta = Plugin.getMetaFromConfig(config);
|
|
@@ -7,7 +7,7 @@ import type * as Runtime from 'effect/Runtime';
|
|
|
7
7
|
|
|
8
8
|
import { DeferredTask, asyncTimeout } from '@dxos/async';
|
|
9
9
|
import { LifecycleState, Resource } from '@dxos/context';
|
|
10
|
-
import { Feed, Filter } from '@dxos/echo';
|
|
10
|
+
import { Database, Feed, Filter } from '@dxos/echo';
|
|
11
11
|
import { EffectEx } from '@dxos/effect';
|
|
12
12
|
import { type FunctionExecutor } from '@dxos/functions-runtime';
|
|
13
13
|
import { log } from '@dxos/log';
|
|
@@ -22,7 +22,7 @@ const MAX_RANGE_ID_COUNT = 10;
|
|
|
22
22
|
export type SegmentsNormalizerProps = {
|
|
23
23
|
functionExecutor: FunctionExecutor;
|
|
24
24
|
feed: Feed.Feed;
|
|
25
|
-
feedRuntime: Runtime.Runtime<
|
|
25
|
+
feedRuntime: Runtime.Runtime<Database.Service>;
|
|
26
26
|
startingCursor: QueueCursor;
|
|
27
27
|
};
|
|
28
28
|
|
|
@@ -36,7 +36,7 @@ export class MessageNormalizer extends Resource {
|
|
|
36
36
|
private readonly _functionExecutor: FunctionExecutor;
|
|
37
37
|
|
|
38
38
|
private _feed: Feed.Feed;
|
|
39
|
-
private _feedRuntime: Runtime.Runtime<
|
|
39
|
+
private _feedRuntime: Runtime.Runtime<Database.Service>;
|
|
40
40
|
private _cursor: QueueCursor;
|
|
41
41
|
private _messagesToProcess: MessageWithRangeId[] = [];
|
|
42
42
|
private _normalizationTask?: DeferredTask;
|
|
@@ -7,6 +7,9 @@ import * as Schema from 'effect/Schema';
|
|
|
7
7
|
|
|
8
8
|
import { Operation } from '@dxos/compute';
|
|
9
9
|
import { log } from '@dxos/log';
|
|
10
|
+
// Imported so TypeScript can name these types in the emitted .d.ts.
|
|
11
|
+
// eslint-disable-next-line unused-imports/no-unused-imports
|
|
12
|
+
import { type Message, type Person } from '@dxos/types';
|
|
10
13
|
import { trim } from '@dxos/util';
|
|
11
14
|
|
|
12
15
|
import { TranscriptOperation } from '../types';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2026 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import * as Effect from 'effect/Effect';
|
|
6
|
+
|
|
7
|
+
import { enrichTranscriptMessage } from '@dxos/assistant/extraction';
|
|
8
|
+
import { Operation } from '@dxos/compute';
|
|
9
|
+
import { Database } from '@dxos/echo';
|
|
10
|
+
|
|
11
|
+
import { TranscriptOperation } from '../types';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Extracts proper nouns from a transcript message and links them to objects in the space via
|
|
15
|
+
* full-text search, rewriting the text with reference links.
|
|
16
|
+
*/
|
|
17
|
+
const handler: Operation.WithHandler<typeof TranscriptOperation.EnrichMessage> = TranscriptOperation.EnrichMessage.pipe(
|
|
18
|
+
Operation.withHandler(
|
|
19
|
+
Effect.fnUntraced(function* ({ message }) {
|
|
20
|
+
const { db } = yield* Database.Service;
|
|
21
|
+
const enriched = yield* enrichTranscriptMessage(message, { db });
|
|
22
|
+
return { message: enriched };
|
|
23
|
+
}),
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
export default handler;
|
package/src/operations/index.ts
CHANGED
package/src/operations/open.ts
CHANGED
|
@@ -6,17 +6,17 @@ import * as Effect from 'effect/Effect';
|
|
|
6
6
|
|
|
7
7
|
import { Operation } from '@dxos/compute';
|
|
8
8
|
import { Database, Feed, Filter } from '@dxos/echo';
|
|
9
|
+
import { renderByline } from '@dxos/react-ui-transcription';
|
|
9
10
|
import { Message } from '@dxos/types';
|
|
10
11
|
|
|
11
12
|
import { TranscriptOperation } from '../types';
|
|
12
|
-
import { renderByline } from '../util';
|
|
13
13
|
|
|
14
14
|
const handler: Operation.WithHandler<typeof TranscriptOperation.Open> = TranscriptOperation.Open.pipe(
|
|
15
15
|
Operation.withHandler(
|
|
16
16
|
Effect.fn(function* ({ transcript }) {
|
|
17
17
|
const transcriptObj = yield* Database.load(transcript);
|
|
18
18
|
const feed = yield* Database.load(transcriptObj.feed);
|
|
19
|
-
const messages = yield* Feed.
|
|
19
|
+
const messages = yield* Feed.query(feed, Filter.type(Message.Message)).run;
|
|
20
20
|
const content = messages
|
|
21
21
|
.flatMap((message: Message.Message, index: number) => renderByline([])(message, index))
|
|
22
22
|
.join('\n\n');
|
|
@@ -10,7 +10,7 @@ import * as Option from 'effect/Option';
|
|
|
10
10
|
|
|
11
11
|
import { AiService, ConsolePrinter, ToolExecutionService, ToolResolverService } from '@dxos/ai';
|
|
12
12
|
import { AiRequest, GenerationObserver } from '@dxos/assistant';
|
|
13
|
-
import {
|
|
13
|
+
import { Operation, Trace } from '@dxos/compute';
|
|
14
14
|
import { Database } from '@dxos/echo';
|
|
15
15
|
import { registryLayerNoop } from '@dxos/echo/testing';
|
|
16
16
|
import { trim } from '@dxos/util';
|
|
@@ -49,7 +49,7 @@ const handler: Operation.WithHandler<typeof TranscriptOperation.Summarize> = Tra
|
|
|
49
49
|
},
|
|
50
50
|
Effect.provide(
|
|
51
51
|
Layer.mergeAll(
|
|
52
|
-
AiService.model('
|
|
52
|
+
AiService.model('com.anthropic.model.claude-sonnet-4-6.default'),
|
|
53
53
|
ToolResolverService.layerEmpty,
|
|
54
54
|
ToolExecutionService.layerEmpty,
|
|
55
55
|
Trace.writerLayerNoop,
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
import { Skill, Template } from '@dxos/compute';
|
|
6
|
+
import { trim } from '@dxos/util';
|
|
7
|
+
|
|
8
|
+
import { TranscriptOperation } from '#types';
|
|
9
|
+
|
|
10
|
+
const SKILL_KEY = 'org.dxos.skill.transcription';
|
|
11
|
+
|
|
12
|
+
const make = () =>
|
|
13
|
+
Skill.make({
|
|
14
|
+
key: SKILL_KEY,
|
|
15
|
+
name: 'Transcription',
|
|
16
|
+
tools: Skill.toolDefinitions({ operations: [TranscriptOperation.Open, TranscriptOperation.Summarize] }),
|
|
17
|
+
instructions: Template.make({
|
|
18
|
+
source: trim`
|
|
19
|
+
You can open and summarize a meeting transcript.
|
|
20
|
+
`,
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const skill: Skill.Definition = {
|
|
25
|
+
key: SKILL_KEY,
|
|
26
|
+
make,
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default skill;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Keyword-spotting demo on the browser's Web Speech API (no DXOS transcriber), driven by the real
|
|
7
|
+
* `Mic` button so the mic UX matches the rest of the suite.
|
|
8
|
+
*
|
|
9
|
+
* - `Default` lists the keywords and checks each as it is heard.
|
|
10
|
+
* - The toolbar `Mic` toggles the shared `RecordingSession`; the story observes it (`useRecordingSession`)
|
|
11
|
+
* to start/stop `window.SpeechRecognition` (continuous + interim results). The editor driver stays
|
|
12
|
+
* idle (no editor view for this session).
|
|
13
|
+
* - Matching normalizes punctuation/whitespace; matched rows show a check via `react-ui-list` `Listbox`.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
17
|
+
import React, { useState } from 'react';
|
|
18
|
+
|
|
19
|
+
import { useAtomCapabilityState } from '@dxos/app-framework/ui';
|
|
20
|
+
import { Panel, Toolbar } from '@dxos/react-ui';
|
|
21
|
+
import { Listbox } from '@dxos/react-ui-list';
|
|
22
|
+
import { useSpeechRecognition } from '@dxos/react-ui-transcription';
|
|
23
|
+
|
|
24
|
+
import { Mic } from '#components';
|
|
25
|
+
import { translations } from '#translations';
|
|
26
|
+
import { TranscriptionCapabilities } from '#types';
|
|
27
|
+
|
|
28
|
+
import { createStoryDecorators } from '../testing';
|
|
29
|
+
|
|
30
|
+
// Stable session key for the Mic button; any non-editor id works (the editor driver ignores it).
|
|
31
|
+
const DOC_ID = 'keyword-detection';
|
|
32
|
+
|
|
33
|
+
// Reads the shared recording flag toggled by the `Mic` button (the editor driver stays idle when no
|
|
34
|
+
// editor view is registered for this session).
|
|
35
|
+
const useRecordingSession = (docId: string): boolean => {
|
|
36
|
+
const [session] = useAtomCapabilityState(TranscriptionCapabilities.RecordingSession);
|
|
37
|
+
return !!session?.recording && session.id === docId;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
type StoryArgs = {
|
|
41
|
+
keywords: string[];
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const DefaultStory = ({ keywords }: StoryArgs) => {
|
|
45
|
+
const [matched, setMatched] = useState<string | undefined>(undefined);
|
|
46
|
+
const handleTranscript = (transcript: string) => {
|
|
47
|
+
const match = keywords.find((keyword) => transcript.includes(keyword));
|
|
48
|
+
setMatched(match ?? undefined);
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
const recording = useRecordingSession(DOC_ID);
|
|
52
|
+
useSpeechRecognition({ active: recording, onTranscript: handleTranscript });
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<Panel.Root>
|
|
56
|
+
<Panel.Toolbar asChild>
|
|
57
|
+
<Toolbar.Root>
|
|
58
|
+
<Mic docId={DOC_ID} />
|
|
59
|
+
</Toolbar.Root>
|
|
60
|
+
</Panel.Toolbar>
|
|
61
|
+
|
|
62
|
+
<Panel.Content>
|
|
63
|
+
<Listbox.Root value={matched}>
|
|
64
|
+
<Listbox.Viewport thin padding>
|
|
65
|
+
<Listbox.Content aria-label='Keywords'>
|
|
66
|
+
{keywords.map((keyword) => (
|
|
67
|
+
<Listbox.Item key={keyword} id={keyword}>
|
|
68
|
+
<Listbox.ItemLabel>{keyword}</Listbox.ItemLabel>
|
|
69
|
+
</Listbox.Item>
|
|
70
|
+
))}
|
|
71
|
+
</Listbox.Content>
|
|
72
|
+
</Listbox.Viewport>
|
|
73
|
+
</Listbox.Root>
|
|
74
|
+
</Panel.Content>
|
|
75
|
+
</Panel.Root>
|
|
76
|
+
);
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
const meta = {
|
|
80
|
+
title: 'plugins/plugin-transcription/stories/Keyword',
|
|
81
|
+
render: DefaultStory,
|
|
82
|
+
decorators: createStoryDecorators(),
|
|
83
|
+
parameters: {
|
|
84
|
+
layout: 'fullscreen',
|
|
85
|
+
controls: { disable: true },
|
|
86
|
+
translations,
|
|
87
|
+
},
|
|
88
|
+
} satisfies Meta<typeof DefaultStory>;
|
|
89
|
+
|
|
90
|
+
export default meta;
|
|
91
|
+
|
|
92
|
+
type Story = StoryObj<typeof meta>;
|
|
93
|
+
|
|
94
|
+
export const Default: Story = {
|
|
95
|
+
args: {
|
|
96
|
+
keywords: ['hello', 'hey kai', 'kai', 'computer', 'dxos', 'composer'].sort(),
|
|
97
|
+
},
|
|
98
|
+
};
|