@dxos/plugin-transcription 0.8.2-staging.7ac8446 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/browser/TranscriptContainer-PFKLKRPQ.mjs +11 -0
- package/dist/lib/browser/{chunk-YCZISX63.mjs → chunk-4KCUYW2F.mjs} +139 -95
- package/dist/lib/browser/chunk-4KCUYW2F.mjs.map +7 -0
- package/dist/lib/browser/{chunk-6ZR5MDK3.mjs → chunk-GOF7MJNV.mjs} +3 -3
- package/dist/lib/browser/{chunk-6ZR5MDK3.mjs.map → chunk-GOF7MJNV.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-K7FOYAXO.mjs → chunk-IGEKO7ZU.mjs} +2 -2
- package/dist/lib/browser/chunk-NODIXNQP.mjs +54 -0
- package/dist/lib/browser/chunk-NODIXNQP.mjs.map +7 -0
- package/dist/lib/browser/chunk-TJPJBE45.mjs +764 -0
- package/dist/lib/browser/chunk-TJPJBE45.mjs.map +7 -0
- package/dist/lib/browser/{chunk-YEPT334A.mjs → chunk-W2KNYJD6.mjs} +4 -4
- package/dist/lib/browser/chunk-W2KNYJD6.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +30 -216
- package/dist/lib/browser/index.mjs.map +4 -4
- package/dist/lib/browser/{intent-resolver-4R66ZCKT.mjs → intent-resolver-I2LJSQDR.mjs} +7 -11
- package/dist/lib/browser/intent-resolver-I2LJSQDR.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-FQUHU5G7.mjs → react-surface-ID2MLJHZ.mjs} +11 -9
- package/dist/lib/browser/react-surface-ID2MLJHZ.mjs.map +7 -0
- package/dist/lib/browser/transcriber-NA7CIFIT.mjs +56 -0
- package/dist/lib/browser/transcriber-NA7CIFIT.mjs.map +7 -0
- package/dist/lib/browser/types/index.mjs +4 -8
- package/dist/lib/node/{TranscriptContainer-QEYTTT2V.cjs → TranscriptContainer-LHMC7553.cjs} +9 -8
- package/dist/lib/node/TranscriptContainer-LHMC7553.cjs.map +7 -0
- package/dist/lib/node/chunk-3GS5UNO5.cjs +778 -0
- package/dist/lib/node/chunk-3GS5UNO5.cjs.map +7 -0
- package/dist/lib/node/{chunk-LP4FG423.cjs → chunk-5J3FBCON.cjs} +5 -5
- package/dist/lib/node/{chunk-NVZWGFJL.cjs → chunk-AFUZI63A.cjs} +6 -6
- package/dist/lib/node/{chunk-NVZWGFJL.cjs.map → chunk-AFUZI63A.cjs.map} +1 -1
- package/dist/lib/node/chunk-EIMUQYCZ.cjs +74 -0
- package/dist/lib/node/chunk-EIMUQYCZ.cjs.map +7 -0
- package/dist/lib/node/{chunk-CZMLKKWT.cjs → chunk-FKDJNJ57.cjs} +8 -8
- package/dist/lib/node/chunk-FKDJNJ57.cjs.map +7 -0
- package/dist/lib/node/{chunk-FCCJALOT.cjs → chunk-ZFTXJZXH.cjs} +138 -95
- package/dist/lib/node/chunk-ZFTXJZXH.cjs.map +7 -0
- package/dist/lib/node/index.cjs +59 -251
- package/dist/lib/node/index.cjs.map +4 -4
- package/dist/lib/node/{intent-resolver-WMMCOUEH.cjs → intent-resolver-LLMGF5I5.cjs} +10 -11
- package/dist/lib/node/intent-resolver-LLMGF5I5.cjs.map +7 -0
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-WI2MGWCC.cjs → react-surface-SEQLEL4K.cjs} +13 -11
- package/dist/lib/node/react-surface-SEQLEL4K.cjs.map +7 -0
- package/dist/lib/node/transcriber-RKKN7LDU.cjs +68 -0
- package/dist/lib/node/transcriber-RKKN7LDU.cjs.map +7 -0
- package/dist/lib/node/types/index.cjs +7 -11
- package/dist/lib/node/types/index.cjs.map +2 -2
- package/dist/lib/node-esm/{TranscriptContainer-ZXUCOWGY.mjs → TranscriptContainer-DLNRFVTA.mjs} +4 -3
- package/dist/lib/node-esm/chunk-BRPFVRAD.mjs +55 -0
- package/dist/lib/node-esm/chunk-BRPFVRAD.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YQYBLFNI.mjs → chunk-EFIWBQDF.mjs} +139 -95
- package/dist/lib/node-esm/chunk-EFIWBQDF.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-J4D2RBBH.mjs → chunk-KUWWHMOA.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-PTZHDZ36.mjs → chunk-MFJPEIVB.mjs} +4 -4
- package/dist/lib/node-esm/chunk-MFJPEIVB.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-PR7EYODX.mjs +765 -0
- package/dist/lib/node-esm/chunk-PR7EYODX.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-X4DDJIVL.mjs → chunk-TXMDLLBR.mjs} +3 -3
- package/dist/lib/node-esm/{chunk-X4DDJIVL.mjs.map → chunk-TXMDLLBR.mjs.map} +1 -1
- package/dist/lib/node-esm/index.mjs +30 -216
- package/dist/lib/node-esm/index.mjs.map +4 -4
- package/dist/lib/node-esm/{intent-resolver-QN2LO5TX.mjs → intent-resolver-WOZKOEBW.mjs} +7 -11
- package/dist/lib/node-esm/intent-resolver-WOZKOEBW.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-PCH6NTVB.mjs → react-surface-7MXUUTAL.mjs} +11 -9
- package/dist/lib/node-esm/react-surface-7MXUUTAL.mjs.map +7 -0
- package/dist/lib/node-esm/transcriber-5WSI6DYK.mjs +57 -0
- package/dist/lib/node-esm/transcriber-5WSI6DYK.mjs.map +7 -0
- package/dist/lib/node-esm/types/index.mjs +4 -8
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +8 -10
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +2 -183
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/intent-resolver.d.ts +2 -2
- package/dist/types/src/capabilities/intent-resolver.d.ts.map +1 -1
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -1
- package/dist/types/src/capabilities/transcriber.d.ts +2 -1
- package/dist/types/src/capabilities/transcriber.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.d.ts +14 -4
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +19 -4
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts +27 -0
- package/dist/types/src/components/Transcript/deprecated/OldTranscript.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/transcript-extension.d.ts +19 -0
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +1 -0
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts +17 -0
- package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +1 -0
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts +10 -0
- package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +1 -0
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts +19 -0
- package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +1 -0
- package/dist/types/src/components/stories/TranscriptionStory.d.ts +11 -0
- package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +1 -0
- package/dist/types/src/components/stories/useIsSpeaking.d.ts +3 -0
- package/dist/types/src/components/stories/useIsSpeaking.d.ts.map +1 -0
- package/dist/types/src/hooks/index.d.ts +1 -0
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioFile.d.ts +1 -1
- package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
- package/dist/types/src/hooks/useAudioTrack.d.ts +1 -1
- package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts +7 -0
- package/dist/types/src/hooks/useQueueModelAdapter.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/useVoiceInput.d.ts.map +1 -1
- package/dist/types/src/model/index.d.ts +2 -0
- package/dist/types/src/model/index.d.ts.map +1 -0
- package/dist/types/src/model/model.d.ts +68 -0
- package/dist/types/src/model/model.d.ts.map +1 -0
- package/dist/types/src/model/model.test.d.ts +2 -0
- package/dist/types/src/model/model.test.d.ts.map +1 -0
- package/dist/types/src/segments-normalization/index.d.ts +4 -0
- package/dist/types/src/segments-normalization/index.d.ts.map +1 -0
- package/dist/types/src/segments-normalization/message-normalizer.d.ts +26 -0
- package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +1 -0
- package/dist/types/src/segments-normalization/normalization.d.ts +520 -0
- package/dist/types/src/segments-normalization/normalization.d.ts.map +1 -0
- package/dist/types/src/segments-normalization/normalization.test.d.ts +2 -0
- package/dist/types/src/segments-normalization/normalization.test.d.ts.map +1 -0
- package/dist/types/src/segments-normalization/utils.d.ts +3 -0
- package/dist/types/src/segments-normalization/utils.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/testing/testing.d.ts +40 -0
- package/dist/types/src/testing/testing.d.ts.map +1 -0
- package/dist/types/src/transcriber/media-stream-recorder.d.ts +8 -5
- package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcriber.browser.test.d.ts +2 -0
- package/dist/types/src/transcriber/transcriber.browser.test.d.ts.map +1 -0
- package/dist/types/src/transcriber/transcriber.d.ts +6 -2
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +19 -15
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -20
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +23 -40
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +15 -8
- package/dist/types/src/types/types.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/index.d.ts +0 -1
- package/dist/types/src/util/index.d.ts.map +1 -1
- package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +62 -41
- package/src/TranscriptionPlugin.tsx +13 -18
- package/src/capabilities/capabilities.ts +15 -8
- package/src/capabilities/index.ts +0 -2
- package/src/capabilities/intent-resolver.ts +7 -8
- package/src/capabilities/react-surface.tsx +5 -4
- package/src/capabilities/transcriber.ts +34 -6
- package/src/components/Transcript/Transcript.stories.tsx +201 -43
- package/src/components/Transcript/Transcript.tsx +83 -208
- package/src/components/Transcript/deprecated/OldTranscript.tsx +260 -0
- package/src/components/Transcript/transcript-extension.ts +236 -0
- package/src/components/TranscriptContainer.tsx +11 -6
- package/src/components/stories/FileTranscription.stories.tsx +240 -0
- package/src/components/stories/KeyWordRecognition.stories.tsx +128 -0
- package/src/components/stories/MicrophoneTranscription.stories.tsx +274 -0
- package/src/components/stories/TranscriptionStory.tsx +41 -0
- package/src/components/stories/useIsSpeaking.tsx +40 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/useAudioFile.ts +39 -9
- package/src/hooks/useAudioTrack.ts +2 -2
- package/src/hooks/useQueueModelAdapter.ts +65 -0
- package/src/hooks/useTranscriber.ts +4 -2
- package/src/meta.ts +2 -2
- package/src/model/index.ts +5 -0
- package/src/model/model.test.ts +169 -0
- package/src/model/model.ts +229 -0
- package/src/segments-normalization/index.ts +7 -0
- package/src/segments-normalization/message-normalizer.ts +108 -0
- package/src/segments-normalization/normalization.test.ts +142 -0
- package/src/segments-normalization/normalization.ts +103 -0
- package/src/segments-normalization/utils.ts +9 -0
- package/src/testing/index.ts +5 -0
- package/src/testing/testing.ts +216 -0
- package/src/transcriber/media-stream-recorder.ts +14 -7
- package/src/transcriber/{transcriber.test.ts → transcriber.browser.test.ts} +7 -7
- package/src/transcriber/transcriber.ts +33 -20
- package/src/transcriber/transcription-manager.ts +87 -71
- package/src/translations.ts +2 -3
- package/src/types/schema.ts +11 -33
- package/src/types/types.ts +8 -12
- package/src/util/index.ts +0 -1
- package/dist/lib/browser/TranscriptContainer-JQ3HFHLQ.mjs +0 -10
- package/dist/lib/browser/app-graph-builder-VDQOVX7P.mjs +0 -191
- package/dist/lib/browser/app-graph-builder-VDQOVX7P.mjs.map +0 -7
- package/dist/lib/browser/chunk-G4B6CPC2.mjs +0 -253
- package/dist/lib/browser/chunk-G4B6CPC2.mjs.map +0 -7
- package/dist/lib/browser/chunk-GU2BNYKZ.mjs +0 -35
- package/dist/lib/browser/chunk-GU2BNYKZ.mjs.map +0 -7
- package/dist/lib/browser/chunk-OGNXNGJB.mjs +0 -73
- package/dist/lib/browser/chunk-OGNXNGJB.mjs.map +0 -7
- package/dist/lib/browser/chunk-YCZISX63.mjs.map +0 -7
- package/dist/lib/browser/chunk-YEPT334A.mjs.map +0 -7
- package/dist/lib/browser/intent-resolver-4R66ZCKT.mjs.map +0 -7
- package/dist/lib/browser/meeting-transcription-state-DLFHQK72.mjs +0 -18
- package/dist/lib/browser/meeting-transcription-state-DLFHQK72.mjs.map +0 -7
- package/dist/lib/browser/react-surface-FQUHU5G7.mjs.map +0 -7
- package/dist/lib/browser/transcriber-LGMIWDYI.mjs +0 -36
- package/dist/lib/browser/transcriber-LGMIWDYI.mjs.map +0 -7
- package/dist/lib/node/TranscriptContainer-QEYTTT2V.cjs.map +0 -7
- package/dist/lib/node/app-graph-builder-IFSIVNUR.cjs +0 -200
- package/dist/lib/node/app-graph-builder-IFSIVNUR.cjs.map +0 -7
- package/dist/lib/node/chunk-3KHUSQNW.cjs +0 -55
- package/dist/lib/node/chunk-3KHUSQNW.cjs.map +0 -7
- package/dist/lib/node/chunk-CZMLKKWT.cjs.map +0 -7
- package/dist/lib/node/chunk-FCCJALOT.cjs.map +0 -7
- package/dist/lib/node/chunk-P4VVD6ZO.cjs +0 -95
- package/dist/lib/node/chunk-P4VVD6ZO.cjs.map +0 -7
- package/dist/lib/node/chunk-UOFHT4GZ.cjs +0 -280
- package/dist/lib/node/chunk-UOFHT4GZ.cjs.map +0 -7
- package/dist/lib/node/intent-resolver-WMMCOUEH.cjs.map +0 -7
- package/dist/lib/node/meeting-transcription-state-URIYILEQ.cjs +0 -34
- package/dist/lib/node/meeting-transcription-state-URIYILEQ.cjs.map +0 -7
- package/dist/lib/node/react-surface-WI2MGWCC.cjs.map +0 -7
- package/dist/lib/node/transcriber-QG5WPKX4.cjs +0 -49
- package/dist/lib/node/transcriber-QG5WPKX4.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-UL6XLIZY.mjs +0 -192
- package/dist/lib/node-esm/app-graph-builder-UL6XLIZY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6X7X2UZF.mjs +0 -254
- package/dist/lib/node-esm/chunk-6X7X2UZF.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-GIO6J6FE.mjs +0 -74
- package/dist/lib/node-esm/chunk-GIO6J6FE.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-HKATMD34.mjs +0 -37
- package/dist/lib/node-esm/chunk-HKATMD34.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-PTZHDZ36.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-YQYBLFNI.mjs.map +0 -7
- package/dist/lib/node-esm/intent-resolver-QN2LO5TX.mjs.map +0 -7
- package/dist/lib/node-esm/meeting-transcription-state-ZYVRAW6Y.mjs +0 -19
- package/dist/lib/node-esm/meeting-transcription-state-ZYVRAW6Y.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-PCH6NTVB.mjs.map +0 -7
- package/dist/lib/node-esm/transcriber-TMPYZ5L4.mjs +0 -37
- package/dist/lib/node-esm/transcriber-TMPYZ5L4.mjs.map +0 -7
- package/dist/types/src/capabilities/app-graph-builder.d.ts +0 -181
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/meeting-transcription-state.d.ts +0 -6
- package/dist/types/src/capabilities/meeting-transcription-state.d.ts.map +0 -1
- package/dist/types/src/components/transcription.stories.d.ts +0 -15
- package/dist/types/src/components/transcription.stories.d.ts.map +0 -1
- package/dist/types/src/transcriber/transcriber.test.d.ts +0 -2
- package/dist/types/src/transcriber/transcriber.test.d.ts.map +0 -1
- package/dist/types/src/util/random-queue-dxn.d.ts +0 -3
- package/dist/types/src/util/random-queue-dxn.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder.ts +0 -152
- package/src/capabilities/meeting-transcription-state.ts +0 -16
- package/src/components/transcription.stories.tsx +0 -196
- package/src/util/random-queue-dxn.ts +0 -9
- /package/dist/lib/browser/{TranscriptContainer-JQ3HFHLQ.mjs.map → TranscriptContainer-PFKLKRPQ.mjs.map} +0 -0
- /package/dist/lib/browser/{chunk-K7FOYAXO.mjs.map → chunk-IGEKO7ZU.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-LP4FG423.cjs.map → chunk-5J3FBCON.cjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-ZXUCOWGY.mjs.map → TranscriptContainer-DLNRFVTA.mjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-J4D2RBBH.mjs.map → chunk-KUWWHMOA.mjs.map} +0 -0
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
import { type WavConfig, type AudioChunk, type AudioRecorder } from './audio-recorder';
|
|
2
|
+
export type MediaStreamRecorderParams = {
|
|
3
|
+
mediaStreamTrack: MediaStreamTrack;
|
|
4
|
+
config: {
|
|
5
|
+
interval: number;
|
|
6
|
+
};
|
|
7
|
+
};
|
|
2
8
|
/**
|
|
3
9
|
* Recorder that uses the MediaContext API and AudioNode API to record audio.
|
|
4
10
|
*
|
|
@@ -9,14 +15,11 @@ export declare class MediaStreamRecorder implements AudioRecorder {
|
|
|
9
15
|
/**
|
|
10
16
|
* Default MediaRecorder implementation do not support wav encoding.
|
|
11
17
|
*/
|
|
12
|
-
private readonly
|
|
18
|
+
private readonly _config;
|
|
13
19
|
private _mediaRecorder?;
|
|
14
20
|
private _header?;
|
|
15
21
|
private _onChunk?;
|
|
16
|
-
constructor({ mediaStreamTrack,
|
|
17
|
-
mediaStreamTrack: MediaStreamTrack;
|
|
18
|
-
interval: number;
|
|
19
|
-
});
|
|
22
|
+
constructor({ mediaStreamTrack, config }: MediaStreamRecorderParams);
|
|
20
23
|
get wavConfig(): WavConfig;
|
|
21
24
|
get mediaStreamTrack(): MediaStreamTrack;
|
|
22
25
|
setOnChunk(onChunk: (chunk: AudioChunk) => void): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"media-stream-recorder.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/media-stream-recorder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASvF;;;;GAIG;AACH,qBACa,mBAAoB,YAAW,aAAa;IACvD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAmB;IACrD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,
|
|
1
|
+
{"version":3,"file":"media-stream-recorder.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/media-stream-recorder.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,UAAU,EAAE,KAAK,aAAa,EAAE,MAAM,kBAAkB,CAAC;AASvF,MAAM,MAAM,yBAAyB,GAAG;IACtC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,MAAM,EAAE;QACN,QAAQ,EAAE,MAAM,CAAC;KAClB,CAAC;CACH,CAAC;AAEF;;;;GAIG;AACH,qBACa,mBAAoB,YAAW,aAAa;IACvD,OAAO,CAAC,QAAQ,CAAC,iBAAiB,CAAmB;IACrD;;OAEG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAsC;IAC9D,OAAO,CAAC,cAAc,CAAC,CAA6B;IACpD,OAAO,CAAC,OAAO,CAAC,CAAyB;IACzC,OAAO,CAAC,QAAQ,CAAC,CAA8B;gBAEnC,EAAE,gBAAgB,EAAE,MAAM,EAAE,EAAE,yBAAyB;IAKnE,IAAI,SAAS,IAAI,SAAS,CAOzB;IAED,IAAI,gBAAgB,qBAEnB;IAED,UAAU,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,IAAI,GAAG,IAAI;IAIhD,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAkBtB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;YAQb,gBAAgB;CA2B/B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcriber.browser.test.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/transcriber.browser.test.ts"],"names":[],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type Context, Resource } from '@dxos/context';
|
|
2
|
+
import { type DataType } from '@dxos/schema';
|
|
2
3
|
import { type AudioRecorder } from './audio-recorder';
|
|
3
|
-
import { type TranscriptSegment } from '../types';
|
|
4
4
|
export type TranscribeConfig = {
|
|
5
5
|
/**
|
|
6
6
|
* Number of chunks to transcribe automatically after.
|
|
@@ -15,7 +15,11 @@ export type TranscribeConfig = {
|
|
|
15
15
|
export type TranscriberParams = {
|
|
16
16
|
config: TranscribeConfig;
|
|
17
17
|
recorder: AudioRecorder;
|
|
18
|
-
|
|
18
|
+
/**
|
|
19
|
+
* Callback to handle the transcribed segments, after all segment transformers are applied.
|
|
20
|
+
* @param segments - The transcribed segments.
|
|
21
|
+
*/
|
|
22
|
+
onSegments: (segments: DataType.MessageBlock.Transcription[]) => Promise<void>;
|
|
19
23
|
};
|
|
20
24
|
/**
|
|
21
25
|
* Handles transcription of audio chunks.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcriber.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/transcriber.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,OAAO,EAAkB,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"transcriber.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/transcriber.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,OAAO,EAAkB,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEvE,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,cAAc,CAAC;AAG7C,OAAO,EAAE,KAAK,aAAa,EAAmB,MAAM,kBAAkB,CAAC;AAuCvE,MAAM,MAAM,gBAAgB,GAAG;IAC7B;;OAEG;IACH,2BAA2B,EAAE,MAAM,CAAC;IAEpC;;;OAGG;IACH,wBAAwB,EAAE,MAAM,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAC9B,MAAM,EAAE,gBAAgB,CAAC;IACzB,QAAQ,EAAE,aAAa,CAAC;IACxB;;;OAGG;IACH,UAAU,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,YAAY,CAAC,aAAa,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAChF,CAAC;AAEF;;;;GAIG;AACH,qBAAa,WAAY,SAAQ,QAAQ;IACvC,OAAO,CAAC,YAAY,CAAoB;IACxC,OAAO,CAAC,kBAAkB,CAAK;IAE/B,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAoC;IAEjE,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAmB;IAC3C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;IAC1C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAkC;IAE9D,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,eAAe,CAAC,CAA2B;gBAEvC,EAAE,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,iBAAiB;cAOtC,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;cAQlC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAOhD,oBAAoB,IAAI,IAAI;IAS5B,mBAAmB,IAAI,IAAI;IAU3B,OAAO,CAAC,eAAe;YAgBT,WAAW;IAoBzB,OAAO,CAAC,cAAc;YAOR,iBAAiB;YAejB,mBAAmB;IA+BjC,OAAO,CAAC,cAAc;CAqCvB"}
|
|
@@ -1,37 +1,41 @@
|
|
|
1
1
|
import { Resource } from '@dxos/context';
|
|
2
|
-
import { type
|
|
2
|
+
import { type DXN } from '@dxos/keys';
|
|
3
3
|
import { type EdgeHttpClient } from '@dxos/react-edge-client';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { DataType } from '@dxos/schema';
|
|
5
|
+
export type TranscriptMessageEnricher = (message: DataType.Message) => Promise<DataType.Message>;
|
|
6
|
+
export type TranscriptionManagerOptions = {
|
|
7
|
+
edgeClient: EdgeHttpClient;
|
|
8
|
+
/**
|
|
9
|
+
* Enrich the message before it is written to the transcription queue.
|
|
10
|
+
*/
|
|
11
|
+
messageEnricher?: TranscriptMessageEnricher;
|
|
12
|
+
};
|
|
6
13
|
/**
|
|
7
14
|
* Manages transcription state for a meeting.
|
|
8
15
|
*/
|
|
9
16
|
export declare class TranscriptionManager extends Resource {
|
|
10
17
|
private readonly _edgeClient;
|
|
18
|
+
private readonly _messageEnricher?;
|
|
11
19
|
private _audioStreamTrack?;
|
|
12
|
-
private
|
|
13
|
-
private _hue?;
|
|
20
|
+
private _identityDid?;
|
|
14
21
|
private _mediaRecorder?;
|
|
15
22
|
private _transcriber?;
|
|
16
|
-
private _enabled;
|
|
17
23
|
private _queue?;
|
|
18
|
-
|
|
24
|
+
private _enabled;
|
|
25
|
+
constructor(options: TranscriptionManagerOptions);
|
|
19
26
|
protected _open(): Promise<void>;
|
|
20
27
|
protected _close(): Promise<void>;
|
|
21
|
-
|
|
28
|
+
/** @reactive */
|
|
29
|
+
get enabled(): boolean;
|
|
30
|
+
setQueue(queueDxn: DXN): TranscriptionManager;
|
|
31
|
+
setIdentityDid(did: string): TranscriptionManager;
|
|
32
|
+
setRecording(recording?: boolean): TranscriptionManager;
|
|
22
33
|
/**
|
|
23
34
|
* Enable or disable transcription.
|
|
24
35
|
* @param enabled - Whether to enable transcription.
|
|
25
36
|
*/
|
|
26
37
|
setEnabled(enabled?: boolean): Promise<void>;
|
|
27
38
|
setAudioTrack(track?: MediaStreamTrack): Promise<void>;
|
|
28
|
-
/**
|
|
29
|
-
* Set the queue to save the transcription to.
|
|
30
|
-
* @param queue - The queue to save the transcription to or the DXN of the queue.
|
|
31
|
-
*/
|
|
32
|
-
setQueue(queue?: Queue<TranscriptBlock> | string): void;
|
|
33
|
-
setName(name: string): void;
|
|
34
|
-
setHue(hue: HuePalette): void;
|
|
35
39
|
private _toggleTranscriber;
|
|
36
40
|
private _maybeReinitTranscriber;
|
|
37
41
|
private _onSegments;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transcription-manager.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/transcription-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transcription-manager.d.ts","sourceRoot":"","sources":["../../../../src/transcriber/transcription-manager.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAGzC,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,YAAY,CAAC;AAEtC,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAqBxC,MAAM,MAAM,yBAAyB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,OAAO,KAAK,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;AAEjG,MAAM,MAAM,2BAA2B,GAAG;IACxC,UAAU,EAAE,cAAc,CAAC;IAE3B;;OAEG;IACH,eAAe,CAAC,EAAE,yBAAyB,CAAC;CAC7C,CAAC;AAEF;;GAEG;AACH,qBAAa,oBAAqB,SAAQ,QAAQ;IAChD,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAiB;IAC7C,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAC,CAA4B;IAC9D,OAAO,CAAC,iBAAiB,CAAC,CAA+B;IACzD,OAAO,CAAC,YAAY,CAAC,CAAqB;IAC1C,OAAO,CAAC,cAAc,CAAC,CAAkC;IACzD,OAAO,CAAC,YAAY,CAAC,CAA0B;IAC/C,OAAO,CAAC,MAAM,CAAC,CAAsC;IACrD,OAAO,CAAC,QAAQ,CAAiB;gBAErB,OAAO,EAAE,2BAA2B;cAMvB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;cAItB,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAIhD,gBAAgB;IAChB,IAAI,OAAO,YAEV;IAED,QAAQ,CAAC,QAAQ,EAAE,GAAG,GAAG,oBAAoB;IAQ7C,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,oBAAoB;IAOjD,YAAY,CAAC,SAAS,CAAC,EAAE,OAAO,GAAG,oBAAoB;IAavD;;;OAGG;IAEG,UAAU,CAAC,OAAO,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;IAW5C,aAAa,CAAC,KAAK,CAAC,EAAE,gBAAgB,GAAG,OAAO,CAAC,IAAI,CAAC;YAU9C,kBAAkB;YAwBlB,uBAAuB;YA2BvB,WAAW;CAiB1B"}
|
|
@@ -1,34 +1,17 @@
|
|
|
1
|
+
import { TranscriptType } from './types';
|
|
1
2
|
declare const _default: {
|
|
2
3
|
'en-US': {
|
|
3
|
-
[
|
|
4
|
+
[TranscriptType.typename]: {
|
|
4
5
|
'typename label': string;
|
|
5
6
|
'object name placeholder': string;
|
|
6
|
-
'plugin name'?: undefined;
|
|
7
|
-
'transcript companion label'?: undefined;
|
|
8
|
-
'start transcription label'?: undefined;
|
|
9
|
-
'stop transcription label'?: undefined;
|
|
10
|
-
'delete button'?: undefined;
|
|
11
|
-
'bookmark button'?: undefined;
|
|
12
|
-
'scroll to end label'?: undefined;
|
|
13
|
-
} | {
|
|
14
|
-
'plugin name': string;
|
|
15
|
-
'transcript companion label': string;
|
|
16
|
-
'start transcription label': string;
|
|
17
|
-
'stop transcription label': string;
|
|
18
|
-
'delete button': string;
|
|
19
|
-
'bookmark button': string;
|
|
20
|
-
'scroll to end label': string;
|
|
21
|
-
'typename label'?: undefined;
|
|
22
|
-
'object name placeholder'?: undefined;
|
|
23
7
|
};
|
|
24
8
|
"dxos.org/plugin/transcription": {
|
|
25
9
|
'plugin name': string;
|
|
26
10
|
'transcript companion label': string;
|
|
27
|
-
'start transcription label': string;
|
|
28
|
-
'stop transcription label': string;
|
|
29
11
|
'delete button': string;
|
|
30
12
|
'bookmark button': string;
|
|
31
13
|
'scroll to end label': string;
|
|
14
|
+
'settings entity extraction label': string;
|
|
32
15
|
};
|
|
33
16
|
};
|
|
34
17
|
}[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../../../src/translations.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;;;QAKnC,CAAC,cAAc,CAAC,QAAQ,CAAC;;;UAGxB;;;;;;;;;;;AANP,wBAmBE"}
|
|
@@ -1,57 +1,40 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import { Expando } from '@dxos/echo-schema';
|
|
2
3
|
/**
|
|
3
4
|
* Root transcript object created when the user starts a transcription.
|
|
4
5
|
*/
|
|
5
|
-
export declare const TranscriptSchema:
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
ended: S.optional<typeof S.Date>;
|
|
6
|
+
export declare const TranscriptSchema: Schema.Struct<{
|
|
7
|
+
started: Schema.optional<typeof Schema.String>;
|
|
8
|
+
ended: Schema.optional<typeof Schema.String>;
|
|
9
9
|
/**
|
|
10
10
|
* Queue containing TranscriptBlock objects.
|
|
11
11
|
*/
|
|
12
12
|
queue: import("@dxos/echo-schema").Ref$<Expando>;
|
|
13
13
|
}>;
|
|
14
|
-
declare const TranscriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
14
|
+
declare const TranscriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<Readonly<{
|
|
15
|
+
started: Schema.optional<typeof Schema.String>;
|
|
16
|
+
ended: Schema.optional<typeof Schema.String>;
|
|
17
|
+
/**
|
|
18
|
+
* Queue containing TranscriptBlock objects.
|
|
19
|
+
*/
|
|
20
|
+
queue: import("@dxos/echo-schema").Ref$<Expando>;
|
|
21
|
+
}>, import("@dxos/echo-schema").TypedObjectOptions>, Schema.Struct.Encoded<Readonly<{
|
|
22
|
+
started: Schema.optional<typeof Schema.String>;
|
|
23
|
+
ended: Schema.optional<typeof Schema.String>;
|
|
24
|
+
/**
|
|
25
|
+
* Queue containing TranscriptBlock objects.
|
|
26
|
+
*/
|
|
27
|
+
queue: import("@dxos/echo-schema").Ref$<Expando>;
|
|
28
|
+
}>>>;
|
|
25
29
|
export declare class TranscriptType extends TranscriptType_base {
|
|
26
30
|
}
|
|
27
31
|
/**
|
|
28
32
|
* First message in queue.
|
|
29
33
|
* Contains metadata for the recording and transcript.
|
|
30
34
|
*/
|
|
31
|
-
declare const TranscriptHeader:
|
|
32
|
-
started:
|
|
33
|
-
}>;
|
|
34
|
-
export type TranscriptHeader = S.Schema.Type<typeof TranscriptHeader>;
|
|
35
|
-
/**
|
|
36
|
-
* Transcription fragment.
|
|
37
|
-
*/
|
|
38
|
-
declare const TranscriptSegment: S.Struct<{
|
|
39
|
-
started: typeof S.Date;
|
|
40
|
-
text: typeof S.String;
|
|
35
|
+
declare const TranscriptHeader: Schema.Struct<{
|
|
36
|
+
started: Schema.optional<typeof Schema.String>;
|
|
41
37
|
}>;
|
|
42
|
-
export type
|
|
43
|
-
/**
|
|
44
|
-
* Transcription block (from single speaker).
|
|
45
|
-
*/
|
|
46
|
-
export declare const TranscriptBlock: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
|
|
47
|
-
id: typeof S.String;
|
|
48
|
-
authorName: S.optional<typeof S.String>;
|
|
49
|
-
authorHue: S.optional<typeof S.String>;
|
|
50
|
-
segments: S.Array$<S.Struct<{
|
|
51
|
-
started: typeof S.Date;
|
|
52
|
-
text: typeof S.String;
|
|
53
|
-
}>>;
|
|
54
|
-
}>>;
|
|
55
|
-
export type TranscriptBlock = S.Schema.Type<typeof TranscriptBlock>;
|
|
38
|
+
export type TranscriptHeader = Schema.Schema.Type<typeof TranscriptHeader>;
|
|
56
39
|
export {};
|
|
57
40
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAoB,MAAM,mBAAmB,CAAC;AAE9D;;GAEG;AACH,eAAO,MAAM,gBAAgB;;;IAM3B;;OAEG;;EAGH,CAAC;;;;IALD;;OAEG;;;;;IAFH;;OAEG;;;AAKL,qBAAa,cAAe,SAAQ,mBAGT;CAAG;AAI9B;;;GAGG;AACH,QAAA,MAAM,gBAAgB;;EAEpB,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
|
@@ -1,18 +1,26 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema } from 'effect';
|
|
2
|
+
import { SpaceId } from '@dxos/react-client/echo';
|
|
2
3
|
import { TranscriptType } from './schema';
|
|
3
4
|
/**
|
|
4
5
|
* Endpoint to the calls service.
|
|
5
6
|
*/
|
|
6
7
|
export declare const TRANSCRIPTION_URL = "https://calls-service.dxos.workers.dev";
|
|
7
8
|
export declare namespace TranscriptionAction {
|
|
8
|
-
const Create_base:
|
|
9
|
-
readonly _tag:
|
|
9
|
+
const Create_base: Schema.TaggedClass<Create, "dxos.org/plugin/transcription/action/create", {
|
|
10
|
+
readonly _tag: Schema.tag<"dxos.org/plugin/transcription/action/create">;
|
|
10
11
|
} & {
|
|
11
|
-
input:
|
|
12
|
-
name:
|
|
13
|
-
spaceId:
|
|
12
|
+
input: Schema.Struct<{
|
|
13
|
+
name: Schema.optional<typeof Schema.String>;
|
|
14
|
+
spaceId: Schema.Schema<SpaceId, string, never> & {
|
|
15
|
+
byteLength: number;
|
|
16
|
+
encode: (value: Uint8Array) => SpaceId;
|
|
17
|
+
decode: (value: SpaceId) => Uint8Array;
|
|
18
|
+
isValid: (value: string) => value is SpaceId;
|
|
19
|
+
make: (value: string) => SpaceId;
|
|
20
|
+
random: () => SpaceId;
|
|
21
|
+
};
|
|
14
22
|
}>;
|
|
15
|
-
output:
|
|
23
|
+
output: Schema.Struct<{
|
|
16
24
|
object: typeof TranscriptType;
|
|
17
25
|
}>;
|
|
18
26
|
}>;
|
|
@@ -20,5 +28,4 @@ export declare namespace TranscriptionAction {
|
|
|
20
28
|
}
|
|
21
29
|
export {};
|
|
22
30
|
}
|
|
23
|
-
export declare const isTranscript: (object: unknown) => object is typeof TranscriptType;
|
|
24
31
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/types/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAElD,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAK1C;;GAEG;AAEH,eAAO,MAAM,iBAAiB,2CAA2C,CAAC;AAE1E,yBAAiB,mBAAmB,CAAC;;;;;;;;;;;;;;;;;;;IAGnC,MAAM,OAAO,MAAO,SAAQ,WAQ1B;KAAG;;CACN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../src/util/array.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"array.d.ts","sourceRoot":"","sources":["../../../../src/util/array.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,kBAAkB,GAAI,QAAQ,YAAY,EAAE,8BASxD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-time-str.d.ts","sourceRoot":"","sources":["../../../../src/util/get-time-str.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"get-time-str.d.ts","sourceRoot":"","sources":["../../../../src/util/get-time-str.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,UAAU,GAAI,YAAY,MAAM,WAOzC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/util/index.ts"],"names":[],"mappings":"AAIA,cAAc,SAAS,CAAC;AACxB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,uBAAuB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"monitor-audio-level.d.ts","sourceRoot":"","sources":["../../../../src/util/monitor-audio-level.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,
|
|
1
|
+
{"version":3,"file":"monitor-audio-level.d.ts","sourceRoot":"","sources":["../../../../src/util/monitor-audio-level.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,GAAI,8CAI/B;IACD,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,eA6CA,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"5.
|
|
1
|
+
{"version":"5.8.3"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dxos/plugin-transcription",
|
|
3
|
-
"version": "0.8.2
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Voice transcription.",
|
|
5
5
|
"homepage": "https://dxos.org",
|
|
6
6
|
"bugs": "https://github.com/dxos/dxos/issues",
|
|
@@ -32,9 +32,11 @@
|
|
|
32
32
|
"src"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@
|
|
35
|
+
"@codemirror/state": "^6.4.1",
|
|
36
|
+
"@codemirror/view": "^6.34.1",
|
|
37
|
+
"@preact-signals/safe-react": "^0.9.0",
|
|
38
|
+
"@preact/signals-core": "^1.9.0",
|
|
36
39
|
"date-fns": "^3.3.1",
|
|
37
|
-
"effect": "3.13.3",
|
|
38
40
|
"extendable-media-recorder": "^9.2.19",
|
|
39
41
|
"extendable-media-recorder-wav-encoder": "^7.0.123",
|
|
40
42
|
"main-thread-scheduling": "^14.1.1",
|
|
@@ -42,54 +44,73 @@
|
|
|
42
44
|
"react-router-dom": "^6.4.0",
|
|
43
45
|
"react-use": "^17.5.1",
|
|
44
46
|
"wavefile": "^11.0.0",
|
|
45
|
-
"@dxos/
|
|
46
|
-
"@dxos/
|
|
47
|
-
"@dxos/
|
|
48
|
-
"@dxos/
|
|
49
|
-
"@dxos/
|
|
50
|
-
"@dxos/
|
|
51
|
-
"@dxos/
|
|
52
|
-
"@dxos/
|
|
53
|
-
"@dxos/
|
|
54
|
-
"@dxos/
|
|
55
|
-
"@dxos/
|
|
56
|
-
"@dxos/
|
|
57
|
-
"@dxos/
|
|
58
|
-
"@dxos/
|
|
59
|
-
"@dxos/
|
|
60
|
-
"@dxos/
|
|
61
|
-
"@dxos/
|
|
62
|
-
"@dxos/
|
|
63
|
-
"@dxos/
|
|
64
|
-
"@dxos/plugin-
|
|
65
|
-
"@dxos/
|
|
66
|
-
"@dxos/
|
|
67
|
-
"@dxos/
|
|
68
|
-
"@dxos/
|
|
69
|
-
"@dxos/
|
|
70
|
-
"@dxos/react-
|
|
71
|
-
"@dxos/react-
|
|
72
|
-
"@dxos/
|
|
73
|
-
"@dxos/
|
|
74
|
-
"@dxos/
|
|
75
|
-
"@dxos/
|
|
47
|
+
"@dxos/ai": "0.8.2",
|
|
48
|
+
"@dxos/app-framework": "0.8.2",
|
|
49
|
+
"@dxos/async": "0.8.2",
|
|
50
|
+
"@dxos/assistant": "0.8.2",
|
|
51
|
+
"@dxos/artifact": "0.8.2",
|
|
52
|
+
"@dxos/client": "0.8.2",
|
|
53
|
+
"@dxos/context": "0.8.2",
|
|
54
|
+
"@dxos/codec-protobuf": "0.8.2",
|
|
55
|
+
"@dxos/display-name": "0.8.2",
|
|
56
|
+
"@dxos/echo": "0.8.2",
|
|
57
|
+
"@dxos/debug": "0.8.2",
|
|
58
|
+
"@dxos/echo-db": "0.8.2",
|
|
59
|
+
"@dxos/echo-schema": "0.8.2",
|
|
60
|
+
"@dxos/invariant": "0.8.2",
|
|
61
|
+
"@dxos/functions": "0.8.2",
|
|
62
|
+
"@dxos/keys": "0.8.2",
|
|
63
|
+
"@dxos/local-storage": "0.8.2",
|
|
64
|
+
"@dxos/live-object": "0.8.2",
|
|
65
|
+
"@dxos/log": "0.8.2",
|
|
66
|
+
"@dxos/plugin-deck": "0.8.2",
|
|
67
|
+
"@dxos/plugin-client": "0.8.2",
|
|
68
|
+
"@dxos/plugin-graph": "0.8.2",
|
|
69
|
+
"@dxos/plugin-markdown": "0.8.2",
|
|
70
|
+
"@dxos/plugin-space": "0.8.2",
|
|
71
|
+
"@dxos/protocols": "0.8.2",
|
|
72
|
+
"@dxos/react-edge-client": "0.8.2",
|
|
73
|
+
"@dxos/react-client": "0.8.2",
|
|
74
|
+
"@dxos/plugin-thread": "0.8.2",
|
|
75
|
+
"@dxos/react-ui-attention": "0.8.2",
|
|
76
|
+
"@dxos/react-ui-components": "0.8.2",
|
|
77
|
+
"@dxos/react-ui-editor": "0.8.2",
|
|
78
|
+
"@dxos/react-ui-grid": "0.8.2",
|
|
79
|
+
"@dxos/react-ui-form": "0.8.2",
|
|
80
|
+
"@dxos/react-ui-stack": "0.8.2",
|
|
81
|
+
"@dxos/schema": "0.8.2",
|
|
82
|
+
"@dxos/react-ui-sfx": "0.8.2",
|
|
83
|
+
"@dxos/tracing": "0.8.2",
|
|
84
|
+
"@dxos/util": "0.8.2"
|
|
76
85
|
},
|
|
77
86
|
"devDependencies": {
|
|
87
|
+
"@effect-rx/rx-react": "^0.34.1",
|
|
88
|
+
"@effect/platform": "0.80.12",
|
|
89
|
+
"@types/dom-speech-recognition": "^0.0.6",
|
|
78
90
|
"@types/react": "~18.2.0",
|
|
91
|
+
"effect": "3.14.21",
|
|
79
92
|
"react": "~18.2.0",
|
|
80
93
|
"react-dom": "~18.2.0",
|
|
81
94
|
"tailwindcss": "~3.4.1",
|
|
82
|
-
"@dxos/
|
|
83
|
-
"@dxos/
|
|
84
|
-
"@dxos/
|
|
85
|
-
"@dxos/
|
|
86
|
-
"@dxos/react-ui
|
|
95
|
+
"@dxos/plugin-preview": "0.8.2",
|
|
96
|
+
"@dxos/plugin-storybook-layout": "0.8.2",
|
|
97
|
+
"@dxos/random": "0.8.2",
|
|
98
|
+
"@dxos/react-ui-syntax-highlighter": "0.8.2",
|
|
99
|
+
"@dxos/react-ui": "0.8.2",
|
|
100
|
+
"@dxos/react-ui-theme": "0.8.2",
|
|
101
|
+
"@dxos/react-ui-form": "0.8.2",
|
|
102
|
+
"@dxos/plugin-theme": "0.8.2",
|
|
103
|
+
"@dxos/storybook-utils": "0.8.2",
|
|
104
|
+
"@dxos/test-utils": "0.8.2"
|
|
87
105
|
},
|
|
88
106
|
"optionalDependencies": {
|
|
107
|
+
"@effect-rx/rx-react": "^0.34.1",
|
|
108
|
+
"@effect/platform": "0.80.12",
|
|
109
|
+
"effect": "^3.13.3",
|
|
89
110
|
"react": "~18.2.0",
|
|
90
111
|
"react-dom": "~18.2.0",
|
|
91
|
-
"@dxos/react-ui
|
|
92
|
-
"@dxos/react-ui": "0.8.2
|
|
112
|
+
"@dxos/react-ui": "0.8.2",
|
|
113
|
+
"@dxos/react-ui-theme": "0.8.2"
|
|
93
114
|
},
|
|
94
115
|
"publishConfig": {
|
|
95
116
|
"access": "public"
|
|
@@ -6,11 +6,14 @@ import { Capabilities, Events, contributes, defineModule, definePlugin } from '@
|
|
|
6
6
|
import { QueueImpl } from '@dxos/echo-db';
|
|
7
7
|
import { isInstanceOf } from '@dxos/echo-schema';
|
|
8
8
|
import { ClientCapabilities, ClientEvents } from '@dxos/plugin-client';
|
|
9
|
+
import { getSpace } from '@dxos/react-client/echo';
|
|
10
|
+
import { DataType } from '@dxos/schema';
|
|
9
11
|
|
|
10
|
-
import {
|
|
12
|
+
import { IntentResolver, ReactSurface, Transcriber } from './capabilities';
|
|
13
|
+
import { renderMarkdown } from './components';
|
|
11
14
|
import { meta } from './meta';
|
|
12
15
|
import translations from './translations';
|
|
13
|
-
import {
|
|
16
|
+
import { TranscriptType } from './types';
|
|
14
17
|
|
|
15
18
|
export const TranscriptionPlugin = () =>
|
|
16
19
|
definePlugin(meta, [
|
|
@@ -19,16 +22,6 @@ export const TranscriptionPlugin = () =>
|
|
|
19
22
|
activatesOn: Events.SetupTranslations,
|
|
20
23
|
activate: () => contributes(Capabilities.Translations, translations),
|
|
21
24
|
}),
|
|
22
|
-
defineModule({
|
|
23
|
-
id: `${meta.id}/module/transcription`,
|
|
24
|
-
activatesOn: Events.SetupAppGraph,
|
|
25
|
-
activate: Transcriber,
|
|
26
|
-
}),
|
|
27
|
-
defineModule({
|
|
28
|
-
id: `${meta.id}/module/meeting-transcription-state`,
|
|
29
|
-
activatesOn: Events.SetupAppGraph,
|
|
30
|
-
activate: MeetingTranscriptionState,
|
|
31
|
-
}),
|
|
32
25
|
defineModule({
|
|
33
26
|
id: `${meta.id}/module/metadata`,
|
|
34
27
|
activatesOn: Events.SetupMetadata,
|
|
@@ -39,12 +32,14 @@ export const TranscriptionPlugin = () =>
|
|
|
39
32
|
icon: 'ph--subtitles--regular',
|
|
40
33
|
// TODO(wittjosiah): Factor out. Artifact? Separate capability?
|
|
41
34
|
getTextContent: async (transcript: TranscriptType) => {
|
|
42
|
-
const client = context.
|
|
35
|
+
const client = context.getCapability(ClientCapabilities.Client);
|
|
36
|
+
const space = getSpace(transcript);
|
|
37
|
+
const members = space?.members.get().map((member) => member.identity) ?? [];
|
|
43
38
|
const queue = new QueueImpl(client.edge, transcript.queue.dxn);
|
|
44
39
|
await queue.refresh();
|
|
45
|
-
const content = queue.
|
|
46
|
-
.filter((
|
|
47
|
-
.
|
|
40
|
+
const content = queue.objects
|
|
41
|
+
.filter((message) => isInstanceOf(DataType.Message, message))
|
|
42
|
+
.flatMap((message, index) => renderMarkdown(members)(message, index))
|
|
48
43
|
.join('\n\n');
|
|
49
44
|
return content;
|
|
50
45
|
},
|
|
@@ -67,8 +62,8 @@ export const TranscriptionPlugin = () =>
|
|
|
67
62
|
activate: IntentResolver,
|
|
68
63
|
}),
|
|
69
64
|
defineModule({
|
|
70
|
-
id: `${meta.id}/module/
|
|
65
|
+
id: `${meta.id}/module/transcription`,
|
|
71
66
|
activatesOn: Events.SetupAppGraph,
|
|
72
|
-
activate:
|
|
67
|
+
activate: Transcriber,
|
|
73
68
|
}),
|
|
74
69
|
]);
|
|
@@ -3,24 +3,31 @@
|
|
|
3
3
|
//
|
|
4
4
|
|
|
5
5
|
import { defineCapability } from '@dxos/app-framework';
|
|
6
|
-
import { type ReactiveObject } from '@dxos/live-object';
|
|
7
6
|
|
|
8
7
|
import { TRANSCRIPTION_PLUGIN } from '../meta';
|
|
9
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
type TranscriberParams,
|
|
10
|
+
type Transcriber,
|
|
11
|
+
type TranscriptionManager,
|
|
12
|
+
type TranscriptMessageEnricher,
|
|
13
|
+
type MediaStreamRecorderParams,
|
|
14
|
+
} from '../transcriber';
|
|
10
15
|
|
|
11
16
|
export namespace TranscriptionCapabilities {
|
|
12
17
|
export type GetTranscriberProps = {
|
|
13
18
|
audioStreamTrack: MediaStreamTrack;
|
|
14
19
|
onSegments: TranscriberParams['onSegments'];
|
|
20
|
+
transcriberConfig?: Partial<TranscriberParams['config']>;
|
|
21
|
+
recorderConfig?: Partial<MediaStreamRecorderParams['config']>;
|
|
15
22
|
};
|
|
16
23
|
export type GetTranscriber = (props: GetTranscriberProps) => Transcriber;
|
|
17
24
|
export const Transcriber = defineCapability<GetTranscriber>(`${TRANSCRIPTION_PLUGIN}/capability/transcriber`);
|
|
18
25
|
|
|
19
|
-
export type
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export const
|
|
24
|
-
`${TRANSCRIPTION_PLUGIN}/capability/
|
|
26
|
+
export type GetTranscriptionManagerProps = {
|
|
27
|
+
messageEnricher?: TranscriptMessageEnricher;
|
|
28
|
+
};
|
|
29
|
+
export type GetTranscriptionManager = (props: GetTranscriptionManagerProps) => TranscriptionManager;
|
|
30
|
+
export const TranscriptionManager = defineCapability<GetTranscriptionManager>(
|
|
31
|
+
`${TRANSCRIPTION_PLUGIN}/capability/transcription-manager`,
|
|
25
32
|
);
|
|
26
33
|
}
|
|
@@ -4,9 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
import { lazy } from '@dxos/app-framework';
|
|
6
6
|
|
|
7
|
-
export const AppGraphBuilder = lazy(() => import('./app-graph-builder'));
|
|
8
7
|
export const IntentResolver = lazy(() => import('./intent-resolver'));
|
|
9
|
-
export const MeetingTranscriptionState = lazy(() => import('./meeting-transcription-state'));
|
|
10
8
|
export const ReactSurface = lazy(() => import('./react-surface'));
|
|
11
9
|
export const Transcriber = lazy(() => import('./transcriber'));
|
|
12
10
|
|