@dxos/plugin-transcription 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731
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/LICENSE +102 -5
- package/PLUGIN.mdl +401 -0
- package/README.md +1 -1
- package/dist/lib/neutral/TranscriptionArticle-L6XANBH5.mjs +54 -0
- package/dist/lib/neutral/TranscriptionArticle-L6XANBH5.mjs.map +7 -0
- package/dist/lib/neutral/TranscriptionPlugin.mjs +46 -0
- package/dist/lib/neutral/TranscriptionPlugin.mjs.map +7 -0
- package/dist/lib/neutral/TranscriptionPlugin.node.mjs +25 -0
- package/dist/lib/neutral/TranscriptionPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs +21 -0
- package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs.map +7 -0
- package/dist/lib/{browser/blueprint-definition-C6XA2SVZ.mjs → neutral/blueprint-definition-HOXDG5QP.mjs} +4 -7
- package/dist/lib/neutral/blueprint-definition-HOXDG5QP.mjs.map +7 -0
- package/dist/lib/{browser → neutral}/blueprints/index.mjs +1 -2
- package/dist/lib/neutral/capabilities/index.mjs +17 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/chunk-2O3ONPRZ.mjs +298 -0
- package/dist/lib/neutral/chunk-2O3ONPRZ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-FHNI26QW.mjs +45 -0
- package/dist/lib/neutral/chunk-FHNI26QW.mjs.map +7 -0
- package/dist/lib/{browser/chunk-EV5ZYKET.mjs → neutral/chunk-ILSA3DU7.mjs} +87 -112
- package/dist/lib/neutral/chunk-ILSA3DU7.mjs.map +7 -0
- package/dist/lib/{browser/chunk-HOOPZ7EM.mjs → neutral/chunk-KAEXRX3Y.mjs} +1 -1
- package/dist/lib/neutral/chunk-KVUT2KYT.mjs +124 -0
- package/dist/lib/neutral/chunk-KVUT2KYT.mjs.map +7 -0
- package/dist/lib/neutral/chunk-MLRJWAQH.mjs +179 -0
- package/dist/lib/neutral/chunk-MLRJWAQH.mjs.map +7 -0
- package/dist/lib/neutral/chunk-Y4YI44ZD.mjs +8 -0
- package/dist/lib/neutral/chunk-Y4YI44ZD.mjs.map +7 -0
- package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs +30 -0
- package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +273 -0
- package/dist/lib/neutral/components/index.mjs.map +7 -0
- package/dist/lib/neutral/containers/index.mjs +9 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-VWFMMAUY.mjs +21 -0
- package/dist/lib/neutral/create-VWFMMAUY.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +19 -0
- package/dist/lib/neutral/index.mjs +44 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/open-V772IQYW.mjs +27 -0
- package/dist/lib/neutral/open-V772IQYW.mjs.map +7 -0
- package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs +13 -0
- package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-YMZRO242.mjs +26 -0
- package/dist/lib/neutral/react-surface-YMZRO242.mjs.map +7 -0
- package/dist/lib/neutral/summarize-6PDRGTKE.mjs +78 -0
- package/dist/lib/neutral/summarize-6PDRGTKE.mjs.map +7 -0
- package/dist/lib/neutral/text-content-KBB37HSM.mjs +30 -0
- package/dist/lib/neutral/text-content-KBB37HSM.mjs.map +7 -0
- package/dist/lib/{browser/transcriber-WCPHHJYY.mjs → neutral/transcriber-ABHATBVH.mjs} +8 -10
- package/dist/lib/neutral/transcriber-ABHATBVH.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +24 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +10 -0
- package/dist/lib/neutral/types/index.mjs.map +7 -0
- 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/TranscriptionPlugin.workerd.d.ts +4 -0
- package/dist/types/src/TranscriptionPlugin.workerd.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 +6 -0
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +10 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/capabilities/text-content.d.ts +8 -0
- package/dist/types/src/capabilities/text-content.d.ts.map +1 -0
- package/dist/types/src/capabilities/{transcriber/transcriber.d.ts → transcriber.d.ts} +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -0
- package/dist/types/src/components/Oracle/Oracle.d.ts +24 -0
- package/dist/types/src/components/Oracle/Oracle.d.ts.map +1 -0
- package/dist/types/src/components/Oracle/Oracle.stories.d.ts +32 -0
- package/dist/types/src/components/Oracle/Oracle.stories.d.ts.map +1 -0
- package/dist/types/src/components/Oracle/index.d.ts +2 -0
- package/dist/types/src/components/Oracle/index.d.ts.map +1 -0
- package/dist/types/src/components/Transcription/Transcription.d.ts +5 -9
- package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -1
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts +21 -24
- 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/components/index.d.ts +1 -0
- package/dist/types/src/components/index.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts +6 -0
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts.map +1 -0
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts +28 -0
- package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts.map +1 -0
- package/dist/types/src/containers/TranscriptionArticle/index.d.ts +2 -0
- package/dist/types/src/containers/TranscriptionArticle/index.d.ts.map +1 -0
- package/dist/types/src/containers/index.d.ts +1 -1
- package/dist/types/src/containers/index.d.ts.map +1 -1
- package/dist/types/src/enrichment/conversation.test.d.ts +2 -0
- package/dist/types/src/enrichment/conversation.test.d.ts.map +1 -0
- package/dist/types/src/enrichment/operations.d.ts +200 -0
- package/dist/types/src/enrichment/operations.d.ts.map +1 -0
- package/dist/types/src/enrichment/parser.d.ts +26 -0
- package/dist/types/src/enrichment/parser.d.ts.map +1 -0
- package/dist/types/src/enrichment/stream-simulator.d.ts +38 -0
- package/dist/types/src/enrichment/stream-simulator.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +2 -1
- package/dist/types/src/hooks/index.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/useFeedModelAdapter.d.ts +12 -0
- package/dist/types/src/hooks/useFeedModelAdapter.d.ts.map +1 -0
- 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/useTranscriptionRecording.d.ts +12 -0
- package/dist/types/src/hooks/useTranscriptionRecording.d.ts.map +1 -0
- package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +2 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts +1 -1
- package/dist/types/src/meta.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/{segments-normalization → normalization}/message-normalizer.d.ts +7 -5
- package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -0
- package/dist/types/src/normalization/normalization.d.ts +834 -0
- 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 +5 -0
- package/dist/types/src/operations/create.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/operations/open.d.ts +5 -0
- package/dist/types/src/operations/open.d.ts.map +1 -0
- package/dist/types/src/operations/summarize.d.ts +8 -0
- package/dist/types/src/operations/summarize.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/stories/FileTranscription.stories.d.ts +20 -0
- package/dist/types/src/stories/FileTranscription.stories.d.ts.map +1 -0
- package/dist/types/src/{components/stories → stories}/KeyWordRecognition.stories.d.ts +2 -2
- package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +1 -0
- package/dist/types/src/{components/stories/MicrophoneTranscription.stories.d.ts → stories/LiveTranscription.stories.d.ts} +7 -7
- package/dist/types/src/stories/LiveTranscription.stories.d.ts.map +1 -0
- package/dist/types/src/stories/TranscriptionStory.d.ts +21 -0
- package/dist/types/src/stories/TranscriptionStory.d.ts.map +1 -0
- package/dist/types/src/stories/common.d.ts +248 -0
- package/dist/types/src/stories/common.d.ts.map +1 -0
- package/dist/types/src/testing/testing.d.ts +5 -6
- 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 +58 -3
- 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 +6 -4
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +9 -8
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/TranscriptOperation.d.ts +1670 -0
- package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -0
- package/dist/types/src/types/TranscriptionCapabilities.d.ts +17 -0
- package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +2 -4
- 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 +140 -86
- package/src/TranscriptionPlugin.node.ts +20 -0
- package/src/TranscriptionPlugin.test.ts +31 -0
- package/src/TranscriptionPlugin.tsx +14 -29
- package/src/TranscriptionPlugin.workerd.ts +18 -0
- package/src/blueprints/transcription-blueprint.ts +5 -9
- package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +3 -1
- package/src/capabilities/index.ts +12 -4
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/react-surface.tsx +31 -0
- package/src/capabilities/text-content.ts +33 -0
- package/src/capabilities/{transcriber/transcriber.ts → transcriber.ts} +5 -2
- package/src/components/Oracle/Oracle.stories.tsx +147 -0
- package/src/components/Oracle/Oracle.tsx +142 -0
- package/src/components/Oracle/index.ts +5 -0
- package/src/components/Transcription/Transcription.stories.tsx +125 -158
- package/src/components/Transcription/Transcription.tsx +33 -38
- package/src/components/index.ts +1 -0
- package/src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx +61 -0
- package/src/containers/TranscriptionArticle/TranscriptionArticle.tsx +62 -0
- package/src/containers/TranscriptionArticle/index.ts +5 -0
- package/src/containers/index.ts +1 -1
- package/src/enrichment/conversation.test.ts +162 -0
- package/src/enrichment/conversation.txt +23 -0
- package/src/enrichment/operations.ts +271 -0
- package/src/enrichment/parser.ts +101 -0
- package/src/enrichment/stream-simulator.ts +125 -0
- package/src/hooks/index.ts +2 -1
- package/src/hooks/useFeedModelAdapter.ts +46 -0
- package/src/hooks/useTranscriber.ts +5 -2
- package/src/hooks/useTranscriptionRecording.ts +87 -0
- package/src/hooks/useVoiceInput.ts +0 -1
- package/src/index.ts +4 -5
- package/src/meta.ts +28 -6
- package/src/model/model.test.ts +8 -8
- package/src/model/model.ts +3 -3
- package/src/{segments-normalization → normalization}/message-normalizer.ts +25 -17
- package/src/{segments-normalization → normalization}/normalization.test.ts +3 -37
- package/src/normalization/normalization.ts +76 -0
- package/src/operations/create.ts +24 -0
- package/src/operations/index.ts +11 -0
- package/src/operations/open.ts +28 -0
- package/src/operations/summarize.ts +101 -0
- package/src/plugin.ts +11 -0
- package/src/stories/FileTranscription.stories.tsx +143 -0
- package/src/{components/stories → stories}/KeyWordRecognition.stories.tsx +38 -38
- package/src/stories/LiveTranscription.stories.tsx +153 -0
- package/src/stories/TranscriptionStory.tsx +101 -0
- package/src/stories/common.ts +233 -0
- package/src/testing/testing.ts +29 -51
- package/src/transcriber/index.ts +1 -1
- package/src/transcriber/transcriber.browser.test.ts +0 -1
- package/src/transcriber/transcriber.test.ts +104 -0
- package/src/transcriber/transcriber.ts +100 -55
- package/src/transcriber/transcription-manager.ts +14 -9
- package/src/translations.ts +10 -7
- package/src/types/TranscriptOperation.ts +106 -0
- package/src/types/TranscriptionCapabilities.ts +39 -0
- package/src/types/index.ts +2 -4
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/TranscriptionContainer-RBFHP2AV.mjs +0 -41
- package/dist/lib/browser/TranscriptionContainer-RBFHP2AV.mjs.map +0 -7
- package/dist/lib/browser/blueprint-definition-C6XA2SVZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-2B74LZZD.mjs +0 -22
- package/dist/lib/browser/chunk-2B74LZZD.mjs.map +0 -7
- package/dist/lib/browser/chunk-EV5ZYKET.mjs.map +0 -7
- package/dist/lib/browser/chunk-GH4IIQ6C.mjs +0 -54
- package/dist/lib/browser/chunk-GH4IIQ6C.mjs.map +0 -7
- package/dist/lib/browser/chunk-O7ILGNBZ.mjs +0 -148
- package/dist/lib/browser/chunk-O7ILGNBZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-XLMRCOQN.mjs +0 -668
- package/dist/lib/browser/chunk-XLMRCOQN.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -114
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-5BLRH4XE.mjs +0 -23
- package/dist/lib/browser/operation-resolver-5BLRH4XE.mjs.map +0 -7
- package/dist/lib/browser/react-surface-U2SI74JK.mjs +0 -36
- package/dist/lib/browser/react-surface-U2SI74JK.mjs.map +0 -7
- package/dist/lib/browser/transcriber-WCPHHJYY.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -15
- package/dist/lib/node-esm/TranscriptionContainer-3OOID5KH.mjs +0 -42
- package/dist/lib/node-esm/TranscriptionContainer-3OOID5KH.mjs.map +0 -7
- package/dist/lib/node-esm/blueprint-definition-TLXDUXIQ.mjs +0 -19
- package/dist/lib/node-esm/blueprint-definition-TLXDUXIQ.mjs.map +0 -7
- package/dist/lib/node-esm/blueprints/index.mjs +0 -10
- package/dist/lib/node-esm/chunk-6GW5NZYG.mjs +0 -55
- package/dist/lib/node-esm/chunk-6GW5NZYG.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-7UE7G6DE.mjs +0 -461
- package/dist/lib/node-esm/chunk-7UE7G6DE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-DYUGYQCB.mjs +0 -669
- package/dist/lib/node-esm/chunk-DYUGYQCB.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-F47HK7GT.mjs +0 -24
- package/dist/lib/node-esm/chunk-F47HK7GT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-H3MXHMQL.mjs +0 -149
- package/dist/lib/node-esm/chunk-H3MXHMQL.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-NVM2QUMX.mjs +0 -37
- package/dist/lib/node-esm/chunk-NVM2QUMX.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -115
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-CVZB7BF4.mjs +0 -24
- package/dist/lib/node-esm/operation-resolver-CVZB7BF4.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-2ICJPBPX.mjs +0 -37
- package/dist/lib/node-esm/react-surface-2ICJPBPX.mjs.map +0 -7
- package/dist/lib/node-esm/transcriber-2RIHUEX4.mjs +0 -62
- package/dist/lib/node-esm/transcriber-2RIHUEX4.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -16
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
- package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
- package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +0 -5
- package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/capabilities/transcriber/index.d.ts +0 -3
- package/dist/types/src/capabilities/transcriber/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/transcriber/transcriber.d.ts.map +0 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts +0 -18
- 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 +0 -3
- package/dist/types/src/components/stories/useIsSpeaking.d.ts.map +0 -1
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +0 -6
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +0 -1
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts +0 -3
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +0 -1
- package/dist/types/src/functions/index.d.ts +0 -18
- package/dist/types/src/functions/index.d.ts.map +0 -1
- package/dist/types/src/functions/open.d.ts +0 -11
- package/dist/types/src/functions/open.d.ts.map +0 -1
- package/dist/types/src/functions/summarize.d.ts +0 -11
- package/dist/types/src/functions/summarize.d.ts.map +0 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +0 -8
- package/dist/types/src/hooks/useQueueModelAdapter.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 +0 -534
- 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/TranscriptAction.d.ts +0 -25
- package/dist/types/src/types/TranscriptAction.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -18
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/types.d.ts +0 -5
- package/dist/types/src/types/types.d.ts.map +0 -1
- package/src/capabilities/blueprint-definition/index.ts +0 -7
- package/src/capabilities/operation-handler/index.ts +0 -7
- package/src/capabilities/operation-handler/operation-handler.ts +0 -25
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -25
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/capabilities/react-surface/react-surface.tsx +0 -28
- package/src/capabilities/transcriber/index.ts +0 -7
- package/src/components/stories/FileTranscription.stories.tsx +0 -252
- package/src/components/stories/MicrophoneTranscription.stories.tsx +0 -282
- package/src/components/stories/TranscriptionStory.tsx +0 -41
- package/src/components/stories/useIsSpeaking.tsx +0 -40
- package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +0 -33
- package/src/containers/TranscriptionContainer/index.ts +0 -7
- package/src/functions/index.ts +0 -11
- package/src/functions/open.ts +0 -37
- package/src/functions/summarize.ts +0 -103
- package/src/hooks/useQueueModelAdapter.ts +0 -66
- package/src/segments-normalization/normalization.ts +0 -115
- package/src/types/TranscriptAction.ts +0 -32
- package/src/types/capabilities.ts +0 -33
- package/src/types/types.ts +0 -9
- package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
- package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
- package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
- package/dist/lib/{browser/chunk-HOOPZ7EM.mjs.map → neutral/chunk-KAEXRX3Y.mjs.map} +0 -0
- package/dist/lib/{browser/types → neutral/hooks}/index.mjs.map +0 -0
- package/dist/lib/{node-esm/blueprints → neutral}/index.mjs.map +0 -0
- package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
- package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
- package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.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/src/{segments-normalization → normalization}/index.ts +1 -1
- /package/src/{segments-normalization → normalization}/utils.ts +0 -0
|
@@ -10,12 +10,15 @@ import { log } from '@dxos/log';
|
|
|
10
10
|
import { trace } from '@dxos/tracing';
|
|
11
11
|
import { type ContentBlock } from '@dxos/types';
|
|
12
12
|
|
|
13
|
-
import { TRANSCRIPTION_URL } from '../types';
|
|
14
13
|
import { mergeFloat64Arrays } from '../util';
|
|
15
|
-
|
|
16
14
|
import { type AudioChunk, type AudioRecorder } from './audio-recorder';
|
|
17
15
|
|
|
18
|
-
|
|
16
|
+
/**
|
|
17
|
+
* Endpoint to the calls service.
|
|
18
|
+
*/
|
|
19
|
+
const DEFAULT_TRANSCRIPTION_URL = 'https://calls-service.dxos.workers.dev';
|
|
20
|
+
|
|
21
|
+
export type WhisperWord = {
|
|
19
22
|
word: string;
|
|
20
23
|
|
|
21
24
|
/**
|
|
@@ -29,7 +32,7 @@ type WhisperWord = {
|
|
|
29
32
|
end: number;
|
|
30
33
|
};
|
|
31
34
|
|
|
32
|
-
type WhisperSegment = {
|
|
35
|
+
export type WhisperSegment = {
|
|
33
36
|
text: string;
|
|
34
37
|
|
|
35
38
|
/**
|
|
@@ -61,8 +64,20 @@ export type TranscribeConfig = {
|
|
|
61
64
|
* This is needed to catch the beginning of the user's speech.
|
|
62
65
|
*/
|
|
63
66
|
prefixBufferChunksAmount: number;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Override the transcription endpoint base URL.
|
|
70
|
+
* Defaults to the DXOS calls service.
|
|
71
|
+
*/
|
|
72
|
+
endpoint?: string;
|
|
64
73
|
};
|
|
65
74
|
|
|
75
|
+
/**
|
|
76
|
+
* Function that converts a base64-encoded WAV payload into Whisper segments.
|
|
77
|
+
* Allows callers to swap in alternative providers or mock the transport.
|
|
78
|
+
*/
|
|
79
|
+
export type TranscribeFn = (audio: string) => Promise<WhisperSegment[]>;
|
|
80
|
+
|
|
66
81
|
export type TranscriberProps = {
|
|
67
82
|
config: TranscribeConfig;
|
|
68
83
|
recorder: AudioRecorder;
|
|
@@ -71,6 +86,10 @@ export type TranscriberProps = {
|
|
|
71
86
|
* @param segments - The transcribed segments.
|
|
72
87
|
*/
|
|
73
88
|
onSegments: (segments: ContentBlock.Transcript[]) => Promise<void>;
|
|
89
|
+
/**
|
|
90
|
+
* Optional override of the transcription transport. When provided, supersedes `config.endpoint`.
|
|
91
|
+
*/
|
|
92
|
+
transcribe?: TranscribeFn;
|
|
74
93
|
};
|
|
75
94
|
|
|
76
95
|
/**
|
|
@@ -80,22 +99,24 @@ export type TranscriberProps = {
|
|
|
80
99
|
*/
|
|
81
100
|
export class Transcriber extends Resource {
|
|
82
101
|
private _audioChunks: AudioChunk[] = [];
|
|
83
|
-
private
|
|
102
|
+
private _lastTimestamp = 0;
|
|
84
103
|
|
|
85
104
|
private readonly _openTrigger = new Trigger({ autoReset: true });
|
|
86
105
|
|
|
87
106
|
private readonly _config: TranscribeConfig;
|
|
88
107
|
private readonly _recorder: AudioRecorder;
|
|
89
108
|
private readonly _onSegments: TranscriberProps['onSegments'];
|
|
109
|
+
private readonly _transcribeFn?: TranscribeFn;
|
|
90
110
|
|
|
91
111
|
private _recording = false;
|
|
92
112
|
private _transcribeTask?: DeferredTask = undefined;
|
|
93
113
|
|
|
94
|
-
constructor({ config, recorder, onSegments }: TranscriberProps) {
|
|
114
|
+
constructor({ config, recorder, onSegments, transcribe }: TranscriberProps) {
|
|
95
115
|
super();
|
|
96
116
|
this._config = config;
|
|
97
117
|
this._recorder = recorder;
|
|
98
118
|
this._onSegments = onSegments;
|
|
119
|
+
this._transcribeFn = transcribe;
|
|
99
120
|
}
|
|
100
121
|
|
|
101
122
|
protected override async _open(ctx: Context): Promise<void> {
|
|
@@ -192,67 +213,91 @@ export class Transcriber extends Resource {
|
|
|
192
213
|
@trace.span({ showInBrowserTimeline: true })
|
|
193
214
|
private async _fetchTranscription(audio: string): Promise<WhisperSegment[]> {
|
|
194
215
|
if (audio.length === 0) {
|
|
195
|
-
this._audioChunks = [];
|
|
196
216
|
throw new Error('No audio to send for transcribing');
|
|
197
217
|
}
|
|
198
218
|
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
219
|
+
let segments: unknown;
|
|
220
|
+
if (this._transcribeFn) {
|
|
221
|
+
segments = await this._transcribeFn(audio);
|
|
222
|
+
} else {
|
|
223
|
+
// TODO(burdon): Create separate endpoint?
|
|
224
|
+
const endpoint = this._config.endpoint ?? DEFAULT_TRANSCRIPTION_URL;
|
|
225
|
+
const response = await fetch(`${endpoint}/transcribe`, {
|
|
226
|
+
method: 'POST',
|
|
227
|
+
body: JSON.stringify({ audio }),
|
|
228
|
+
headers: {
|
|
229
|
+
'Content-Type': 'application/json',
|
|
230
|
+
},
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
if (!response.ok) {
|
|
234
|
+
throw new Error(`Transcription failed: ${response.statusText}`);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
({ segments } = (await response.json()) as { segments?: unknown });
|
|
210
238
|
}
|
|
211
239
|
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
log.info('transcription response', {
|
|
217
|
-
segments: segments.length,
|
|
218
|
-
string: segments.map((segments) => segments.text).join(' '),
|
|
219
|
-
});
|
|
240
|
+
if (!Array.isArray(segments)) {
|
|
241
|
+
throw new Error('Transcription response payload is invalid');
|
|
242
|
+
}
|
|
220
243
|
|
|
221
|
-
|
|
244
|
+
log.info('transcription response', { segments: segments.length });
|
|
245
|
+
return segments as WhisperSegment[];
|
|
222
246
|
}
|
|
223
247
|
|
|
224
248
|
private _alignSegments(segments: WhisperSegment[], originalChunks: AudioChunk[]): ContentBlock.Transcript[] {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
const filteredSegments = segments
|
|
229
|
-
// Use segments that end after the last used timestamp.
|
|
230
|
-
// Segments could overlap, so we need to filter words that starts after the last used timestamp.
|
|
231
|
-
.filter((segment) => zeroTimestamp + segment.end * 1_000 >= this._lastUsedTimestamp)
|
|
232
|
-
// Use words that starts after the last used timestamp.
|
|
233
|
-
.map((segment) => {
|
|
234
|
-
const words = segment.words.filter((word) => zeroTimestamp + word.start * 1_000 >= this._lastUsedTimestamp);
|
|
235
|
-
return {
|
|
236
|
-
...segment,
|
|
237
|
-
words,
|
|
238
|
-
text: words.map((word) => word.word).join(''),
|
|
239
|
-
start: words.at(0)?.start ?? segment.end,
|
|
240
|
-
};
|
|
241
|
-
})
|
|
242
|
-
.filter((segment) => segment.words.length > 0);
|
|
243
|
-
|
|
244
|
-
if (filteredSegments.length === 0) {
|
|
245
|
-
return [];
|
|
249
|
+
const result = alignWhisperSegments(segments, originalChunks, this._lastTimestamp);
|
|
250
|
+
if (result.lastTimestamp !== undefined) {
|
|
251
|
+
this._lastTimestamp = result.lastTimestamp;
|
|
246
252
|
}
|
|
247
253
|
|
|
248
|
-
|
|
249
|
-
|
|
254
|
+
return result.transcripts;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Pure helper that filters and absolute-timestamps Whisper segments against a chunk timeline.
|
|
260
|
+
* Exported for testing.
|
|
261
|
+
*
|
|
262
|
+
* @param segments - Raw segments returned by the Whisper service for `originalChunks`.
|
|
263
|
+
* @param originalChunks - Chunks fed into the transcription request (used for the zero timestamp).
|
|
264
|
+
* @param lastTimestamp - Most recent absolute timestamp already emitted; segments whose end
|
|
265
|
+
* falls strictly before this point are deduped out, as are individual words whose start does.
|
|
266
|
+
*/
|
|
267
|
+
export const alignWhisperSegments = (
|
|
268
|
+
segments: WhisperSegment[],
|
|
269
|
+
originalChunks: AudioChunk[],
|
|
270
|
+
lastTimestamp: number,
|
|
271
|
+
): { transcripts: ContentBlock.Transcript[]; lastTimestamp?: number } => {
|
|
272
|
+
if (originalChunks.length === 0) {
|
|
273
|
+
return { transcripts: [] };
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
const zeroTimestamp = originalChunks[0].timestamp;
|
|
277
|
+
|
|
278
|
+
const filteredSegments = segments
|
|
279
|
+
.filter((segment) => zeroTimestamp + segment.end * 1_000 >= lastTimestamp)
|
|
280
|
+
.map((segment) => {
|
|
281
|
+
const words = segment.words.filter((word) => zeroTimestamp + word.start * 1_000 >= lastTimestamp);
|
|
282
|
+
return {
|
|
283
|
+
...segment,
|
|
284
|
+
words,
|
|
285
|
+
text: words.map((word) => word.word).join(''),
|
|
286
|
+
start: words.at(0)?.start ?? segment.end,
|
|
287
|
+
};
|
|
288
|
+
})
|
|
289
|
+
.filter((segment) => segment.words.length > 0);
|
|
290
|
+
|
|
291
|
+
if (filteredSegments.length === 0) {
|
|
292
|
+
return { transcripts: [] };
|
|
293
|
+
}
|
|
250
294
|
|
|
251
|
-
|
|
252
|
-
|
|
295
|
+
return {
|
|
296
|
+
lastTimestamp: zeroTimestamp + filteredSegments.at(-1)!.end * 1_000,
|
|
297
|
+
transcripts: filteredSegments.map((segment) => ({
|
|
253
298
|
_tag: 'transcript',
|
|
254
299
|
started: new Date(zeroTimestamp + segment.start * 1_000).toISOString(),
|
|
255
300
|
text: segment.text.trim(),
|
|
256
|
-
}))
|
|
257
|
-
}
|
|
258
|
-
}
|
|
301
|
+
})),
|
|
302
|
+
};
|
|
303
|
+
};
|
|
@@ -3,11 +3,14 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { Atom, type Registry } from '@effect-atom/atom-react';
|
|
6
|
+
import * as Effect from 'effect/Effect';
|
|
7
|
+
import * as Layer from 'effect/Layer';
|
|
6
8
|
|
|
7
9
|
import { synchronized } from '@dxos/async';
|
|
10
|
+
import { createFeedServiceLayer, type Space } from '@dxos/client/echo';
|
|
8
11
|
import { Resource } from '@dxos/context';
|
|
9
|
-
import { Obj } from '@dxos/echo';
|
|
10
|
-
import {
|
|
12
|
+
import { Feed, Obj } from '@dxos/echo';
|
|
13
|
+
import { runAndForwardErrors } from '@dxos/effect';
|
|
11
14
|
import { type EdgeHttpClient } from '@dxos/react-edge-client';
|
|
12
15
|
import { type ContentBlock, Message } from '@dxos/types';
|
|
13
16
|
|
|
@@ -37,7 +40,7 @@ export type TranscriptionManagerOptions = {
|
|
|
37
40
|
registry: Registry.Registry;
|
|
38
41
|
|
|
39
42
|
/**
|
|
40
|
-
* Enrich the message before it is written to the transcription
|
|
43
|
+
* Enrich the message before it is written to the transcription feed.
|
|
41
44
|
*/
|
|
42
45
|
messageEnricher?: TranscriptMessageEnricher;
|
|
43
46
|
};
|
|
@@ -53,7 +56,8 @@ export class TranscriptionManager extends Resource {
|
|
|
53
56
|
private _identityDid?: string = undefined;
|
|
54
57
|
private _mediaRecorder?: MediaStreamRecorder = undefined;
|
|
55
58
|
private _transcriber?: Transcriber = undefined;
|
|
56
|
-
private
|
|
59
|
+
private _feed?: Feed.Feed = undefined;
|
|
60
|
+
private _feedServiceLayer?: Layer.Layer<Feed.FeedService> = undefined;
|
|
57
61
|
private _enabledAtom = Atom.make(false);
|
|
58
62
|
|
|
59
63
|
constructor(options: TranscriptionManagerOptions) {
|
|
@@ -71,8 +75,9 @@ export class TranscriptionManager extends Resource {
|
|
|
71
75
|
return this._registry.get(this._enabledAtom);
|
|
72
76
|
}
|
|
73
77
|
|
|
74
|
-
|
|
75
|
-
this.
|
|
78
|
+
setFeed(space: Space, feed: Feed.Feed): this {
|
|
79
|
+
this._feed = feed;
|
|
80
|
+
this._feedServiceLayer = createFeedServiceLayer(space.queues);
|
|
76
81
|
return this;
|
|
77
82
|
}
|
|
78
83
|
|
|
@@ -132,7 +137,7 @@ export class TranscriptionManager extends Resource {
|
|
|
132
137
|
return;
|
|
133
138
|
}
|
|
134
139
|
|
|
135
|
-
// Reinitialize transcriber if
|
|
140
|
+
// Reinitialize transcriber if feed or media stream track has changed.
|
|
136
141
|
let needReinit = false;
|
|
137
142
|
if (this._audioStreamTrack !== this._mediaRecorder?.mediaStreamTrack) {
|
|
138
143
|
this._mediaRecorder = new MediaStreamRecorder({
|
|
@@ -161,7 +166,7 @@ export class TranscriptionManager extends Resource {
|
|
|
161
166
|
}
|
|
162
167
|
|
|
163
168
|
private async _onSegments(segments: ContentBlock.Transcript[]): Promise<void> {
|
|
164
|
-
if (!this.isOpen || !this.
|
|
169
|
+
if (!this.isOpen || !this._feed || !this._feedServiceLayer) {
|
|
165
170
|
return;
|
|
166
171
|
}
|
|
167
172
|
|
|
@@ -175,6 +180,6 @@ export class TranscriptionManager extends Resource {
|
|
|
175
180
|
block = await this._messageEnricher(block);
|
|
176
181
|
}
|
|
177
182
|
|
|
178
|
-
await
|
|
183
|
+
await Feed.append(this._feed, [block]).pipe(Effect.provide(this._feedServiceLayer), runAndForwardErrors);
|
|
179
184
|
}
|
|
180
185
|
}
|
package/src/translations.ts
CHANGED
|
@@ -4,20 +4,23 @@
|
|
|
4
4
|
|
|
5
5
|
import { type Resource } from '@dxos/react-ui';
|
|
6
6
|
|
|
7
|
-
import { meta } from '
|
|
7
|
+
import { meta } from '#meta';
|
|
8
8
|
|
|
9
9
|
export const translations = [
|
|
10
10
|
{
|
|
11
11
|
'en-US': {
|
|
12
12
|
[meta.id]: {
|
|
13
|
-
'plugin
|
|
14
|
-
'transcript
|
|
13
|
+
'plugin.name': 'Transcription',
|
|
14
|
+
'transcript-companion.label': 'Transcript',
|
|
15
15
|
|
|
16
|
-
'delete
|
|
17
|
-
'bookmark
|
|
18
|
-
'scroll
|
|
16
|
+
'delete.button': 'Delete',
|
|
17
|
+
'bookmark.button': 'Bookmark',
|
|
18
|
+
'scroll-to-end.label': 'Scroll to latest',
|
|
19
19
|
|
|
20
|
-
'
|
|
20
|
+
'start-recording.label': 'Start recording',
|
|
21
|
+
'stop-recording.label': 'Stop recording',
|
|
22
|
+
|
|
23
|
+
'settings.entity-extraction.label': 'Entity extraction',
|
|
21
24
|
},
|
|
22
25
|
},
|
|
23
26
|
},
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import * as Schema from 'effect/Schema';
|
|
8
|
+
|
|
9
|
+
import { AiService } from '@dxos/ai';
|
|
10
|
+
import { SpaceSchema } from '@dxos/client/echo';
|
|
11
|
+
import { Operation } from '@dxos/compute';
|
|
12
|
+
import { Database, Feed, Ref, Type, DXN } from '@dxos/echo';
|
|
13
|
+
import { Message, Transcript } from '@dxos/types';
|
|
14
|
+
|
|
15
|
+
import { meta } from '#meta';
|
|
16
|
+
|
|
17
|
+
const makeKey = (name: string) => DXN.make(`${meta.id}.operation.${name}`);
|
|
18
|
+
|
|
19
|
+
export const Create = Operation.make({
|
|
20
|
+
meta: { key: makeKey('create'), name: 'Create Transcript', icon: 'ph--microphone--regular' },
|
|
21
|
+
input: Schema.Struct({
|
|
22
|
+
name: Schema.optional(Schema.String),
|
|
23
|
+
space: SpaceSchema,
|
|
24
|
+
}),
|
|
25
|
+
output: Schema.Struct({
|
|
26
|
+
object: Type.getSchema(Transcript.Transcript),
|
|
27
|
+
}),
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
export const MessageWithRangeId = Schema.extend(
|
|
31
|
+
Type.getSchema(Message.Message),
|
|
32
|
+
Schema.Struct({
|
|
33
|
+
rangeId: Schema.optional(Schema.Array(Schema.String)).annotations({
|
|
34
|
+
description: 'The IDs of the messages that contain the sentences.',
|
|
35
|
+
}),
|
|
36
|
+
}),
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
export type MessageWithRangeIdType = Schema.Schema.Type<typeof MessageWithRangeId>;
|
|
40
|
+
|
|
41
|
+
export const Open = Operation.make({
|
|
42
|
+
meta: {
|
|
43
|
+
key: DXN.make('org.dxos.function.transcription.open'),
|
|
44
|
+
name: 'Open',
|
|
45
|
+
description: 'Opens and reads the contents of a transcription object.',
|
|
46
|
+
icon: 'ph--folder-open--regular',
|
|
47
|
+
},
|
|
48
|
+
input: Schema.Struct({
|
|
49
|
+
transcript: Ref.Ref(Transcript.Transcript).annotations({
|
|
50
|
+
description: 'The ID of the transcription object.',
|
|
51
|
+
}),
|
|
52
|
+
}),
|
|
53
|
+
output: Schema.Struct({
|
|
54
|
+
content: Schema.String,
|
|
55
|
+
}),
|
|
56
|
+
services: [Database.Service, Feed.FeedService],
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
export const Summarize = Operation.make({
|
|
60
|
+
meta: {
|
|
61
|
+
key: DXN.make('org.dxos.function.transcription.summarize'),
|
|
62
|
+
name: 'Summarize',
|
|
63
|
+
description: 'Summarize a transcript of a meeting.',
|
|
64
|
+
icon: 'ph--text-align-left--regular',
|
|
65
|
+
},
|
|
66
|
+
input: Schema.Struct({
|
|
67
|
+
transcript: Schema.String.annotations({
|
|
68
|
+
description: 'The transcript of the meeting.',
|
|
69
|
+
}),
|
|
70
|
+
notes: Schema.optional(Schema.String).annotations({
|
|
71
|
+
description: 'Additional notes from the participants.',
|
|
72
|
+
}),
|
|
73
|
+
}),
|
|
74
|
+
output: Schema.Struct({
|
|
75
|
+
summary: Schema.String.annotations({
|
|
76
|
+
description: 'The summary of the transcript.',
|
|
77
|
+
}),
|
|
78
|
+
}),
|
|
79
|
+
services: [AiService.AiService],
|
|
80
|
+
});
|
|
81
|
+
|
|
82
|
+
export const SentenceNormalizationInput = Schema.Struct({
|
|
83
|
+
messages: Schema.Array(MessageWithRangeId).annotations({
|
|
84
|
+
description: 'Messages to normalize into sentences.',
|
|
85
|
+
}),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export type SentenceNormalizationInputType = Schema.Schema.Type<typeof SentenceNormalizationInput>;
|
|
89
|
+
|
|
90
|
+
export const SentenceNormalizationOutput = Schema.Struct({
|
|
91
|
+
sentences: Schema.Array(MessageWithRangeId.pipe(Schema.mutable)).pipe(Schema.mutable).annotations({
|
|
92
|
+
description: 'The sentences of the transcript.',
|
|
93
|
+
}),
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
export const SentenceNormalization = Operation.make({
|
|
97
|
+
meta: {
|
|
98
|
+
key: DXN.make('org.dxos.function.transcription.sentenceNormalization'),
|
|
99
|
+
name: 'Sentence Normalization',
|
|
100
|
+
description: 'Post process of transcription for sentence normalization',
|
|
101
|
+
icon: 'ph--text-t--regular',
|
|
102
|
+
},
|
|
103
|
+
input: SentenceNormalizationInput,
|
|
104
|
+
output: SentenceNormalizationOutput,
|
|
105
|
+
services: [],
|
|
106
|
+
});
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
//
|
|
2
|
+
// Copyright 2025 DXOS.org
|
|
3
|
+
//
|
|
4
|
+
|
|
5
|
+
// @import-as-namespace
|
|
6
|
+
|
|
7
|
+
import { Capability } from '@dxos/app-framework';
|
|
8
|
+
|
|
9
|
+
import { meta } from '#meta';
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
type MediaStreamRecorderProps,
|
|
13
|
+
type Transcriber as TranscriberType,
|
|
14
|
+
type TranscriberProps,
|
|
15
|
+
type TranscriptMessageEnricher,
|
|
16
|
+
type TranscriptionManager as TranscriptionManagerType,
|
|
17
|
+
} from '../transcriber';
|
|
18
|
+
|
|
19
|
+
export type GetTranscriberProps = {
|
|
20
|
+
audioStreamTrack: MediaStreamTrack;
|
|
21
|
+
recorderConfig?: Partial<MediaStreamRecorderProps['config']>;
|
|
22
|
+
transcriberConfig?: Partial<TranscriberProps['config']>;
|
|
23
|
+
onSegments: TranscriberProps['onSegments'];
|
|
24
|
+
transcribe?: TranscriberProps['transcribe'];
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
export type GetTranscriber = (props: GetTranscriberProps) => TranscriberType;
|
|
28
|
+
|
|
29
|
+
export type GetTranscriptionManagerProps = {
|
|
30
|
+
messageEnricher?: TranscriptMessageEnricher;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type GetTranscriptionManager = (props: GetTranscriptionManagerProps) => TranscriptionManagerType;
|
|
34
|
+
|
|
35
|
+
export const Transcriber = Capability.make<GetTranscriber>(`${meta.id}.capability.transcriber`);
|
|
36
|
+
|
|
37
|
+
export const TranscriptionManager = Capability.make<GetTranscriptionManager>(
|
|
38
|
+
`${meta.id}.capability.transcription-manager`,
|
|
39
|
+
);
|
package/src/types/index.ts
CHANGED
|
@@ -2,7 +2,5 @@
|
|
|
2
2
|
// Copyright 2025 DXOS.org
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
export * from './
|
|
6
|
-
export * as
|
|
7
|
-
export { TranscriptOperation } from './TranscriptAction';
|
|
8
|
-
export * from './types';
|
|
5
|
+
export * as TranscriptionCapabilities from './TranscriptionCapabilities';
|
|
6
|
+
export * as TranscriptOperation from './TranscriptOperation';
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Transcription,
|
|
3
|
-
useQueueModelAdapter
|
|
4
|
-
} from "./chunk-XLMRCOQN.mjs";
|
|
5
|
-
import {
|
|
6
|
-
renderByline
|
|
7
|
-
} from "./chunk-HOOPZ7EM.mjs";
|
|
8
|
-
import "./chunk-GH4IIQ6C.mjs";
|
|
9
|
-
import "./chunk-2B74LZZD.mjs";
|
|
10
|
-
import "./chunk-J5LGTIGS.mjs";
|
|
11
|
-
|
|
12
|
-
// src/containers/TranscriptionContainer/TranscriptionContainer.tsx
|
|
13
|
-
import React from "react";
|
|
14
|
-
import { Obj } from "@dxos/echo";
|
|
15
|
-
import { useMembers, useQueue } from "@dxos/react-client/echo";
|
|
16
|
-
import { Panel } from "@dxos/react-ui";
|
|
17
|
-
var TranscriptionContainer = ({ role, subject: transcript }) => {
|
|
18
|
-
const attendableId = Obj.getDXN(transcript).toString();
|
|
19
|
-
const db = Obj.getDatabase(transcript);
|
|
20
|
-
const members = useMembers(db?.spaceId).map((member) => member.identity);
|
|
21
|
-
const queue = useQueue(transcript.queue.dxn, {
|
|
22
|
-
pollInterval: 1e3
|
|
23
|
-
});
|
|
24
|
-
const model = useQueueModelAdapter(renderByline(members), queue);
|
|
25
|
-
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
26
|
-
role
|
|
27
|
-
}, /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
28
|
-
asChild: true
|
|
29
|
-
}, /* @__PURE__ */ React.createElement(Transcription, {
|
|
30
|
-
attendableId,
|
|
31
|
-
model,
|
|
32
|
-
transcript
|
|
33
|
-
})));
|
|
34
|
-
};
|
|
35
|
-
|
|
36
|
-
// src/containers/TranscriptionContainer/index.ts
|
|
37
|
-
var TranscriptionContainer_default = TranscriptionContainer;
|
|
38
|
-
export {
|
|
39
|
-
TranscriptionContainer_default as default
|
|
40
|
-
};
|
|
41
|
-
//# sourceMappingURL=TranscriptionContainer-RBFHP2AV.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/containers/TranscriptionContainer/TranscriptionContainer.tsx", "../../../src/containers/TranscriptionContainer/index.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type SurfaceComponentProps } from '@dxos/app-toolkit/ui';\nimport { Obj } from '@dxos/echo';\nimport { useMembers, useQueue } from '@dxos/react-client/echo';\nimport { Panel } from '@dxos/react-ui';\nimport { type Message, type Transcript } from '@dxos/types';\n\nimport { Transcription } from '../../components';\nimport { useQueueModelAdapter } from '../../hooks';\nimport { renderByline } from '../../util';\n\nexport type TranscriptionContainerProps = SurfaceComponentProps<Transcript.Transcript>;\n\nexport const TranscriptionContainer = ({ role, subject: transcript }: TranscriptionContainerProps) => {\n const attendableId = Obj.getDXN(transcript).toString();\n const db = Obj.getDatabase(transcript);\n const members = useMembers(db?.spaceId).map((member) => member.identity);\n const queue = useQueue<Message.Message>(transcript.queue.dxn, { pollInterval: 1_000 });\n const model = useQueueModelAdapter(renderByline(members), queue);\n\n return (\n <Panel.Root role={role}>\n <Panel.Content asChild>\n <Transcription attendableId={attendableId} model={model} transcript={transcript} />\n </Panel.Content>\n </Panel.Root>\n );\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { TranscriptionContainer } from './TranscriptionContainer';\n\nexport default TranscriptionContainer;\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,WAAW;AACpB,SAASC,YAAYC,gBAAgB;AACrC,SAASC,aAAa;AASf,IAAMC,yBAAyB,CAAC,EAAEC,MAAMC,SAASC,WAAU,MAA+B;AAC/F,QAAMC,eAAeC,IAAIC,OAAOH,UAAAA,EAAYI,SAAQ;AACpD,QAAMC,KAAKH,IAAII,YAAYN,UAAAA;AAC3B,QAAMO,UAAUC,WAAWH,IAAII,OAAAA,EAASC,IAAI,CAACC,WAAWA,OAAOC,QAAQ;AACvE,QAAMC,QAAQC,SAA0Bd,WAAWa,MAAME,KAAK;IAAEC,cAAc;EAAM,CAAA;AACpF,QAAMC,QAAQC,qBAAqBC,aAAaZ,OAAAA,GAAUM,KAAAA;AAE1D,SACE,sBAAA,cAACO,MAAMC,MAAI;IAACvB;KACV,sBAAA,cAACsB,MAAME,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACC,eAAAA;IAAcvB;IAA4BgB;IAAcjB;;AAIjE;;;AC1BA,IAAA,iCAAeyB;",
|
|
6
|
-
"names": ["React", "Obj", "useMembers", "useQueue", "Panel", "TranscriptionContainer", "role", "subject", "transcript", "attendableId", "Obj", "getDXN", "toString", "db", "getDatabase", "members", "useMembers", "spaceId", "map", "member", "identity", "queue", "useQueue", "dxn", "pollInterval", "model", "useQueueModelAdapter", "renderByline", "Panel", "Root", "Content", "asChild", "Transcription", "TranscriptionContainer"]
|
|
7
|
-
}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/capabilities/blueprint-definition/blueprint-definition.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\n\nimport { TranscriptionBlueprint } from '../../blueprints';\n\nconst blueprintDefinition = Capability.makeModule<\n [],\n Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]\n>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, TranscriptionBlueprint)]));\n\nexport default blueprintDefinition;\n"],
|
|
5
|
-
"mappings": ";;;;;;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAIhC,IAAMC,sBAAsBC,WAAWC,WAGrC,MAAaC,eAAQ;EAACF,WAAWG,YAAYC,gBAAgBC,qBAAqBC,+BAAAA;CAAwB,CAAA;AAE5G,IAAA,+BAAeP;",
|
|
6
|
-
"names": ["Effect", "Capability", "AppCapabilities", "blueprintDefinition", "Capability", "makeModule", "succeed", "contributes", "AppCapabilities", "BlueprintDefinition", "TranscriptionBlueprint"]
|
|
7
|
-
}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
// src/meta.ts
|
|
2
|
-
import { trim } from "@dxos/util";
|
|
3
|
-
var meta = {
|
|
4
|
-
id: "dxos.org/plugin/transcription",
|
|
5
|
-
name: "Transcription",
|
|
6
|
-
description: trim`
|
|
7
|
-
Real-time voice-to-text transcription service for capturing spoken content.
|
|
8
|
-
Convert audio input into searchable text that integrates seamlessly with notes and documents.
|
|
9
|
-
`,
|
|
10
|
-
icon: "ph--microphone--regular",
|
|
11
|
-
iconHue: "sky",
|
|
12
|
-
source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transcription",
|
|
13
|
-
tags: [
|
|
14
|
-
"labs"
|
|
15
|
-
],
|
|
16
|
-
screenshots: []
|
|
17
|
-
};
|
|
18
|
-
|
|
19
|
-
export {
|
|
20
|
-
meta
|
|
21
|
-
};
|
|
22
|
-
//# sourceMappingURL=chunk-2B74LZZD.mjs.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../../src/meta.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { type Plugin } from '@dxos/app-framework';\nimport { trim } from '@dxos/util';\n\nexport const meta: Plugin.Meta = {\n id: 'dxos.org/plugin/transcription',\n name: 'Transcription',\n description: trim`\n Real-time voice-to-text transcription service for capturing spoken content.\n Convert audio input into searchable text that integrates seamlessly with notes and documents.\n `,\n icon: 'ph--microphone--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transcription',\n tags: ['labs'],\n screenshots: [],\n};\n"],
|
|
5
|
-
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,aAAaC;;;;EAIbC,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa,CAAA;AACf;",
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "trim", "icon", "iconHue", "source", "tags", "screenshots"]
|
|
7
|
-
}
|