@dxos/plugin-transcription 0.8.4-main.c85a9c8dae → 0.8.4-main.d9fc60f731

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (373) hide show
  1. package/LICENSE +102 -5
  2. package/PLUGIN.mdl +401 -0
  3. package/README.md +1 -1
  4. package/dist/lib/neutral/TranscriptionArticle-L6XANBH5.mjs +54 -0
  5. package/dist/lib/neutral/TranscriptionArticle-L6XANBH5.mjs.map +7 -0
  6. package/dist/lib/neutral/TranscriptionPlugin.mjs +46 -0
  7. package/dist/lib/neutral/TranscriptionPlugin.mjs.map +7 -0
  8. package/dist/lib/neutral/TranscriptionPlugin.node.mjs +25 -0
  9. package/dist/lib/neutral/TranscriptionPlugin.node.mjs.map +7 -0
  10. package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs +21 -0
  11. package/dist/lib/neutral/TranscriptionPlugin.workerd.mjs.map +7 -0
  12. package/dist/lib/{browser/blueprint-definition-C6XA2SVZ.mjs → neutral/blueprint-definition-HOXDG5QP.mjs} +4 -7
  13. package/dist/lib/neutral/blueprint-definition-HOXDG5QP.mjs.map +7 -0
  14. package/dist/lib/{browser → neutral}/blueprints/index.mjs +1 -2
  15. package/dist/lib/neutral/capabilities/index.mjs +17 -0
  16. package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
  17. package/dist/lib/neutral/chunk-2O3ONPRZ.mjs +298 -0
  18. package/dist/lib/neutral/chunk-2O3ONPRZ.mjs.map +7 -0
  19. package/dist/lib/neutral/chunk-FHNI26QW.mjs +45 -0
  20. package/dist/lib/neutral/chunk-FHNI26QW.mjs.map +7 -0
  21. package/dist/lib/{browser/chunk-EV5ZYKET.mjs → neutral/chunk-ILSA3DU7.mjs} +87 -112
  22. package/dist/lib/neutral/chunk-ILSA3DU7.mjs.map +7 -0
  23. package/dist/lib/{browser/chunk-HOOPZ7EM.mjs → neutral/chunk-KAEXRX3Y.mjs} +1 -1
  24. package/dist/lib/neutral/chunk-KVUT2KYT.mjs +124 -0
  25. package/dist/lib/neutral/chunk-KVUT2KYT.mjs.map +7 -0
  26. package/dist/lib/neutral/chunk-MLRJWAQH.mjs +179 -0
  27. package/dist/lib/neutral/chunk-MLRJWAQH.mjs.map +7 -0
  28. package/dist/lib/neutral/chunk-Y4YI44ZD.mjs +8 -0
  29. package/dist/lib/neutral/chunk-Y4YI44ZD.mjs.map +7 -0
  30. package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs +30 -0
  31. package/dist/lib/neutral/chunk-ZR4BH4QQ.mjs.map +7 -0
  32. package/dist/lib/neutral/components/index.mjs +273 -0
  33. package/dist/lib/neutral/components/index.mjs.map +7 -0
  34. package/dist/lib/neutral/containers/index.mjs +9 -0
  35. package/dist/lib/neutral/containers/index.mjs.map +7 -0
  36. package/dist/lib/neutral/create-VWFMMAUY.mjs +21 -0
  37. package/dist/lib/neutral/create-VWFMMAUY.mjs.map +7 -0
  38. package/dist/lib/neutral/hooks/index.mjs +19 -0
  39. package/dist/lib/neutral/index.mjs +44 -0
  40. package/dist/lib/neutral/meta.json +1 -0
  41. package/dist/lib/neutral/meta.mjs +8 -0
  42. package/dist/lib/neutral/open-V772IQYW.mjs +27 -0
  43. package/dist/lib/neutral/open-V772IQYW.mjs.map +7 -0
  44. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs +13 -0
  45. package/dist/lib/neutral/operation-handler-NXMOAXFP.mjs.map +7 -0
  46. package/dist/lib/neutral/operations/index.mjs +8 -0
  47. package/dist/lib/neutral/plugin.mjs +16 -0
  48. package/dist/lib/neutral/plugin.mjs.map +7 -0
  49. package/dist/lib/neutral/react-surface-YMZRO242.mjs +26 -0
  50. package/dist/lib/neutral/react-surface-YMZRO242.mjs.map +7 -0
  51. package/dist/lib/neutral/summarize-6PDRGTKE.mjs +78 -0
  52. package/dist/lib/neutral/summarize-6PDRGTKE.mjs.map +7 -0
  53. package/dist/lib/neutral/text-content-KBB37HSM.mjs +30 -0
  54. package/dist/lib/neutral/text-content-KBB37HSM.mjs.map +7 -0
  55. package/dist/lib/{browser/transcriber-WCPHHJYY.mjs → neutral/transcriber-ABHATBVH.mjs} +8 -10
  56. package/dist/lib/neutral/transcriber-ABHATBVH.mjs.map +7 -0
  57. package/dist/lib/neutral/translations.mjs +24 -0
  58. package/dist/lib/neutral/translations.mjs.map +7 -0
  59. package/dist/lib/neutral/types/index.mjs +10 -0
  60. package/dist/lib/neutral/types/index.mjs.map +7 -0
  61. package/dist/types/src/TranscriptionPlugin.d.ts +1 -0
  62. package/dist/types/src/TranscriptionPlugin.d.ts.map +1 -1
  63. package/dist/types/src/TranscriptionPlugin.node.d.ts +4 -0
  64. package/dist/types/src/TranscriptionPlugin.node.d.ts.map +1 -0
  65. package/dist/types/src/TranscriptionPlugin.test.d.ts +2 -0
  66. package/dist/types/src/TranscriptionPlugin.test.d.ts.map +1 -0
  67. package/dist/types/src/TranscriptionPlugin.workerd.d.ts +4 -0
  68. package/dist/types/src/TranscriptionPlugin.workerd.d.ts.map +1 -0
  69. package/dist/types/src/blueprints/transcription-blueprint.d.ts +2 -2
  70. package/dist/types/src/blueprints/transcription-blueprint.d.ts.map +1 -1
  71. package/dist/types/src/capabilities/blueprint-definition.d.ts +6 -0
  72. package/dist/types/src/capabilities/blueprint-definition.d.ts.map +1 -0
  73. package/dist/types/src/capabilities/index.d.ts +10 -4
  74. package/dist/types/src/capabilities/index.d.ts.map +1 -1
  75. package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
  76. package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
  77. package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
  78. package/dist/types/src/capabilities/text-content.d.ts +8 -0
  79. package/dist/types/src/capabilities/text-content.d.ts.map +1 -0
  80. package/dist/types/src/capabilities/{transcriber/transcriber.d.ts → transcriber.d.ts} +1 -1
  81. package/dist/types/src/capabilities/transcriber.d.ts.map +1 -0
  82. package/dist/types/src/components/Oracle/Oracle.d.ts +24 -0
  83. package/dist/types/src/components/Oracle/Oracle.d.ts.map +1 -0
  84. package/dist/types/src/components/Oracle/Oracle.stories.d.ts +32 -0
  85. package/dist/types/src/components/Oracle/Oracle.stories.d.ts.map +1 -0
  86. package/dist/types/src/components/Oracle/index.d.ts +2 -0
  87. package/dist/types/src/components/Oracle/index.d.ts.map +1 -0
  88. package/dist/types/src/components/Transcription/Transcription.d.ts +5 -9
  89. package/dist/types/src/components/Transcription/Transcription.d.ts.map +1 -1
  90. package/dist/types/src/components/Transcription/Transcription.stories.d.ts +21 -24
  91. package/dist/types/src/components/Transcription/Transcription.stories.d.ts.map +1 -1
  92. package/dist/types/src/components/Transcription/transcription-extension.d.ts.map +1 -1
  93. package/dist/types/src/components/index.d.ts +1 -0
  94. package/dist/types/src/components/index.d.ts.map +1 -1
  95. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts +6 -0
  96. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.d.ts.map +1 -0
  97. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts +28 -0
  98. package/dist/types/src/containers/TranscriptionArticle/TranscriptionArticle.stories.d.ts.map +1 -0
  99. package/dist/types/src/containers/TranscriptionArticle/index.d.ts +2 -0
  100. package/dist/types/src/containers/TranscriptionArticle/index.d.ts.map +1 -0
  101. package/dist/types/src/containers/index.d.ts +1 -1
  102. package/dist/types/src/containers/index.d.ts.map +1 -1
  103. package/dist/types/src/enrichment/conversation.test.d.ts +2 -0
  104. package/dist/types/src/enrichment/conversation.test.d.ts.map +1 -0
  105. package/dist/types/src/enrichment/operations.d.ts +200 -0
  106. package/dist/types/src/enrichment/operations.d.ts.map +1 -0
  107. package/dist/types/src/enrichment/parser.d.ts +26 -0
  108. package/dist/types/src/enrichment/parser.d.ts.map +1 -0
  109. package/dist/types/src/enrichment/stream-simulator.d.ts +38 -0
  110. package/dist/types/src/enrichment/stream-simulator.d.ts.map +1 -0
  111. package/dist/types/src/hooks/index.d.ts +2 -1
  112. package/dist/types/src/hooks/index.d.ts.map +1 -1
  113. package/dist/types/src/hooks/useAudioFile.d.ts.map +1 -1
  114. package/dist/types/src/hooks/useAudioTrack.d.ts.map +1 -1
  115. package/dist/types/src/hooks/useFeedModelAdapter.d.ts +12 -0
  116. package/dist/types/src/hooks/useFeedModelAdapter.d.ts.map +1 -0
  117. package/dist/types/src/hooks/useTranscriber.d.ts +2 -2
  118. package/dist/types/src/hooks/useTranscriber.d.ts.map +1 -1
  119. package/dist/types/src/hooks/useTranscriptionRecording.d.ts +12 -0
  120. package/dist/types/src/hooks/useTranscriptionRecording.d.ts.map +1 -0
  121. package/dist/types/src/hooks/useVoiceInput.d.ts.map +1 -1
  122. package/dist/types/src/index.d.ts +2 -3
  123. package/dist/types/src/index.d.ts.map +1 -1
  124. package/dist/types/src/meta.d.ts +1 -1
  125. package/dist/types/src/meta.d.ts.map +1 -1
  126. package/dist/types/src/model/model.d.ts +2 -2
  127. package/dist/types/src/model/model.d.ts.map +1 -1
  128. package/dist/types/src/{segments-normalization → normalization}/index.d.ts +1 -1
  129. package/dist/types/src/normalization/index.d.ts.map +1 -0
  130. package/dist/types/src/{segments-normalization → normalization}/message-normalizer.d.ts +7 -5
  131. package/dist/types/src/normalization/message-normalizer.d.ts.map +1 -0
  132. package/dist/types/src/normalization/normalization.d.ts +834 -0
  133. package/dist/types/src/normalization/normalization.d.ts.map +1 -0
  134. package/dist/types/src/normalization/normalization.test.d.ts.map +1 -0
  135. package/dist/types/src/normalization/utils.d.ts.map +1 -0
  136. package/dist/types/src/operations/create.d.ts +5 -0
  137. package/dist/types/src/operations/create.d.ts.map +1 -0
  138. package/dist/types/src/operations/index.d.ts +3 -0
  139. package/dist/types/src/operations/index.d.ts.map +1 -0
  140. package/dist/types/src/operations/open.d.ts +5 -0
  141. package/dist/types/src/operations/open.d.ts.map +1 -0
  142. package/dist/types/src/operations/summarize.d.ts +8 -0
  143. package/dist/types/src/operations/summarize.d.ts.map +1 -0
  144. package/dist/types/src/plugin.d.ts +4 -0
  145. package/dist/types/src/plugin.d.ts.map +1 -0
  146. package/dist/types/src/stories/FileTranscription.stories.d.ts +20 -0
  147. package/dist/types/src/stories/FileTranscription.stories.d.ts.map +1 -0
  148. package/dist/types/src/{components/stories → stories}/KeyWordRecognition.stories.d.ts +2 -2
  149. package/dist/types/src/stories/KeyWordRecognition.stories.d.ts.map +1 -0
  150. package/dist/types/src/{components/stories/MicrophoneTranscription.stories.d.ts → stories/LiveTranscription.stories.d.ts} +7 -7
  151. package/dist/types/src/stories/LiveTranscription.stories.d.ts.map +1 -0
  152. package/dist/types/src/stories/TranscriptionStory.d.ts +21 -0
  153. package/dist/types/src/stories/TranscriptionStory.d.ts.map +1 -0
  154. package/dist/types/src/stories/common.d.ts +248 -0
  155. package/dist/types/src/stories/common.d.ts.map +1 -0
  156. package/dist/types/src/testing/testing.d.ts +5 -6
  157. package/dist/types/src/testing/testing.d.ts.map +1 -1
  158. package/dist/types/src/transcriber/index.d.ts +1 -1
  159. package/dist/types/src/transcriber/index.d.ts.map +1 -1
  160. package/dist/types/src/transcriber/media-stream-recorder.d.ts.map +1 -1
  161. package/dist/types/src/transcriber/transcriber.d.ts +58 -3
  162. package/dist/types/src/transcriber/transcriber.d.ts.map +1 -1
  163. package/dist/types/src/transcriber/transcriber.test.d.ts +2 -0
  164. package/dist/types/src/transcriber/transcriber.test.d.ts.map +1 -0
  165. package/dist/types/src/transcriber/transcription-manager.d.ts +6 -4
  166. package/dist/types/src/transcriber/transcription-manager.d.ts.map +1 -1
  167. package/dist/types/src/translations.d.ts +9 -8
  168. package/dist/types/src/translations.d.ts.map +1 -1
  169. package/dist/types/src/types/TranscriptOperation.d.ts +1670 -0
  170. package/dist/types/src/types/TranscriptOperation.d.ts.map +1 -0
  171. package/dist/types/src/types/TranscriptionCapabilities.d.ts +17 -0
  172. package/dist/types/src/types/TranscriptionCapabilities.d.ts.map +1 -0
  173. package/dist/types/src/types/index.d.ts +2 -4
  174. package/dist/types/src/types/index.d.ts.map +1 -1
  175. package/dist/types/src/util/array.d.ts.map +1 -1
  176. package/dist/types/src/util/get-time-str.d.ts.map +1 -1
  177. package/dist/types/src/util/monitor-audio-level.d.ts.map +1 -1
  178. package/dist/types/src/util/render-byline.d.ts.map +1 -1
  179. package/dist/types/tsconfig.tsbuildinfo +1 -1
  180. package/package.json +140 -86
  181. package/src/TranscriptionPlugin.node.ts +20 -0
  182. package/src/TranscriptionPlugin.test.ts +31 -0
  183. package/src/TranscriptionPlugin.tsx +14 -29
  184. package/src/TranscriptionPlugin.workerd.ts +18 -0
  185. package/src/blueprints/transcription-blueprint.ts +5 -9
  186. package/src/capabilities/{blueprint-definition/blueprint-definition.ts → blueprint-definition.ts} +3 -1
  187. package/src/capabilities/index.ts +12 -4
  188. package/src/capabilities/operation-handler.ts +16 -0
  189. package/src/capabilities/react-surface.tsx +31 -0
  190. package/src/capabilities/text-content.ts +33 -0
  191. package/src/capabilities/{transcriber/transcriber.ts → transcriber.ts} +5 -2
  192. package/src/components/Oracle/Oracle.stories.tsx +147 -0
  193. package/src/components/Oracle/Oracle.tsx +142 -0
  194. package/src/components/Oracle/index.ts +5 -0
  195. package/src/components/Transcription/Transcription.stories.tsx +125 -158
  196. package/src/components/Transcription/Transcription.tsx +33 -38
  197. package/src/components/index.ts +1 -0
  198. package/src/containers/TranscriptionArticle/TranscriptionArticle.stories.tsx +61 -0
  199. package/src/containers/TranscriptionArticle/TranscriptionArticle.tsx +62 -0
  200. package/src/containers/TranscriptionArticle/index.ts +5 -0
  201. package/src/containers/index.ts +1 -1
  202. package/src/enrichment/conversation.test.ts +162 -0
  203. package/src/enrichment/conversation.txt +23 -0
  204. package/src/enrichment/operations.ts +271 -0
  205. package/src/enrichment/parser.ts +101 -0
  206. package/src/enrichment/stream-simulator.ts +125 -0
  207. package/src/hooks/index.ts +2 -1
  208. package/src/hooks/useFeedModelAdapter.ts +46 -0
  209. package/src/hooks/useTranscriber.ts +5 -2
  210. package/src/hooks/useTranscriptionRecording.ts +87 -0
  211. package/src/hooks/useVoiceInput.ts +0 -1
  212. package/src/index.ts +4 -5
  213. package/src/meta.ts +28 -6
  214. package/src/model/model.test.ts +8 -8
  215. package/src/model/model.ts +3 -3
  216. package/src/{segments-normalization → normalization}/message-normalizer.ts +25 -17
  217. package/src/{segments-normalization → normalization}/normalization.test.ts +3 -37
  218. package/src/normalization/normalization.ts +76 -0
  219. package/src/operations/create.ts +24 -0
  220. package/src/operations/index.ts +11 -0
  221. package/src/operations/open.ts +28 -0
  222. package/src/operations/summarize.ts +101 -0
  223. package/src/plugin.ts +11 -0
  224. package/src/stories/FileTranscription.stories.tsx +143 -0
  225. package/src/{components/stories → stories}/KeyWordRecognition.stories.tsx +38 -38
  226. package/src/stories/LiveTranscription.stories.tsx +153 -0
  227. package/src/stories/TranscriptionStory.tsx +101 -0
  228. package/src/stories/common.ts +233 -0
  229. package/src/testing/testing.ts +29 -51
  230. package/src/transcriber/index.ts +1 -1
  231. package/src/transcriber/transcriber.browser.test.ts +0 -1
  232. package/src/transcriber/transcriber.test.ts +104 -0
  233. package/src/transcriber/transcriber.ts +100 -55
  234. package/src/transcriber/transcription-manager.ts +14 -9
  235. package/src/translations.ts +10 -7
  236. package/src/types/TranscriptOperation.ts +106 -0
  237. package/src/types/TranscriptionCapabilities.ts +39 -0
  238. package/src/types/index.ts +2 -4
  239. package/src/vite-env.d.ts +10 -0
  240. package/dist/lib/browser/TranscriptionContainer-RBFHP2AV.mjs +0 -41
  241. package/dist/lib/browser/TranscriptionContainer-RBFHP2AV.mjs.map +0 -7
  242. package/dist/lib/browser/blueprint-definition-C6XA2SVZ.mjs.map +0 -7
  243. package/dist/lib/browser/chunk-2B74LZZD.mjs +0 -22
  244. package/dist/lib/browser/chunk-2B74LZZD.mjs.map +0 -7
  245. package/dist/lib/browser/chunk-EV5ZYKET.mjs.map +0 -7
  246. package/dist/lib/browser/chunk-GH4IIQ6C.mjs +0 -54
  247. package/dist/lib/browser/chunk-GH4IIQ6C.mjs.map +0 -7
  248. package/dist/lib/browser/chunk-O7ILGNBZ.mjs +0 -148
  249. package/dist/lib/browser/chunk-O7ILGNBZ.mjs.map +0 -7
  250. package/dist/lib/browser/chunk-XLMRCOQN.mjs +0 -668
  251. package/dist/lib/browser/chunk-XLMRCOQN.mjs.map +0 -7
  252. package/dist/lib/browser/index.mjs +0 -114
  253. package/dist/lib/browser/index.mjs.map +0 -7
  254. package/dist/lib/browser/meta.json +0 -1
  255. package/dist/lib/browser/operation-resolver-5BLRH4XE.mjs +0 -23
  256. package/dist/lib/browser/operation-resolver-5BLRH4XE.mjs.map +0 -7
  257. package/dist/lib/browser/react-surface-U2SI74JK.mjs +0 -36
  258. package/dist/lib/browser/react-surface-U2SI74JK.mjs.map +0 -7
  259. package/dist/lib/browser/transcriber-WCPHHJYY.mjs.map +0 -7
  260. package/dist/lib/browser/types/index.mjs +0 -15
  261. package/dist/lib/node-esm/TranscriptionContainer-3OOID5KH.mjs +0 -42
  262. package/dist/lib/node-esm/TranscriptionContainer-3OOID5KH.mjs.map +0 -7
  263. package/dist/lib/node-esm/blueprint-definition-TLXDUXIQ.mjs +0 -19
  264. package/dist/lib/node-esm/blueprint-definition-TLXDUXIQ.mjs.map +0 -7
  265. package/dist/lib/node-esm/blueprints/index.mjs +0 -10
  266. package/dist/lib/node-esm/chunk-6GW5NZYG.mjs +0 -55
  267. package/dist/lib/node-esm/chunk-6GW5NZYG.mjs.map +0 -7
  268. package/dist/lib/node-esm/chunk-7UE7G6DE.mjs +0 -461
  269. package/dist/lib/node-esm/chunk-7UE7G6DE.mjs.map +0 -7
  270. package/dist/lib/node-esm/chunk-DYUGYQCB.mjs +0 -669
  271. package/dist/lib/node-esm/chunk-DYUGYQCB.mjs.map +0 -7
  272. package/dist/lib/node-esm/chunk-F47HK7GT.mjs +0 -24
  273. package/dist/lib/node-esm/chunk-F47HK7GT.mjs.map +0 -7
  274. package/dist/lib/node-esm/chunk-H3MXHMQL.mjs +0 -149
  275. package/dist/lib/node-esm/chunk-H3MXHMQL.mjs.map +0 -7
  276. package/dist/lib/node-esm/chunk-HSLMI22Q.mjs +0 -11
  277. package/dist/lib/node-esm/chunk-NVM2QUMX.mjs +0 -37
  278. package/dist/lib/node-esm/chunk-NVM2QUMX.mjs.map +0 -7
  279. package/dist/lib/node-esm/index.mjs +0 -115
  280. package/dist/lib/node-esm/index.mjs.map +0 -7
  281. package/dist/lib/node-esm/meta.json +0 -1
  282. package/dist/lib/node-esm/operation-resolver-CVZB7BF4.mjs +0 -24
  283. package/dist/lib/node-esm/operation-resolver-CVZB7BF4.mjs.map +0 -7
  284. package/dist/lib/node-esm/react-surface-2ICJPBPX.mjs +0 -37
  285. package/dist/lib/node-esm/react-surface-2ICJPBPX.mjs.map +0 -7
  286. package/dist/lib/node-esm/transcriber-2RIHUEX4.mjs +0 -62
  287. package/dist/lib/node-esm/transcriber-2RIHUEX4.mjs.map +0 -7
  288. package/dist/lib/node-esm/types/index.mjs +0 -16
  289. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts +0 -6
  290. package/dist/types/src/capabilities/blueprint-definition/blueprint-definition.d.ts.map +0 -1
  291. package/dist/types/src/capabilities/blueprint-definition/index.d.ts +0 -3
  292. package/dist/types/src/capabilities/blueprint-definition/index.d.ts.map +0 -1
  293. package/dist/types/src/capabilities/operation-handler/index.d.ts +0 -3
  294. package/dist/types/src/capabilities/operation-handler/index.d.ts.map +0 -1
  295. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts +0 -5
  296. package/dist/types/src/capabilities/operation-handler/operation-handler.d.ts.map +0 -1
  297. package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
  298. package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
  299. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
  300. package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
  301. package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
  302. package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
  303. package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
  304. package/dist/types/src/capabilities/transcriber/index.d.ts +0 -3
  305. package/dist/types/src/capabilities/transcriber/index.d.ts.map +0 -1
  306. package/dist/types/src/capabilities/transcriber/transcriber.d.ts.map +0 -1
  307. package/dist/types/src/components/stories/FileTranscription.stories.d.ts +0 -18
  308. package/dist/types/src/components/stories/FileTranscription.stories.d.ts.map +0 -1
  309. package/dist/types/src/components/stories/KeyWordRecognition.stories.d.ts.map +0 -1
  310. package/dist/types/src/components/stories/MicrophoneTranscription.stories.d.ts.map +0 -1
  311. package/dist/types/src/components/stories/TranscriptionStory.d.ts +0 -12
  312. package/dist/types/src/components/stories/TranscriptionStory.d.ts.map +0 -1
  313. package/dist/types/src/components/stories/useIsSpeaking.d.ts +0 -3
  314. package/dist/types/src/components/stories/useIsSpeaking.d.ts.map +0 -1
  315. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts +0 -6
  316. package/dist/types/src/containers/TranscriptionContainer/TranscriptionContainer.d.ts.map +0 -1
  317. package/dist/types/src/containers/TranscriptionContainer/index.d.ts +0 -3
  318. package/dist/types/src/containers/TranscriptionContainer/index.d.ts.map +0 -1
  319. package/dist/types/src/functions/index.d.ts +0 -18
  320. package/dist/types/src/functions/index.d.ts.map +0 -1
  321. package/dist/types/src/functions/open.d.ts +0 -11
  322. package/dist/types/src/functions/open.d.ts.map +0 -1
  323. package/dist/types/src/functions/summarize.d.ts +0 -11
  324. package/dist/types/src/functions/summarize.d.ts.map +0 -1
  325. package/dist/types/src/hooks/useQueueModelAdapter.d.ts +0 -8
  326. package/dist/types/src/hooks/useQueueModelAdapter.d.ts.map +0 -1
  327. package/dist/types/src/segments-normalization/index.d.ts.map +0 -1
  328. package/dist/types/src/segments-normalization/message-normalizer.d.ts.map +0 -1
  329. package/dist/types/src/segments-normalization/normalization.d.ts +0 -534
  330. package/dist/types/src/segments-normalization/normalization.d.ts.map +0 -1
  331. package/dist/types/src/segments-normalization/normalization.test.d.ts.map +0 -1
  332. package/dist/types/src/segments-normalization/utils.d.ts.map +0 -1
  333. package/dist/types/src/types/TranscriptAction.d.ts +0 -25
  334. package/dist/types/src/types/TranscriptAction.d.ts.map +0 -1
  335. package/dist/types/src/types/capabilities.d.ts +0 -18
  336. package/dist/types/src/types/capabilities.d.ts.map +0 -1
  337. package/dist/types/src/types/types.d.ts +0 -5
  338. package/dist/types/src/types/types.d.ts.map +0 -1
  339. package/src/capabilities/blueprint-definition/index.ts +0 -7
  340. package/src/capabilities/operation-handler/index.ts +0 -7
  341. package/src/capabilities/operation-handler/operation-handler.ts +0 -25
  342. package/src/capabilities/operation-resolver/index.ts +0 -7
  343. package/src/capabilities/operation-resolver/operation-resolver.ts +0 -25
  344. package/src/capabilities/react-surface/index.ts +0 -7
  345. package/src/capabilities/react-surface/react-surface.tsx +0 -28
  346. package/src/capabilities/transcriber/index.ts +0 -7
  347. package/src/components/stories/FileTranscription.stories.tsx +0 -252
  348. package/src/components/stories/MicrophoneTranscription.stories.tsx +0 -282
  349. package/src/components/stories/TranscriptionStory.tsx +0 -41
  350. package/src/components/stories/useIsSpeaking.tsx +0 -40
  351. package/src/containers/TranscriptionContainer/TranscriptionContainer.tsx +0 -33
  352. package/src/containers/TranscriptionContainer/index.ts +0 -7
  353. package/src/functions/index.ts +0 -11
  354. package/src/functions/open.ts +0 -37
  355. package/src/functions/summarize.ts +0 -103
  356. package/src/hooks/useQueueModelAdapter.ts +0 -66
  357. package/src/segments-normalization/normalization.ts +0 -115
  358. package/src/types/TranscriptAction.ts +0 -32
  359. package/src/types/capabilities.ts +0 -33
  360. package/src/types/types.ts +0 -9
  361. package/dist/lib/{browser → neutral}/blueprints/index.mjs.map +0 -0
  362. package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs +0 -0
  363. package/dist/lib/{browser → neutral}/chunk-J5LGTIGS.mjs.map +0 -0
  364. package/dist/lib/{browser/chunk-HOOPZ7EM.mjs.map → neutral/chunk-KAEXRX3Y.mjs.map} +0 -0
  365. package/dist/lib/{browser/types → neutral/hooks}/index.mjs.map +0 -0
  366. package/dist/lib/{node-esm/blueprints → neutral}/index.mjs.map +0 -0
  367. package/dist/lib/{node-esm/chunk-HSLMI22Q.mjs.map → neutral/meta.mjs.map} +0 -0
  368. package/dist/lib/{node-esm/types → neutral/operations}/index.mjs.map +0 -0
  369. package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
  370. package/dist/types/src/{segments-normalization → normalization}/normalization.test.d.ts +0 -0
  371. package/dist/types/src/{segments-normalization → normalization}/utils.d.ts +0 -0
  372. package/src/{segments-normalization → normalization}/index.ts +1 -1
  373. /package/src/{segments-normalization → normalization}/utils.ts +0 -0
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/TranscriptionPlugin.tsx", "raw-loader:/__w/dxos/dxos/packages/plugins/plugin-transcription/PLUGIN.mdl?raw"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppActivationEvents, AppPlugin } from '@dxos/app-toolkit';\nimport { Transcript } from '@dxos/types';\n\nimport { BlueprintDefinition, OperationHandler, ReactSurface, TextContent, Transcriber } from '#capabilities';\nimport { meta } from '#meta';\nimport { translations } from '#translations';\n\n// eslint-disable-next-line import/no-relative-packages\nimport pluginSpec from '../PLUGIN.mdl?raw';\n\nexport const TranscriptionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addTextContentModule({ activate: TextContent }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),\n AppPlugin.addSurfaceModule({ activate: ReactSurface }),\n AppPlugin.addTranslationsModule({ translations }),\n Plugin.addModule({\n id: 'transcription',\n activatesOn: AppActivationEvents.SetupAppGraph,\n activate: Transcriber,\n }),\n AppPlugin.addPluginAssetModule({\n asset: { pluginId: meta.id, path: 'PLUGIN.mdl', content: pluginSpec, mimeType: 'application/x-mdl' },\n }),\n Plugin.make,\n);\n\nexport default TranscriptionPlugin;\n", "---\nid: org.dxos.plugin.transcription\nname: TranscriptionPlugin\nversion: 0.1.0\n---\n\nA real-time voice-to-text transcription plugin for DXOS Composer.\nCaptures spoken audio from a microphone, converts it to timestamped text segments via the\nWhisper speech-recognition service, and stores the results in an ECHO `Transcript` object\nbacked by a `Feed`.\nThe plugin also exposes blueprint-compatible operations that let AI assistants open and\nsummarize transcripts inside agent workflows.\n\n## Extensions\n\nThe following extension dialects are used in this document.\nEach extension is defined in the Appendix or resolved via its URI.\n\n| Term | URI |\n|-------------|--------------------------------|\n| `type` | `org.dxos.mdl.type@1.0` |\n| `feat` | `org.dxos.mdl.feat@1.0` |\n| `test` | `org.dxos.mdl.test@1.0` |\n| `component` | `org.dxos.mdl.component@1.0` |\n| `op` | `org.dxos.mdl.op@1.0` |\n\n## Types\n\n```mdl\ntype TranscriptSegment\n fields:\n text: string # transcribed text for this segment\n started: string # ISO-8601 wall-clock timestamp of segment start\n```\n\n```mdl\ntype Message\n fields:\n id: string\n created: string # ISO-8601 creation timestamp\n blocks: TranscriptSegment[]\n sender:\n identityDid?: string # DID of the speaker, if known\n```\n\n```mdl\ntype Transcript\n fields:\n id: string\n feed: Ref<Feed> # ECHO feed that stores Message objects\n started?: string # ISO-8601 timestamp when recording started\n```\n\n```mdl\ntype WhisperWord\n fields:\n word: string\n start: number # seconds from start of audio chunk\n end: number\n```\n\n```mdl\ntype WhisperSegment\n fields:\n text: string\n start: number\n end: number\n no_speech_prob: number # probability of silence; used to filter noise\n words: WhisperWord[]\n```\n\n## Components\n\n```mdl\ncomponent Transcription\n desc: Read-only CodeMirror editor that renders transcript messages as Markdown with byline headings.\n props:\n transcript?: Transcript\n model: SerializationModel<Message>\n slots:\n (none \u2014 self-contained editor viewport)\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [CodeMirror editor \u2014 read-only] \u2502\n \u2502 ## Speaker \u00B7 HH:MM \u2502\n \u2502 Transcribed text\u2026 \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent Oracle\n desc: |\n Ambient display surface with an SVG graph canvas and a centered text overlay.\n Used to show the latest transcribed utterance alongside a live visualization.\n props:\n text?: string # latest utterance to display\n delay?: number # per-character reveal delay in ms (default 12)\n slots:\n canvas?: ReactNode # replaces default SVG.Graph when provided\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [SVG canvas \u2014 absolutely fills]\u2502\n \u2502 [Oracle.Text] \u2502\n \u2502 \"latest utterance\u2026\" \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n```mdl\ncomponent TranscriptionArticle\n desc: Full-page article panel combining the Transcription editor with a start/stop recording toolbar action.\n props:\n subject: Transcript\n role: string\n attendableId?: string\n state:\n recording: boolean # whether microphone capture is active\n actions:\n toggleRecording()\n layout: |\n \u250C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510\n \u2502 [Toolbar] [\uD83C\uDFA4 Start/Stop] \u2502\n \u251C\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2524\n \u2502 [Transcription editor] \u2502\n \u2502 \u2026 \u2502\n \u2514\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2518\n```\n\n## Operations\n\nPure operations \u2014 no side-effects.\n\n```mdl\nop openTranscript\n desc: Loads a Transcript from ECHO, reads all Messages from its Feed, and returns the full text content rendered with speaker bylines.\n input:\n transcript: Ref<Transcript>\n output: string\n errors:\n TranscriptNotFound: no Transcript object found for the given ref\n FeedNotFound: the Transcript's feed ref cannot be resolved\n requires: [Database, FeedService]\n```\n\nEffectful operations \u2014 produce output via AI or mutate persistent state.\n\n```mdl\nop createTranscript\n desc: Creates a new Feed and a Transcript object linked to it, then writes both into the current ECHO space.\n input:\n name?: string\n space: Space\n output: Transcript\n effects: [echo:write]\n```\n\n```mdl\nop summarizeTranscript\n desc: Sends a transcript string and optional participant notes to an LLM and returns a Markdown summary with key points, verbatim quotes, and actionable tasks extracted from the conversation.\n input:\n transcript: string\n notes?: string\n output: string\n effects: [http]\n requires: [AiService]\n note: |\n Uses Claude Sonnet. Prompt instructs the model to bold speaker names,\n include verbatim quotes, and emit only tasks that are directly actionable\n and clearly assigned.\n```\n\n```mdl\nop normalizeSentences\n desc: Post-processes an array of raw transcript messages, merging word-level tokens into grammatically complete sentences.\n input:\n messages: Message[]\n output: Message[]\n note: pure transformation; no effects or service dependencies\n```\n\n## Features\n\n```mdl\nfeat F-1: Recording Lifecycle\n\n req F-1.1: User can start microphone capture from TranscriptionArticle toolbar.\n req F-1.2: User can stop microphone capture; final buffered chunks are flushed and transcribed.\n req F-1.3: TranscriptionManager restarts the Transcriber automatically when the audio track changes.\n```\n\n```mdl\nfeat F-2: Audio Chunking and Transcription\n\n req F-2.1:\n when: user is speaking and chunk count reaches transcribeAfterChunksAmount\n then: Transcriber schedules a deferred transcription task\n\n req F-2.2:\n when: transcription task runs\n then: buffered PCM chunks are merged into a WAV file and POSTed to the Whisper endpoint\n\n req F-2.3:\n when: Whisper response is received\n then: segments are filtered by no_speech_prob and aligned to absolute wall-clock timestamps\n\n req F-2.4:\n when: user is not speaking\n then: only prefixBufferChunksAmount most-recent chunks are retained; older chunks discarded\n```\n\n```mdl\nfeat F-3: Transcript Persistence\n\n req F-3.1:\n when: aligned segments are produced\n then: a Message object with the segments is appended to the Transcript's ECHO Feed\n\n req F-3.2:\n when: a messageEnricher is configured\n then: Message is passed through the enricher before being written to the Feed\n\n req F-3.3:\n when: a peer's ECHO space receives the Feed update\n then: TranscriptionArticle re-renders with the new messages\n tags: [collaborative]\n```\n\n```mdl\nfeat F-4: Transcript Display\n\n req F-4.1:\n when: a Transcript object is opened\n then: all Messages are rendered in the Transcription editor with speaker bylines and timestamps\n\n req F-4.2:\n when: new messages arrive during live recording\n then: the SerializationModel is updated and the editor scrolls to show the latest content\n```\n\n```mdl\nfeat F-5: AI Summary\n\n req F-5.1:\n when: op:summarizeTranscript is invoked\n then: LLM returns a structured Markdown document with key points, quotes, and tasks\n\n req F-5.2:\n when: participant notes are provided\n then: notes are correlated with transcript content in the summary\n\n req F-5.3:\n when: no actionable tasks are found\n then: the tasks section is omitted from the summary\n```\n\n```mdl\nfeat F-6: Blueprint Integration\n\n req F-6.1: Blueprint exposes op:openTranscript and op:summarizeTranscript as AI tools.\n req F-6.2: An AI assistant can open a transcript by Ref and return formatted text to the user.\n req F-6.3: An AI assistant can invoke the summary operation and present the result as a message.\n```\n\n## Acceptance\n\n```mdl\ntest T-1: Create transcript\n given: a DXOS space is available\n when: op:createTranscript is invoked\n then:\n - a new Feed is created in the space\n - a Transcript object linked to the Feed is created in the space\n - the returned Transcript.feed.target is not null\n```\n\n```mdl\ntest T-2: Record and persist segment\n given: a Transcript with a Feed, microphone capture active\n when: the user speaks and silence is detected\n then:\n - Whisper returns at least one segment\n - a Message is appended to the Feed\n - Message.blocks contains at least one TranscriptSegment with non-empty text\n```\n\n```mdl\ntest T-3: Deduplicate segments across chunk boundaries\n given: two consecutive transcription tasks with overlapping Whisper output\n when: the second task produces segments whose end timestamps fall before lastTimestamp\n then:\n - duplicate segments are filtered out\n - only novel words (start >= lastTimestamp) are included\n```\n\n```mdl\ntest T-4: Open transcript\n given: a Transcript with three Messages in its Feed\n when: op:openTranscript is invoked\n then:\n - content string contains three byline sections\n - each section starts with \"## <speaker> \u00B7 <time>\"\n```\n\n```mdl\ntest T-5: Summarize transcript\n given: a transcript string and optional notes string\n when: op:summarizeTranscript is invoked\n then:\n - summary is a non-empty Markdown string\n - speaker names appear in bold\n - a tasks section is present if actionable tasks were detected\n```\n\n```mdl\ntest T-6: Sentence normalization is pure\n given: an array of raw word-level Messages\n when: op:normalizeSentences is called\n then:\n - output messages contain complete sentences\n - no ECHO writes occur\n - input array is not mutated\n```\n\n```mdl\ntest T-7: Toggle recording in UI\n given: TranscriptionArticle is mounted with a Transcript\n when: user clicks the Start Recording toolbar button\n then:\n - recording state becomes true\n - toolbar button label changes to \"Stop Recording\"\n - microphone capture begins\n```\n\n---\n\n## Appendix: Extension Definitions\n\nExtension block types used in this document are defined below using\nthe core `ext` primitive \u2014 the only construct the base language provides.\n\n```mdl\next type\n uri: org.dxos.mdl.type@1.0\n desc: A named data structure with typed fields and optional literals.\n fields:\n desc?: Prose\n fields?: FieldMap # name[?]: TypeExpr (# inline comment)\n literals?: UnionList # a | b | c\n extends?: TypeRef[]\n```\n\n```mdl\next feat\n uri: org.dxos.mdl.feat@1.0\n desc: A named feature grouping one or more requirements.\n fields:\n desc?: Prose\n req: RequirementList\n nesting: self # feat blocks may contain feat blocks\n```\n\n```mdl\next test\n uri: org.dxos.mdl.test@1.0\n desc: An acceptance scenario expressed as given / when / then steps.\n fields:\n given?: Step | Step[]\n when?: Step | Step[]\n then: Step | Step[]\n tags?: TagList\n```\n\n```mdl\next component\n uri: org.dxos.mdl.component@1.0\n desc: A UI component with props, internal state, slots, actions, and events.\n fields:\n desc?: Prose\n props?: FieldMap # external inputs (immutable inside component)\n state?: FieldMap # internal reactive state\n slots?: FieldMap # named ReactNode injection points\n actions?: ActionMap # methods the component exposes or handles\n emits?: EventMap # events the component raises to its parent\n layout?: CodeBlock # ASCII sketch of visual structure (non-normative)\n```\n\n```mdl\next op\n uri: org.dxos.mdl.op@1.0\n desc: |\n A named operation with typed inputs, outputs, and declared errors.\n Pure ops have no effects or requires. Effectful ops declare both.\n fields:\n desc?: Prose\n input?: FieldMap # named input parameters\n output?: TypeExpr # return type\n errors?: ErrorMap # name: Prose (when this error occurs)\n effects?: EffectList # echo:read | echo:write | http | fs | ...\n requires?: ServiceList # injected service dependencies\n note?: Prose # implementation guidance (non-normative)\n```\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,qBAAqBC,iBAAiB;AAC/C,SAASC,kBAAkB;AAE3B,SAASC,qBAAqBC,kBAAkBC,cAAcC,aAAaC,mBAAmB;AAC9F,SAASC,YAAY;AACrB,SAASC,oBAAoB;;;ACV7B;;;ADeO,IAAMC,sBAAsBC,OAAOC,OAAOC,IAAAA,EAAMC,KACrDC,UAAUC,6BAA6B;EAAEC,UAAUC;AAAoB,CAAA,GACvEH,UAAUI,qBAAqB;EAAEF,UAAUG;AAAY,CAAA,GACvDL,UAAUM,0BAA0B;EAAEJ,UAAUK;AAAiB,CAAA,GACjEP,UAAUQ,gBAAgB;EAAEC,QAAQ;IAACC,WAAWA;;AAAY,CAAA,GAC5DV,UAAUW,iBAAiB;EAAET,UAAUU;AAAa,CAAA,GACpDZ,UAAUa,sBAAsB;EAAEC;AAAa,CAAA,GAC/ClB,OAAOmB,UAAU;EACfC,IAAI;EACJC,aAAaC,oBAAoBC;EACjCjB,UAAUkB;AACZ,CAAA,GACApB,UAAUqB,qBAAqB;EAC7BC,OAAO;IAAEC,UAAUzB,KAAKkB;IAAIQ,MAAM;IAAcC,SAASC;IAAYC,UAAU;EAAoB;AACrG,CAAA,GACA/B,OAAOgC,IAAI;AAGb,IAAA,8BAAejC;",
6
+ "names": ["Plugin", "AppActivationEvents", "AppPlugin", "Transcript", "BlueprintDefinition", "OperationHandler", "ReactSurface", "TextContent", "Transcriber", "meta", "translations", "TranscriptionPlugin", "Plugin", "define", "meta", "pipe", "AppPlugin", "addBlueprintDefinitionModule", "activate", "BlueprintDefinition", "addTextContentModule", "TextContent", "addOperationHandlerModule", "OperationHandler", "addSchemaModule", "schema", "Transcript", "addSurfaceModule", "ReactSurface", "addTranslationsModule", "translations", "addModule", "id", "activatesOn", "AppActivationEvents", "SetupAppGraph", "Transcriber", "addPluginAssetModule", "asset", "pluginId", "path", "content", "pluginSpec", "mimeType", "make"]
7
+ }
@@ -0,0 +1,25 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/TranscriptionPlugin.node.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { AppPlugin } from "@dxos/app-toolkit";
6
+ import { Transcript } from "@dxos/types";
7
+ import { BlueprintDefinition, OperationHandler, TextContent } from "#capabilities";
8
+ import { meta } from "#meta";
9
+ var TranscriptionPlugin = Plugin.define(meta).pipe(AppPlugin.addBlueprintDefinitionModule({
10
+ activate: BlueprintDefinition
11
+ }), AppPlugin.addTextContentModule({
12
+ activate: TextContent
13
+ }), AppPlugin.addOperationHandlerModule({
14
+ activate: OperationHandler
15
+ }), AppPlugin.addSchemaModule({
16
+ schema: [
17
+ Transcript.Transcript
18
+ ]
19
+ }), Plugin.make);
20
+ var TranscriptionPlugin_node_default = TranscriptionPlugin;
21
+ export {
22
+ TranscriptionPlugin,
23
+ TranscriptionPlugin_node_default as default
24
+ };
25
+ //# sourceMappingURL=TranscriptionPlugin.node.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/TranscriptionPlugin.node.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Transcript } from '@dxos/types';\n\nimport { BlueprintDefinition, OperationHandler, TextContent } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const TranscriptionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addBlueprintDefinitionModule({ activate: BlueprintDefinition }),\n AppPlugin.addTextContentModule({ activate: TextContent }),\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),\n Plugin.make,\n);\n\nexport default TranscriptionPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAE3B,SAASC,qBAAqBC,kBAAkBC,mBAAmB;AACnE,SAASC,YAAY;AAEd,IAAMC,sBAAsBP,OAAOQ,OAAOF,IAAAA,EAAMG,KACrDR,UAAUS,6BAA6B;EAAEC,UAAUR;AAAoB,CAAA,GACvEF,UAAUW,qBAAqB;EAAED,UAAUN;AAAY,CAAA,GACvDJ,UAAUY,0BAA0B;EAAEF,UAAUP;AAAiB,CAAA,GACjEH,UAAUa,gBAAgB;EAAEC,QAAQ;IAACb,WAAWA;;AAAY,CAAA,GAC5DF,OAAOgB,IAAI;AAGb,IAAA,mCAAeT;",
6
+ "names": ["Plugin", "AppPlugin", "Transcript", "BlueprintDefinition", "OperationHandler", "TextContent", "meta", "TranscriptionPlugin", "define", "pipe", "addBlueprintDefinitionModule", "activate", "addTextContentModule", "addOperationHandlerModule", "addSchemaModule", "schema", "make"]
7
+ }
@@ -0,0 +1,21 @@
1
+ import "./chunk-J5LGTIGS.mjs";
2
+
3
+ // src/TranscriptionPlugin.workerd.ts
4
+ import { Plugin } from "@dxos/app-framework";
5
+ import { AppPlugin } from "@dxos/app-toolkit";
6
+ import { Transcript } from "@dxos/types";
7
+ import { OperationHandler } from "#capabilities";
8
+ import { meta } from "#meta";
9
+ var TranscriptionPlugin = Plugin.define(meta).pipe(AppPlugin.addOperationHandlerModule({
10
+ activate: OperationHandler
11
+ }), AppPlugin.addSchemaModule({
12
+ schema: [
13
+ Transcript.Transcript
14
+ ]
15
+ }), Plugin.make);
16
+ var TranscriptionPlugin_workerd_default = TranscriptionPlugin;
17
+ export {
18
+ TranscriptionPlugin,
19
+ TranscriptionPlugin_workerd_default as default
20
+ };
21
+ //# sourceMappingURL=TranscriptionPlugin.workerd.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/TranscriptionPlugin.workerd.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { AppPlugin } from '@dxos/app-toolkit';\nimport { Transcript } from '@dxos/types';\n\nimport { OperationHandler } from '#capabilities';\nimport { meta } from '#meta';\n\nexport const TranscriptionPlugin = Plugin.define(meta).pipe(\n AppPlugin.addOperationHandlerModule({ activate: OperationHandler }),\n AppPlugin.addSchemaModule({ schema: [Transcript.Transcript] }),\n Plugin.make,\n);\n\nexport default TranscriptionPlugin;\n"],
5
+ "mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,kBAAkB;AAE3B,SAASC,wBAAwB;AACjC,SAASC,YAAY;AAEd,IAAMC,sBAAsBL,OAAOM,OAAOF,IAAAA,EAAMG,KACrDN,UAAUO,0BAA0B;EAAEC,UAAUN;AAAiB,CAAA,GACjEF,UAAUS,gBAAgB;EAAEC,QAAQ;IAACT,WAAWA;;AAAY,CAAA,GAC5DF,OAAOY,IAAI;AAGb,IAAA,sCAAeP;",
6
+ "names": ["Plugin", "AppPlugin", "Transcript", "OperationHandler", "meta", "TranscriptionPlugin", "define", "pipe", "addOperationHandlerModule", "activate", "addSchemaModule", "schema", "make"]
7
+ }
@@ -1,18 +1,15 @@
1
- import {
2
- transcription_blueprint_default
3
- } from "./chunk-O7ILGNBZ.mjs";
4
- import "./chunk-HOOPZ7EM.mjs";
5
1
  import "./chunk-J5LGTIGS.mjs";
