@dxos/plugin-transcription 0.8.4-main.4a85c3132b → 0.8.4-main.4f23b4e393
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/neutral/TranscriptionContainer-7XF7IS4X.mjs +33 -0
- package/dist/lib/neutral/TranscriptionContainer-7XF7IS4X.mjs.map +7 -0
- package/dist/lib/neutral/TranscriptionPlugin.mjs +34 -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/{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-CHWQ3RBF.mjs +224 -0
- package/dist/lib/neutral/chunk-CHWQ3RBF.mjs.map +7 -0
- package/dist/lib/{browser/chunk-2B74LZZD.mjs → neutral/chunk-GL4RS533.mjs} +2 -2
- package/dist/lib/{browser/chunk-2B74LZZD.mjs.map → neutral/chunk-GL4RS533.mjs.map} +3 -3
- package/dist/lib/{browser/chunk-HOOPZ7EM.mjs → neutral/chunk-KAEXRX3Y.mjs} +1 -1
- package/dist/lib/neutral/chunk-KG6BVY54.mjs +8 -0
- package/dist/lib/neutral/chunk-KG6BVY54.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-NNR3EYR2.mjs +124 -0
- package/dist/lib/neutral/chunk-NNR3EYR2.mjs.map +7 -0
- package/dist/lib/{browser/chunk-EV5ZYKET.mjs → neutral/chunk-OZAZ2HDJ.mjs} +86 -111
- package/dist/lib/neutral/chunk-OZAZ2HDJ.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 +207 -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-2D6S4IMQ.mjs +21 -0
- package/dist/lib/neutral/create-2D6S4IMQ.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +17 -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-2QB6IIET.mjs +27 -0
- package/dist/lib/neutral/open-2QB6IIET.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-QF4MUMWG.mjs +26 -0
- package/dist/lib/neutral/react-surface-QF4MUMWG.mjs.map +7 -0
- package/dist/lib/neutral/summarize-ZJOKF5UO.mjs +78 -0
- package/dist/lib/neutral/summarize-ZJOKF5UO.mjs.map +7 -0
- package/dist/lib/neutral/text-content-F4ASMITB.mjs +30 -0
- package/dist/lib/neutral/text-content-F4ASMITB.mjs.map +7 -0
- package/dist/lib/{browser/transcriber-WCPHHJYY.mjs → neutral/transcriber-WOYMMM3T.mjs} +8 -10
- package/dist/lib/neutral/transcriber-WOYMMM3T.mjs.map +7 -0
- package/dist/lib/neutral/translations.mjs +22 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +12 -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/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/Transcription/Transcription.d.ts +5 -4
- package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -1
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts +12 -12
- 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 +3 -3
- package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +1 -1
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts +1 -2
- package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +1 -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/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/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/{segments-normalization → normalization}/normalization.d.ts +330 -321
- 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/{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/{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 → stories}/MicrophoneTranscription.stories.d.ts +3 -3
- 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 +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 +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 +6 -4
- 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/TranscriptOperation.d.ts +917 -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/{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 +3 -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 +134 -81
- package/src/TranscriptionPlugin.node.ts +20 -0
- package/src/TranscriptionPlugin.test.ts +31 -0
- package/src/TranscriptionPlugin.tsx +8 -29
- 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/Transcription/Transcription.stories.tsx +41 -34
- package/src/components/Transcription/Transcription.tsx +30 -29
- package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +15 -11
- package/src/containers/TranscriptionContainer/index.ts +1 -3
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useFeedModelAdapter.ts +46 -0
- package/src/hooks/useTranscriber.ts +5 -2
- package/src/hooks/useVoiceInput.ts +0 -1
- package/src/index.ts +4 -5
- package/src/meta.ts +1 -1
- package/src/model/model.test.ts +6 -6
- 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/{components/stories → stories}/FileTranscription.stories.tsx +40 -66
- package/src/{components/stories → stories}/KeyWordRecognition.stories.tsx +32 -30
- package/src/{components/stories → stories}/MicrophoneTranscription.stories.tsx +25 -46
- package/src/stories/TranscriptionStory.tsx +93 -0
- package/src/testing/testing.ts +28 -45
- 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 +94 -53
- package/src/transcriber/transcription-manager.ts +14 -9
- package/src/translations.ts +7 -7
- package/src/types/TranscriptOperation.ts +103 -0
- package/src/types/TranscriptionCapabilities.ts +39 -0
- package/src/types/index.ts +4 -4
- 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-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.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/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.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.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/TranscriptionStory.tsx +0 -41
- 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/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/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}/utils.ts +0 -0
- /package/src/{components/stories → stories}/useIsSpeaking.tsx +0 -0
- /package/src/types/{types.ts → defs.ts} +0 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import {
|
|
2
|
+
renderByline
|
|
3
|
+
} from "./chunk-KAEXRX3Y.mjs";
|
|
4
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
5
|
+
|
|
6
|
+
// src/containers/TranscriptionContainer/TranscriptionContainer.tsx
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { Filter, Obj, Query } from "@dxos/echo";
|
|
9
|
+
import { useMembers, useQuery } from "@dxos/react-client/echo";
|
|
10
|
+
import { Panel } from "@dxos/react-ui";
|
|
11
|
+
import { Message } from "@dxos/types";
|
|
12
|
+
import { Transcription } from "#components";
|
|
13
|
+
import { useFeedModelAdapter } from "#hooks";
|
|
14
|
+
var TranscriptionContainer = ({ role, subject: transcript, attendableId }) => {
|
|
15
|
+
const db = Obj.getDatabase(transcript);
|
|
16
|
+
const members = useMembers(db?.spaceId).map((member) => member.identity);
|
|
17
|
+
const feed = transcript.feed.target;
|
|
18
|
+
const messages = useQuery(db, feed ? Query.select(Filter.type(Message.Message)).from(feed) : Query.select(Filter.nothing()));
|
|
19
|
+
const model = useFeedModelAdapter(renderByline(members), messages);
|
|
20
|
+
return /* @__PURE__ */ React.createElement(Panel.Root, {
|
|
21
|
+
role
|
|
22
|
+
}, /* @__PURE__ */ React.createElement(Panel.Content, {
|
|
23
|
+
asChild: true
|
|
24
|
+
}, /* @__PURE__ */ React.createElement(Transcription, {
|
|
25
|
+
attendableId,
|
|
26
|
+
model,
|
|
27
|
+
transcript
|
|
28
|
+
})));
|
|
29
|
+
};
|
|
30
|
+
export {
|
|
31
|
+
TranscriptionContainer as default
|
|
32
|
+
};
|
|
33
|
+
//# sourceMappingURL=TranscriptionContainer-7XF7IS4X.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/containers/TranscriptionContainer/TranscriptionContainer.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport React from 'react';\n\nimport { type AppSurface } from '@dxos/app-toolkit/ui';\nimport { Filter, Obj, Query } from '@dxos/echo';\nimport { useMembers, useQuery } from '@dxos/react-client/echo';\nimport { Panel } from '@dxos/react-ui';\nimport { Message, type Transcript } from '@dxos/types';\n\nimport { Transcription } from '#components';\nimport { useFeedModelAdapter } from '#hooks';\n\nimport { renderByline } from '../../util';\n\nexport type TranscriptionContainerProps = AppSurface.ObjectArticleProps<Transcript.Transcript>;\n\nexport const TranscriptionContainer = ({ role, subject: transcript, attendableId }: TranscriptionContainerProps) => {\n const db = Obj.getDatabase(transcript);\n const members = useMembers(db?.spaceId).map((member) => member.identity);\n const feed = transcript.feed.target;\n const messages = useQuery(\n db,\n feed ? Query.select(Filter.type(Message.Message)).from(feed) : Query.select(Filter.nothing()),\n );\n const model = useFeedModelAdapter(renderByline(members), messages);\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"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,OAAOA,WAAW;AAGlB,SAASC,QAAQC,KAAKC,aAAa;AACnC,SAASC,YAAYC,gBAAgB;AACrC,SAASC,aAAa;AACtB,SAASC,eAAgC;AAEzC,SAASC,qBAAqB;AAC9B,SAASC,2BAA2B;AAM7B,IAAMC,yBAAyB,CAAC,EAAEC,MAAMC,SAASC,YAAYC,aAAY,MAA+B;AAC7G,QAAMC,KAAKC,IAAIC,YAAYJ,UAAAA;AAC3B,QAAMK,UAAUC,WAAWJ,IAAIK,OAAAA,EAASC,IAAI,CAACC,WAAWA,OAAOC,QAAQ;AACvE,QAAMC,OAAOX,WAAWW,KAAKC;AAC7B,QAAMC,WAAWC,SACfZ,IACAS,OAAOI,MAAMC,OAAOC,OAAOC,KAAKC,QAAQA,OAAO,CAAA,EAAGC,KAAKT,IAAAA,IAAQI,MAAMC,OAAOC,OAAOI,QAAO,CAAA,CAAA;AAE5F,QAAMC,QAAQC,oBAAoBC,aAAanB,OAAAA,GAAUQ,QAAAA;AAEzD,SACE,sBAAA,cAACY,MAAMC,MAAI;IAAC5B;KACV,sBAAA,cAAC2B,MAAME,SAAO;IAACC,SAAAA;KACb,sBAAA,cAACC,eAAAA;IAAc5B;IAA4BqB;IAActB;;AAIjE;",
|
|
6
|
+
"names": ["React", "Filter", "Obj", "Query", "useMembers", "useQuery", "Panel", "Message", "Transcription", "useFeedModelAdapter", "TranscriptionContainer", "role", "subject", "transcript", "attendableId", "db", "Obj", "getDatabase", "members", "useMembers", "spaceId", "map", "member", "identity", "feed", "target", "messages", "useQuery", "Query", "select", "Filter", "type", "Message", "from", "nothing", "model", "useFeedModelAdapter", "renderByline", "Panel", "Root", "Content", "asChild", "Transcription"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/TranscriptionPlugin.tsx
|
|
4
|
+
import { Plugin } from "@dxos/app-framework";
|
|
5
|
+
import { AppActivationEvents, AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
+
import { Transcript } from "@dxos/types";
|
|
7
|
+
import { BlueprintDefinition, OperationHandler, ReactSurface, TextContent, Transcriber } from "#capabilities";
|
|
8
|
+
import { meta } from "#meta";
|
|
9
|
+
import { translations } from "#translations";
|
|
10
|
+
var TranscriptionPlugin = Plugin.define(meta).pipe(AppPlugin.addBlueprintDefinitionModule({
|
|
11
|
+
activate: BlueprintDefinition
|
|
12
|
+
}), AppPlugin.addTextContentModule({
|
|
13
|
+
activate: TextContent
|
|
14
|
+
}), AppPlugin.addOperationHandlerModule({
|
|
15
|
+
activate: OperationHandler
|
|
16
|
+
}), AppPlugin.addSchemaModule({
|
|
17
|
+
schema: [
|
|
18
|
+
Transcript.Transcript
|
|
19
|
+
]
|
|
20
|
+
}), AppPlugin.addSurfaceModule({
|
|
21
|
+
activate: ReactSurface
|
|
22
|
+
}), AppPlugin.addTranslationsModule({
|
|
23
|
+
translations
|
|
24
|
+
}), Plugin.addModule({
|
|
25
|
+
id: "transcription",
|
|
26
|
+
activatesOn: AppActivationEvents.SetupAppGraph,
|
|
27
|
+
activate: Transcriber
|
|
28
|
+
}), Plugin.make);
|
|
29
|
+
var TranscriptionPlugin_default = TranscriptionPlugin;
|
|
30
|
+
export {
|
|
31
|
+
TranscriptionPlugin,
|
|
32
|
+
TranscriptionPlugin_default as default
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=TranscriptionPlugin.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/TranscriptionPlugin.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { Transcript } from '@dxos/types';\n\nimport { BlueprintDefinition, OperationHandler, ReactSurface, TextContent, Transcriber } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\nexport const TranscriptionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addTextContentModule({ activate: TextContent }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'transcription',\n activatesOn: AppActivationEvents.SetupAppGraph,\n activate: Transcriber,\n }),\n Plugin.make,\n);\n\nexport default TranscriptionPlugin;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,kBAAkB;AAE3B,SAASC,qBAAqBC,kBAAkBC,cAAcC,aAAaC,mBAAmB;AAC9F,SAASC,YAAY;AACrB,SAASC,oBAAoB;AAEtB,IAAMC,sBAAsBX,OAAOY,OAAOH,IAAAA,EAAMI,KACrDX,UAAUY,6BAA6B;EAAEC,UAAUX;AAAoB,CAAA,GACvEF,UAAUc,qBAAqB;EAAED,UAAUR;AAAY,CAAA,GACvDL,UAAUe,0BAA0B;EAAEF,UAAUV;AAAiB,CAAA,GACjEH,UAAUgB,gBAAgB;EAAEC,QAAQ;IAAChB,WAAWA;;AAAY,CAAA,GAC5DD,UAAUkB,iBAAiB;EAAEL,UAAUT;AAAa,CAAA,GACpDJ,UAAUmB,sBAAsB;EAAEX;AAAa,CAAA,GAC/CV,OAAOsB,UAAU;EACfC,IAAI;EACJC,aAAavB,oBAAoBwB;EACjCV,UAAUP;AACZ,CAAA,GACAR,OAAO0B,IAAI;AAGb,IAAA,8BAAef;",
|
|
6
|
+
"names": ["Plugin", "AppActivationEvents", "AppPlugin", "Transcript", "BlueprintDefinition", "OperationHandler", "ReactSurface", "TextContent", "Transcriber", "meta", "translations", "TranscriptionPlugin", "define", "pipe", "addBlueprintDefinitionModule", "activate", "addTextContentModule", "addOperationHandlerModule", "addSchemaModule", "schema", "addSurfaceModule", "addTranslationsModule", "addModule", "id", "activatesOn", "SetupAppGraph", "make"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/TranscriptionPlugin.node.ts
|
|
4
|
+
import { Plugin } from "@dxos/app-framework";
|
|
5
|
+
import { AppPlugin } from "@dxos/app-toolkit";
|
|
6
|
+
import { Transcript } from "@dxos/types";
|
|
7
|
+
import { BlueprintDefinition, OperationHandler, TextContent } from "#capabilities";
|
|
8
|
+
import { meta } from "#meta";
|
|
9
|
+
var TranscriptionPlugin = Plugin.define(meta).pipe(AppPlugin.addBlueprintDefinitionModule({
|
|
10
|
+
activate: BlueprintDefinition
|
|
11
|
+
}), AppPlugin.addTextContentModule({
|
|
12
|
+
activate: TextContent
|
|
13
|
+
}), AppPlugin.addOperationHandlerModule({
|
|
14
|
+
activate: OperationHandler
|
|
15
|
+
}), AppPlugin.addSchemaModule({
|
|
16
|
+
schema: [
|
|
17
|
+
Transcript.Transcript
|
|
18
|
+
]
|
|
19
|
+
}), Plugin.make);
|
|
20
|
+
var TranscriptionPlugin_node_default = TranscriptionPlugin;
|
|
21
|
+
export {
|
|
22
|
+
TranscriptionPlugin,
|
|
23
|
+
TranscriptionPlugin_node_default as default
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=TranscriptionPlugin.node.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/TranscriptionPlugin.node.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Transcript } from '@dxos/types';\n\nimport { BlueprintDefinition, OperationHandler, TextContent } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const TranscriptionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addTextContentModule({ activate: TextContent }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),\n Plugin.make,\n);\n\nexport default TranscriptionPlugin;\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAE3B,SAASC,qBAAqBC,kBAAkBC,mBAAmB;AACnE,SAASC,YAAY;AAEd,IAAMC,sBAAsBP,OAAOQ,OAAOF,IAAAA,EAAMG,KACrDR,UAAUS,6BAA6B;EAAEC,UAAUR;AAAoB,CAAA,GACvEF,UAAUW,qBAAqB;EAAED,UAAUN;AAAY,CAAA,GACvDJ,UAAUY,0BAA0B;EAAEF,UAAUP;AAAiB,CAAA,GACjEH,UAAUa,gBAAgB;EAAEC,QAAQ;IAACb,WAAWA;;AAAY,CAAA,GAC5DF,OAAOgB,IAAI;AAGb,IAAA,mCAAeT;",
|
|
6
|
+
"names": ["Plugin", "AppPlugin", "Transcript", "BlueprintDefinition", "OperationHandler", "TextContent", "meta", "TranscriptionPlugin", "define", "pipe", "addBlueprintDefinitionModule", "activate", "addTextContentModule", "addOperationHandlerModule", "addSchemaModule", "schema", "make"]
|
|
7
|
+
}
|
|
@@ -1,18 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
transcription_blueprint_default
|
|
3
|
-
} from "./chunk-O7ILGNBZ.mjs";
|
|
4
|
-
import "./chunk-HOOPZ7EM.mjs";
|
|
5
1
|
import "./chunk-J5LGTIGS.mjs";
|
|
6
2
|
|
|
7
|
-
// src/capabilities/blueprint-definition
|
|
3
|
+
// src/capabilities/blueprint-definition.ts
|
|
8
4
|
import * as Effect from "effect/Effect";
|
|
9
5
|
import { Capability } from "@dxos/app-framework";
|
|
10
6
|
import { AppCapabilities } from "@dxos/app-toolkit";
|
|
7
|
+
import { TranscriptionBlueprint } from "#blueprints";
|
|
11
8
|
var blueprintDefinition = Capability.makeModule(() => Effect.succeed([
|
|
12
|
-
Capability.contributes(AppCapabilities.BlueprintDefinition,
|
|
9
|
+
Capability.contributes(AppCapabilities.BlueprintDefinition, TranscriptionBlueprint)
|
|
13
10
|
]));
|
|
14
11
|
var blueprint_definition_default = blueprintDefinition;
|
|
15
12
|
export {
|
|
16
13
|
blueprint_definition_default as default
|
|
17
14
|
};
|
|
18
|
-
//# sourceMappingURL=blueprint-definition-
|
|
15
|
+
//# sourceMappingURL=blueprint-definition-HOXDG5QP.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/capabilities/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// eslint-disable-next-line unused-imports/no-unused-imports\nimport type { Blueprint } from '@dxos/compute';\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,SAASC,8BAA8B;AAEvC,IAAMC,sBAAsBH,WAAWI,WAGrC,MAAaC,eAAQ;EAACL,WAAWM,YAAYL,gBAAgBM,qBAAqBL,sBAAAA;CAAwB,CAAA;AAE5G,IAAA,+BAAeC;",
|
|
6
|
+
"names": ["Effect", "Capability", "AppCapabilities", "TranscriptionBlueprint", "blueprintDefinition", "makeModule", "succeed", "contributes", "BlueprintDefinition"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import "../chunk-J5LGTIGS.mjs";
|
|
2
|
+
|
|
3
|
+
// src/capabilities/index.ts
|
|
4
|
+
import { Capability } from "@dxos/app-framework";
|
|
5
|
+
var BlueprintDefinition = Capability.lazy("BlueprintDefinition", () => import("../blueprint-definition-HOXDG5QP.mjs"));
|
|
6
|
+
var TextContent = Capability.lazy("TextContent", () => import("../text-content-F4ASMITB.mjs"));
|
|
7
|
+
var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-NXMOAXFP.mjs"));
|
|
8
|
+
var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-QF4MUMWG.mjs"));
|
|
9
|
+
var Transcriber = Capability.lazy("Transcriber", () => import("../transcriber-WOYMMM3T.mjs"));
|
|
10
|
+
export {
|
|
11
|
+
BlueprintDefinition,
|
|
12
|
+
OperationHandler,
|
|
13
|
+
ReactSurface,
|
|
14
|
+
TextContent,
|
|
15
|
+
Transcriber
|
|
16
|
+
};
|
|
17
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../../src/capabilities/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport type { Blueprint, OperationHandlerSet } from '@dxos/compute';\n\nexport const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));\nexport const TextContent = Capability.lazy('TextContent', () => import('./text-content'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const Transcriber = Capability.lazy('Transcriber', () => import('./transcriber'));\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,kBAAkB;AAIpB,IAAMC,sBAAsBD,WAAWE,KAAK,uBAAuB,MAAM,OAAO,sCAAA,CAAA;AAChF,IAAMC,cAAcH,WAAWE,KAAK,eAAe,MAAM,OAAO,8BAAA,CAAA;AAChE,IAAME,mBAAmBJ,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;AAER,IAAMG,eAAeL,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMI,cAAcN,WAAWE,KAAK,eAAe,MAAM,OAAO,6BAAA,CAAA;",
|
|
6
|
+
"names": ["Capability", "BlueprintDefinition", "lazy", "TextContent", "OperationHandler", "ReactSurface", "Transcriber"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SerializationModel
|
|
3
|
+
} from "./chunk-MLRJWAQH.mjs";
|
|
4
|
+
|
|
5
|
+
// src/hooks/useAudioFile.ts
|
|
6
|
+
import { useEffect, useState } from "react";
|
|
7
|
+
import { scheduleTask } from "@dxos/async";
|
|
8
|
+
import { Context } from "@dxos/context";
|
|
9
|
+
import { log } from "@dxos/log";
|
|
10
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-transcription/src/hooks/useAudioFile.ts";
|
|
11
|
+
var useAudioFile = (audioUrl, constraints) => {
|
|
12
|
+
const [{ audio, stream, track }, setStream] = useState({});
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const ctx = new Context(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 11 });
|
|
15
|
+
scheduleTask(ctx, async () => {
|
|
16
|
+
try {
|
|
17
|
+
const response = await fetch(audioUrl);
|
|
18
|
+
const blob = await response.blob();
|
|
19
|
+
const objectUrl = URL.createObjectURL(blob);
|
|
20
|
+
ctx.onDispose(() => {
|
|
21
|
+
URL.revokeObjectURL(objectUrl);
|
|
22
|
+
});
|
|
23
|
+
const audio2 = new Audio();
|
|
24
|
+
audio2.src = objectUrl;
|
|
25
|
+
await new Promise((resolve, reject) => {
|
|
26
|
+
audio2.addEventListener("error", (err) => {
|
|
27
|
+
log.error("error", {
|
|
28
|
+
err
|
|
29
|
+
}, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 25, S: void 0 });
|
|
30
|
+
reject(err);
|
|
31
|
+
}, {
|
|
32
|
+
once: true
|
|
33
|
+
});
|
|
34
|
+
audio2.addEventListener("canplay", async () => {
|
|
35
|
+
resolve();
|
|
36
|
+
}, {
|
|
37
|
+
once: true
|
|
38
|
+
});
|
|
39
|
+
audio2.load();
|
|
40
|
+
});
|
|
41
|
+
const audioCtx = new AudioContext();
|
|
42
|
+
if (audioCtx.state === "suspended") {
|
|
43
|
+
await audioCtx.resume();
|
|
44
|
+
}
|
|
45
|
+
const destination = audioCtx.createMediaStreamDestination();
|
|
46
|
+
destination.channelCount = 1;
|
|
47
|
+
const source = audioCtx.createMediaElementSource(audio2);
|
|
48
|
+
source.connect(destination);
|
|
49
|
+
const track2 = destination.stream.getAudioTracks()[0];
|
|
50
|
+
if (constraints) {
|
|
51
|
+
await track2.applyConstraints(constraints).catch((err) => log.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 50, S: void 0 }));
|
|
52
|
+
}
|
|
53
|
+
setStream({
|
|
54
|
+
audio: audio2,
|
|
55
|
+
stream: destination.stream,
|
|
56
|
+
track: destination.stream.getAudioTracks()[0]
|
|
57
|
+
});
|
|
58
|
+
} catch (err) {
|
|
59
|
+
log.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 59, S: void 0 });
|
|
60
|
+
}
|
|
61
|
+
});
|
|
62
|
+
return () => {
|
|
63
|
+
void ctx.dispose();
|
|
64
|
+
};
|
|
65
|
+
}, [
|
|
66
|
+
audioUrl
|
|
67
|
+
]);
|
|
68
|
+
return {
|
|
69
|
+
audio,
|
|
70
|
+
stream,
|
|
71
|
+
track
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
|
|
75
|
+
// src/hooks/useAudioTrack.ts
|
|
76
|
+
import { useEffect as useEffect2, useState as useState2 } from "react";
|
|
77
|
+
var useAudioTrack = (active, constraints) => {
|
|
78
|
+
const [track, setTrack] = useState2();
|
|
79
|
+
useEffect2(() => {
|
|
80
|
+
if (!active) {
|
|
81
|
+
track?.stop();
|
|
82
|
+
setTrack(void 0);
|
|
83
|
+
return;
|
|
84
|
+
}
|
|
85
|
+
const initAudio = async () => {
|
|
86
|
+
const audio = new Audio();
|
|
87
|
+
audio.srcObject = await navigator.mediaDevices.getUserMedia({
|
|
88
|
+
audio: constraints ?? true
|
|
89
|
+
});
|
|
90
|
+
const [track2] = audio.srcObject.getAudioTracks();
|
|
91
|
+
if (track2) {
|
|
92
|
+
setTrack(track2);
|
|
93
|
+
}
|
|
94
|
+
};
|
|
95
|
+
if (active) {
|
|
96
|
+
void initAudio();
|
|
97
|
+
}
|
|
98
|
+
}, [
|
|
99
|
+
active
|
|
100
|
+
]);
|
|
101
|
+
return track;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
// src/hooks/useFeedModelAdapter.ts
|
|
105
|
+
import { useEffect as useEffect3, useMemo } from "react";
|
|
106
|
+
var useFeedModelAdapter = (renderer, objects, initialChunks = []) => {
|
|
107
|
+
const model = useMemo(() => new SerializationModel(renderer, initialChunks), [
|
|
108
|
+
renderer
|
|
109
|
+
]);
|
|
110
|
+
useEffect3(() => {
|
|
111
|
+
for (const chunk of objects) {
|
|
112
|
+
model.appendChunk(chunk);
|
|
113
|
+
}
|
|
114
|
+
}, [
|
|
115
|
+
model,
|
|
116
|
+
objects
|
|
117
|
+
]);
|
|
118
|
+
useEffect3(() => {
|
|
119
|
+
if (model.chunks.length === objects.length) {
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const chunk = objects.at(-1);
|
|
123
|
+
if (chunk) {
|
|
124
|
+
model.appendChunk(chunk);
|
|
125
|
+
}
|
|
126
|
+
}, [
|
|
127
|
+
model,
|
|
128
|
+
objects.length
|
|
129
|
+
]);
|
|
130
|
+
return model;
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
// src/hooks/useTranscriber.ts
|
|
134
|
+
import { useEffect as useEffect4, useMemo as useMemo2 } from "react";
|
|
135
|
+
import { useCapabilities } from "@dxos/app-framework/ui";
|
|
136
|
+
import { TranscriptionCapabilities } from "#types";
|
|
137
|
+
var useTranscriber = ({ audioStreamTrack, recorderConfig, transcriberConfig, onSegments, transcribe }) => {
|
|
138
|
+
const [getTranscriber] = useCapabilities(TranscriptionCapabilities.Transcriber);
|
|
139
|
+
const transcriber = useMemo2(() => {
|
|
140
|
+
if (!getTranscriber || !audioStreamTrack || !onSegments) {
|
|
141
|
+
return void 0;
|
|
142
|
+
}
|
|
143
|
+
return getTranscriber({
|
|
144
|
+
audioStreamTrack,
|
|
145
|
+
recorderConfig,
|
|
146
|
+
transcriberConfig,
|
|
147
|
+
onSegments,
|
|
148
|
+
transcribe
|
|
149
|
+
});
|
|
150
|
+
}, [
|
|
151
|
+
getTranscriber,
|
|
152
|
+
audioStreamTrack,
|
|
153
|
+
recorderConfig,
|
|
154
|
+
transcriberConfig,
|
|
155
|
+
onSegments,
|
|
156
|
+
transcribe
|
|
157
|
+
]);
|
|
158
|
+
useEffect4(() => {
|
|
159
|
+
return () => {
|
|
160
|
+
void transcriber?.close();
|
|
161
|
+
};
|
|
162
|
+
}, [
|
|
163
|
+
transcriber
|
|
164
|
+
]);
|
|
165
|
+
return transcriber;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// src/hooks/useVoiceInput.ts
|
|
169
|
+
import { useCallback, useEffect as useEffect5, useState as useState3 } from "react";
|
|
170
|
+
import { scheduleMicroTask } from "@dxos/async";
|
|
171
|
+
import { Context as Context2 } from "@dxos/context";
|
|
172
|
+
import { log as log2 } from "@dxos/log";
|
|
173
|
+
import { useSoundEffect } from "@dxos/react-ui-sfx";
|
|
174
|
+
var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-transcription/src/hooks/useVoiceInput.ts";
|
|
175
|
+
var useVoiceInput = ({ active, onUpdate }) => {
|
|
176
|
+
const soundStart = useSoundEffect("StartRecording");
|
|
177
|
+
const soundStop = useSoundEffect("StopRecording");
|
|
178
|
+
const handleSegments = useCallback(async (segments) => {
|
|
179
|
+
const text = segments.map((str) => str.text.trim().replace(/[^\w\s]/g, "")).join(" ");
|
|
180
|
+
onUpdate(text);
|
|
181
|
+
}, []);
|
|
182
|
+
const [recording, setRecording] = useState3(false);
|
|
183
|
+
const track = useAudioTrack(active);
|
|
184
|
+
const transcriber = useTranscriber({
|
|
185
|
+
audioStreamTrack: track,
|
|
186
|
+
onSegments: handleSegments
|
|
187
|
+
});
|
|
188
|
+
useEffect5(() => {
|
|
189
|
+
const ctx = new Context2(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 29 });
|
|
190
|
+
scheduleMicroTask(ctx, async () => {
|
|
191
|
+
if (active && transcriber) {
|
|
192
|
+
await transcriber.open();
|
|
193
|
+
log2.info("starting...", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 33, S: void 0 });
|
|
194
|
+
setRecording(true);
|
|
195
|
+
void soundStart.play();
|
|
196
|
+
transcriber.startChunksRecording();
|
|
197
|
+
} else if (!active && transcriber?.isOpen) {
|
|
198
|
+
transcriber?.stopChunksRecording();
|
|
199
|
+
await transcriber?.close();
|
|
200
|
+
log2.info("stopped", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 40, S: void 0 });
|
|
201
|
+
setRecording(false);
|
|
202
|
+
void soundStop.play();
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
return () => {
|
|
206
|
+
void ctx.dispose();
|
|
207
|
+
};
|
|
208
|
+
}, [
|
|
209
|
+
active,
|
|
210
|
+
transcriber
|
|
211
|
+
]);
|
|
212
|
+
return {
|
|
213
|
+
recording
|
|
214
|
+
};
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
export {
|
|
218
|
+
useAudioFile,
|
|
219
|
+
useAudioTrack,
|
|
220
|
+
useFeedModelAdapter,
|
|
221
|
+
useTranscriber,
|
|
222
|
+
useVoiceInput
|
|
223
|
+
};
|
|
224
|
+
//# sourceMappingURL=chunk-CHWQ3RBF.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/hooks/useAudioFile.ts", "../../../src/hooks/useAudioTrack.ts", "../../../src/hooks/useFeedModelAdapter.ts", "../../../src/hooks/useTranscriber.ts", "../../../src/hooks/useVoiceInput.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { scheduleTask } from '@dxos/async';\nimport { Context } from '@dxos/context';\nimport { log } from '@dxos/log';\n\nexport type UseAudioState = {\n audio?: HTMLAudioElement;\n stream?: MediaStream;\n track?: MediaStreamTrack;\n};\n\nexport const useAudioFile = (audioUrl: string, constraints?: MediaTrackConstraints): UseAudioState => {\n const [{ audio, stream, track }, setStream] = useState<UseAudioState>({});\n useEffect(() => {\n const ctx = new Context();\n\n scheduleTask(ctx, async () => {\n // TODO(wittjosiah): Fetch to external url fails in headless storybook test.\n try {\n const response = await fetch(audioUrl);\n const blob = await response.blob();\n const objectUrl = URL.createObjectURL(blob);\n ctx.onDispose(() => {\n URL.revokeObjectURL(objectUrl);\n });\n\n const audio = new Audio();\n audio.src = objectUrl;\n\n await new Promise<void>((resolve, reject) => {\n audio.addEventListener(\n 'error',\n (err) => {\n log.error('error', { err });\n reject(err);\n },\n { once: true },\n );\n audio.addEventListener(\n 'canplay',\n async () => {\n resolve();\n },\n { once: true },\n );\n audio.load();\n });\n\n const audioCtx = new AudioContext();\n\n // Resume AudioContext if it's suspended.\n if (audioCtx.state === 'suspended') {\n await audioCtx.resume();\n }\n\n const destination = audioCtx.createMediaStreamDestination();\n destination.channelCount = 1;\n\n const source = audioCtx.createMediaElementSource(audio);\n source.connect(destination);\n const track = destination.stream.getAudioTracks()[0];\n if (constraints) {\n await track.applyConstraints(constraints).catch((err) => log.catch(err));\n }\n\n // Also connect to speakers so audio is audible.\n setStream({\n audio,\n stream: destination.stream,\n track: destination.stream.getAudioTracks()[0],\n });\n } catch (err) {\n log.catch(err);\n }\n });\n\n return () => {\n void ctx.dispose();\n };\n }, [audioUrl]);\n\n return { audio, stream, track };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\n/**\n *\n */\n// TODO(burdon): Reconcile with react-ui-sfx and plugin-calls.\nexport const useAudioTrack = (active?: boolean, constraints?: MediaTrackConstraints): MediaStreamTrack | undefined => {\n const [track, setTrack] = useState<MediaStreamTrack>();\n useEffect(() => {\n if (!active) {\n track?.stop();\n setTrack(undefined);\n return;\n }\n\n const initAudio = async () => {\n const audio = new Audio();\n audio.srcObject = await navigator.mediaDevices.getUserMedia({ audio: constraints ?? true });\n const [track] = audio.srcObject.getAudioTracks();\n if (track) {\n setTrack(track);\n }\n };\n\n if (active) {\n void initAudio();\n }\n }, [active]);\n\n return track;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useMemo } from 'react';\n\nimport type { Obj } from '@dxos/echo';\n\nimport { type ChunkRenderer, SerializationModel } from '../model';\n\n/**\n * Feeds an array of objects (typically from `useQuery(db, Query.from(feed))`) into a\n * `SerializationModel`, appending each new tail item as the array grows.\n *\n * @param renderer - chunk renderer.\n * @param objects - current snapshot of feed items.\n * @param initialChunks - chunks to seed the model with on first render.\n */\nexport const useFeedModelAdapter = <T extends Obj.Unknown>(\n renderer: ChunkRenderer<T>,\n objects: readonly T[],\n initialChunks: T[] = [],\n): SerializationModel<T> => {\n const model = useMemo(() => new SerializationModel<T>(renderer, initialChunks), [renderer]);\n\n // Seed the model with the current snapshot on first render and whenever the\n // identity of `objects` changes (e.g. feed swapped).\n useEffect(() => {\n for (const chunk of objects) {\n model.appendChunk(chunk);\n }\n }, [model, objects]);\n\n // Append new tail items as the array grows.\n useEffect(() => {\n if (model.chunks.length === objects.length) {\n return;\n }\n const chunk = objects.at(-1);\n if (chunk) {\n model.appendChunk(chunk);\n }\n }, [model, objects.length]);\n\n return model;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useMemo } from 'react';\n\nimport { useCapabilities } from '@dxos/app-framework/ui';\n\nimport { TranscriptionCapabilities } from '#types';\n\nimport { type Transcriber } from '../transcriber';\n\n/**\n * Records audio while user is speaking and transcribes it after user is done speaking.\n */\nexport const useTranscriber = ({\n audioStreamTrack,\n recorderConfig,\n transcriberConfig,\n onSegments,\n transcribe,\n}: Partial<TranscriptionCapabilities.GetTranscriberProps>) => {\n const [getTranscriber] = useCapabilities(TranscriptionCapabilities.Transcriber);\n\n // Initialize audio transcription.\n const transcriber = useMemo<Transcriber | undefined>(() => {\n if (!getTranscriber || !audioStreamTrack || !onSegments) {\n return undefined;\n }\n\n return getTranscriber({\n audioStreamTrack,\n recorderConfig,\n transcriberConfig,\n onSegments,\n transcribe,\n });\n }, [getTranscriber, audioStreamTrack, recorderConfig, transcriberConfig, onSegments, transcribe]);\n\n useEffect(() => {\n return () => {\n void transcriber?.close();\n };\n }, [transcriber]);\n\n return transcriber;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { scheduleMicroTask } from '@dxos/async';\nimport { Context } from '@dxos/context';\nimport { log } from '@dxos/log';\nimport { useSoundEffect } from '@dxos/react-ui-sfx';\n\nimport { type TranscriberProps } from '../transcriber';\nimport { useAudioTrack } from './useAudioTrack';\nimport { useTranscriber } from './useTranscriber';\n\nexport type UseVoiceInputProps = {\n active?: boolean;\n onUpdate: (text: string) => void;\n};\n\n/**\n * Hook for voice input.\n */\nexport const useVoiceInput = ({ active, onUpdate }: UseVoiceInputProps) => {\n const soundStart = useSoundEffect('StartRecording');\n const soundStop = useSoundEffect('StopRecording');\n\n const handleSegments = useCallback<TranscriberProps['onSegments']>(async (segments) => {\n const text = segments.map((str) => str.text.trim().replace(/[^\\w\\s]/g, '')).join(' ');\n onUpdate(text);\n }, []);\n\n // Audio/transcription.\n const [recording, setRecording] = useState(false);\n const track = useAudioTrack(active);\n const transcriber = useTranscriber({\n audioStreamTrack: track,\n onSegments: handleSegments,\n });\n\n // Start/stop transcription.\n useEffect(() => {\n const ctx = new Context();\n scheduleMicroTask(ctx, async () => {\n if (active && transcriber) {\n await transcriber.open();\n log.info('starting...');\n setRecording(true);\n void soundStart.play();\n transcriber.startChunksRecording();\n } else if (!active && transcriber?.isOpen) {\n transcriber?.stopChunksRecording();\n await transcriber?.close();\n log.info('stopped');\n setRecording(false);\n void soundStop.play();\n }\n });\n\n return () => {\n void ctx.dispose();\n };\n }, [active, transcriber]);\n\n return { recording };\n};\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": ["useEffect", "useState", "scheduleTask", "Context", "log", "useAudioFile", "objectUrl", "createObjectURL", "ctx", "onDispose", "URL", "revokeObjectURL", "audio", "Audio", "Promise", "resolve", "addEventListener", "err", "reject", "once", "audioCtx", "state", "destination", "source", "createMediaElementSource", "connect", "track", "constraints", "applyConstraints", "catch", "setStream", "stream", "audioUrl", "useEffect", "useState", "useAudioTrack", "active", "constraints", "track", "setTrack", "stop", "undefined", "initAudio", "audio", "Audio", "srcObject", "navigator", "mediaDevices", "getUserMedia", "getAudioTracks", "useEffect", "useMemo", "useFeedModelAdapter", "renderer", "objects", "initialChunks", "model", "useMemo", "SerializationModel", "useEffect", "chunk", "appendChunk", "chunks", "length", "at", "useEffect", "useMemo", "useCapabilities", "TranscriptionCapabilities", "useTranscriber", "audioStreamTrack", "recorderConfig", "transcriberConfig", "onSegments", "transcribe", "getTranscriber", "Transcriber", "transcriber", "undefined", "close", "useCallback", "useEffect", "useState", "scheduleMicroTask", "Context", "log", "useSoundEffect", "__dxlog_file", "soundStop", "useSoundEffect", "handleSegments", "useCallback", "segments", "str", "trim", "onUpdate", "text", "transcriber", "useTranscriber", "audioStreamTrack", "track", "onSegments", "useEffect", "scheduleMicroTask", "active", "log", "setRecording", "soundStart", "startChunksRecording", "stopChunksRecording", "close"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// src/meta.ts
|
|
2
2
|
import { trim } from "@dxos/util";
|
|
3
3
|
var meta = {
|
|
4
|
-
id: "dxos.
|
|
4
|
+
id: "org.dxos.plugin.transcription",
|
|
5
5
|
name: "Transcription",
|
|
6
6
|
description: trim`
|
|
7
7
|
Real-time voice-to-text transcription service for capturing spoken content.
|
|
@@ -19,4 +19,4 @@ var meta = {
|
|
|
19
19
|
export {
|
|
20
20
|
meta
|
|
21
21
|
};
|
|
22
|
-
//# sourceMappingURL=chunk-
|
|
22
|
+
//# sourceMappingURL=chunk-GL4RS533.mjs.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
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.
|
|
5
|
-
"mappings": ";AAKA,SAASA,YAAY;AAEd,IAAMC,OAAoB;EAC/BC,IAAI;EACJC,MAAM;EACNC,
|
|
6
|
-
"names": ["trim", "meta", "id", "name", "description", "
|
|
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: 'org.dxos.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,aAAaJ;;;;EAIbK,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;IAAC;;EACPC,aAAa,CAAA;AACf;",
|
|
6
|
+
"names": ["trim", "meta", "id", "name", "description", "icon", "iconHue", "source", "tags", "screenshots"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// src/operations/index.ts
|
|
2
|
+
import { OperationHandlerSet } from "@dxos/compute";
|
|
3
|
+
var TranscriptionOperationHandlerSet = OperationHandlerSet.lazy(() => import("./create-2D6S4IMQ.mjs"), () => import("./open-2QB6IIET.mjs"), () => import("./summarize-ZJOKF5UO.mjs"));
|
|
4
|
+
|
|
5
|
+
export {
|
|
6
|
+
TranscriptionOperationHandlerSet
|
|
7
|
+
};
|
|
8
|
+
//# sourceMappingURL=chunk-KG6BVY54.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/operations/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { OperationHandlerSet } from '@dxos/compute';\n\nexport const TranscriptionOperationHandlerSet = OperationHandlerSet.lazy(\n () => import('./create'),\n () => import('./open'),\n () => import('./summarize'),\n);\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,2BAA2B;AAE7B,IAAMC,mCAAmCD,oBAAoBE,KAClE,MAAM,OAAO,uBAAA,GACb,MAAM,OAAO,qBAAA,GACb,MAAM,OAAO,0BAAA,CAAA;",
|
|
6
|
+
"names": ["OperationHandlerSet", "TranscriptionOperationHandlerSet", "lazy"]
|
|
7
|
+
}
|