@dxos/plugin-transcription 0.8.4-main.fcfe5033a5 → 0.8.4-staging.60fe92afc8
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/neutral/blueprint-definition-DA4QFRYJ.mjs +15 -0
- package/dist/lib/neutral/blueprint-definition-DA4QFRYJ.mjs.map +7 -0
- package/dist/lib/neutral/blueprints/index.mjs +8 -0
- package/dist/lib/neutral/capabilities/index.mjs +17 -0
- package/dist/lib/neutral/capabilities/index.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-HOOPZ7EM.mjs → neutral/chunk-KAEXRX3Y.mjs} +1 -1
- package/dist/lib/{browser/chunk-KOX4WNAR.mjs → neutral/chunk-KMT3BMMQ.mjs} +35 -22
- package/dist/lib/neutral/chunk-KMT3BMMQ.mjs.map +7 -0
- package/dist/lib/neutral/chunk-KXJZEYS7.mjs +8 -0
- package/dist/lib/neutral/chunk-KXJZEYS7.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-TO77KAQK.mjs +298 -0
- package/dist/lib/neutral/chunk-TO77KAQK.mjs.map +7 -0
- package/dist/lib/neutral/chunk-TX3NQISZ.mjs +435 -0
- package/dist/lib/neutral/chunk-TX3NQISZ.mjs.map +7 -0
- package/dist/lib/{browser/blueprints/index.mjs → neutral/chunk-ZR4BH4QQ.mjs} +5 -6
- package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +269 -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/{browser/create-BTWYQ6IM.mjs → neutral/create-RVR7VC33.mjs} +5 -5
- package/dist/lib/neutral/create-RVR7VC33.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/meta.mjs.map +7 -0
- package/dist/lib/{browser/open-CYRYIEZI.mjs → neutral/open-A5KXKRH4.mjs} +7 -7
- package/dist/lib/neutral/open-A5KXKRH4.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/operations/index.mjs.map +7 -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/{browser/summarize-X2ZYTN7S.mjs → neutral/summarize-5XPPMVTE.mjs} +9 -11
- package/dist/lib/neutral/summarize-5XPPMVTE.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/neutral/transcriber-OGSF3XO5.mjs +59 -0
- package/dist/lib/neutral/transcriber-OGSF3XO5.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 +1 -1
- package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +8 -3
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts +1 -1
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/text-content.d.ts +8 -0
- package/dist/types/src/capabilities/text-content.d.ts.map +1 -0
- package/dist/types/src/capabilities/transcriber.d.ts +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
- 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 +1 -8
- package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -1
- package/dist/types/src/components/Transcription/Transcription.stories.d.ts +20 -23
- 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 +1 -1
- 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/{operations/definitions.d.ts → normalization/normalization.d.ts} +464 -547
- 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 +3 -3
- package/dist/types/src/operations/create.d.ts.map +1 -1
- package/dist/types/src/operations/index.d.ts +1 -2
- package/dist/types/src/operations/index.d.ts.map +1 -1
- package/dist/types/src/operations/open.d.ts +3 -3
- package/dist/types/src/operations/open.d.ts.map +1 -1
- package/dist/types/src/operations/summarize.d.ts +3 -3
- package/dist/types/src/operations/summarize.d.ts.map +1 -1
- 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/stories/KeyWordRecognition.stories.d.ts.map +1 -0
- package/dist/types/src/{components/stories/MicrophoneTranscription.stories.d.ts → stories/LiveTranscription.stories.d.ts} +5 -5
- 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 -2
- 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 +136 -102
- package/src/TranscriptionPlugin.node.ts +20 -0
- package/src/TranscriptionPlugin.test.ts +31 -0
- package/src/TranscriptionPlugin.tsx +11 -31
- package/src/TranscriptionPlugin.workerd.ts +18 -0
- package/src/blueprints/transcription-blueprint.ts +3 -4
- package/src/capabilities/blueprint-definition.ts +6 -4
- package/src/capabilities/index.ts +9 -2
- package/src/capabilities/operation-handler.ts +1 -1
- package/src/capabilities/react-surface.tsx +2 -2
- package/src/capabilities/text-content.ts +33 -0
- package/src/capabilities/transcriber.ts +9 -5
- 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 +117 -153
- package/src/components/Transcription/Transcription.tsx +8 -17
- 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/useAudioTrack.ts +1 -1
- package/src/hooks/useFeedModelAdapter.ts +46 -0
- package/src/hooks/useTranscriber.ts +7 -5
- package/src/hooks/useTranscriptionRecording.ts +87 -0
- package/src/hooks/useVoiceInput.ts +1 -1
- package/src/index.ts +4 -5
- package/src/meta.ts +28 -6
- package/src/model/model.test.ts +5 -5
- 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 +4 -38
- package/src/{segments-normalization → normalization}/normalization.ts +8 -9
- package/src/operations/create.ts +3 -3
- package/src/operations/index.ts +1 -3
- package/src/operations/open.ts +3 -3
- package/src/operations/summarize.ts +7 -7
- package/src/plugin.ts +11 -0
- package/src/stories/FileTranscription.stories.tsx +143 -0
- package/src/{components/stories → stories}/KeyWordRecognition.stories.tsx +36 -36
- 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 +22 -34
- package/src/transcriber/index.ts +1 -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 +3 -0
- package/src/{operations/definitions.ts → types/TranscriptOperation.ts} +14 -9
- package/src/types/TranscriptionCapabilities.ts +39 -0
- package/src/types/index.ts +2 -2
- package/src/vite-env.d.ts +10 -0
- package/dist/lib/browser/blueprints/index.mjs.map +0 -7
- package/dist/lib/browser/chunk-5LWSJZTZ.mjs +0 -17
- package/dist/lib/browser/chunk-5LWSJZTZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-KOX4WNAR.mjs.map +0 -7
- package/dist/lib/browser/create-BTWYQ6IM.mjs.map +0 -7
- package/dist/lib/browser/index.mjs +0 -1213
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/open-CYRYIEZI.mjs.map +0 -7
- package/dist/lib/browser/operations/index.mjs +0 -13
- package/dist/lib/browser/operations/index.mjs.map +0 -7
- package/dist/lib/browser/summarize-X2ZYTN7S.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -10
- package/dist/lib/node-esm/blueprints/index.mjs +0 -32
- package/dist/lib/node-esm/blueprints/index.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
- package/dist/lib/node-esm/chunk-MT5I4NH5.mjs +0 -112
- package/dist/lib/node-esm/chunk-MT5I4NH5.mjs.map +0 -7
- 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/chunk-X74WYCCE.mjs +0 -19
- package/dist/lib/node-esm/chunk-X74WYCCE.mjs.map +0 -7
- package/dist/lib/node-esm/create-MLUFPST2.mjs +0 -22
- package/dist/lib/node-esm/create-MLUFPST2.mjs.map +0 -7
- package/dist/lib/node-esm/index.mjs +0 -1214
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/open-5IOC2U4Z.mjs +0 -28
- package/dist/lib/node-esm/open-5IOC2U4Z.mjs.map +0 -7
- package/dist/lib/node-esm/operations/index.mjs +0 -14
- package/dist/lib/node-esm/operations/index.mjs.map +0 -7
- package/dist/lib/node-esm/summarize-IORITU7T.mjs +0 -80
- package/dist/lib/node-esm/summarize-IORITU7T.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -11
- 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 -2
- package/dist/types/src/containers/TranscriptionContainer/index.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/operations/definitions.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 -364
- 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/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/components/stories/FileTranscription.stories.tsx +0 -250
- package/src/components/stories/MicrophoneTranscription.stories.tsx +0 -264
- package/src/components/stories/TranscriptionStory.tsx +0 -43
- package/src/components/stories/useIsSpeaking.tsx +0 -40
- package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +0 -35
- package/src/containers/TranscriptionContainer/index.ts +0 -5
- package/src/hooks/useQueueModelAdapter.ts +0 -66
- package/src/types/capabilities.ts +0 -34
- package/src/types/types.ts +0 -9
- package/dist/lib/{browser/types → 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/{node-esm/types → neutral/hooks}/index.mjs.map +0 -0
- package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/index.mjs.map} +0 -0
- package/dist/types/src/{segments-normalization → normalization}/normalization.test.d.ts +0 -0
- package/dist/types/src/{segments-normalization → normalization}/utils.d.ts +0 -0
- package/dist/types/src/{components/stories → stories}/KeyWordRecognition.stories.d.ts +0 -0
- package/src/{segments-normalization → normalization}/index.ts +1 -1
- /package/src/{segments-normalization → normalization}/utils.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message-normalizer.d.ts","sourceRoot":"","sources":["../../../../src/segments-normalization/message-normalizer.ts"],"names":[],"mappings":"AASA,OAAO,EAAkB,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAQ3C,MAAM,MAAM,uBAAuB,GAAG;IACpC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;IAC9B,cAAc,EAAE,WAAW,CAAC;CAC7B,CAAC;AAGF,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;CACnB,CAAC;AAGF,qBAAa,iBAAkB,SAAQ,QAAQ;IAC7C,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAmB;IACrD,OAAO,CAAC,MAAM,CAAyB;IACvC,OAAO,CAAC,OAAO,CAAc;IAC7B,OAAO,CAAC,kBAAkB,CAA4B;IACtD,OAAO,CAAC,kBAAkB,CAAC,CAAe;IAC1C,OAAO,CAAC,wBAAwB,CAAC,CAAW;gBAEhC,EAAE,gBAAgB,EAAE,KAAK,EAAE,cAAc,EAAE,EAAE,uBAAuB;cAOvD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;YAyBjC,gBAAgB;IAgC9B,OAAO,CAAC,cAAc;CAMvB"}
|
|
@@ -1,364 +0,0 @@
|
|
|
1
|
-
import * as Schema from 'effect/Schema';
|
|
2
|
-
import { Operation } from '@dxos/operation';
|
|
3
|
-
import { SentenceNormalizationOutput, type MessageWithRangeIdType, type SentenceNormalizationInputType } from '../operations/definitions';
|
|
4
|
-
export type MessageWithRangeId = MessageWithRangeIdType;
|
|
5
|
-
/** @deprecated Use SentenceNormalizationInputType */
|
|
6
|
-
export type NormalizationInput = SentenceNormalizationInputType;
|
|
7
|
-
/** @deprecated Use SentenceNormalizationOutput */
|
|
8
|
-
export type NormalizationOutput = Schema.Schema.Type<typeof SentenceNormalizationOutput>;
|
|
9
|
-
/**
|
|
10
|
-
* Sentence normalization for transcription.
|
|
11
|
-
* TODO(dmaretskyi): Reimplement using AiRequest.run or LanguageModel.generateObject - runStructured was removed.
|
|
12
|
-
*/
|
|
13
|
-
export declare const sentenceNormalization: Operation.WithHandler<Operation.Definition<{
|
|
14
|
-
readonly messages: readonly (import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
15
|
-
readonly id: string;
|
|
16
|
-
readonly parentMessage?: string | undefined;
|
|
17
|
-
readonly threadId?: string | undefined;
|
|
18
|
-
readonly created: string;
|
|
19
|
-
readonly sender: {
|
|
20
|
-
readonly name?: string | undefined;
|
|
21
|
-
readonly role?: "user" | "assistant" | "tool" | undefined;
|
|
22
|
-
readonly contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
23
|
-
readonly image?: string | undefined;
|
|
24
|
-
readonly fullName?: string | undefined;
|
|
25
|
-
readonly preferredName?: string | undefined;
|
|
26
|
-
readonly nickname?: string | undefined;
|
|
27
|
-
readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
28
|
-
readonly description?: string | undefined;
|
|
29
|
-
readonly name?: string | undefined;
|
|
30
|
-
readonly status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
31
|
-
readonly image?: string | undefined;
|
|
32
|
-
readonly website?: string | undefined;
|
|
33
|
-
} & {
|
|
34
|
-
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
35
|
-
}> | undefined;
|
|
36
|
-
readonly jobTitle?: string | undefined;
|
|
37
|
-
readonly department?: string | undefined;
|
|
38
|
-
readonly notes?: string | undefined;
|
|
39
|
-
readonly emails?: readonly {
|
|
40
|
-
readonly value: string;
|
|
41
|
-
readonly label?: string | undefined;
|
|
42
|
-
}[] | undefined;
|
|
43
|
-
readonly identities?: readonly {
|
|
44
|
-
readonly value: string;
|
|
45
|
-
readonly label?: string | undefined;
|
|
46
|
-
}[] | undefined;
|
|
47
|
-
readonly phoneNumbers?: readonly {
|
|
48
|
-
readonly value: string;
|
|
49
|
-
readonly label?: string | undefined;
|
|
50
|
-
}[] | undefined;
|
|
51
|
-
readonly fields?: readonly {
|
|
52
|
-
readonly value: string;
|
|
53
|
-
readonly label: string;
|
|
54
|
-
readonly category?: string | undefined;
|
|
55
|
-
}[] | undefined;
|
|
56
|
-
readonly addresses?: readonly {
|
|
57
|
-
readonly value: {
|
|
58
|
-
readonly street?: string | undefined;
|
|
59
|
-
readonly extended?: string | undefined;
|
|
60
|
-
readonly locality?: string | undefined;
|
|
61
|
-
readonly region?: string | undefined;
|
|
62
|
-
readonly postalCode?: string | undefined;
|
|
63
|
-
readonly postOfficeBoxNumber?: string | undefined;
|
|
64
|
-
readonly country?: string | undefined;
|
|
65
|
-
};
|
|
66
|
-
readonly label?: string | undefined;
|
|
67
|
-
}[] | undefined;
|
|
68
|
-
readonly urls?: readonly {
|
|
69
|
-
readonly value: string;
|
|
70
|
-
readonly label?: string | undefined;
|
|
71
|
-
}[] | undefined;
|
|
72
|
-
readonly birthday?: string | undefined;
|
|
73
|
-
} & {
|
|
74
|
-
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
75
|
-
}> | undefined;
|
|
76
|
-
readonly identityDid?: string | undefined;
|
|
77
|
-
readonly identityKey?: string | undefined;
|
|
78
|
-
readonly email?: string | undefined;
|
|
79
|
-
};
|
|
80
|
-
readonly blocks: readonly ({
|
|
81
|
-
readonly pending?: boolean | undefined;
|
|
82
|
-
readonly text: string;
|
|
83
|
-
readonly mimeType?: string | undefined;
|
|
84
|
-
readonly disposition?: string | undefined;
|
|
85
|
-
readonly _tag: "text";
|
|
86
|
-
} | {
|
|
87
|
-
readonly pending?: boolean | undefined;
|
|
88
|
-
readonly _tag: "reasoning";
|
|
89
|
-
readonly reasoningText?: string | undefined;
|
|
90
|
-
readonly redactedText?: string | undefined;
|
|
91
|
-
readonly signature?: string | undefined;
|
|
92
|
-
} | {
|
|
93
|
-
readonly name: string;
|
|
94
|
-
readonly pending?: boolean | undefined;
|
|
95
|
-
readonly _tag: "toolCall";
|
|
96
|
-
readonly toolCallId: string;
|
|
97
|
-
readonly input: string;
|
|
98
|
-
readonly providerExecuted: boolean;
|
|
99
|
-
} | {
|
|
100
|
-
readonly name: string;
|
|
101
|
-
readonly pending?: boolean | undefined;
|
|
102
|
-
readonly _tag: "toolResult";
|
|
103
|
-
readonly toolCallId: string;
|
|
104
|
-
readonly providerExecuted: boolean;
|
|
105
|
-
readonly result?: string | undefined;
|
|
106
|
-
readonly error?: string | undefined;
|
|
107
|
-
} | {
|
|
108
|
-
readonly pending?: boolean | undefined;
|
|
109
|
-
readonly mimeType?: string | undefined;
|
|
110
|
-
readonly _tag: "stats";
|
|
111
|
-
readonly message?: string | undefined;
|
|
112
|
-
readonly model?: string | undefined;
|
|
113
|
-
readonly usage?: {
|
|
114
|
-
readonly inputTokens?: number | undefined;
|
|
115
|
-
readonly outputTokens?: number | undefined;
|
|
116
|
-
readonly totalTokens?: number | undefined;
|
|
117
|
-
} | undefined;
|
|
118
|
-
readonly toolCalls?: number | undefined;
|
|
119
|
-
readonly errors?: number | undefined;
|
|
120
|
-
readonly duration?: number | undefined;
|
|
121
|
-
} | {
|
|
122
|
-
readonly source?: {
|
|
123
|
-
readonly type: "base64";
|
|
124
|
-
readonly mediaType: string;
|
|
125
|
-
readonly data: string;
|
|
126
|
-
} | {
|
|
127
|
-
readonly type: "http";
|
|
128
|
-
readonly url: string;
|
|
129
|
-
} | undefined;
|
|
130
|
-
readonly id?: string | undefined;
|
|
131
|
-
readonly pending?: boolean | undefined;
|
|
132
|
-
readonly _tag: "image";
|
|
133
|
-
} | {
|
|
134
|
-
readonly name?: string | undefined;
|
|
135
|
-
readonly pending?: boolean | undefined;
|
|
136
|
-
readonly _tag: "file";
|
|
137
|
-
readonly mediaType?: string | undefined;
|
|
138
|
-
readonly url: string;
|
|
139
|
-
} | {
|
|
140
|
-
readonly pending?: boolean | undefined;
|
|
141
|
-
readonly _tag: "reference";
|
|
142
|
-
readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>;
|
|
143
|
-
} | {
|
|
144
|
-
readonly pending?: boolean | undefined;
|
|
145
|
-
readonly text: string;
|
|
146
|
-
readonly _tag: "transcript";
|
|
147
|
-
readonly started: string;
|
|
148
|
-
} | {
|
|
149
|
-
readonly pending?: boolean | undefined;
|
|
150
|
-
readonly _tag: "status";
|
|
151
|
-
readonly statusText: string;
|
|
152
|
-
} | {
|
|
153
|
-
readonly pending?: boolean | undefined;
|
|
154
|
-
readonly text: string;
|
|
155
|
-
readonly _tag: "suggestion";
|
|
156
|
-
} | {
|
|
157
|
-
readonly pending?: boolean | undefined;
|
|
158
|
-
readonly _tag: "select";
|
|
159
|
-
readonly options: string[];
|
|
160
|
-
} | {
|
|
161
|
-
readonly version: unknown;
|
|
162
|
-
readonly pending?: boolean | undefined;
|
|
163
|
-
readonly _tag: "anchor";
|
|
164
|
-
readonly objectId: string;
|
|
165
|
-
} | {
|
|
166
|
-
readonly pending?: boolean | undefined;
|
|
167
|
-
readonly text: string;
|
|
168
|
-
readonly _tag: "proposal";
|
|
169
|
-
} | {
|
|
170
|
-
readonly pending?: boolean | undefined;
|
|
171
|
-
readonly _tag: "summary";
|
|
172
|
-
readonly content: string;
|
|
173
|
-
} | {
|
|
174
|
-
readonly pending?: boolean | undefined;
|
|
175
|
-
readonly _tag: "toolkit";
|
|
176
|
-
} | {
|
|
177
|
-
readonly pending?: boolean | undefined;
|
|
178
|
-
readonly disposition?: string | undefined;
|
|
179
|
-
readonly _tag: "json";
|
|
180
|
-
readonly data: string;
|
|
181
|
-
})[];
|
|
182
|
-
readonly properties?: {
|
|
183
|
-
readonly [x: string]: any;
|
|
184
|
-
} | undefined;
|
|
185
|
-
} & {
|
|
186
|
-
readonly rangeId?: readonly string[] | undefined;
|
|
187
|
-
})[];
|
|
188
|
-
}, {
|
|
189
|
-
readonly sentences: {
|
|
190
|
-
id: import("@dxos/keys").ObjectId;
|
|
191
|
-
"~@dxos/echo/Kind": import("@dxos/echo/internal").EntityKind.Object;
|
|
192
|
-
parentMessage?: string | undefined | undefined;
|
|
193
|
-
threadId?: string | undefined | undefined;
|
|
194
|
-
created: string;
|
|
195
|
-
sender: {
|
|
196
|
-
readonly name?: string | undefined;
|
|
197
|
-
readonly role?: "user" | "assistant" | "tool" | undefined;
|
|
198
|
-
readonly contact?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
199
|
-
readonly image?: string | undefined;
|
|
200
|
-
readonly fullName?: string | undefined;
|
|
201
|
-
readonly preferredName?: string | undefined;
|
|
202
|
-
readonly nickname?: string | undefined;
|
|
203
|
-
readonly organization?: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & {
|
|
204
|
-
readonly description?: string | undefined;
|
|
205
|
-
readonly name?: string | undefined;
|
|
206
|
-
readonly status?: "prospect" | "qualified" | "active" | "commit" | "reject" | undefined;
|
|
207
|
-
readonly image?: string | undefined;
|
|
208
|
-
readonly website?: string | undefined;
|
|
209
|
-
} & {
|
|
210
|
-
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
211
|
-
}> | undefined;
|
|
212
|
-
readonly jobTitle?: string | undefined;
|
|
213
|
-
readonly department?: string | undefined;
|
|
214
|
-
readonly notes?: string | undefined;
|
|
215
|
-
readonly emails?: readonly {
|
|
216
|
-
readonly value: string;
|
|
217
|
-
readonly label?: string | undefined;
|
|
218
|
-
}[] | undefined;
|
|
219
|
-
readonly identities?: readonly {
|
|
220
|
-
readonly value: string;
|
|
221
|
-
readonly label?: string | undefined;
|
|
222
|
-
}[] | undefined;
|
|
223
|
-
readonly phoneNumbers?: readonly {
|
|
224
|
-
readonly value: string;
|
|
225
|
-
readonly label?: string | undefined;
|
|
226
|
-
}[] | undefined;
|
|
227
|
-
readonly fields?: readonly {
|
|
228
|
-
readonly value: string;
|
|
229
|
-
readonly label: string;
|
|
230
|
-
readonly category?: string | undefined;
|
|
231
|
-
}[] | undefined;
|
|
232
|
-
readonly addresses?: readonly {
|
|
233
|
-
readonly value: {
|
|
234
|
-
readonly street?: string | undefined;
|
|
235
|
-
readonly extended?: string | undefined;
|
|
236
|
-
readonly locality?: string | undefined;
|
|
237
|
-
readonly region?: string | undefined;
|
|
238
|
-
readonly postalCode?: string | undefined;
|
|
239
|
-
readonly postOfficeBoxNumber?: string | undefined;
|
|
240
|
-
readonly country?: string | undefined;
|
|
241
|
-
};
|
|
242
|
-
readonly label?: string | undefined;
|
|
243
|
-
}[] | undefined;
|
|
244
|
-
readonly urls?: readonly {
|
|
245
|
-
readonly value: string;
|
|
246
|
-
readonly label?: string | undefined;
|
|
247
|
-
}[] | undefined;
|
|
248
|
-
readonly birthday?: string | undefined;
|
|
249
|
-
} & {
|
|
250
|
-
readonly location?: readonly [number, number, (number | undefined)?] | undefined;
|
|
251
|
-
}> | undefined;
|
|
252
|
-
readonly identityDid?: string | undefined;
|
|
253
|
-
readonly identityKey?: string | undefined;
|
|
254
|
-
readonly email?: string | undefined;
|
|
255
|
-
};
|
|
256
|
-
blocks: readonly ({
|
|
257
|
-
readonly pending?: boolean | undefined;
|
|
258
|
-
readonly text: string;
|
|
259
|
-
readonly mimeType?: string | undefined;
|
|
260
|
-
readonly disposition?: string | undefined;
|
|
261
|
-
readonly _tag: "text";
|
|
262
|
-
} | {
|
|
263
|
-
readonly pending?: boolean | undefined;
|
|
264
|
-
readonly _tag: "reasoning";
|
|
265
|
-
readonly reasoningText?: string | undefined;
|
|
266
|
-
readonly redactedText?: string | undefined;
|
|
267
|
-
readonly signature?: string | undefined;
|
|
268
|
-
} | {
|
|
269
|
-
readonly name: string;
|
|
270
|
-
readonly pending?: boolean | undefined;
|
|
271
|
-
readonly _tag: "toolCall";
|
|
272
|
-
readonly toolCallId: string;
|
|
273
|
-
readonly input: string;
|
|
274
|
-
readonly providerExecuted: boolean;
|
|
275
|
-
} | {
|
|
276
|
-
readonly name: string;
|
|
277
|
-
readonly pending?: boolean | undefined;
|
|
278
|
-
readonly _tag: "toolResult";
|
|
279
|
-
readonly toolCallId: string;
|
|
280
|
-
readonly providerExecuted: boolean;
|
|
281
|
-
readonly result?: string | undefined;
|
|
282
|
-
readonly error?: string | undefined;
|
|
283
|
-
} | {
|
|
284
|
-
readonly pending?: boolean | undefined;
|
|
285
|
-
readonly mimeType?: string | undefined;
|
|
286
|
-
readonly _tag: "stats";
|
|
287
|
-
readonly message?: string | undefined;
|
|
288
|
-
readonly model?: string | undefined;
|
|
289
|
-
readonly usage?: {
|
|
290
|
-
readonly inputTokens?: number | undefined;
|
|
291
|
-
readonly outputTokens?: number | undefined;
|
|
292
|
-
readonly totalTokens?: number | undefined;
|
|
293
|
-
} | undefined;
|
|
294
|
-
readonly toolCalls?: number | undefined;
|
|
295
|
-
readonly errors?: number | undefined;
|
|
296
|
-
readonly duration?: number | undefined;
|
|
297
|
-
} | {
|
|
298
|
-
readonly source?: {
|
|
299
|
-
readonly type: "base64";
|
|
300
|
-
readonly mediaType: string;
|
|
301
|
-
readonly data: string;
|
|
302
|
-
} | {
|
|
303
|
-
readonly type: "http";
|
|
304
|
-
readonly url: string;
|
|
305
|
-
} | undefined;
|
|
306
|
-
readonly id?: string | undefined;
|
|
307
|
-
readonly pending?: boolean | undefined;
|
|
308
|
-
readonly _tag: "image";
|
|
309
|
-
} | {
|
|
310
|
-
readonly name?: string | undefined;
|
|
311
|
-
readonly pending?: boolean | undefined;
|
|
312
|
-
readonly _tag: "file";
|
|
313
|
-
readonly mediaType?: string | undefined;
|
|
314
|
-
readonly url: string;
|
|
315
|
-
} | {
|
|
316
|
-
readonly pending?: boolean | undefined;
|
|
317
|
-
readonly _tag: "reference";
|
|
318
|
-
readonly reference: import("@dxos/echo/internal").Ref<import("@dxos/echo/Entity").OfKind<import("@dxos/echo/internal").EntityKind.Object> & import("@dxos/echo/Obj").Unknown>;
|
|
319
|
-
} | {
|
|
320
|
-
readonly pending?: boolean | undefined;
|
|
321
|
-
readonly text: string;
|
|
322
|
-
readonly _tag: "transcript";
|
|
323
|
-
readonly started: string;
|
|
324
|
-
} | {
|
|
325
|
-
readonly pending?: boolean | undefined;
|
|
326
|
-
readonly _tag: "status";
|
|
327
|
-
readonly statusText: string;
|
|
328
|
-
} | {
|
|
329
|
-
readonly pending?: boolean | undefined;
|
|
330
|
-
readonly text: string;
|
|
331
|
-
readonly _tag: "suggestion";
|
|
332
|
-
} | {
|
|
333
|
-
readonly pending?: boolean | undefined;
|
|
334
|
-
readonly _tag: "select";
|
|
335
|
-
readonly options: string[];
|
|
336
|
-
} | {
|
|
337
|
-
readonly version: unknown;
|
|
338
|
-
readonly pending?: boolean | undefined;
|
|
339
|
-
readonly _tag: "anchor";
|
|
340
|
-
readonly objectId: string;
|
|
341
|
-
} | {
|
|
342
|
-
readonly pending?: boolean | undefined;
|
|
343
|
-
readonly text: string;
|
|
344
|
-
readonly _tag: "proposal";
|
|
345
|
-
} | {
|
|
346
|
-
readonly pending?: boolean | undefined;
|
|
347
|
-
readonly _tag: "summary";
|
|
348
|
-
readonly content: string;
|
|
349
|
-
} | {
|
|
350
|
-
readonly pending?: boolean | undefined;
|
|
351
|
-
readonly _tag: "toolkit";
|
|
352
|
-
} | {
|
|
353
|
-
readonly pending?: boolean | undefined;
|
|
354
|
-
readonly disposition?: string | undefined;
|
|
355
|
-
readonly _tag: "json";
|
|
356
|
-
readonly data: string;
|
|
357
|
-
})[];
|
|
358
|
-
properties?: {
|
|
359
|
-
readonly [x: string]: any;
|
|
360
|
-
} | undefined | undefined;
|
|
361
|
-
rangeId?: readonly string[] | undefined;
|
|
362
|
-
}[];
|
|
363
|
-
}, never>>;
|
|
364
|
-
//# sourceMappingURL=normalization.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalization.d.ts","sourceRoot":"","sources":["../../../../src/segments-normalization/normalization.ts"],"names":[],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"normalization.test.d.ts","sourceRoot":"","sources":["../../../../src/segments-normalization/normalization.test.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/segments-normalization/utils.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,aAAa,CAAC;AAEzC,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,CAAC,KAAK,WAE5C,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Capability } from '@dxos/app-framework';
|
|
2
|
-
import { type MediaStreamRecorderProps, type Transcriber, type TranscriberProps, type TranscriptMessageEnricher, type TranscriptionManager } from '../transcriber';
|
|
3
|
-
export declare namespace TranscriptionCapabilities {
|
|
4
|
-
type GetTranscriberProps = {
|
|
5
|
-
audioStreamTrack: MediaStreamTrack;
|
|
6
|
-
recorderConfig?: Partial<MediaStreamRecorderProps['config']>;
|
|
7
|
-
transcriberConfig?: Partial<TranscriberProps['config']>;
|
|
8
|
-
onSegments: TranscriberProps['onSegments'];
|
|
9
|
-
};
|
|
10
|
-
type GetTranscriber = (props: GetTranscriberProps) => Transcriber;
|
|
11
|
-
const Transcriber: Capability.InterfaceDef<GetTranscriber>;
|
|
12
|
-
type GetTranscriptionManagerProps = {
|
|
13
|
-
messageEnricher?: TranscriptMessageEnricher;
|
|
14
|
-
};
|
|
15
|
-
type GetTranscriptionManager = (props: GetTranscriptionManagerProps) => TranscriptionManager;
|
|
16
|
-
const TranscriptionManager: Capability.InterfaceDef<GetTranscriptionManager>;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=capabilities.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"capabilities.d.ts","sourceRoot":"","sources":["../../../../src/types/capabilities.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAIjD,OAAO,EACL,KAAK,wBAAwB,EAC7B,KAAK,WAAW,EAChB,KAAK,gBAAgB,EACrB,KAAK,yBAAyB,EAC9B,KAAK,oBAAoB,EAC1B,MAAM,gBAAgB,CAAC;AAExB,yBAAiB,yBAAyB,CAAC;IACzC,KAAY,mBAAmB,GAAG;QAChC,gBAAgB,EAAE,gBAAgB,CAAC;QACnC,cAAc,CAAC,EAAE,OAAO,CAAC,wBAAwB,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC7D,iBAAiB,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;QACxD,UAAU,EAAE,gBAAgB,CAAC,YAAY,CAAC,CAAC;KAC5C,CAAC;IACF,KAAY,cAAc,GAAG,CAAC,KAAK,EAAE,mBAAmB,KAAK,WAAW,CAAC;IAClE,MAAM,WAAW,yCAAuE,CAAC;IAEhG,KAAY,4BAA4B,GAAG;QACzC,eAAe,CAAC,EAAE,yBAAyB,CAAC;KAC7C,CAAC;IACF,KAAY,uBAAuB,GAAG,CAAC,KAAK,EAAE,4BAA4B,KAAK,oBAAoB,CAAC;IAC7F,MAAM,oBAAoB,kDAEhC,CAAC;CACH"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,eAAO,MAAM,iBAAiB,2CAA2C,CAAC"}
|
|
@@ -1,250 +0,0 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Copyright 2025 DXOS.org
|
|
3
|
-
//
|
|
4
|
-
|
|
5
|
-
import { type Meta, type StoryObj } from '@storybook/react-vite';
|
|
6
|
-
import * as Effect from 'effect/Effect';
|
|
7
|
-
import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
8
|
-
|
|
9
|
-
import { withPluginManager } from '@dxos/app-framework/testing';
|
|
10
|
-
import { AppActivationEvents } from '@dxos/app-toolkit';
|
|
11
|
-
import { scheduleTask } from '@dxos/async';
|
|
12
|
-
import { Context } from '@dxos/context';
|
|
13
|
-
import { Obj } from '@dxos/echo';
|
|
14
|
-
import { MemoryQueue } from '@dxos/echo-db';
|
|
15
|
-
import { createQueueDXN } from '@dxos/echo/internal';
|
|
16
|
-
import { FunctionExecutor, ServiceContainer } from '@dxos/functions-runtime';
|
|
17
|
-
import { log } from '@dxos/log';
|
|
18
|
-
import { ClientPlugin } from '@dxos/plugin-client';
|
|
19
|
-
import { initializeIdentity } from '@dxos/plugin-client/testing';
|
|
20
|
-
import { PreviewPlugin } from '@dxos/plugin-preview';
|
|
21
|
-
import { StorybookPlugin, corePlugins } from '@dxos/plugin-testing';
|
|
22
|
-
import { withLayout } from '@dxos/react-ui/testing';
|
|
23
|
-
import { TestSchema } from '@dxos/schema/testing';
|
|
24
|
-
import { type Actor, Message, Organization, Person } from '@dxos/types';
|
|
25
|
-
import { seedTestData } from '@dxos/types/testing';
|
|
26
|
-
|
|
27
|
-
import { useAudioFile, useQueueModelAdapter, useTranscriber } from '#hooks';
|
|
28
|
-
import { TestItem } from '#testing';
|
|
29
|
-
|
|
30
|
-
import { MessageNormalizer, getActorId } from '../../segments-normalization';
|
|
31
|
-
import { type MediaStreamRecorderProps, type TranscriberProps } from '../../transcriber';
|
|
32
|
-
import { TranscriptionPlugin } from '../../TranscriptionPlugin';
|
|
33
|
-
import { renderByline } from '../../util';
|
|
34
|
-
import { TranscriptionStory } from './TranscriptionStory';
|
|
35
|
-
import { useIsSpeaking } from './useIsSpeaking';
|
|
36
|
-
|
|
37
|
-
const AudioFile = ({
|
|
38
|
-
detectSpeaking,
|
|
39
|
-
audioUrl,
|
|
40
|
-
normalizeSentences,
|
|
41
|
-
transcriberConfig,
|
|
42
|
-
recorderConfig,
|
|
43
|
-
audioConstraints,
|
|
44
|
-
}: {
|
|
45
|
-
detectSpeaking?: boolean;
|
|
46
|
-
normalizeSentences?: boolean;
|
|
47
|
-
audioUrl: string;
|
|
48
|
-
transcriberConfig?: TranscriberProps['config'];
|
|
49
|
-
recorderConfig?: MediaStreamRecorderProps['config'];
|
|
50
|
-
audioConstraints?: MediaTrackConstraints;
|
|
51
|
-
}) => {
|
|
52
|
-
const [running, setRunning] = useState(false);
|
|
53
|
-
const actor: Actor.Actor = useMemo(() => ({ name: 'You' }), []);
|
|
54
|
-
|
|
55
|
-
// Audio.
|
|
56
|
-
const { audio, track, stream } = useAudioFile(audioUrl, audioConstraints);
|
|
57
|
-
|
|
58
|
-
// Speaking.
|
|
59
|
-
const isSpeaking = detectSpeaking ? useIsSpeaking(track) : true;
|
|
60
|
-
const ref = useRef<HTMLAudioElement>(null);
|
|
61
|
-
useEffect(() => {
|
|
62
|
-
if (ref.current && stream) {
|
|
63
|
-
ref.current.srcObject = stream;
|
|
64
|
-
}
|
|
65
|
-
}, [stream]);
|
|
66
|
-
|
|
67
|
-
useEffect(() => {
|
|
68
|
-
if (!audio) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (running) {
|
|
73
|
-
void audio.play();
|
|
74
|
-
} else {
|
|
75
|
-
void audio.pause();
|
|
76
|
-
}
|
|
77
|
-
}, [audio, running]);
|
|
78
|
-
|
|
79
|
-
// Transcriber.
|
|
80
|
-
// TODO(dmaretskyi): Use space.queues.create() instead.
|
|
81
|
-
const queueDxn = useMemo(() => createQueueDXN(), []);
|
|
82
|
-
const queue = useMemo(() => new MemoryQueue<Message.Message>(queueDxn), [queueDxn]);
|
|
83
|
-
|
|
84
|
-
const model = useQueueModelAdapter(renderByline([]), queue);
|
|
85
|
-
const handleSegments = useCallback<TranscriberProps['onSegments']>(
|
|
86
|
-
async (blocks) => {
|
|
87
|
-
void queue?.append([
|
|
88
|
-
Obj.make(Message.Message, {
|
|
89
|
-
created: new Date().toISOString(),
|
|
90
|
-
sender: actor,
|
|
91
|
-
blocks,
|
|
92
|
-
}),
|
|
93
|
-
]);
|
|
94
|
-
},
|
|
95
|
-
[queue],
|
|
96
|
-
);
|
|
97
|
-
|
|
98
|
-
const transcriber = useTranscriber({
|
|
99
|
-
audioStreamTrack: track,
|
|
100
|
-
onSegments: handleSegments,
|
|
101
|
-
transcriberConfig,
|
|
102
|
-
recorderConfig,
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
// Normalize sentences.
|
|
106
|
-
const normalizer = useMemo(() => {
|
|
107
|
-
if (!normalizeSentences) {
|
|
108
|
-
return;
|
|
109
|
-
}
|
|
110
|
-
const executor = new FunctionExecutor(
|
|
111
|
-
new ServiceContainer().setServices({
|
|
112
|
-
// ai: {
|
|
113
|
-
// client: new Edge AiServiceClient({
|
|
114
|
-
// endpoint: AI_SERVICE_ENDPOINT.REMOTE,
|
|
115
|
-
// defaultGenerationOptions: {
|
|
116
|
-
// model: '@anthropic/claude-3-5-sonnet-20241022',
|
|
117
|
-
// },
|
|
118
|
-
// }),
|
|
119
|
-
// },
|
|
120
|
-
}),
|
|
121
|
-
);
|
|
122
|
-
|
|
123
|
-
return new MessageNormalizer({
|
|
124
|
-
functionExecutor: executor,
|
|
125
|
-
queue,
|
|
126
|
-
startingCursor: { actorId: getActorId(actor), timestamp: new Date().toISOString() },
|
|
127
|
-
});
|
|
128
|
-
}, [normalizeSentences, queue, actor]);
|
|
129
|
-
|
|
130
|
-
useEffect(() => {
|
|
131
|
-
if (!normalizer) {
|
|
132
|
-
return;
|
|
133
|
-
}
|
|
134
|
-
const ctx = new Context();
|
|
135
|
-
scheduleTask(ctx, async () => {
|
|
136
|
-
await normalizer.open();
|
|
137
|
-
ctx.onDispose(async () => {
|
|
138
|
-
await normalizer.close();
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
return () => {
|
|
142
|
-
void ctx.dispose();
|
|
143
|
-
};
|
|
144
|
-
}, [normalizer]);
|
|
145
|
-
|
|
146
|
-
const manageChunkRecording = () => {
|
|
147
|
-
if (running && isSpeaking && transcriber) {
|
|
148
|
-
log.info('starting transcription');
|
|
149
|
-
transcriber?.startChunksRecording();
|
|
150
|
-
} else if ((!isSpeaking || !running) && transcriber) {
|
|
151
|
-
log.info('stopping transcription');
|
|
152
|
-
transcriber?.stopChunksRecording();
|
|
153
|
-
}
|
|
154
|
-
};
|
|
155
|
-
|
|
156
|
-
useEffect(() => {
|
|
157
|
-
const ctx = new Context();
|
|
158
|
-
scheduleTask(ctx, async () => {
|
|
159
|
-
if (transcriber && running) {
|
|
160
|
-
await transcriber.open();
|
|
161
|
-
} else if (!running) {
|
|
162
|
-
await transcriber?.close();
|
|
163
|
-
}
|
|
164
|
-
manageChunkRecording();
|
|
165
|
-
});
|
|
166
|
-
|
|
167
|
-
return () => {
|
|
168
|
-
void ctx.dispose();
|
|
169
|
-
};
|
|
170
|
-
}, [transcriber, running]);
|
|
171
|
-
|
|
172
|
-
useEffect(() => {
|
|
173
|
-
manageChunkRecording();
|
|
174
|
-
}, [isSpeaking, stream]);
|
|
175
|
-
|
|
176
|
-
return (
|
|
177
|
-
<TranscriptionStory
|
|
178
|
-
disabled={!stream}
|
|
179
|
-
model={model}
|
|
180
|
-
running={running}
|
|
181
|
-
onRunningChange={setRunning}
|
|
182
|
-
audioRef={ref}
|
|
183
|
-
/>
|
|
184
|
-
);
|
|
185
|
-
};
|
|
186
|
-
|
|
187
|
-
const meta = {
|
|
188
|
-
title: 'plugins/plugin-transcription/components/FileTranscription',
|
|
189
|
-
decorators: [
|
|
190
|
-
withLayout({ layout: 'column' }),
|
|
191
|
-
withPluginManager({
|
|
192
|
-
plugins: [
|
|
193
|
-
...corePlugins(),
|
|
194
|
-
StorybookPlugin({}),
|
|
195
|
-
ClientPlugin({
|
|
196
|
-
types: [TestItem, Person.Person, Organization.Organization, TestSchema.DocumentType],
|
|
197
|
-
onClientInitialized: ({ client }) =>
|
|
198
|
-
Effect.gen(function* () {
|
|
199
|
-
const { personalSpace } = yield* initializeIdentity(client);
|
|
200
|
-
yield* Effect.promise(() => seedTestData(personalSpace));
|
|
201
|
-
}),
|
|
202
|
-
}),
|
|
203
|
-
|
|
204
|
-
PreviewPlugin(),
|
|
205
|
-
TranscriptionPlugin(),
|
|
206
|
-
],
|
|
207
|
-
fireEvents: [AppActivationEvents.SetupAppGraph],
|
|
208
|
-
}),
|
|
209
|
-
],
|
|
210
|
-
} satisfies Meta;
|
|
211
|
-
|
|
212
|
-
export default meta;
|
|
213
|
-
|
|
214
|
-
type Story = StoryObj<typeof meta>;
|
|
215
|
-
|
|
216
|
-
const TRANSCRIBER_CONFIG = {
|
|
217
|
-
transcribeAfterChunksAmount: 100,
|
|
218
|
-
prefixBufferChunksAmount: 50,
|
|
219
|
-
normalizeSentences: true,
|
|
220
|
-
};
|
|
221
|
-
|
|
222
|
-
const RECORDER_CONFIG = {
|
|
223
|
-
interval: 200,
|
|
224
|
-
};
|
|
225
|
-
|
|
226
|
-
export const Default: StoryObj<typeof AudioFile> = {
|
|
227
|
-
render: AudioFile,
|
|
228
|
-
args: {
|
|
229
|
-
detectSpeaking: true,
|
|
230
|
-
// https://learnenglish.britishcouncil.org/general-english/audio-zone/living-london
|
|
231
|
-
audioUrl: 'https://dxos.network/audio-london.m4a',
|
|
232
|
-
// textUrl: 'https://dxos.network/audio-london.txt',
|
|
233
|
-
transcriberConfig: TRANSCRIBER_CONFIG,
|
|
234
|
-
recorderConfig: RECORDER_CONFIG,
|
|
235
|
-
},
|
|
236
|
-
};
|
|
237
|
-
|
|
238
|
-
// TODO(mykola): Fix sentence normalization.
|
|
239
|
-
// export const WithSentenceNormalization: StoryObj<typeof AudioFile> = {
|
|
240
|
-
// render: AudioFile,
|
|
241
|
-
// args: {
|
|
242
|
-
// detectSpeaking: true,
|
|
243
|
-
// normalizeSentences: true,
|
|
244
|
-
// // https://learnenglish.britishcouncil.org/general-english/audio-zone/living-london
|
|
245
|
-
// audioUrl: 'https://dxos.network/audio-london.m4a',
|
|
246
|
-
// // textUrl: 'https://dxos.network/audio-london.txt',
|
|
247
|
-
// transcriberConfig: TRANSCRIBER_CONFIG,
|
|
248
|
-
// recorderConfig: RECORDER_CONFIG,
|
|
249
|
-
// },
|
|
250
|
-
// };
|