@dxos/plugin-transcription 0.8.2-main.12df754 → 0.8.2-main.30e4dbb
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-4D4BHE7G.mjs → TranscriptContainer-3LU3XBEB.mjs} +3 -3
- package/dist/lib/browser/app-graph-builder-YXELPN6F.mjs +349 -0
- package/dist/lib/browser/app-graph-builder-YXELPN6F.mjs.map +7 -0
- package/dist/lib/browser/{chunk-DR3NBV6Q.mjs → chunk-GWY2Q2NE.mjs} +105 -78
- package/dist/lib/browser/chunk-GWY2Q2NE.mjs.map +7 -0
- package/dist/lib/browser/{chunk-RHHJZQPM.mjs → chunk-HNIKXVCG.mjs} +135 -117
- package/dist/lib/browser/chunk-HNIKXVCG.mjs.map +7 -0
- package/dist/lib/browser/chunk-HRDAILQX.mjs +27 -0
- package/dist/lib/browser/chunk-HRDAILQX.mjs.map +7 -0
- package/dist/lib/browser/{chunk-5BE6RTNC.mjs → chunk-LTIQFX4W.mjs} +1 -1
- package/dist/lib/browser/{chunk-5BE6RTNC.mjs.map → chunk-LTIQFX4W.mjs.map} +1 -1
- package/dist/lib/browser/{chunk-5Q3R53U3.mjs → chunk-TGOKX32G.mjs} +21 -31
- package/dist/lib/browser/chunk-TGOKX32G.mjs.map +7 -0
- package/dist/lib/browser/index.mjs +29 -17
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/{intent-resolver-ZQQEH27F.mjs → intent-resolver-BBB3DWV4.mjs} +4 -4
- package/dist/lib/browser/{intent-resolver-ZQQEH27F.mjs.map → intent-resolver-BBB3DWV4.mjs.map} +2 -2
- package/dist/lib/browser/{meeting-transcription-state-5D52VTHU.mjs → meeting-transcription-state-MNA2XROE.mjs} +2 -2
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/{react-surface-HETJ5XY6.mjs → react-surface-R277DACJ.mjs} +18 -7
- package/dist/lib/browser/react-surface-R277DACJ.mjs.map +7 -0
- package/dist/lib/browser/settings-I226DZ27.mjs +24 -0
- package/dist/lib/browser/settings-I226DZ27.mjs.map +7 -0
- package/dist/lib/browser/{transcriber-SMRLU2KY.mjs → transcriber-QRSS6X6S.mjs} +4 -4
- package/dist/lib/browser/types/index.mjs +3 -3
- package/dist/lib/node/{TranscriptContainer-ZWP6UKY6.cjs → TranscriptContainer-DICOMZLM.cjs} +8 -8
- package/dist/lib/node/{TranscriptContainer-ZWP6UKY6.cjs.map → TranscriptContainer-DICOMZLM.cjs.map} +2 -2
- package/dist/lib/node/app-graph-builder-I6LYVIYY.cjs +350 -0
- package/dist/lib/node/app-graph-builder-I6LYVIYY.cjs.map +7 -0
- package/dist/lib/node/{chunk-3QEJ5EBO.cjs → chunk-34WFY7M7.cjs} +22 -32
- package/dist/lib/node/chunk-34WFY7M7.cjs.map +7 -0
- package/dist/lib/node/{chunk-KO6MKCED.cjs → chunk-4JOJCZPJ.cjs} +138 -119
- package/dist/lib/node/chunk-4JOJCZPJ.cjs.map +7 -0
- package/dist/lib/node/{chunk-HYGDHS6X.cjs → chunk-JUGOXWES.cjs} +4 -4
- package/dist/lib/node/{chunk-HYGDHS6X.cjs.map → chunk-JUGOXWES.cjs.map} +1 -1
- package/dist/lib/node/{chunk-WXG4Z2EZ.cjs → chunk-K553L7CZ.cjs} +23 -8
- package/dist/lib/node/chunk-K553L7CZ.cjs.map +7 -0
- package/dist/lib/node/{chunk-LA73IHCB.cjs → chunk-RK4BEN5E.cjs} +108 -80
- package/dist/lib/node/chunk-RK4BEN5E.cjs.map +7 -0
- package/dist/lib/node/index.cjs +46 -34
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/{intent-resolver-VY3XWYAA.cjs → intent-resolver-7XY3WITN.cjs} +8 -8
- package/dist/lib/node/{intent-resolver-VY3XWYAA.cjs.map → intent-resolver-7XY3WITN.cjs.map} +2 -2
- package/dist/lib/node/{meeting-transcription-state-OYWCY5XE.cjs → meeting-transcription-state-5XLTMWPA.cjs} +6 -6
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/{react-surface-M2JQIIDY.cjs → react-surface-HUSWAORU.cjs} +20 -11
- package/dist/lib/node/react-surface-HUSWAORU.cjs.map +7 -0
- package/dist/lib/node/settings-NDMU3EWQ.cjs +38 -0
- package/dist/lib/node/settings-NDMU3EWQ.cjs.map +7 -0
- package/dist/lib/node/{transcriber-E6AAB4SU.cjs → transcriber-UZJMG44C.cjs} +10 -10
- package/dist/lib/node/types/index.cjs +8 -8
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/{TranscriptContainer-3HJ752CP.mjs → TranscriptContainer-K4E4P5T6.mjs} +3 -3
- package/dist/lib/node-esm/app-graph-builder-6FY2UQOH.mjs +350 -0
- package/dist/lib/node-esm/app-graph-builder-6FY2UQOH.mjs.map +7 -0
- package/dist/lib/node-esm/chunk-3I7AC3D3.mjs +28 -0
- package/dist/lib/node-esm/chunk-3I7AC3D3.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-YXZOLOFT.mjs → chunk-5E2MR5XK.mjs} +1 -1
- package/dist/lib/node-esm/{chunk-YXZOLOFT.mjs.map → chunk-5E2MR5XK.mjs.map} +1 -1
- package/dist/lib/node-esm/{chunk-SDMGJZLN.mjs → chunk-6C34FO4C.mjs} +135 -117
- package/dist/lib/node-esm/chunk-6C34FO4C.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-K3R3YK3S.mjs → chunk-CKANLRS4.mjs} +105 -78
- package/dist/lib/node-esm/chunk-CKANLRS4.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-54HDN33F.mjs → chunk-KUQ3ZTRX.mjs} +21 -31
- package/dist/lib/node-esm/chunk-KUQ3ZTRX.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +29 -17
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/{intent-resolver-FCTNJPWY.mjs → intent-resolver-ACGAPLDZ.mjs} +4 -4
- package/dist/lib/node-esm/{intent-resolver-FCTNJPWY.mjs.map → intent-resolver-ACGAPLDZ.mjs.map} +2 -2
- package/dist/lib/node-esm/{meeting-transcription-state-XMZJ45P4.mjs → meeting-transcription-state-3WOZ52BQ.mjs} +2 -2
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/{react-surface-PXFSIM6V.mjs → react-surface-G2OY4MWL.mjs} +18 -7
- package/dist/lib/node-esm/react-surface-G2OY4MWL.mjs.map +7 -0
- package/dist/lib/node-esm/settings-O7X2UQQG.mjs +25 -0
- package/dist/lib/node-esm/settings-O7X2UQQG.mjs.map +7 -0
- package/dist/lib/node-esm/{transcriber-REAGRCPY.mjs → transcriber-NVVFH7IF.mjs} +4 -4
- package/dist/lib/node-esm/types/index.mjs +3 -3
- package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts +1 -1
- package/dist/types/src/capabilities/capabilities.d.ts.map +1 -1
- package/dist/types/src/capabilities/index.d.ts +1 -0
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- 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/settings.d.ts +4 -0
- package/dist/types/src/capabilities/settings.d.ts.map +1 -0
- package/dist/types/src/components/Transcript/Transcript.d.ts +6 -4
- package/dist/types/src/components/Transcript/Transcript.d.ts.map +1 -1
- package/dist/types/src/components/Transcript/Transcript.stories.d.ts +8 -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 +4 -4
- package/dist/types/src/components/Transcript/transcript-extension.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptContainer.d.ts.map +1 -1
- package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts +6 -0
- package/dist/types/src/components/TranscriptionSettings/TranscriptionSettings.d.ts.map +1 -0
- package/dist/types/src/components/TranscriptionSettings/index.d.ts +2 -0
- package/dist/types/src/components/TranscriptionSettings/index.d.ts.map +1 -0
- 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/components/transcription.stories.d.ts +6 -3
- package/dist/types/src/components/transcription.stories.d.ts.map +1 -1
- package/dist/types/src/entity-extraction/entity-extraction.d.ts +33 -7
- package/dist/types/src/entity-extraction/entity-extraction.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/useQueueModelAdapter.d.ts +2 -2
- package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +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/model.d.ts +23 -23
- package/dist/types/src/model/model.d.ts.map +1 -1
- 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/transcriber.d.ts +2 -2
- package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
- package/dist/types/src/transcriber/transcription-manager.d.ts +17 -15
- package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
- package/dist/types/src/translations.d.ts +3 -18
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +26 -40
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/types.d.ts +11 -7
- 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/monitor-audio-level.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +51 -46
- package/src/TranscriptionPlugin.tsx +29 -12
- package/src/capabilities/app-graph-builder.ts +99 -29
- package/src/capabilities/capabilities.ts +1 -1
- package/src/capabilities/index.ts +1 -0
- package/src/capabilities/intent-resolver.ts +2 -2
- package/src/capabilities/react-surface.tsx +12 -4
- package/src/capabilities/settings.ts +20 -0
- package/src/components/Transcript/Transcript.stories.tsx +72 -36
- package/src/components/Transcript/Transcript.tsx +37 -30
- package/src/components/Transcript/deprecated/{Transcript.tsx → OldTranscript.tsx} +30 -1
- package/src/components/Transcript/transcript-extension.ts +20 -17
- package/src/components/TranscriptContainer.tsx +6 -4
- package/src/components/TranscriptionSettings/TranscriptionSettings.tsx +26 -0
- package/src/components/TranscriptionSettings/index.ts +5 -0
- package/src/components/index.ts +1 -0
- package/src/components/transcription.stories.tsx +84 -34
- package/src/entity-extraction/entity-extraction.test.ts +75 -10
- package/src/entity-extraction/entity-extraction.ts +110 -55
- package/src/entity-extraction/system-prompt.tpl +38 -9
- package/src/hooks/useQueueModelAdapter.ts +44 -11
- package/src/model/model.test.ts +90 -44
- package/src/model/model.ts +59 -59
- package/src/testing/index.ts +5 -0
- package/src/testing/testing.ts +221 -0
- package/src/transcriber/transcriber.browser.test.ts +3 -3
- package/src/transcriber/transcriber.ts +19 -10
- package/src/transcriber/transcription-manager.ts +66 -57
- package/src/translations.ts +2 -0
- package/src/types/schema.ts +10 -31
- package/src/types/types.ts +17 -7
- package/dist/lib/browser/app-graph-builder-I4SSIQMW.mjs +0 -168
- package/dist/lib/browser/app-graph-builder-I4SSIQMW.mjs.map +0 -7
- package/dist/lib/browser/chunk-5Q3R53U3.mjs.map +0 -7
- package/dist/lib/browser/chunk-DR3NBV6Q.mjs.map +0 -7
- package/dist/lib/browser/chunk-GI5LZ4SV.mjs +0 -8
- package/dist/lib/browser/chunk-GI5LZ4SV.mjs.map +0 -7
- package/dist/lib/browser/chunk-RHHJZQPM.mjs.map +0 -7
- package/dist/lib/browser/react-surface-HETJ5XY6.mjs.map +0 -7
- package/dist/lib/node/app-graph-builder-WWC4WNTG.cjs +0 -177
- package/dist/lib/node/app-graph-builder-WWC4WNTG.cjs.map +0 -7
- package/dist/lib/node/chunk-3QEJ5EBO.cjs.map +0 -7
- package/dist/lib/node/chunk-KO6MKCED.cjs.map +0 -7
- package/dist/lib/node/chunk-LA73IHCB.cjs.map +0 -7
- package/dist/lib/node/chunk-WXG4Z2EZ.cjs.map +0 -7
- package/dist/lib/node/react-surface-M2JQIIDY.cjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-PPJQAFSI.mjs +0 -169
- package/dist/lib/node-esm/app-graph-builder-PPJQAFSI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-54HDN33F.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K3R3YK3S.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-SDMGJZLN.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XY22OP6H.mjs +0 -10
- package/dist/lib/node-esm/chunk-XY22OP6H.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-PXFSIM6V.mjs.map +0 -7
- package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts +0 -13
- package/dist/types/src/components/Transcript/deprecated/Transcript.d.ts.map +0 -1
- package/dist/types/src/components/Transcript/testings.d.ts +0 -51
- package/dist/types/src/components/Transcript/testings.d.ts.map +0 -1
- package/dist/types/src/testing/test-data.d.ts +0 -73
- package/dist/types/src/testing/test-data.d.ts.map +0 -1
- package/src/components/Transcript/testings.ts +0 -182
- package/src/testing/test-data.ts +0 -314
- /package/dist/lib/browser/{TranscriptContainer-4D4BHE7G.mjs.map → TranscriptContainer-3LU3XBEB.mjs.map} +0 -0
- /package/dist/lib/browser/{meeting-transcription-state-5D52VTHU.mjs.map → meeting-transcription-state-MNA2XROE.mjs.map} +0 -0
- /package/dist/lib/browser/{transcriber-SMRLU2KY.mjs.map → transcriber-QRSS6X6S.mjs.map} +0 -0
- /package/dist/lib/node/{meeting-transcription-state-OYWCY5XE.cjs.map → meeting-transcription-state-5XLTMWPA.cjs.map} +0 -0
- /package/dist/lib/node/{transcriber-E6AAB4SU.cjs.map → transcriber-UZJMG44C.cjs.map} +0 -0
- /package/dist/lib/node-esm/{TranscriptContainer-3HJ752CP.mjs.map → TranscriptContainer-K4E4P5T6.mjs.map} +0 -0
- /package/dist/lib/node-esm/{meeting-transcription-state-XMZJ45P4.mjs.map → meeting-transcription-state-3WOZ52BQ.mjs.map} +0 -0
- /package/dist/lib/node-esm/{transcriber-REAGRCPY.mjs.map → transcriber-NVVFH7IF.mjs.map} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
|
+
import {
|
|
3
|
+
TRANSCRIPTION_PLUGIN
|
|
4
|
+
} from "./chunk-X4DDJIVL.mjs";
|
|
5
|
+
|
|
6
|
+
// packages/plugins/plugin-transcription/src/components/TranscriptionSettings/TranscriptionSettings.tsx
|
|
7
|
+
import React from "react";
|
|
8
|
+
import { Input, useTranslation } from "@dxos/react-ui";
|
|
9
|
+
import { DeprecatedFormContainer, DeprecatedFormInput } from "@dxos/react-ui-form";
|
|
10
|
+
var TranscriptionSettings = ({ settings }) => {
|
|
11
|
+
const { t } = useTranslation(TRANSCRIPTION_PLUGIN);
|
|
12
|
+
return /* @__PURE__ */ React.createElement(DeprecatedFormContainer, null, /* @__PURE__ */ React.createElement(DeprecatedFormInput, {
|
|
13
|
+
label: t("settings entity extraction label")
|
|
14
|
+
}, /* @__PURE__ */ React.createElement(Input.Switch, {
|
|
15
|
+
checked: !!settings.entityExtraction,
|
|
16
|
+
onCheckedChange: (checked) => settings.entityExtraction = checked
|
|
17
|
+
})));
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
// packages/plugins/plugin-transcription/src/components/index.ts
|
|
21
|
+
import { lazy } from "react";
|
|
22
|
+
var TranscriptContainer = lazy(() => import("./TranscriptContainer-K4E4P5T6.mjs"));
|
|
23
|
+
|
|
24
|
+
export {
|
|
25
|
+
TranscriptionSettings,
|
|
26
|
+
TranscriptContainer
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=chunk-3I7AC3D3.mjs.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/TranscriptionSettings/TranscriptionSettings.tsx", "../../../src/components/index.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport React from 'react';\n\nimport { Input, useTranslation } from '@dxos/react-ui';\nimport { DeprecatedFormContainer, DeprecatedFormInput } from '@dxos/react-ui-form';\n\nimport { TRANSCRIPTION_PLUGIN } from '../../meta';\nimport { type TranscriptionSettingsProps } from '../../types';\n\nexport const TranscriptionSettings = ({ settings }: { settings: TranscriptionSettingsProps }) => {\n const { t } = useTranslation(TRANSCRIPTION_PLUGIN);\n\n return (\n <DeprecatedFormContainer>\n <DeprecatedFormInput label={t('settings entity extraction label')}>\n <Input.Switch\n checked={!!settings.entityExtraction}\n onCheckedChange={(checked) => (settings.entityExtraction = checked)}\n />\n </DeprecatedFormInput>\n </DeprecatedFormContainer>\n );\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { lazy } from 'react';\n\nexport * from './Transcript';\nexport * from './TranscriptContainer';\nexport * from './TranscriptionSettings';\n\nexport const TranscriptContainer = lazy(() => import('./TranscriptContainer'));\n"],
|
|
5
|
+
"mappings": ";;;;;;AAIA,OAAOA,WAAW;AAElB,SAASC,OAAOC,sBAAsB;AACtC,SAASC,yBAAyBC,2BAA2B;AAKtD,IAAMC,wBAAwB,CAAC,EAAEC,SAAQ,MAA4C;AAC1F,QAAM,EAAEC,EAAC,IAAKC,eAAeC,oBAAAA;AAE7B,SACE,sBAAA,cAACC,yBAAAA,MACC,sBAAA,cAACC,qBAAAA;IAAoBC,OAAOL,EAAE,kCAAA;KAC5B,sBAAA,cAACM,MAAMC,QAAM;IACXC,SAAS,CAAC,CAACT,SAASU;IACpBC,iBAAiB,CAACF,YAAaT,SAASU,mBAAmBD;;AAKrE;;;ACrBA,SAASG,YAAY;AAMd,IAAMC,sBAAsBC,KAAK,MAAM,OAAO,oCAAA,CAAA;",
|
|
6
|
+
"names": ["React", "Input", "useTranslation", "DeprecatedFormContainer", "DeprecatedFormInput", "TranscriptionSettings", "settings", "t", "useTranslation", "TRANSCRIPTION_PLUGIN", "DeprecatedFormContainer", "DeprecatedFormInput", "label", "Input", "Switch", "checked", "entityExtraction", "onCheckedChange", "lazy", "TranscriptContainer", "lazy"]
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/capabilities/capabilities.ts"],
|
|
4
|
-
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type Live } from '@dxos/live-object';\n\nimport { TRANSCRIPTION_PLUGIN } from '../meta';\nimport { type TranscriberParams, type Transcriber, type TranscriptionManager } from '../transcriber';\n\nexport namespace TranscriptionCapabilities {\n export type GetTranscriberProps = {\n audioStreamTrack: MediaStreamTrack;\n onSegments: TranscriberParams['onSegments'];\n config?: TranscriberParams['config'];\n };\n export type GetTranscriber = (props: GetTranscriberProps) => Transcriber;\n export const Transcriber = defineCapability<GetTranscriber>(`${TRANSCRIPTION_PLUGIN}/capability/transcriber`);\n\n export type MeetingTranscriptionState = Live<{\n
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { defineCapability } from '@dxos/app-framework';\nimport { type Live } from '@dxos/live-object';\n\nimport { TRANSCRIPTION_PLUGIN } from '../meta';\nimport { type TranscriberParams, type Transcriber, type TranscriptionManager } from '../transcriber';\n\nexport namespace TranscriptionCapabilities {\n export type GetTranscriberProps = {\n audioStreamTrack: MediaStreamTrack;\n onSegments: TranscriberParams['onSegments'];\n config?: TranscriberParams['config'];\n };\n export type GetTranscriber = (props: GetTranscriberProps) => Transcriber;\n export const Transcriber = defineCapability<GetTranscriber>(`${TRANSCRIPTION_PLUGIN}/capability/transcriber`);\n\n export type MeetingTranscriptionState = Live<{\n transcriptionManager?: TranscriptionManager;\n enabled: boolean; // TODO(burdon): Move state into TranscriptionManager.\n }>;\n export const MeetingTranscriptionState = defineCapability<MeetingTranscriptionState>(\n `${TRANSCRIPTION_PLUGIN}/capability/meeting-transcription-state`,\n );\n}\n"],
|
|
5
5
|
"mappings": ";;;;;;AAIA,SAASA,wBAAwB;;UAMhBC,4BAAAA;6BAOFC,cAAcC,iBAAiC,GAAGC,oBAAAA,yBAA6C;6BAM/FC,4BAA4BF,iBACvC,GAAGC,oBAAAA,yCAA6D;AAEpE,GAhBiBH,8BAAAA,4BAAAA,CAAAA,EAAAA;",
|
|
6
6
|
"names": ["defineCapability", "TranscriptionCapabilities", "Transcriber", "defineCapability", "TRANSCRIPTION_PLUGIN", "MeetingTranscriptionState"]
|
|
7
7
|
}
|
|
@@ -1,19 +1,16 @@
|
|
|
1
1
|
import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
|
|
2
2
|
import {
|
|
3
3
|
TranscriptionCapabilities
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-5E2MR5XK.mjs";
|
|
5
5
|
|
|
6
6
|
// packages/plugins/plugin-transcription/src/components/TranscriptContainer.tsx
|
|
7
7
|
import React2 from "react";
|
|
8
8
|
import { fullyQualifiedId, getSpace } from "@dxos/client/echo";
|
|
9
|
-
import { useQueue } from "@dxos/react-client/echo";
|
|
9
|
+
import { useMembers, useQueue } from "@dxos/react-client/echo";
|
|
10
10
|
import { StackItem } from "@dxos/react-ui-stack";
|
|
11
11
|
|
|
12
12
|
// packages/plugins/plugin-transcription/src/components/Transcript/Transcript.tsx
|
|
13
13
|
import React from "react";
|
|
14
|
-
import { DXN } from "@dxos/keys";
|
|
15
|
-
import { log as log2 } from "@dxos/log";
|
|
16
|
-
import { resolveRef, useClient } from "@dxos/react-client";
|
|
17
14
|
import { IconButton, useThemeContext } from "@dxos/react-ui";
|
|
18
15
|
import { createBasicExtensions, createMarkdownExtensions, createRenderer, createThemeExtensions, decorateMarkdown, editorWidth, preview, useTextEditor } from "@dxos/react-ui-editor";
|
|
19
16
|
import { mx } from "@dxos/react-ui-theme";
|
|
@@ -68,59 +65,59 @@ var DocumentAdapter = class {
|
|
|
68
65
|
});
|
|
69
66
|
}
|
|
70
67
|
};
|
|
71
|
-
var
|
|
72
|
-
constructor(_renderer,
|
|
68
|
+
var SerializationModel = class {
|
|
69
|
+
constructor(_renderer, initialChunks = []) {
|
|
73
70
|
this._renderer = _renderer;
|
|
74
|
-
this.
|
|
75
|
-
this.
|
|
76
|
-
this.
|
|
71
|
+
this._chunks = [];
|
|
72
|
+
this._chunkLineCounts = /* @__PURE__ */ new Map();
|
|
73
|
+
this._lineToChunk = /* @__PURE__ */ new Map();
|
|
77
74
|
this._changes = [];
|
|
78
75
|
this.update = new Event();
|
|
79
|
-
|
|
80
|
-
this.
|
|
76
|
+
initialChunks.forEach((chunk) => {
|
|
77
|
+
this.appendChunk(chunk);
|
|
81
78
|
});
|
|
82
79
|
}
|
|
83
80
|
toJSON() {
|
|
84
81
|
return {
|
|
85
|
-
|
|
82
|
+
chunks: this._chunks.length,
|
|
86
83
|
changes: this._changes.length
|
|
87
84
|
};
|
|
88
85
|
}
|
|
89
86
|
get doc() {
|
|
90
87
|
return Text.of([
|
|
91
|
-
...this.
|
|
88
|
+
...this._chunks.flatMap((chunk, index) => this._renderer(chunk, index)),
|
|
92
89
|
""
|
|
93
90
|
]);
|
|
94
91
|
}
|
|
95
|
-
get
|
|
96
|
-
return this.
|
|
92
|
+
get chunks() {
|
|
93
|
+
return this._chunks;
|
|
97
94
|
}
|
|
98
95
|
/**
|
|
99
96
|
* Get the block ID at the given line number.
|
|
100
97
|
*/
|
|
101
|
-
|
|
102
|
-
return this.
|
|
98
|
+
getChunkAtLine(line) {
|
|
99
|
+
return this._lineToChunk.get(line);
|
|
103
100
|
}
|
|
104
101
|
reset() {
|
|
105
|
-
this.
|
|
106
|
-
this.
|
|
107
|
-
this.
|
|
102
|
+
this._chunks.length = 0;
|
|
103
|
+
this._chunkLineCounts.clear();
|
|
104
|
+
this._lineToChunk.clear();
|
|
108
105
|
this.update.emit();
|
|
109
106
|
return this;
|
|
110
107
|
}
|
|
111
|
-
|
|
112
|
-
const index = this.
|
|
113
|
-
this.
|
|
108
|
+
appendChunk(chunk) {
|
|
109
|
+
const index = this._chunks.length;
|
|
110
|
+
this._chunks.push(chunk);
|
|
114
111
|
this._changes.push({
|
|
115
112
|
type: "append",
|
|
116
113
|
index,
|
|
117
|
-
|
|
114
|
+
chunk
|
|
118
115
|
});
|
|
119
116
|
this.update.emit();
|
|
120
117
|
return this;
|
|
121
118
|
}
|
|
122
|
-
|
|
123
|
-
const index = this.
|
|
119
|
+
updateChunk(chunk) {
|
|
120
|
+
const index = this._chunks.findIndex((c) => c.id === chunk.id);
|
|
124
121
|
invariant(index !== -1, void 0, {
|
|
125
122
|
F: __dxlog_file,
|
|
126
123
|
L: 147,
|
|
@@ -130,17 +127,17 @@ var BlockModel = class {
|
|
|
130
127
|
""
|
|
131
128
|
]
|
|
132
129
|
});
|
|
133
|
-
this.
|
|
130
|
+
this._chunks[index] = chunk;
|
|
134
131
|
this._changes.push({
|
|
135
132
|
type: "update",
|
|
136
133
|
index,
|
|
137
|
-
|
|
134
|
+
chunk
|
|
138
135
|
});
|
|
139
136
|
this.update.emit();
|
|
140
137
|
return this;
|
|
141
138
|
}
|
|
142
139
|
deleteBlock(id) {
|
|
143
|
-
const index = this.
|
|
140
|
+
const index = this._chunks.findIndex((c) => c.id === id);
|
|
144
141
|
invariant(index !== -1, void 0, {
|
|
145
142
|
F: __dxlog_file,
|
|
146
143
|
L: 156,
|
|
@@ -150,7 +147,7 @@ var BlockModel = class {
|
|
|
150
147
|
""
|
|
151
148
|
]
|
|
152
149
|
});
|
|
153
|
-
this.
|
|
150
|
+
this._chunks.splice(index, 1);
|
|
154
151
|
this._changes.push({
|
|
155
152
|
type: "delete",
|
|
156
153
|
index,
|
|
@@ -160,7 +157,7 @@ var BlockModel = class {
|
|
|
160
157
|
return this;
|
|
161
158
|
}
|
|
162
159
|
/**
|
|
163
|
-
* Syncs the tracked changes with the
|
|
160
|
+
* Syncs the tracked changes with the ChunkDocument.
|
|
164
161
|
*/
|
|
165
162
|
sync(document2) {
|
|
166
163
|
log("sync", {
|
|
@@ -174,7 +171,7 @@ var BlockModel = class {
|
|
|
174
171
|
for (const change of this._changes) {
|
|
175
172
|
switch (change.type) {
|
|
176
173
|
case "append": {
|
|
177
|
-
const lines = this._renderer(change.
|
|
174
|
+
const lines = this._renderer(change.chunk, change.index);
|
|
178
175
|
const lastLine = document2.lineCount();
|
|
179
176
|
document2.replaceLines(lastLine + 1, 0, lines);
|
|
180
177
|
break;
|
|
@@ -182,36 +179,36 @@ var BlockModel = class {
|
|
|
182
179
|
case "update": {
|
|
183
180
|
let lineStart = 1;
|
|
184
181
|
for (let i = 0; i < change.index; i++) {
|
|
185
|
-
lineStart += this.
|
|
182
|
+
lineStart += this._chunkLineCounts.get(this._chunks[i].id);
|
|
186
183
|
}
|
|
187
|
-
const previousLineCount = this.
|
|
188
|
-
const newLines = this._renderer(change.
|
|
184
|
+
const previousLineCount = this._chunkLineCounts.get(change.chunk.id);
|
|
185
|
+
const newLines = this._renderer(change.chunk, change.index);
|
|
189
186
|
document2.replaceLines(lineStart, previousLineCount, newLines);
|
|
190
187
|
break;
|
|
191
188
|
}
|
|
192
189
|
case "delete": {
|
|
193
190
|
let lineStart = 1;
|
|
194
191
|
for (let i = 0; i < change.index; i++) {
|
|
195
|
-
lineStart += this.
|
|
192
|
+
lineStart += this._chunkLineCounts.get(this._chunks[i].id);
|
|
196
193
|
}
|
|
197
|
-
const previousLineCount = this.
|
|
194
|
+
const previousLineCount = this._chunkLineCounts.get(change.id);
|
|
198
195
|
document2.replaceLines(lineStart, previousLineCount, []);
|
|
199
196
|
break;
|
|
200
197
|
}
|
|
201
198
|
}
|
|
202
199
|
}
|
|
203
|
-
this.
|
|
200
|
+
this._lineToChunk.clear();
|
|
204
201
|
let currentLine = 1;
|
|
205
|
-
for (const
|
|
206
|
-
const lineCount = this._renderer(
|
|
207
|
-
this.
|
|
208
|
-
this.
|
|
202
|
+
for (const [index, chunk] of this._chunks.entries()) {
|
|
203
|
+
const lineCount = this._renderer(chunk, index).length;
|
|
204
|
+
this._chunkLineCounts.set(chunk.id, lineCount);
|
|
205
|
+
this._lineToChunk.set(currentLine, chunk);
|
|
209
206
|
currentLine += lineCount;
|
|
210
207
|
}
|
|
211
|
-
const
|
|
212
|
-
for (const id of this.
|
|
213
|
-
if (!
|
|
214
|
-
this.
|
|
208
|
+
const chunkIds = new Set(this._chunks.map((chunk) => chunk.id));
|
|
209
|
+
for (const id of this._chunkLineCounts.keys()) {
|
|
210
|
+
if (!chunkIds.has(id)) {
|
|
211
|
+
this._chunkLineCounts.delete(id);
|
|
215
212
|
}
|
|
216
213
|
}
|
|
217
214
|
this._changes.length = 0;
|
|
@@ -227,12 +224,13 @@ var transcript = ({ model, started, renderButton }) => {
|
|
|
227
224
|
class: "cm-timestamp-gutter",
|
|
228
225
|
lineMarkerChange: (update) => update.docChanged || update.viewportChanged,
|
|
229
226
|
markers: (view) => {
|
|
230
|
-
const start = getStartTime(started, model.
|
|
227
|
+
const start = getStartTime(started, model.chunks[0]);
|
|
231
228
|
const builder = new RangeSetBuilder();
|
|
232
229
|
for (const { from, to } of view.visibleRanges) {
|
|
233
230
|
let line = view.state.doc.lineAt(from);
|
|
234
231
|
while (line.from <= to) {
|
|
235
|
-
const
|
|
232
|
+
const block = model.getChunkAtLine(line.number)?.blocks[0];
|
|
233
|
+
const timestamp = block?.type === "transcription" && block.started;
|
|
236
234
|
if (timestamp) {
|
|
237
235
|
builder.add(line.from, line.from, new TimestampMarker(line.number, new Date(timestamp), start));
|
|
238
236
|
}
|
|
@@ -253,11 +251,13 @@ var transcript = ({ model, started, renderButton }) => {
|
|
|
253
251
|
const scroller = view.scrollDOM;
|
|
254
252
|
let isAutoScrolling = false;
|
|
255
253
|
let hasScrolled = false;
|
|
256
|
-
|
|
257
|
-
|
|
254
|
+
let timeout;
|
|
255
|
+
const scrollToBottom = (smooth = false) => {
|
|
256
|
+
scroller.style.scrollBehavior = smooth ? "smooth" : "";
|
|
258
257
|
scroller.classList.add("cm-hide-scrollbar");
|
|
259
258
|
isAutoScrolling = true;
|
|
260
|
-
|
|
259
|
+
clearTimeout(timeout);
|
|
260
|
+
timeout = setTimeout(() => {
|
|
261
261
|
this._controls?.classList.add("opacity-0");
|
|
262
262
|
scroller.classList.remove("cm-hide-scrollbar");
|
|
263
263
|
isAutoScrolling = false;
|
|
@@ -274,7 +274,7 @@ var transcript = ({ model, started, renderButton }) => {
|
|
|
274
274
|
view.dom.appendChild(this._controls);
|
|
275
275
|
renderButton(this._controls, {
|
|
276
276
|
onClick: () => {
|
|
277
|
-
scrollToBottom();
|
|
277
|
+
scrollToBottom(false);
|
|
278
278
|
}
|
|
279
279
|
}, view);
|
|
280
280
|
}
|
|
@@ -287,7 +287,7 @@ var transcript = ({ model, started, renderButton }) => {
|
|
|
287
287
|
const autoScroll = scroller.scrollHeight - scroller.scrollTop - scroller.clientHeight === 0 || !hasScrolled;
|
|
288
288
|
model.sync(this._adapter);
|
|
289
289
|
if (autoScroll) {
|
|
290
|
-
scrollToBottom();
|
|
290
|
+
scrollToBottom(true);
|
|
291
291
|
}
|
|
292
292
|
}));
|
|
293
293
|
}
|
|
@@ -361,39 +361,46 @@ var TimestampMarker = class extends GutterMarker {
|
|
|
361
361
|
return el;
|
|
362
362
|
}
|
|
363
363
|
};
|
|
364
|
-
var getStartTime = (started,
|
|
364
|
+
var getStartTime = (started, message) => {
|
|
365
365
|
if (started) {
|
|
366
366
|
return started;
|
|
367
367
|
}
|
|
368
|
-
if (
|
|
369
|
-
return new Date(
|
|
368
|
+
if (message?.blocks[0]?.type === "transcription" && message.blocks[0].started) {
|
|
369
|
+
return new Date(message.blocks[0].started);
|
|
370
370
|
}
|
|
371
371
|
return void 0;
|
|
372
372
|
};
|
|
373
373
|
var formatTimestamp = (timestamp, relative) => {
|
|
374
|
-
if (
|
|
375
|
-
return format(timestamp, "HH:mm:ss");
|
|
376
|
-
} else {
|
|
374
|
+
if (relative) {
|
|
377
375
|
const pad = (n = 0) => String(n).padStart(2, "0");
|
|
378
376
|
const { hours, minutes, seconds } = intervalToDuration({
|
|
379
377
|
start: relative,
|
|
380
378
|
end: timestamp
|
|
381
379
|
});
|
|
382
380
|
return `${pad(hours)}:${pad(minutes)}:${pad(seconds)}`;
|
|
381
|
+
} else {
|
|
382
|
+
return format(timestamp, "HH:mm:ss");
|
|
383
383
|
}
|
|
384
384
|
};
|
|
385
385
|
|
|
386
386
|
// packages/plugins/plugin-transcription/src/components/Transcript/Transcript.tsx
|
|
387
|
-
var
|
|
388
|
-
|
|
387
|
+
var renderMarkdown = (identities) => (message, index, debug = false) => {
|
|
388
|
+
if (message.sender.role === "assistant") {
|
|
389
|
+
return [
|
|
390
|
+
message.blocks.find((block) => block.type === "transcription")?.text ?? "",
|
|
391
|
+
""
|
|
392
|
+
];
|
|
393
|
+
}
|
|
394
|
+
const identity = identities.find((identity2) => identity2.did === message.sender.identityDid);
|
|
395
|
+
const name = identity?.profile?.displayName ?? message.sender.contact?.target?.fullName ?? message.sender.name ?? message.sender.email ?? message.sender.identityDid;
|
|
396
|
+
const blocks = message.blocks.filter((block) => block.type === "transcription");
|
|
389
397
|
return [
|
|
390
|
-
`###### ${
|
|
391
|
-
|
|
398
|
+
`###### ${name}` + (debug ? ` [${index}]:${message.id}` : ""),
|
|
399
|
+
blocks.map((block) => block.text.trim()).join(" "),
|
|
392
400
|
""
|
|
393
401
|
];
|
|
394
402
|
};
|
|
395
403
|
var Transcript = ({ classNames, transcript: object, space, model, attendableId, ignoreAttention }) => {
|
|
396
|
-
const client = useClient();
|
|
397
404
|
const { themeMode } = useThemeContext();
|
|
398
405
|
const { parentRef } = useTextEditor(() => {
|
|
399
406
|
return {
|
|
@@ -409,28 +416,7 @@ var Transcript = ({ classNames, transcript: object, space, model, attendableId,
|
|
|
409
416
|
themeMode
|
|
410
417
|
}),
|
|
411
418
|
decorateMarkdown(),
|
|
412
|
-
space && preview(
|
|
413
|
-
onLookup: async ({ label, ref }) => {
|
|
414
|
-
log2.info("onLookup", {
|
|
415
|
-
label,
|
|
416
|
-
ref
|
|
417
|
-
}, {
|
|
418
|
-
F: __dxlog_file2,
|
|
419
|
-
L: 71,
|
|
420
|
-
S: void 0,
|
|
421
|
-
C: (f, a) => f(...a)
|
|
422
|
-
});
|
|
423
|
-
const dxn = DXN.parse(ref);
|
|
424
|
-
if (!dxn) {
|
|
425
|
-
return null;
|
|
426
|
-
}
|
|
427
|
-
const object2 = await resolveRef(client, dxn, space);
|
|
428
|
-
return {
|
|
429
|
-
label,
|
|
430
|
-
object: object2
|
|
431
|
-
};
|
|
432
|
-
}
|
|
433
|
-
}),
|
|
419
|
+
space && preview(),
|
|
434
420
|
transcript({
|
|
435
421
|
model,
|
|
436
422
|
started: object?.started ? new Date(object.started) : void 0,
|
|
@@ -449,14 +435,15 @@ var Transcript = ({ classNames, transcript: object, space, model, attendableId,
|
|
|
449
435
|
]);
|
|
450
436
|
return /* @__PURE__ */ React.createElement("div", {
|
|
451
437
|
ref: parentRef,
|
|
452
|
-
className: mx("flex grow overflow-hidden", editorWidth, classNames)
|
|
438
|
+
className: mx("flex grow overflow-hidden", editorWidth, classNames),
|
|
439
|
+
"data-popover-collision-boundary": true
|
|
453
440
|
});
|
|
454
441
|
};
|
|
455
442
|
|
|
456
443
|
// packages/plugins/plugin-transcription/src/hooks/useAudioFile.ts
|
|
457
444
|
import { useEffect, useState } from "react";
|
|
458
|
-
import { log as
|
|
459
|
-
var
|
|
445
|
+
import { log as log2 } from "@dxos/log";
|
|
446
|
+
var __dxlog_file2 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-transcription/src/hooks/useAudioFile.ts";
|
|
460
447
|
var useAudioFile = (audioUrl) => {
|
|
461
448
|
const [{ audio, stream, track }, setStream] = useState({});
|
|
462
449
|
useEffect(() => {
|
|
@@ -467,10 +454,10 @@ var useAudioFile = (audioUrl) => {
|
|
|
467
454
|
audio2.src = URL.createObjectURL(blob);
|
|
468
455
|
await new Promise((resolve, reject) => {
|
|
469
456
|
audio2.addEventListener("error", (err) => {
|
|
470
|
-
|
|
457
|
+
log2.error("error", {
|
|
471
458
|
err
|
|
472
459
|
}, {
|
|
473
|
-
F:
|
|
460
|
+
F: __dxlog_file2,
|
|
474
461
|
L: 27,
|
|
475
462
|
S: void 0,
|
|
476
463
|
C: (f, a) => f(...a)
|
|
@@ -480,8 +467,8 @@ var useAudioFile = (audioUrl) => {
|
|
|
480
467
|
once: true
|
|
481
468
|
});
|
|
482
469
|
audio2.addEventListener("canplay", () => {
|
|
483
|
-
|
|
484
|
-
F:
|
|
470
|
+
log2.info("starting...", void 0, {
|
|
471
|
+
F: __dxlog_file2,
|
|
485
472
|
L: 35,
|
|
486
473
|
S: void 0,
|
|
487
474
|
C: (f, a) => f(...a)
|
|
@@ -544,19 +531,47 @@ var useAudioTrack = (active) => {
|
|
|
544
531
|
};
|
|
545
532
|
|
|
546
533
|
// packages/plugins/plugin-transcription/src/hooks/useQueueModelAdapter.ts
|
|
547
|
-
import { useMemo, useEffect as useEffect3 } from "react";
|
|
548
|
-
var useQueueModelAdapter = (renderer, queue,
|
|
549
|
-
const model = useMemo(() => new
|
|
534
|
+
import { useMemo, useEffect as useEffect3, useState as useState3 } from "react";
|
|
535
|
+
var useQueueModelAdapter = (renderer, queue, initialChunks = []) => {
|
|
536
|
+
const model = useMemo(() => new SerializationModel(renderer, initialChunks), [
|
|
550
537
|
queue
|
|
551
538
|
]);
|
|
539
|
+
const [loaded, setLoaded] = useState3(false);
|
|
552
540
|
useEffect3(() => {
|
|
553
|
-
if (!queue
|
|
541
|
+
if (!queue) {
|
|
554
542
|
return;
|
|
555
543
|
}
|
|
556
|
-
const
|
|
557
|
-
|
|
544
|
+
const update = () => {
|
|
545
|
+
for (const block of queue?.items ?? []) {
|
|
546
|
+
model.appendChunk(block);
|
|
547
|
+
}
|
|
548
|
+
setLoaded(true);
|
|
549
|
+
};
|
|
550
|
+
let i;
|
|
551
|
+
if (queue.isLoading) {
|
|
552
|
+
i = setInterval(() => {
|
|
553
|
+
if (!queue?.isLoading) {
|
|
554
|
+
clearInterval(i);
|
|
555
|
+
update();
|
|
556
|
+
}
|
|
557
|
+
}, 1e3);
|
|
558
|
+
} else {
|
|
559
|
+
update();
|
|
560
|
+
}
|
|
561
|
+
return () => clearTimeout(i);
|
|
562
|
+
}, [
|
|
563
|
+
model,
|
|
564
|
+
queue
|
|
565
|
+
]);
|
|
566
|
+
useEffect3(() => {
|
|
567
|
+
if (!loaded || !queue || model.chunks.length === queue.items.length) {
|
|
568
|
+
return;
|
|
569
|
+
}
|
|
570
|
+
const chunk = queue.items[queue.items.length - 1];
|
|
571
|
+
model.appendChunk(chunk);
|
|
558
572
|
}, [
|
|
559
573
|
model,
|
|
574
|
+
loaded,
|
|
560
575
|
queue?.items.length
|
|
561
576
|
]);
|
|
562
577
|
return model;
|
|
@@ -568,11 +583,12 @@ import { useCapabilities } from "@dxos/app-framework";
|
|
|
568
583
|
|
|
569
584
|
// packages/plugins/plugin-transcription/src/capabilities/index.ts
|
|
570
585
|
import { lazy } from "@dxos/app-framework";
|
|
571
|
-
var AppGraphBuilder = lazy(() => import("./app-graph-builder-
|
|
572
|
-
var IntentResolver = lazy(() => import("./intent-resolver-
|
|
573
|
-
var MeetingTranscriptionState = lazy(() => import("./meeting-transcription-state-
|
|
574
|
-
var ReactSurface = lazy(() => import("./react-surface-
|
|
575
|
-
var Transcriber = lazy(() => import("./transcriber-
|
|
586
|
+
var AppGraphBuilder = lazy(() => import("./app-graph-builder-6FY2UQOH.mjs"));
|
|
587
|
+
var IntentResolver = lazy(() => import("./intent-resolver-ACGAPLDZ.mjs"));
|
|
588
|
+
var MeetingTranscriptionState = lazy(() => import("./meeting-transcription-state-3WOZ52BQ.mjs"));
|
|
589
|
+
var ReactSurface = lazy(() => import("./react-surface-G2OY4MWL.mjs"));
|
|
590
|
+
var Transcriber = lazy(() => import("./transcriber-NVVFH7IF.mjs"));
|
|
591
|
+
var Settings = lazy(() => import("./settings-O7X2UQQG.mjs"));
|
|
576
592
|
|
|
577
593
|
// packages/plugins/plugin-transcription/src/hooks/useTranscriber.ts
|
|
578
594
|
var useTranscriber = ({ audioStreamTrack, onSegments, config }) => {
|
|
@@ -603,12 +619,12 @@ var useTranscriber = ({ audioStreamTrack, onSegments, config }) => {
|
|
|
603
619
|
};
|
|
604
620
|
|
|
605
621
|
// packages/plugins/plugin-transcription/src/hooks/useVoiceInput.ts
|
|
606
|
-
import { useState as
|
|
622
|
+
import { useState as useState4, useEffect as useEffect5, useCallback } from "react";
|
|
607
623
|
import { scheduleMicroTask } from "@dxos/async";
|
|
608
624
|
import { Context } from "@dxos/context";
|
|
609
|
-
import { log as
|
|
625
|
+
import { log as log3 } from "@dxos/log";
|
|
610
626
|
import { useSoundEffect } from "@dxos/react-ui-sfx";
|
|
611
|
-
var
|
|
627
|
+
var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/plugins/plugin-transcription/src/hooks/useVoiceInput.ts";
|
|
612
628
|
var useVoiceInput = ({ active, onUpdate }) => {
|
|
613
629
|
const soundStart = useSoundEffect("StartRecording");
|
|
614
630
|
const soundStop = useSoundEffect("StopRecording");
|
|
@@ -616,7 +632,7 @@ var useVoiceInput = ({ active, onUpdate }) => {
|
|
|
616
632
|
const text = segments.map((str) => str.text.trim().replace(/[^\w\s]/g, "")).join(" ");
|
|
617
633
|
onUpdate(text);
|
|
618
634
|
}, []);
|
|
619
|
-
const [recording, setRecording] =
|
|
635
|
+
const [recording, setRecording] = useState4(false);
|
|
620
636
|
const track = useAudioTrack(active);
|
|
621
637
|
const transcriber = useTranscriber({
|
|
622
638
|
audioStreamTrack: track,
|
|
@@ -624,14 +640,14 @@ var useVoiceInput = ({ active, onUpdate }) => {
|
|
|
624
640
|
});
|
|
625
641
|
useEffect5(() => {
|
|
626
642
|
const ctx = new Context(void 0, {
|
|
627
|
-
F:
|
|
643
|
+
F: __dxlog_file3,
|
|
628
644
|
L: 43
|
|
629
645
|
});
|
|
630
646
|
scheduleMicroTask(ctx, async () => {
|
|
631
647
|
if (active && transcriber) {
|
|
632
648
|
await transcriber.open();
|
|
633
|
-
|
|
634
|
-
F:
|
|
649
|
+
log3.info("starting...", void 0, {
|
|
650
|
+
F: __dxlog_file3,
|
|
635
651
|
L: 47,
|
|
636
652
|
S: void 0,
|
|
637
653
|
C: (f, a) => f(...a)
|
|
@@ -642,8 +658,8 @@ var useVoiceInput = ({ active, onUpdate }) => {
|
|
|
642
658
|
} else if (!active && transcriber?.isOpen) {
|
|
643
659
|
transcriber?.stopChunksRecording();
|
|
644
660
|
await transcriber?.close();
|
|
645
|
-
|
|
646
|
-
F:
|
|
661
|
+
log3.info("stopped", void 0, {
|
|
662
|
+
F: __dxlog_file3,
|
|
647
663
|
L: 54,
|
|
648
664
|
S: void 0,
|
|
649
665
|
C: (f, a) => f(...a)
|
|
@@ -668,10 +684,11 @@ var useVoiceInput = ({ active, onUpdate }) => {
|
|
|
668
684
|
var TranscriptionContainer = ({ role, transcript: transcript2 }) => {
|
|
669
685
|
const attendableId = fullyQualifiedId(transcript2);
|
|
670
686
|
const space = getSpace(transcript2);
|
|
687
|
+
const members = useMembers(space?.key).map((member) => member.identity);
|
|
671
688
|
const queue = useQueue(transcript2.queue.dxn, {
|
|
672
689
|
pollInterval: 1e3
|
|
673
690
|
});
|
|
674
|
-
const model = useQueueModelAdapter(renderMarkdown, queue);
|
|
691
|
+
const model = useQueueModelAdapter(renderMarkdown(members), queue);
|
|
675
692
|
return /* @__PURE__ */ React2.createElement(StackItem.Content, {
|
|
676
693
|
role,
|
|
677
694
|
classNames: "container-max-width pli-2"
|
|
@@ -698,6 +715,7 @@ export {
|
|
|
698
715
|
IntentResolver,
|
|
699
716
|
MeetingTranscriptionState,
|
|
700
717
|
ReactSurface,
|
|
701
|
-
Transcriber
|
|
718
|
+
Transcriber,
|
|
719
|
+
Settings
|
|
702
720
|
};
|
|
703
|
-
//# sourceMappingURL=chunk-
|
|
721
|
+
//# sourceMappingURL=chunk-6C34FO4C.mjs.map
|