6
2
 
7
- // src/capabilities/blueprint-definition/blueprint-definition.ts
3
+ // src/capabilities/blueprint-definition.ts
8
4
  import * as Effect from "effect/Effect";
9
5
  import { Capability } from "@dxos/app-framework";
10
6
  import { AppCapabilities } from "@dxos/app-toolkit";
7
+ import { TranscriptionBlueprint } from "#blueprints";
11
8
  var blueprintDefinition = Capability.makeModule(() => Effect.succeed([
12
- Capability.contributes(AppCapabilities.BlueprintDefinition, transcription_blueprint_default)
9
+ Capability.contributes(AppCapabilities.BlueprintDefinition, TranscriptionBlueprint)
13
10
  ]));
14
11
  var blueprint_definition_default = blueprintDefinition;
15
12
  export {
16
13
  blueprint_definition_default as default
17
14
  };
18
- //# sourceMappingURL=blueprint-definition-C6XA2SVZ.mjs.map
15
+ //# sourceMappingURL=blueprint-definition-HOXDG5QP.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/capabilities/blueprint-definition.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Capability } from '@dxos/app-framework';\nimport { AppCapabilities } from '@dxos/app-toolkit';\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport type { Blueprint } from '@dxos/compute';\n\nimport { TranscriptionBlueprint } from '#blueprints';\n\nconst blueprintDefinition = Capability.makeModule<\n [],\n Capability.Capability<typeof AppCapabilities.BlueprintDefinition>[]\n>(() => Effect.succeed([Capability.contributes(AppCapabilities.BlueprintDefinition, TranscriptionBlueprint)]));\n\nexport default blueprintDefinition;\n"],
5
+ "mappings": ";;;AAIA,YAAYA,YAAY;AAExB,SAASC,kBAAkB;AAC3B,SAASC,uBAAuB;AAIhC,SAASC,8BAA8B;AAEvC,IAAMC,sBAAsBH,WAAWI,WAGrC,MAAaC,eAAQ;EAACL,WAAWM,YAAYL,gBAAgBM,qBAAqBL,sBAAAA;CAAwB,CAAA;AAE5G,IAAA,+BAAeC;",
6
+ "names": ["Effect", "Capability", "AppCapabilities", "TranscriptionBlueprint", "blueprintDefinition", "makeModule", "succeed", "contributes", "BlueprintDefinition"]
7
+ }
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  transcription_blueprint_default
3
- } from "../chunk-O7ILGNBZ.mjs";
4
- import "../chunk-HOOPZ7EM.mjs";
3
+ } from "../chunk-ZR4BH4QQ.mjs";
5
4
  import "../chunk-J5LGTIGS.mjs";
6
5
  export {
7
6
  transcription_blueprint_default as TranscriptionBlueprint
@@ -0,0 +1,17 @@
1
+ import "../chunk-J5LGTIGS.mjs";
2
+
3
+ // src/capabilities/index.ts
4
+ import { Capability } from "@dxos/app-framework";
5
+ var BlueprintDefinition = Capability.lazy("BlueprintDefinition", () => import("../blueprint-definition-HOXDG5QP.mjs"));
6
+ var TextContent = Capability.lazy("TextContent", () => import("../text-content-KBB37HSM.mjs"));
7
+ var OperationHandler = Capability.lazy("OperationHandler", () => import("../operation-handler-NXMOAXFP.mjs"));
8
+ var ReactSurface = Capability.lazy("ReactSurface", () => import("../react-surface-YMZRO242.mjs"));
9
+ var Transcriber = Capability.lazy("Transcriber", () => import("../transcriber-ABHATBVH.mjs"));
10
+ export {
11
+ BlueprintDefinition,
12
+ OperationHandler,
13
+ ReactSurface,
14
+ TextContent,
15
+ Transcriber
16
+ };
17
+ //# sourceMappingURL=index.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../src/capabilities/index.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { Capability } from '@dxos/app-framework';\n// eslint-disable-next-line unused-imports/no-unused-imports\nimport type { Blueprint, OperationHandlerSet } from '@dxos/compute';\n\nexport const BlueprintDefinition = Capability.lazy('BlueprintDefinition', () => import('./blueprint-definition'));\nexport const TextContent = Capability.lazy('TextContent', () => import('./text-content'));\nexport const OperationHandler = Capability.lazy<OperationHandlerSet.OperationHandlerSet>(\n 'OperationHandler',\n () => import('./operation-handler'),\n);\nexport const ReactSurface = Capability.lazy('ReactSurface', () => import('./react-surface'));\nexport const Transcriber = Capability.lazy('Transcriber', () => import('./transcriber'));\n"],
5
+ "mappings": ";;;AAIA,SAASA,kBAAkB;AAIpB,IAAMC,sBAAsBD,WAAWE,KAAK,uBAAuB,MAAM,OAAO,sCAAA,CAAA;AAChF,IAAMC,cAAcH,WAAWE,KAAK,eAAe,MAAM,OAAO,8BAAA,CAAA;AAChE,IAAME,mBAAmBJ,WAAWE,KACzC,oBACA,MAAM,OAAO,mCAAA,CAAA;AAER,IAAMG,eAAeL,WAAWE,KAAK,gBAAgB,MAAM,OAAO,+BAAA,CAAA;AAClE,IAAMI,cAAcN,WAAWE,KAAK,eAAe,MAAM,OAAO,6BAAA,CAAA;",
6
+ "names": ["Capability", "BlueprintDefinition", "lazy", "TextContent", "OperationHandler", "ReactSurface", "Transcriber"]
7
+ }
@@ -0,0 +1,298 @@
1
+ import {
2
+ SerializationModel
3
+ } from "./chunk-MLRJWAQH.mjs";
4
+
5
+ // src/hooks/useAudioFile.ts
6
+ import { useEffect, useState } from "react";
7
+ import { scheduleTask } from "@dxos/async";
8
+ import { Context } from "@dxos/context";
9
+ import { log } from "@dxos/log";
10
+ var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-transcription/src/hooks/useAudioFile.ts";
11
+ var useAudioFile = (audioUrl, constraints) => {
12
+ const [{ audio, stream, track }, setStream] = useState({});
13
+ useEffect(() => {
14
+ const ctx = new Context(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 11 });
15
+ scheduleTask(ctx, async () => {
16
+ try {
17
+ const response = await fetch(audioUrl);
18
+ const blob = await response.blob();
19
+ const objectUrl = URL.createObjectURL(blob);
20
+ ctx.onDispose(() => {
21
+ URL.revokeObjectURL(objectUrl);
22
+ });
23
+ const audio2 = new Audio();
24
+ audio2.src = objectUrl;
25
+ await new Promise((resolve, reject) => {
26
+ audio2.addEventListener("error", (err) => {
27
+ log.error("error", {
28
+ err
29
+ }, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 25, S: void 0 });
30
+ reject(err);
31
+ }, {
32
+ once: true
33
+ });
34
+ audio2.addEventListener("canplay", async () => {
35
+ resolve();
36
+ }, {
37
+ once: true
38
+ });
39
+ audio2.load();
40
+ });
41
+ const audioCtx = new AudioContext();
42
+ if (audioCtx.state === "suspended") {
43
+ await audioCtx.resume();
44
+ }
45
+ const destination = audioCtx.createMediaStreamDestination();
46
+ destination.channelCount = 1;
47
+ const source = audioCtx.createMediaElementSource(audio2);
48
+ source.connect(destination);
49
+ const track2 = destination.stream.getAudioTracks()[0];
50
+ if (constraints) {
51
+ await track2.applyConstraints(constraints).catch((err) => log.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 50, S: void 0 }));
52
+ }
53
+ setStream({
54
+ audio: audio2,
55
+ stream: destination.stream,
56
+ track: destination.stream.getAudioTracks()[0]
57
+ });
58
+ } catch (err) {
59
+ log.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 59, S: void 0 });
60
+ }
61
+ });
62
+ return () => {
63
+ void ctx.dispose();
64
+ };
65
+ }, [
66
+ audioUrl
67
+ ]);
68
+ return {
69
+ audio,
70
+ stream,
71
+ track
72
+ };
73
+ };
74
+
75
+ // src/hooks/useAudioTrack.ts
76
+ import { useEffect as useEffect2, useState as useState2 } from "react";
77
+ var useAudioTrack = (active, constraints) => {
78
+ const [track, setTrack] = useState2();
79
+ useEffect2(() => {
80
+ if (!active) {
81
+ track?.stop();
82
+ setTrack(void 0);
83
+ return;
84
+ }
85
+ const initAudio = async () => {
86
+ const audio = new Audio();
87
+ audio.srcObject = await navigator.mediaDevices.getUserMedia({
88
+ audio: constraints ?? true
89
+ });
90
+ const [track2] = audio.srcObject.getAudioTracks();
91
+ if (track2) {
92
+ setTrack(track2);
93
+ }
94
+ };
95
+ if (active) {
96
+ void initAudio();
97
+ }
98
+ }, [
99
+ active
100
+ ]);
101
+ return track;
102
+ };
103
+
104
+ // src/hooks/useFeedModelAdapter.ts
105
+ import { useEffect as useEffect3, useMemo } from "react";
106
+ var useFeedModelAdapter = (renderer, objects, initialChunks = []) => {
107
+ const model = useMemo(() => new SerializationModel(renderer, initialChunks), [
108
+ renderer
109
+ ]);
110
+ useEffect3(() => {
111
+ for (const chunk of objects) {
112
+ model.appendChunk(chunk);
113
+ }
114
+ }, [
115
+ model,
116
+ objects
117
+ ]);
118
+ useEffect3(() => {
119
+ if (model.chunks.length === objects.length) {
120
+ return;
121
+ }
122
+ const chunk = objects.at(-1);
123
+ if (chunk) {
124
+ model.appendChunk(chunk);
125
+ }
126
+ }, [
127
+ model,
128
+ objects.length
129
+ ]);
130
+ return model;
131
+ };
132
+
133
+ // src/hooks/useTranscriber.ts
134
+ import { useEffect as useEffect4, useMemo as useMemo2 } from "react";
135
+ import { useCapabilities } from "@dxos/app-framework/ui";
136
+ import { TranscriptionCapabilities } from "#types";
137
+ var useTranscriber = ({ audioStreamTrack, recorderConfig, transcriberConfig, onSegments, transcribe }) => {
138
+ const [getTranscriber] = useCapabilities(TranscriptionCapabilities.Transcriber);
139
+ const transcriber = useMemo2(() => {
140
+ if (!getTranscriber || !audioStreamTrack || !onSegments) {
141
+ return void 0;
142
+ }
143
+ return getTranscriber({
144
+ audioStreamTrack,
145
+ recorderConfig,
146
+ transcriberConfig,
147
+ onSegments,
148
+ transcribe
149
+ });
150
+ }, [
151
+ getTranscriber,
152
+ audioStreamTrack,
153
+ recorderConfig,
154
+ transcriberConfig,
155
+ onSegments,
156
+ transcribe
157
+ ]);
158
+ useEffect4(() => {
159
+ return () => {
160
+ void transcriber?.close();
161
+ };
162
+ }, [
163
+ transcriber
164
+ ]);
165
+ return transcriber;
166
+ };
167
+
168
+ // src/hooks/useTranscriptionRecording.ts
169
+ import * as Effect from "effect/Effect";
170
+ import { useCallback, useEffect as useEffect5, useState as useState3 } from "react";
171
+ import { createFeedServiceLayer } from "@dxos/client/echo";
172
+ import { Feed, Obj } from "@dxos/echo";
173
+ import { runAndForwardErrors } from "@dxos/effect";
174
+ import { log as log2 } from "@dxos/log";
175
+ import { getSpace } from "@dxos/react-client/echo";
176
+ import { useIdentity } from "@dxos/react-client/halo";
177
+ import { Message } from "@dxos/types";
178
+ var __dxlog_file2 = "/__w/dxos/dxos/packages/plugins/plugin-transcription/src/hooks/useTranscriptionRecording.ts";
179
+ var useTranscriptionRecording = (transcript) => {
180
+ const space = getSpace(transcript);
181
+ const identity = useIdentity();
182
+ const feed = transcript.feed.target;
183
+ const [recording, setRecording] = useState3(false);
184
+ const track = useAudioTrack(recording);
185
+ const handleSegments = useCallback(async (blocks) => {
186
+ if (!space || !feed || blocks.length === 0) {
187
+ return;
188
+ }
189
+ const sender = identity ? {
190
+ identityDid: identity.did,
191
+ name: identity.profile?.displayName
192
+ } : {};
193
+ const message = Obj.make(Message.Message, {
194
+ sender,
195
+ created: (/* @__PURE__ */ new Date()).toISOString(),
196
+ blocks
197
+ });
198
+ const feedServiceLayer = createFeedServiceLayer(space.queues);
199
+ await Feed.append(feed, [
200
+ message
201
+ ]).pipe(Effect.provide(feedServiceLayer), runAndForwardErrors);
202
+ }, [
203
+ space,
204
+ feed,
205
+ identity
206
+ ]);
207
+ const transcriber = useTranscriber({
208
+ audioStreamTrack: track,
209
+ onSegments: handleSegments
210
+ });
211
+ useEffect5(() => {
212
+ if (!transcriber) {
213
+ return;
214
+ }
215
+ let cancelled = false;
216
+ void transcriber.open().then(() => {
217
+ if (!cancelled && recording) {
218
+ transcriber.startChunksRecording();
219
+ }
220
+ }, (err) => {
221
+ if (!cancelled) {
222
+ log2.catch(err, void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file2, L: 67, S: void 0 });
223
+ setRecording(false);
224
+ }
225
+ });
226
+ return () => {
227
+ cancelled = true;
228
+ transcriber.stopChunksRecording();
229
+ };
230
+ }, [
231
+ transcriber,
232
+ recording
233
+ ]);
234
+ const toggleRecording = useCallback(() => setRecording((value) => !value), []);
235
+ return {
236
+ recording,
237
+ toggleRecording
238
+ };
239
+ };
240
+
241
+ // src/hooks/useVoiceInput.ts
242
+ import { useCallback as useCallback2, useEffect as useEffect6, useState as useState4 } from "react";
243
+ import { scheduleMicroTask } from "@dxos/async";
244
+ import { Context as Context2 } from "@dxos/context";
245
+ import { log as log3 } from "@dxos/log";
246
+ import { useSoundEffect } from "@dxos/react-ui-sfx";
247
+ var __dxlog_file3 = "/__w/dxos/dxos/packages/plugins/plugin-transcription/src/hooks/useVoiceInput.ts";
248
+ var useVoiceInput = ({ active, onUpdate }) => {
249
+ const soundStart = useSoundEffect("StartRecording");
250
+ const soundStop = useSoundEffect("StopRecording");
251
+ const handleSegments = useCallback2(async (segments) => {
252
+ const text = segments.map((str) => str.text.trim().replace(/[^\w\s]/g, "")).join(" ");
253
+ onUpdate(text);
254
+ }, []);
255
+ const [recording, setRecording] = useState4(false);
256
+ const track = useAudioTrack(active);
257
+ const transcriber = useTranscriber({
258
+ audioStreamTrack: track,
259
+ onSegments: handleSegments
260
+ });
261
+ useEffect6(() => {
262
+ const ctx = new Context2(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 29 });
263
+ scheduleMicroTask(ctx, async () => {
264
+ if (active && transcriber) {
265
+ await transcriber.open();
266
+ log3.info("starting...", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 33, S: void 0 });
267
+ setRecording(true);
268
+ void soundStart.play();
269
+ transcriber.startChunksRecording();
270
+ } else if (!active && transcriber?.isOpen) {
271
+ transcriber?.stopChunksRecording();
272
+ await transcriber?.close();
273
+ log3.info("stopped", void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file3, L: 40, S: void 0 });
274
+ setRecording(false);
275
+ void soundStop.play();
276
+ }
277
+ });
278
+ return () => {
279
+ void ctx.dispose();
280
+ };
281
+ }, [
282
+ active,
283
+ transcriber
284
+ ]);
285
+ return {
286
+ recording
287
+ };
288
+ };
289
+
290
+ export {
291
+ useAudioFile,
292
+ useAudioTrack,
293
+ useFeedModelAdapter,
294
+ useTranscriber,
295
+ useTranscriptionRecording,
296
+ useVoiceInput
297
+ };
298
+ //# sourceMappingURL=chunk-2O3ONPRZ.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/hooks/useAudioFile.ts", "../../../src/hooks/useAudioTrack.ts", "../../../src/hooks/useFeedModelAdapter.ts", "../../../src/hooks/useTranscriber.ts", "../../../src/hooks/useTranscriptionRecording.ts", "../../../src/hooks/useVoiceInput.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\nimport { scheduleTask } from '@dxos/async';\nimport { Context } from '@dxos/context';\nimport { log } from '@dxos/log';\n\nexport type UseAudioState = {\n audio?: HTMLAudioElement;\n stream?: MediaStream;\n track?: MediaStreamTrack;\n};\n\nexport const useAudioFile = (audioUrl: string, constraints?: MediaTrackConstraints): UseAudioState => {\n const [{ audio, stream, track }, setStream] = useState<UseAudioState>({});\n useEffect(() => {\n const ctx = new Context();\n\n scheduleTask(ctx, async () => {\n // TODO(wittjosiah): Fetch to external url fails in headless storybook test.\n try {\n const response = await fetch(audioUrl);\n const blob = await response.blob();\n const objectUrl = URL.createObjectURL(blob);\n ctx.onDispose(() => {\n URL.revokeObjectURL(objectUrl);\n });\n\n const audio = new Audio();\n audio.src = objectUrl;\n\n await new Promise<void>((resolve, reject) => {\n audio.addEventListener(\n 'error',\n (err) => {\n log.error('error', { err });\n reject(err);\n },\n { once: true },\n );\n audio.addEventListener(\n 'canplay',\n async () => {\n resolve();\n },\n { once: true },\n );\n audio.load();\n });\n\n const audioCtx = new AudioContext();\n\n // Resume AudioContext if it's suspended.\n if (audioCtx.state === 'suspended') {\n await audioCtx.resume();\n }\n\n const destination = audioCtx.createMediaStreamDestination();\n destination.channelCount = 1;\n\n const source = audioCtx.createMediaElementSource(audio);\n source.connect(destination);\n const track = destination.stream.getAudioTracks()[0];\n if (constraints) {\n await track.applyConstraints(constraints).catch((err) => log.catch(err));\n }\n\n // Also connect to speakers so audio is audible.\n setStream({\n audio,\n stream: destination.stream,\n track: destination.stream.getAudioTracks()[0],\n });\n } catch (err) {\n log.catch(err);\n }\n });\n\n return () => {\n void ctx.dispose();\n };\n }, [audioUrl]);\n\n return { audio, stream, track };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useState } from 'react';\n\n/**\n *\n */\n// TODO(burdon): Reconcile with react-ui-sfx and plugin-calls.\nexport const useAudioTrack = (active?: boolean, constraints?: MediaTrackConstraints): MediaStreamTrack | undefined => {\n const [track, setTrack] = useState<MediaStreamTrack>();\n useEffect(() => {\n if (!active) {\n track?.stop();\n setTrack(undefined);\n return;\n }\n\n const initAudio = async () => {\n const audio = new Audio();\n audio.srcObject = await navigator.mediaDevices.getUserMedia({ audio: constraints ?? true });\n const [track] = audio.srcObject.getAudioTracks();\n if (track) {\n setTrack(track);\n }\n };\n\n if (active) {\n void initAudio();\n }\n }, [active]);\n\n return track;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useMemo } from 'react';\n\nimport type { Obj } from '@dxos/echo';\n\nimport { type ChunkRenderer, SerializationModel } from '../model';\n\n/**\n * Feeds an array of objects (typically from `useQuery(db, Query.from(feed))`) into a\n * `SerializationModel`, appending each new tail item as the array grows.\n *\n * @param renderer - chunk renderer.\n * @param objects - current snapshot of feed items.\n * @param initialChunks - chunks to seed the model with on first render.\n */\nexport const useFeedModelAdapter = <T extends Obj.Unknown>(\n renderer: ChunkRenderer<T>,\n objects: readonly T[],\n initialChunks: T[] = [],\n): SerializationModel<T> => {\n const model = useMemo(() => new SerializationModel<T>(renderer, initialChunks), [renderer]);\n\n // Seed the model with the current snapshot on first render and whenever the\n // identity of `objects` changes (e.g. feed swapped).\n useEffect(() => {\n for (const chunk of objects) {\n model.appendChunk(chunk);\n }\n }, [model, objects]);\n\n // Append new tail items as the array grows.\n useEffect(() => {\n if (model.chunks.length === objects.length) {\n return;\n }\n const chunk = objects.at(-1);\n if (chunk) {\n model.appendChunk(chunk);\n }\n }, [model, objects.length]);\n\n return model;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useEffect, useMemo } from 'react';\n\nimport { useCapabilities } from '@dxos/app-framework/ui';\n\nimport { TranscriptionCapabilities } from '#types';\n\nimport { type Transcriber } from '../transcriber';\n\n/**\n * Records audio while user is speaking and transcribes it after user is done speaking.\n */\nexport const useTranscriber = ({\n audioStreamTrack,\n recorderConfig,\n transcriberConfig,\n onSegments,\n transcribe,\n}: Partial<TranscriptionCapabilities.GetTranscriberProps>) => {\n const [getTranscriber] = useCapabilities(TranscriptionCapabilities.Transcriber);\n\n // Initialize audio transcription.\n const transcriber = useMemo<Transcriber | undefined>(() => {\n if (!getTranscriber || !audioStreamTrack || !onSegments) {\n return undefined;\n }\n\n return getTranscriber({\n audioStreamTrack,\n recorderConfig,\n transcriberConfig,\n onSegments,\n transcribe,\n });\n }, [getTranscriber, audioStreamTrack, recorderConfig, transcriberConfig, onSegments, transcribe]);\n\n useEffect(() => {\n return () => {\n void transcriber?.close();\n };\n }, [transcriber]);\n\n return transcriber;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { createFeedServiceLayer } from '@dxos/client/echo';\nimport { Feed, Obj } from '@dxos/echo';\nimport { runAndForwardErrors } from '@dxos/effect';\nimport { log } from '@dxos/log';\nimport { getSpace } from '@dxos/react-client/echo';\nimport { useIdentity } from '@dxos/react-client/halo';\nimport { Message, type Transcript } from '@dxos/types';\n\nimport { useAudioTrack } from './useAudioTrack';\nimport { useTranscriber } from './useTranscriber';\n\nexport type TranscriptionRecording = {\n recording: boolean;\n toggleRecording: () => void;\n};\n\n/**\n * Drives the recording lifecycle for a transcript: opens an audio track, feeds it through the\n * transcriber, and appends transcribed message batches to the transcript's feed. Returns the\n * recording flag and a toggle callback for the caller to wire to UI.\n */\nexport const useTranscriptionRecording = (transcript: Transcript.Transcript): TranscriptionRecording => {\n const space = getSpace(transcript);\n const identity = useIdentity();\n const feed = transcript.feed.target;\n\n const [recording, setRecording] = useState(false);\n const track = useAudioTrack(recording);\n\n // Append a transcribed message batch to the transcript's feed.\n const handleSegments = useCallback(\n async (blocks: Message.Message['blocks']) => {\n if (!space || !feed || blocks.length === 0) {\n return;\n }\n const sender = identity ? { identityDid: identity.did, name: identity.profile?.displayName } : {};\n const message = Obj.make(Message.Message, {\n sender,\n created: new Date().toISOString(),\n blocks,\n });\n const feedServiceLayer = createFeedServiceLayer(space.queues);\n await Feed.append(feed, [message]).pipe(Effect.provide(feedServiceLayer), runAndForwardErrors);\n },\n [space, feed, identity],\n );\n\n // Drive the transcriber lifecycle off the recording flag + audio track.\n const transcriber = useTranscriber({ audioStreamTrack: track, onSegments: handleSegments });\n useEffect(() => {\n if (!transcriber) {\n return;\n }\n let cancelled = false;\n // If `open()` rejects (e.g. mic permission denied, device init failure) we must\n // clear `recording` — otherwise the toolbar button reports \"stop\" forever while\n // nothing is actually being captured.\n void transcriber.open().then(\n () => {\n if (!cancelled && recording) {\n transcriber.startChunksRecording();\n }\n },\n (err) => {\n if (!cancelled) {\n log.catch(err);\n setRecording(false);\n }\n },\n );\n return () => {\n cancelled = true;\n transcriber.stopChunksRecording();\n };\n }, [transcriber, recording]);\n\n const toggleRecording = useCallback(() => setRecording((value) => !value), []);\n\n return { recording, toggleRecording };\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { useCallback, useEffect, useState } from 'react';\n\nimport { scheduleMicroTask } from '@dxos/async';\nimport { Context } from '@dxos/context';\nimport { log } from '@dxos/log';\nimport { useSoundEffect } from '@dxos/react-ui-sfx';\n\nimport { type TranscriberProps } from '../transcriber';\nimport { useAudioTrack } from './useAudioTrack';\nimport { useTranscriber } from './useTranscriber';\n\nexport type UseVoiceInputProps = {\n active?: boolean;\n onUpdate: (text: string) => void;\n};\n\n/**\n * Hook for voice input.\n */\nexport const useVoiceInput = ({ active, onUpdate }: UseVoiceInputProps) => {\n const soundStart = useSoundEffect('StartRecording');\n const soundStop = useSoundEffect('StopRecording');\n\n const handleSegments = useCallback<TranscriberProps['onSegments']>(async (segments) => {\n const text = segments.map((str) => str.text.trim().replace(/[^\\w\\s]/g, '')).join(' ');\n onUpdate(text);\n }, []);\n\n // Audio/transcription.\n const [recording, setRecording] = useState(false);\n const track = useAudioTrack(active);\n const transcriber = useTranscriber({\n audioStreamTrack: track,\n onSegments: handleSegments,\n });\n\n // Start/stop transcription.\n useEffect(() => {\n const ctx = new Context();\n scheduleMicroTask(ctx, async () => {\n if (active && transcriber) {\n await transcriber.open();\n log.info('starting...');\n setRecording(true);\n void soundStart.play();\n transcriber.startChunksRecording();\n } else if (!active && transcriber?.isOpen) {\n transcriber?.stopChunksRecording();\n await transcriber?.close();\n log.info('stopped');\n setRecording(false);\n void soundStop.play();\n }\n });\n\n return () => {\n void ctx.dispose();\n };\n }, [active, transcriber]);\n\n return { recording };\n};\n"],
5
+ "mappings": "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",
6
+ "names": ["useEffect", "useState", "scheduleTask", "Context", "log", "useAudioFile", "objectUrl", "createObjectURL", "ctx", "onDispose", "URL", "revokeObjectURL", "audio", "Audio", "Promise", "resolve", "addEventListener", "err", "reject", "once", "audioCtx", "state", "destination", "source", "createMediaElementSource", "connect", "track", "constraints", "applyConstraints", "catch", "setStream", "stream", "audioUrl", "useEffect", "useState", "useAudioTrack", "active", "constraints", "track", "setTrack", "stop", "undefined", "initAudio", "audio", "Audio", "srcObject", "navigator", "mediaDevices", "getUserMedia", "getAudioTracks", "useEffect", "useMemo", "useFeedModelAdapter", "renderer", "objects", "initialChunks", "model", "useMemo", "SerializationModel", "useEffect", "chunk", "appendChunk", "chunks", "length", "at", "useEffect", "useMemo", "useCapabilities", "TranscriptionCapabilities", "useTranscriber", "audioStreamTrack", "recorderConfig", "transcriberConfig", "onSegments", "transcribe", "getTranscriber", "Transcriber", "transcriber", "undefined", "close", "Effect", "useCallback", "useEffect", "useState", "createFeedServiceLayer", "Feed", "Obj", "runAndForwardErrors", "log", "getSpace", "useIdentity", "Message", "__dxlog_file", "identity", "useIdentity", "feed", "transcript", "target", "recording", "setRecording", "track", "useAudioTrack", "useState", "handleSegments", "useCallback", "name", "message", "Obj", "Message", "sender", "created", "Date", "toISOString", "blocks", "pipe", "Effect", "provide", "feedServiceLayer", "space", "onSegments", "useEffect", "cancelled", "transcriber", "startChunksRecording", "err", "log", "toggleRecording", "useCallback", "useEffect", "useState", "scheduleMicroTask", "Context", "log", "useSoundEffect", "__dxlog_file", "soundStop", "useSoundEffect", "handleSegments", "useCallback", "segments", "str", "trim", "onUpdate", "text", "transcriber", "useTranscriber", "audioStreamTrack", "track", "onSegments", "useEffect", "scheduleMicroTask", "active", "log", "setRecording", "soundStart", "startChunksRecording", "stopChunksRecording", "close"]
7
+ }
@@ -0,0 +1,45 @@
1
+ // src/meta.ts
2
+ import { Plugin } from "@dxos/app-framework";
3
+ import { DXN } from "@dxos/keys";
4
+ import { trim } from "@dxos/util";
5
+ var meta = Plugin.makeMeta({
6
+ key: DXN.make("org.dxos.plugin.transcription"),
7
+ name: "Transcription",
8
+ author: "DXOS",
9
+ description: trim`
10
+ Real-time voice-to-text transcription for DXOS Composer.
11
+ Captures microphone audio in short PCM chunks, batches them into WAV payloads, and streams
12
+ the results to a Whisper-compatible speech-recognition endpoint.
13
+ Transcribed segments are timestamped, deduplicated across chunk boundaries, and persisted
14
+ as Message objects in an ECHO Feed so that every participant in a shared space sees the
15
+ live transcript without any manual sync step.
16
+
17
+ Each recording session is represented as a Transcript object linked to its Feed.
18
+ The read-only editor renders messages with speaker bylines and wall-clock timestamps,
19
+ supporting markdown decoration and document preview.
20
+ An optional message enricher pipeline lets plugins annotate messages before they are
21
+ committed — for example, to attach speaker identity from a calls service.
22
+
23
+ The plugin ships two blueprint-compatible operations: Open (loads and formats a transcript
24
+ for reading by an AI assistant) and Summarize (sends the transcript text to an LLM and
25
+ returns a structured Markdown summary with key points, verbatim quotes, and actionable
26
+ tasks extracted from the conversation).
27
+
28
+ A sentence-normalization pass merges raw word-level tokens from the recognizer into
29
+ grammatically complete sentences, improving readability of the stored transcript without
30
+ altering the underlying audio timeline.
31
+ `,
32
+ icon: "ph--microphone--regular",
33
+ iconHue: "sky",
34
+ source: "https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transcription",
35
+ spec: "PLUGIN.mdl",
36
+ tags: [
37
+ "labs"
38
+ ],
39
+ screenshots: []
40
+ });
41
+
42
+ export {
43
+ meta
44
+ };
45
+ //# sourceMappingURL=chunk-FHNI26QW.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/meta.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Plugin } from '@dxos/app-framework';\nimport { DXN } from '@dxos/keys';\nimport { trim } from '@dxos/util';\n\nexport const meta = Plugin.makeMeta({\n key: DXN.make('org.dxos.plugin.transcription'),\n name: 'Transcription',\n author: 'DXOS',\n description: trim`\n Real-time voice-to-text transcription for DXOS Composer.\n Captures microphone audio in short PCM chunks, batches them into WAV payloads, and streams\n the results to a Whisper-compatible speech-recognition endpoint.\n Transcribed segments are timestamped, deduplicated across chunk boundaries, and persisted\n as Message objects in an ECHO Feed so that every participant in a shared space sees the\n live transcript without any manual sync step.\n\n Each recording session is represented as a Transcript object linked to its Feed.\n The read-only editor renders messages with speaker bylines and wall-clock timestamps,\n supporting markdown decoration and document preview.\n An optional message enricher pipeline lets plugins annotate messages before they are\n committed — for example, to attach speaker identity from a calls service.\n\n The plugin ships two blueprint-compatible operations: Open (loads and formats a transcript\n for reading by an AI assistant) and Summarize (sends the transcript text to an LLM and\n returns a structured Markdown summary with key points, verbatim quotes, and actionable\n tasks extracted from the conversation).\n\n A sentence-normalization pass merges raw word-level tokens from the recognizer into\n grammatically complete sentences, improving readability of the stored transcript without\n altering the underlying audio timeline.\n `,\n icon: 'ph--microphone--regular',\n iconHue: 'sky',\n source: 'https://github.com/dxos/dxos/tree/main/packages/plugins/plugin-transcription',\n spec: 'PLUGIN.mdl',\n tags: ['labs'],\n screenshots: [],\n});\n"],
5
+ "mappings": ";AAIA,SAASA,cAAc;AACvB,SAASC,WAAW;AACpB,SAASC,YAAY;AAEd,IAAMC,OAAOH,OAAOI,SAAS;EAClCC,KAAKJ,IAAIK,KAAK,+BAAA;EACdC,MAAM;EACNC,QAAQ;EACRC,aAAaP;;;;;;;;;;;;;;;;;;;;;;;EAuBbQ,MAAM;EACNC,SAAS;EACTC,QAAQ;EACRC,MAAM;EACNC,MAAM;IAAC;;EACPC,aAAa,CAAA;AACf,CAAA;",
6
+ "names": ["Plugin", "DXN", "trim", "meta", "makeMeta", "key", "make", "name", "author", "description", "icon", "iconHue", "source", "spec", "tags", "screenshots"]
7
+ }