@tscaps/engine 0.3.1 → 0.4.0

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 (251) hide show
  1. package/README.md +35 -8
  2. package/dist/modules/document/CssVariable.d.ts +6 -0
  3. package/dist/modules/document/CssVariable.d.ts.map +1 -1
  4. package/dist/modules/document/CssVariable.js +6 -0
  5. package/dist/modules/document/CssVariable.js.map +1 -1
  6. package/dist/modules/document/Document.d.ts +3 -0
  7. package/dist/modules/document/Document.d.ts.map +1 -1
  8. package/dist/modules/document/Document.js +12 -1
  9. package/dist/modules/document/Document.js.map +1 -1
  10. package/dist/modules/document/DocumentEditor.d.ts +16 -4
  11. package/dist/modules/document/DocumentEditor.d.ts.map +1 -1
  12. package/dist/modules/document/DocumentEditor.js +14 -10
  13. package/dist/modules/document/DocumentEditor.js.map +1 -1
  14. package/dist/modules/document/Line.d.ts +6 -0
  15. package/dist/modules/document/Line.d.ts.map +1 -1
  16. package/dist/modules/document/Line.js +10 -0
  17. package/dist/modules/document/Line.js.map +1 -1
  18. package/dist/modules/document/Word.d.ts +8 -0
  19. package/dist/modules/document/Word.d.ts.map +1 -1
  20. package/dist/modules/document/Word.js +11 -1
  21. package/dist/modules/document/Word.js.map +1 -1
  22. package/dist/modules/pipeline/RenderPipelineBuilder.d.ts +1 -1
  23. package/dist/modules/pipeline/RenderPipelineBuilder.d.ts.map +1 -1
  24. package/dist/modules/pipeline/RenderPipelineBuilder.js +15 -5
  25. package/dist/modules/pipeline/RenderPipelineBuilder.js.map +1 -1
  26. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts +18 -8
  27. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts.map +1 -1
  28. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js +27 -21
  29. package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js.map +1 -1
  30. package/dist/modules/rendering/SubtitleFrameRenderer.d.ts +41 -33
  31. package/dist/modules/rendering/SubtitleFrameRenderer.d.ts.map +1 -1
  32. package/dist/modules/rendering/index.d.ts +4 -0
  33. package/dist/modules/rendering/index.d.ts.map +1 -1
  34. package/dist/modules/rendering/index.js +2 -0
  35. package/dist/modules/rendering/index.js.map +1 -1
  36. package/dist/modules/rendering/subtitle/ActiveRenderSession.d.ts +13 -6
  37. package/dist/modules/rendering/subtitle/ActiveRenderSession.d.ts.map +1 -1
  38. package/dist/modules/rendering/subtitle/ActiveRenderSession.js +16 -9
  39. package/dist/modules/rendering/subtitle/ActiveRenderSession.js.map +1 -1
  40. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.d.ts +5 -2
  41. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.d.ts.map +1 -1
  42. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.js +26 -8
  43. package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.js.map +1 -1
  44. package/dist/modules/rendering/subtitle/AnimationStateFingerprint.d.ts +20 -0
  45. package/dist/modules/rendering/subtitle/AnimationStateFingerprint.d.ts.map +1 -0
  46. package/dist/modules/rendering/subtitle/AnimationStateFingerprint.js +2 -0
  47. package/dist/modules/rendering/subtitle/AnimationStateFingerprint.js.map +1 -0
  48. package/dist/modules/rendering/subtitle/AssetGroupBuilder.d.ts +4 -0
  49. package/dist/modules/rendering/subtitle/AssetGroupBuilder.d.ts.map +1 -1
  50. package/dist/modules/rendering/subtitle/AssetGroupBuilder.js +8 -0
  51. package/dist/modules/rendering/subtitle/AssetGroupBuilder.js.map +1 -1
  52. package/dist/modules/rendering/subtitle/BatchPlanner.d.ts +50 -5
  53. package/dist/modules/rendering/subtitle/BatchPlanner.d.ts.map +1 -1
  54. package/dist/modules/rendering/subtitle/BatchPlanner.js +97 -15
  55. package/dist/modules/rendering/subtitle/BatchPlanner.js.map +1 -1
  56. package/dist/modules/rendering/subtitle/ElementWidthMeasurer.d.ts +56 -0
  57. package/dist/modules/rendering/subtitle/ElementWidthMeasurer.d.ts.map +1 -0
  58. package/dist/modules/rendering/subtitle/ElementWidthMeasurer.js +119 -0
  59. package/dist/modules/rendering/subtitle/ElementWidthMeasurer.js.map +1 -0
  60. package/dist/modules/rendering/subtitle/ElementWidths.d.ts +23 -0
  61. package/dist/modules/rendering/subtitle/ElementWidths.d.ts.map +1 -0
  62. package/dist/modules/rendering/subtitle/ElementWidths.js +29 -0
  63. package/dist/modules/rendering/subtitle/ElementWidths.js.map +1 -0
  64. package/dist/modules/rendering/subtitle/ImageDecodeSpriteSheetRasterProbe.d.ts +18 -0
  65. package/dist/modules/rendering/subtitle/ImageDecodeSpriteSheetRasterProbe.d.ts.map +1 -0
  66. package/dist/modules/rendering/subtitle/ImageDecodeSpriteSheetRasterProbe.js +42 -0
  67. package/dist/modules/rendering/subtitle/ImageDecodeSpriteSheetRasterProbe.js.map +1 -0
  68. package/dist/modules/rendering/subtitle/KeyframeScanAnimationStateFingerprint.d.ts +35 -0
  69. package/dist/modules/rendering/subtitle/KeyframeScanAnimationStateFingerprint.d.ts.map +1 -0
  70. package/dist/modules/rendering/subtitle/KeyframeScanAnimationStateFingerprint.js +64 -0
  71. package/dist/modules/rendering/subtitle/KeyframeScanAnimationStateFingerprint.js.map +1 -0
  72. package/dist/modules/rendering/subtitle/PreparedStyle.d.ts +2 -0
  73. package/dist/modules/rendering/subtitle/PreparedStyle.d.ts.map +1 -1
  74. package/dist/modules/rendering/subtitle/PreparedStyleFactory.d.ts.map +1 -1
  75. package/dist/modules/rendering/subtitle/PreparedStyleFactory.js +12 -1
  76. package/dist/modules/rendering/subtitle/PreparedStyleFactory.js.map +1 -1
  77. package/dist/modules/rendering/subtitle/SegmentAnchorVarsBuilder.d.ts +28 -0
  78. package/dist/modules/rendering/subtitle/SegmentAnchorVarsBuilder.d.ts.map +1 -0
  79. package/dist/modules/rendering/subtitle/SegmentAnchorVarsBuilder.js +23 -0
  80. package/dist/modules/rendering/subtitle/SegmentAnchorVarsBuilder.js.map +1 -0
  81. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.d.ts +3 -0
  82. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.d.ts.map +1 -1
  83. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.js +12 -3
  84. package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.js.map +1 -1
  85. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.d.ts +7 -1
  86. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.d.ts.map +1 -1
  87. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.js +23 -5
  88. package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.js.map +1 -1
  89. package/dist/modules/rendering/subtitle/SpriteSheetProbeObserver.d.ts +29 -0
  90. package/dist/modules/rendering/subtitle/SpriteSheetProbeObserver.d.ts.map +1 -0
  91. package/dist/modules/rendering/subtitle/SpriteSheetProbeObserver.js +2 -0
  92. package/dist/modules/rendering/subtitle/SpriteSheetProbeObserver.js.map +1 -0
  93. package/dist/modules/rendering/subtitle/SpriteSheetRasterProbe.d.ts +19 -0
  94. package/dist/modules/rendering/subtitle/SpriteSheetRasterProbe.d.ts.map +1 -0
  95. package/dist/modules/rendering/subtitle/SpriteSheetRasterProbe.js +2 -0
  96. package/dist/modules/rendering/subtitle/SpriteSheetRasterProbe.js.map +1 -0
  97. package/dist/modules/rendering/subtitle/SpriteSheetSizeProbe.d.ts +31 -0
  98. package/dist/modules/rendering/subtitle/SpriteSheetSizeProbe.d.ts.map +1 -0
  99. package/dist/modules/rendering/subtitle/SpriteSheetSizeProbe.js +89 -0
  100. package/dist/modules/rendering/subtitle/SpriteSheetSizeProbe.js.map +1 -0
  101. package/dist/modules/rendering/subtitle/SubtreeAnimationReading.d.ts +49 -0
  102. package/dist/modules/rendering/subtitle/SubtreeAnimationReading.d.ts.map +1 -0
  103. package/dist/modules/rendering/subtitle/SubtreeAnimationReading.js +87 -0
  104. package/dist/modules/rendering/subtitle/SubtreeAnimationReading.js.map +1 -0
  105. package/dist/modules/rendering/subtitle/SubtreeAnimationSupport.d.ts +17 -0
  106. package/dist/modules/rendering/subtitle/SubtreeAnimationSupport.d.ts.map +1 -0
  107. package/dist/modules/rendering/subtitle/SubtreeAnimationSupport.js +53 -0
  108. package/dist/modules/rendering/subtitle/SubtreeAnimationSupport.js.map +1 -0
  109. package/dist/modules/rendering/subtitle/SubtreeMountAnimationStateFingerprint.d.ts +62 -0
  110. package/dist/modules/rendering/subtitle/SubtreeMountAnimationStateFingerprint.d.ts.map +1 -0
  111. package/dist/modules/rendering/subtitle/SubtreeMountAnimationStateFingerprint.js +153 -0
  112. package/dist/modules/rendering/subtitle/SubtreeMountAnimationStateFingerprint.js.map +1 -0
  113. package/dist/modules/rendering/subtitle/SvgFilterStateFingerprint.d.ts +47 -0
  114. package/dist/modules/rendering/subtitle/SvgFilterStateFingerprint.d.ts.map +1 -0
  115. package/dist/modules/rendering/subtitle/SvgFilterStateFingerprint.js +69 -0
  116. package/dist/modules/rendering/subtitle/SvgFilterStateFingerprint.js.map +1 -0
  117. package/dist/modules/rendering/subtitle/UnknownAnimationStateFingerprint.d.ts +9 -0
  118. package/dist/modules/rendering/subtitle/UnknownAnimationStateFingerprint.d.ts.map +1 -0
  119. package/dist/modules/rendering/subtitle/UnknownAnimationStateFingerprint.js +10 -0
  120. package/dist/modules/rendering/subtitle/UnknownAnimationStateFingerprint.js.map +1 -0
  121. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.d.ts.map +1 -1
  122. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.js +2 -0
  123. package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.js.map +1 -1
  124. package/dist/modules/rendering/types/ElementRenderOverrides.d.ts +2 -0
  125. package/dist/modules/rendering/types/ElementRenderOverrides.d.ts.map +1 -1
  126. package/dist/modules/rendering/types/ElementRenderOverrides.js +4 -0
  127. package/dist/modules/rendering/types/ElementRenderOverrides.js.map +1 -1
  128. package/dist/modules/splitting/BalancedLineSplitter.d.ts +9 -0
  129. package/dist/modules/splitting/BalancedLineSplitter.d.ts.map +1 -1
  130. package/dist/modules/splitting/BalancedLineSplitter.js +15 -3
  131. package/dist/modules/splitting/BalancedLineSplitter.js.map +1 -1
  132. package/dist/modules/splitting/BalancedPixelWidthLineSplitter.d.ts +1 -4
  133. package/dist/modules/splitting/BalancedPixelWidthLineSplitter.d.ts.map +1 -1
  134. package/dist/modules/splitting/BalancedPixelWidthLineSplitter.js +5 -7
  135. package/dist/modules/splitting/BalancedPixelWidthLineSplitter.js.map +1 -1
  136. package/dist/modules/splitting/DomProbeCanvasTextMeasurer.d.ts +16 -7
  137. package/dist/modules/splitting/DomProbeCanvasTextMeasurer.d.ts.map +1 -1
  138. package/dist/modules/splitting/DomProbeCanvasTextMeasurer.js +44 -33
  139. package/dist/modules/splitting/DomProbeCanvasTextMeasurer.js.map +1 -1
  140. package/dist/modules/splitting/TextMeasurer.d.ts +9 -4
  141. package/dist/modules/splitting/TextMeasurer.d.ts.map +1 -1
  142. package/dist/modules/svg-filter/SvgFilter.d.ts +9 -0
  143. package/dist/modules/svg-filter/SvgFilter.d.ts.map +1 -1
  144. package/dist/modules/svg-filter/SvgFilter.js +17 -0
  145. package/dist/modules/svg-filter/SvgFilter.js.map +1 -1
  146. package/dist/modules/svg-filter/SvgFilterDefinitions.d.ts +7 -0
  147. package/dist/modules/svg-filter/SvgFilterDefinitions.d.ts.map +1 -1
  148. package/dist/modules/svg-filter/SvgFilterDefinitions.js +17 -0
  149. package/dist/modules/svg-filter/SvgFilterDefinitions.js.map +1 -1
  150. package/dist/modules/tagging/RegexTagger.js +1 -2
  151. package/dist/modules/tagging/RegexTagger.js.map +1 -1
  152. package/dist/modules/tagging/SpanTagger.js +1 -2
  153. package/dist/modules/tagging/SpanTagger.js.map +1 -1
  154. package/dist/modules/tagging/StructureTagger.js +1 -2
  155. package/dist/modules/tagging/StructureTagger.js.map +1 -1
  156. package/dist/modules/tagging/WordlistTagger.js +1 -2
  157. package/dist/modules/tagging/WordlistTagger.js.map +1 -1
  158. package/dist/modules/transcription/AudioSegmentLayout.d.ts +23 -0
  159. package/dist/modules/transcription/AudioSegmentLayout.d.ts.map +1 -0
  160. package/dist/modules/transcription/AudioSegmentLayout.js +40 -0
  161. package/dist/modules/transcription/AudioSegmentLayout.js.map +1 -0
  162. package/dist/modules/transcription/FallbackAudioDecoder.d.ts +25 -0
  163. package/dist/modules/transcription/FallbackAudioDecoder.d.ts.map +1 -0
  164. package/dist/modules/transcription/FallbackAudioDecoder.js +46 -0
  165. package/dist/modules/transcription/FallbackAudioDecoder.js.map +1 -0
  166. package/dist/modules/transcription/MediaBunnyAudioOnlyRemuxer.d.ts +71 -0
  167. package/dist/modules/transcription/MediaBunnyAudioOnlyRemuxer.d.ts.map +1 -0
  168. package/dist/modules/transcription/MediaBunnyAudioOnlyRemuxer.js +145 -0
  169. package/dist/modules/transcription/MediaBunnyAudioOnlyRemuxer.js.map +1 -0
  170. package/dist/modules/transcription/WebAudioAudioDecoder.d.ts +46 -0
  171. package/dist/modules/transcription/WebAudioAudioDecoder.d.ts.map +1 -0
  172. package/dist/modules/transcription/WebAudioAudioDecoder.js +123 -0
  173. package/dist/modules/transcription/WebAudioAudioDecoder.js.map +1 -0
  174. package/dist/modules/transcription/index.d.ts +4 -0
  175. package/dist/modules/transcription/index.d.ts.map +1 -1
  176. package/dist/modules/transcription/index.js +3 -0
  177. package/dist/modules/transcription/index.js.map +1 -1
  178. package/dist/modules/video/RenderJob.d.ts +23 -0
  179. package/dist/modules/video/RenderJob.d.ts.map +1 -1
  180. package/dist/modules/video/index.d.ts +5 -3
  181. package/dist/modules/video/index.d.ts.map +1 -1
  182. package/dist/modules/video/index.js +2 -0
  183. package/dist/modules/video/index.js.map +1 -1
  184. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.d.ts +33 -1
  185. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.d.ts.map +1 -1
  186. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.js +97 -20
  187. package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.js.map +1 -1
  188. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.d.ts.map +1 -1
  189. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js +1 -0
  190. package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js.map +1 -1
  191. package/dist/modules/video/mediabunny/caption/BatchedSubtitleLayerSource.d.ts +20 -9
  192. package/dist/modules/video/mediabunny/caption/BatchedSubtitleLayerSource.d.ts.map +1 -1
  193. package/dist/modules/video/mediabunny/caption/BatchedSubtitleLayerSource.js +56 -14
  194. package/dist/modules/video/mediabunny/caption/BatchedSubtitleLayerSource.js.map +1 -1
  195. package/dist/modules/video/mediabunny/caption/ComposedSubtitleLayerSource.d.ts +29 -10
  196. package/dist/modules/video/mediabunny/caption/ComposedSubtitleLayerSource.d.ts.map +1 -1
  197. package/dist/modules/video/mediabunny/caption/ComposedSubtitleLayerSource.js +48 -17
  198. package/dist/modules/video/mediabunny/caption/ComposedSubtitleLayerSource.js.map +1 -1
  199. package/dist/modules/video/mediabunny/caption/SubtitleLayerSource.d.ts +28 -11
  200. package/dist/modules/video/mediabunny/caption/SubtitleLayerSource.d.ts.map +1 -1
  201. package/dist/modules/video/mediabunny/caption/VideoBoundSubtitleLayerSource.d.ts +33 -12
  202. package/dist/modules/video/mediabunny/caption/VideoBoundSubtitleLayerSource.d.ts.map +1 -1
  203. package/dist/modules/video/mediabunny/caption/VideoBoundSubtitleLayerSource.js +53 -18
  204. package/dist/modules/video/mediabunny/caption/VideoBoundSubtitleLayerSource.js.map +1 -1
  205. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoder.d.ts.map +1 -1
  206. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoder.js +7 -3
  207. package/dist/modules/video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoder.js.map +1 -1
  208. package/dist/modules/video/mediabunny/frame/BufferedVideoFrameSource.d.ts +45 -0
  209. package/dist/modules/video/mediabunny/frame/BufferedVideoFrameSource.d.ts.map +1 -0
  210. package/dist/modules/video/mediabunny/frame/BufferedVideoFrameSource.js +93 -0
  211. package/dist/modules/video/mediabunny/frame/BufferedVideoFrameSource.js.map +1 -0
  212. package/dist/modules/video/mediabunny/frame/DefaultVideoFrameDecoderFactory.d.ts.map +1 -1
  213. package/dist/modules/video/mediabunny/frame/DefaultVideoFrameDecoderFactory.js +3 -1
  214. package/dist/modules/video/mediabunny/frame/DefaultVideoFrameDecoderFactory.js.map +1 -1
  215. package/dist/modules/video/mediabunny/frame/RetainedVideoFrame.d.ts +26 -0
  216. package/dist/modules/video/mediabunny/frame/RetainedVideoFrame.d.ts.map +1 -0
  217. package/dist/modules/video/mediabunny/frame/RetainedVideoFrame.js +55 -0
  218. package/dist/modules/video/mediabunny/frame/RetainedVideoFrame.js.map +1 -0
  219. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderFactory.d.ts +6 -1
  220. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderFactory.d.ts.map +1 -1
  221. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderSelectionFailedError.d.ts +14 -0
  222. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderSelectionFailedError.d.ts.map +1 -0
  223. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderSelectionFailedError.js +14 -0
  224. package/dist/modules/video/mediabunny/frame/VideoFrameDecoderSelectionFailedError.js.map +1 -0
  225. package/dist/modules/video/mediabunny/frame/WebCodecsOnlyVideoFrameDecoderFactory.d.ts +16 -0
  226. package/dist/modules/video/mediabunny/frame/WebCodecsOnlyVideoFrameDecoderFactory.d.ts.map +1 -0
  227. package/dist/modules/video/mediabunny/frame/WebCodecsOnlyVideoFrameDecoderFactory.js +23 -0
  228. package/dist/modules/video/mediabunny/frame/WebCodecsOnlyVideoFrameDecoderFactory.js.map +1 -0
  229. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.d.ts +9 -3
  230. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.d.ts.map +1 -1
  231. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.js +24 -7
  232. package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.js.map +1 -1
  233. package/dist/modules/video/mediabunny/painter/FramePainter.d.ts +35 -14
  234. package/dist/modules/video/mediabunny/painter/FramePainter.d.ts.map +1 -1
  235. package/package.json +1 -1
  236. package/dist/modules/rendering/subtitle/AbstractAnim.d.ts +0 -13
  237. package/dist/modules/rendering/subtitle/AbstractAnim.d.ts.map +0 -1
  238. package/dist/modules/rendering/subtitle/AbstractAnim.js +0 -2
  239. package/dist/modules/rendering/subtitle/AbstractAnim.js.map +0 -1
  240. package/dist/modules/rendering/subtitle/AnimationProbe.d.ts +0 -39
  241. package/dist/modules/rendering/subtitle/AnimationProbe.d.ts.map +0 -1
  242. package/dist/modules/rendering/subtitle/AnimationProbe.js +0 -203
  243. package/dist/modules/rendering/subtitle/AnimationProbe.js.map +0 -1
  244. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.d.ts +0 -17
  245. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.d.ts.map +0 -1
  246. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.js +0 -58
  247. package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.js.map +0 -1
  248. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts +0 -27
  249. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts.map +0 -1
  250. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js +0 -84
  251. package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js.map +0 -1
@@ -0,0 +1,25 @@
1
+ import type { AudioDecoder } from '../transcription/AudioDecoder';
2
+ /**
3
+ * `AudioDecoder` that runs a primary decoder and retries with a
4
+ * fallback when the primary fails for any reason — a codec the
5
+ * runtime cannot decode, but also a decoder dying mid-stream, which
6
+ * a different decode strategy may survive. Genuinely broken input
7
+ * costs one extra attempt that fails fast.
8
+ *
9
+ * When both fail it throws an `AggregateError` whose `errors` are the
10
+ * primary's and the fallback's, in that order — neither caused the
11
+ * other, so neither can be the other's `cause`. Its message names
12
+ * both reasons, so a report that keeps only the outer error still
13
+ * says which attempt died of what.
14
+ *
15
+ * Progress callbacks are forwarded to whichever decoder ends up
16
+ * producing the result; a fallback run restarts progress from zero.
17
+ */
18
+ export declare class FallbackAudioDecoder implements AudioDecoder {
19
+ private readonly primary;
20
+ private readonly fallback;
21
+ constructor(primary: AudioDecoder, fallback: AudioDecoder);
22
+ decode(audio: Blob, targetSampleRate: number, onProgress?: (progress: number) => void): Promise<Float32Array>;
23
+ private describe;
24
+ }
25
+ //# sourceMappingURL=FallbackAudioDecoder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FallbackAudioDecoder.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/FallbackAudioDecoder.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAExE;;;;;;;;;;;;;;;GAeG;AACH,qBAAa,oBAAqB,YAAW,YAAY;IAGrD,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBADR,OAAO,EAAE,YAAY,EACrB,QAAQ,EAAE,YAAY;IAGnC,MAAM,CACV,KAAK,EAAE,IAAI,EACX,gBAAgB,EAAE,MAAM,EACxB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GACtC,OAAO,CAAC,YAAY,CAAC;IAmBxB,OAAO,CAAC,QAAQ;CAIjB"}
@@ -0,0 +1,46 @@
1
+ /**
2
+ * `AudioDecoder` that runs a primary decoder and retries with a
3
+ * fallback when the primary fails for any reason — a codec the
4
+ * runtime cannot decode, but also a decoder dying mid-stream, which
5
+ * a different decode strategy may survive. Genuinely broken input
6
+ * costs one extra attempt that fails fast.
7
+ *
8
+ * When both fail it throws an `AggregateError` whose `errors` are the
9
+ * primary's and the fallback's, in that order — neither caused the
10
+ * other, so neither can be the other's `cause`. Its message names
11
+ * both reasons, so a report that keeps only the outer error still
12
+ * says which attempt died of what.
13
+ *
14
+ * Progress callbacks are forwarded to whichever decoder ends up
15
+ * producing the result; a fallback run restarts progress from zero.
16
+ */
17
+ export class FallbackAudioDecoder {
18
+ primary;
19
+ fallback;
20
+ constructor(primary, fallback) {
21
+ this.primary = primary;
22
+ this.fallback = fallback;
23
+ }
24
+ async decode(audio, targetSampleRate, onProgress) {
25
+ let primaryError;
26
+ try {
27
+ return await this.primary.decode(audio, targetSampleRate, onProgress);
28
+ }
29
+ catch (error) {
30
+ primaryError = error;
31
+ }
32
+ try {
33
+ return await this.fallback.decode(audio, targetSampleRate, onProgress);
34
+ }
35
+ catch (fallbackError) {
36
+ throw new AggregateError([primaryError, fallbackError], `No audio decode path succeeded. Primary: ${this.describe(primaryError)}.`
37
+ + ` Fallback: ${this.describe(fallbackError)}`, { cause: fallbackError });
38
+ }
39
+ }
40
+ describe(error) {
41
+ if (error instanceof Error)
42
+ return `${error.name}: ${error.message}`;
43
+ return String(error);
44
+ }
45
+ }
46
+ //# sourceMappingURL=FallbackAudioDecoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FallbackAudioDecoder.js","sourceRoot":"","sources":["../../../src/modules/transcription/FallbackAudioDecoder.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,OAAO,oBAAoB;IAGZ;IACA;IAFnB,YACmB,OAAqB,EACrB,QAAsB;QADtB,YAAO,GAAP,OAAO,CAAc;QACrB,aAAQ,GAAR,QAAQ,CAAc;IACtC,CAAC;IAEJ,KAAK,CAAC,MAAM,CACV,KAAW,EACX,gBAAwB,EACxB,UAAuC;QAEvC,IAAI,YAAqB,CAAC;QAC1B,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;QACxE,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,YAAY,GAAG,KAAK,CAAC;QACvB,CAAC;QACD,IAAI,CAAC;YACH,OAAO,MAAM,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,EAAE,gBAAgB,EAAE,UAAU,CAAC,CAAC;QACzE,CAAC;QAAC,OAAO,aAAa,EAAE,CAAC;YACvB,MAAM,IAAI,cAAc,CACtB,CAAC,YAAY,EAAE,aAAa,CAAC,EAC7B,4CAA4C,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,GAAG;kBACxE,cAAc,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,EAC9C,EAAE,KAAK,EAAE,aAAa,EAAE,CACzB,CAAC;QACJ,CAAC;IACH,CAAC;IAEO,QAAQ,CAAC,KAAc;QAC7B,IAAI,KAAK,YAAY,KAAK;YAAE,OAAO,GAAG,KAAK,CAAC,IAAI,KAAK,KAAK,CAAC,OAAO,EAAE,CAAC;QACrE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;CACF"}
@@ -0,0 +1,71 @@
1
+ /** An audio-only container covering one contiguous stretch of a source. */
2
+ export interface AudioOnlySegment {
3
+ readonly bytes: Blob;
4
+ /** Source timestamp the segment's first sample stands at, in seconds. */
5
+ readonly startSeconds: number;
6
+ /**
7
+ * Source timestamp from which the samples are a faithful decode, in
8
+ * seconds. What comes before is lead-in the previous segment
9
+ * already covers properly.
10
+ */
11
+ readonly usableFromSeconds: number;
12
+ }
13
+ /**
14
+ * Copies a media blob's primary audio track verbatim into audio-only
15
+ * MP4 (m4a) containers. A packet copy touches no codec, so it works
16
+ * without any WebCodecs support and never decodes the video track —
17
+ * the result holds the audio at its original bitrate and nothing
18
+ * else.
19
+ *
20
+ * The track comes out whole or split into segments of a bounded
21
+ * length, each a stand-alone container that decodes on its own.
22
+ * Segments overlap: to reassemble them, drop each one's lead-in —
23
+ * everything before its `usableFromSeconds` — and place the rest at
24
+ * that timestamp. Placing a segment anywhere else, or appending it
25
+ * to the previous one, loses the seam.
26
+ *
27
+ * Each segment's first packet is shifted to zero, which the muxer
28
+ * requires. A whole-track remux keeps whatever lead-in the source
29
+ * has and only corrects AAC's negative priming timestamp, a bias
30
+ * bounded by the priming itself (~20 ms).
31
+ *
32
+ * Throws a plain `Error` when the source has no audio track, when
33
+ * the container cannot carry its codec, and when the track holds no
34
+ * packets at all; callers wrap it into their own error vocabulary.
35
+ */
36
+ export declare class MediaBunnyAudioOnlyRemuxer {
37
+ /**
38
+ * How far a segment reaches beyond the stretch it is trusted for,
39
+ * at both ends. Codecs reconstruct a frame together with its
40
+ * neighbours, so the frames at a segment's edges decode attenuated
41
+ * without them. Sized above the longest frame in common use
42
+ * (60 ms, Opus).
43
+ */
44
+ private static readonly MARGIN_SECONDS;
45
+ remux(media: Blob, onProgress?: (progress: number) => void): Promise<Blob>;
46
+ /**
47
+ * Yields the track as consecutive segments, each trusted for
48
+ * `maxSegmentSeconds` of source time and carrying a margin of
49
+ * context on either side of that. Segments are produced as they
50
+ * are copied, so a consumer that decodes one at a time never
51
+ * holds more than one decoded at once.
52
+ */
53
+ remuxSegments(media: Blob, maxSegmentSeconds: number, onProgress?: (progress: number) => void): AsyncGenerator<AudioOnlySegment>;
54
+ /**
55
+ * Whether the packet has reached the segment at `index`. A segment
56
+ * trusted only from past the end of the track is never reached,
57
+ * because it would be decoded for nothing.
58
+ */
59
+ private reached;
60
+ private open;
61
+ /**
62
+ * A later segment is anchored to its own first packet, which is
63
+ * what lets it be decoded on its own. The first one keeps whatever
64
+ * lead-in the source has and only lifts the track above zero,
65
+ * because moving it would silently retime a whole-track remux.
66
+ */
67
+ private shiftFor;
68
+ private close;
69
+ private carriableCodecOf;
70
+ }
71
+ //# sourceMappingURL=MediaBunnyAudioOnlyRemuxer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaBunnyAudioOnlyRemuxer.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/MediaBunnyAudioOnlyRemuxer.ts"],"names":[],"mappings":"AAcA,2EAA2E;AAC3E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC;IACrB,yEAAyE;IACzE,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B;;;;OAIG;IACH,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;CACpC;AAYD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,0BAA0B;IAErC;;;;;;OAMG;IACH,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAQ;IAExC,KAAK,CAAC,KAAK,EAAE,IAAI,EAAE,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;IAOhF;;;;;;OAMG;IACI,aAAa,CAClB,KAAK,EAAE,IAAI,EACX,iBAAiB,EAAE,MAAM,EACzB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GACtC,cAAc,CAAC,gBAAgB,CAAC;IAwCnC;;;;OAIG;IACH,OAAO,CAAC,OAAO;YAWD,IAAI;IAqBlB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;YAIF,KAAK;YAWL,gBAAgB;CAQ/B"}
@@ -0,0 +1,145 @@
1
+ import { ALL_FORMATS, BlobSource, BufferTarget, EncodedAudioPacketSource, EncodedPacketSink, Input, Mp4OutputFormat, Output, } from 'mediabunny';
2
+ import { AudioSegmentLayout } from '../transcription/AudioSegmentLayout';
3
+ /**
4
+ * Copies a media blob's primary audio track verbatim into audio-only
5
+ * MP4 (m4a) containers. A packet copy touches no codec, so it works
6
+ * without any WebCodecs support and never decodes the video track —
7
+ * the result holds the audio at its original bitrate and nothing
8
+ * else.
9
+ *
10
+ * The track comes out whole or split into segments of a bounded
11
+ * length, each a stand-alone container that decodes on its own.
12
+ * Segments overlap: to reassemble them, drop each one's lead-in —
13
+ * everything before its `usableFromSeconds` — and place the rest at
14
+ * that timestamp. Placing a segment anywhere else, or appending it
15
+ * to the previous one, loses the seam.
16
+ *
17
+ * Each segment's first packet is shifted to zero, which the muxer
18
+ * requires. A whole-track remux keeps whatever lead-in the source
19
+ * has and only corrects AAC's negative priming timestamp, a bias
20
+ * bounded by the priming itself (~20 ms).
21
+ *
22
+ * Throws a plain `Error` when the source has no audio track, when
23
+ * the container cannot carry its codec, and when the track holds no
24
+ * packets at all; callers wrap it into their own error vocabulary.
25
+ */
26
+ export class MediaBunnyAudioOnlyRemuxer {
27
+ /**
28
+ * How far a segment reaches beyond the stretch it is trusted for,
29
+ * at both ends. Codecs reconstruct a frame together with its
30
+ * neighbours, so the frames at a segment's edges decode attenuated
31
+ * without them. Sized above the longest frame in common use
32
+ * (60 ms, Opus).
33
+ */
34
+ static MARGIN_SECONDS = 0.15;
35
+ async remux(media, onProgress) {
36
+ for await (const segment of this.remuxSegments(media, Infinity, onProgress)) {
37
+ return segment.bytes;
38
+ }
39
+ throw new Error('The source audio track has no packets');
40
+ }
41
+ /**
42
+ * Yields the track as consecutive segments, each trusted for
43
+ * `maxSegmentSeconds` of source time and carrying a margin of
44
+ * context on either side of that. Segments are produced as they
45
+ * are copied, so a consumer that decodes one at a time never
46
+ * holds more than one decoded at once.
47
+ */
48
+ async *remuxSegments(media, maxSegmentSeconds, onProgress) {
49
+ const input = new Input({ source: new BlobSource(media), formats: ALL_FORMATS });
50
+ try {
51
+ const track = await input.getPrimaryAudioTrack();
52
+ if (!track)
53
+ throw new Error('The source has no audio track');
54
+ const codec = await this.carriableCodecOf(track);
55
+ const decoderConfig = await track.getDecoderConfig();
56
+ const meta = decoderConfig ? { decoderConfig } : {};
57
+ const durationSeconds = await track.computeDuration();
58
+ const layout = new AudioSegmentLayout(maxSegmentSeconds, MediaBunnyAudioOnlyRemuxer.MARGIN_SECONDS);
59
+ const open = [];
60
+ let nextIndex = 0;
61
+ for await (const packet of new EncodedPacketSink(track).packets()) {
62
+ while (this.reached(packet.timestamp, layout, nextIndex, durationSeconds)) {
63
+ // A segment whose whole stretch is behind this packet gets
64
+ // no packets at all, so there is nothing to open for it.
65
+ if (packet.timestamp < layout.endsAt(nextIndex)) {
66
+ open.push(await this.open(codec, packet.timestamp, layout, nextIndex));
67
+ }
68
+ nextIndex += 1;
69
+ }
70
+ for (const segment of open) {
71
+ await segment.source.add(packet.clone({ timestamp: packet.timestamp + segment.shiftSeconds }), meta);
72
+ }
73
+ while (open.length > 0 && packet.timestamp >= open[0].endsAtSeconds) {
74
+ yield await this.close(open.shift());
75
+ }
76
+ if (onProgress && durationSeconds > 0) {
77
+ onProgress(Math.min(1, packet.timestamp / durationSeconds));
78
+ }
79
+ }
80
+ while (open.length > 0)
81
+ yield await this.close(open.shift());
82
+ if (onProgress)
83
+ onProgress(1);
84
+ }
85
+ finally {
86
+ input.dispose();
87
+ }
88
+ }
89
+ /**
90
+ * Whether the packet has reached the segment at `index`. A segment
91
+ * trusted only from past the end of the track is never reached,
92
+ * because it would be decoded for nothing.
93
+ */
94
+ reached(timestampSeconds, layout, index, durationSeconds) {
95
+ if (timestampSeconds < layout.collectsFrom(index))
96
+ return false;
97
+ if (index === 0 || durationSeconds <= 0)
98
+ return true;
99
+ return layout.usableFrom(index) < durationSeconds;
100
+ }
101
+ async open(codec, anchorSeconds, layout, index) {
102
+ const target = new BufferTarget();
103
+ const output = new Output({ format: new Mp4OutputFormat(), target });
104
+ const source = new EncodedAudioPacketSource(codec);
105
+ output.addAudioTrack(source);
106
+ await output.start();
107
+ return {
108
+ target,
109
+ output,
110
+ source,
111
+ shiftSeconds: this.shiftFor(anchorSeconds, index === 0),
112
+ usableFromSeconds: layout.usableFrom(index),
113
+ endsAtSeconds: layout.endsAt(index),
114
+ };
115
+ }
116
+ /**
117
+ * A later segment is anchored to its own first packet, which is
118
+ * what lets it be decoded on its own. The first one keeps whatever
119
+ * lead-in the source has and only lifts the track above zero,
120
+ * because moving it would silently retime a whole-track remux.
121
+ */
122
+ shiftFor(anchorSeconds, isFirst) {
123
+ return isFirst ? Math.max(0, -anchorSeconds) : -anchorSeconds;
124
+ }
125
+ async close(open) {
126
+ open.source.close();
127
+ await open.output.finalize();
128
+ if (!open.target.buffer)
129
+ throw new Error('Remux finished without producing output');
130
+ return {
131
+ bytes: new Blob([open.target.buffer], { type: 'audio/mp4' }),
132
+ startSeconds: Math.max(0, -open.shiftSeconds),
133
+ usableFromSeconds: open.usableFromSeconds,
134
+ };
135
+ }
136
+ async carriableCodecOf(track) {
137
+ const codec = await track.getCodec();
138
+ const supported = new Mp4OutputFormat().getSupportedAudioCodecs();
139
+ if (!codec || !supported.includes(codec)) {
140
+ throw new Error(`The audio codec cannot be carried into an audio-only container: ${codec ?? 'unknown'}`);
141
+ }
142
+ return codec;
143
+ }
144
+ }
145
+ //# sourceMappingURL=MediaBunnyAudioOnlyRemuxer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MediaBunnyAudioOnlyRemuxer.js","sourceRoot":"","sources":["../../../src/modules/transcription/MediaBunnyAudioOnlyRemuxer.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,UAAU,EACV,YAAY,EACZ,wBAAwB,EACxB,iBAAiB,EACjB,KAAK,EACL,eAAe,EACf,MAAM,GAGP,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAyB/E;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,OAAO,0BAA0B;IAErC;;;;;;OAMG;IACK,MAAM,CAAU,cAAc,GAAG,IAAI,CAAC;IAE9C,KAAK,CAAC,KAAK,CAAC,KAAW,EAAE,UAAuC;QAC9D,IAAI,KAAK,EAAE,MAAM,OAAO,IAAI,IAAI,CAAC,aAAa,CAAC,KAAK,EAAE,QAAQ,EAAE,UAAU,C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AI,CAAC,MAAM,CAAC,MAAM;YAAE,MAAM,IAAI,KAAK,CAAC,yCAAyC,CAAC,CAAC;QACpF,OAAO;YACL,KAAK,EAAE,IAAI,IAAI,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC;YAC5D,YAAY,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,YAAY,CAAC;YAC7C,iBAAiB,EAAE,IAAI,CAAC,iBAAiB;SAC1C,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,gBAAgB,CAAC,KAAsB;QACnD,MAAM,KAAK,GAAG,MAAM,KAAK,CAAC,QAAQ,EAAE,CAAC;QACrC,MAAM,SAAS,GAAG,IAAI,eAAe,EAAE,CAAC,uBAAuB,EAAE,CAAC;QAClE,IAAI,CAAC,KAAK,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,mEAAmE,KAAK,IAAI,SAAS,EAAE,CAAC,CAAC;QAC3G,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC"}
@@ -0,0 +1,46 @@
1
+ import type { AudioDecoder } from '../transcription/AudioDecoder';
2
+ /**
3
+ * Decodes an audio/video Blob to mono `Float32Array` PCM at the
4
+ * requested sample rate through the Web Audio API. `decodeAudioData`
5
+ * ships everywhere, so this covers runtimes whose WebCodecs has no
6
+ * `AudioDecoder` (Safari before 26 is video-only).
7
+ *
8
+ * Peak memory does not follow the source's length: the audio track is
9
+ * decoded in bounded segments into one pre-sized buffer, so the cost
10
+ * is that buffer plus a single segment. The video track never loads.
11
+ *
12
+ * Main-thread only — `OfflineAudioContext` is not available inside
13
+ * Worker contexts.
14
+ *
15
+ * Throws a `DOMException` named `NotSupportedError` for audio it
16
+ * cannot decode and for a container it cannot read, following the
17
+ * WebCodecs convention so callers classify both decode paths alike.
18
+ */
19
+ export declare class WebAudioAudioDecoder implements AudioDecoder {
20
+ private readonly segmentSeconds;
21
+ private static readonly DEFAULT_SEGMENT_SECONDS;
22
+ private readonly remuxer;
23
+ /**
24
+ * @param segmentSeconds - How much source audio one
25
+ * `decodeAudioData` call covers. Trades peak memory against
26
+ * per-segment setup; the decoded result is the same at any value.
27
+ */
28
+ constructor(segmentSeconds?: number);
29
+ decode(audio: Blob, targetSampleRate: number, onProgress?: (progress: number) => void): Promise<Float32Array>;
30
+ private segmentsOf;
31
+ /**
32
+ * Returns the length of the source's primary audio track, or
33
+ * `null` when it carries none.
34
+ */
35
+ private audioDurationOf;
36
+ private decodeWithWebAudio;
37
+ /**
38
+ * Downmixes the decoded segment into the target, dropping its
39
+ * first `skipped` frames and laying the rest down from `offset`,
40
+ * clipped to the target's capacity. Returns the index one past the
41
+ * last frame written.
42
+ */
43
+ private mixIntoTarget;
44
+ private notSupported;
45
+ }
46
+ //# sourceMappingURL=WebAudioAudioDecoder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebAudioAudioDecoder.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/WebAudioAudioDecoder.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAIxE;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,oBAAqB,YAAW,YAAY;IAYrD,OAAO,CAAC,QAAQ,CAAC,cAAc;IAVjC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,uBAAuB,CAAM;IAErD,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoC;IAE5D;;;;OAIG;gBAEgB,cAAc,GAAE,MAAqD;IAGlF,MAAM,CACV,KAAK,EAAE,IAAI,EACX,gBAAgB,EAAE,MAAM,EACxB,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,GACtC,OAAO,CAAC,YAAY,CAAC;YAmBT,UAAU;IAQzB;;;OAGG;YACW,eAAe;YAcf,kBAAkB;IAWhC;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAyBrB,OAAO,CAAC,YAAY;CAIrB"}
@@ -0,0 +1,123 @@
1
+ import { ALL_FORMATS, BlobSource, Input } from 'mediabunny';
2
+ import { MediaBunnyAudioOnlyRemuxer } from '../transcription/MediaBunnyAudioOnlyRemuxer';
3
+ /**
4
+ * Decodes an audio/video Blob to mono `Float32Array` PCM at the
5
+ * requested sample rate through the Web Audio API. `decodeAudioData`
6
+ * ships everywhere, so this covers runtimes whose WebCodecs has no
7
+ * `AudioDecoder` (Safari before 26 is video-only).
8
+ *
9
+ * Peak memory does not follow the source's length: the audio track is
10
+ * decoded in bounded segments into one pre-sized buffer, so the cost
11
+ * is that buffer plus a single segment. The video track never loads.
12
+ *
13
+ * Main-thread only — `OfflineAudioContext` is not available inside
14
+ * Worker contexts.
15
+ *
16
+ * Throws a `DOMException` named `NotSupportedError` for audio it
17
+ * cannot decode and for a container it cannot read, following the
18
+ * WebCodecs convention so callers classify both decode paths alike.
19
+ */
20
+ export class WebAudioAudioDecoder {
21
+ segmentSeconds;
22
+ static DEFAULT_SEGMENT_SECONDS = 60;
23
+ remuxer = new MediaBunnyAudioOnlyRemuxer();
24
+ /**
25
+ * @param segmentSeconds - How much source audio one
26
+ * `decodeAudioData` call covers. Trades peak memory against
27
+ * per-segment setup; the decoded result is the same at any value.
28
+ */
29
+ constructor(segmentSeconds = WebAudioAudioDecoder.DEFAULT_SEGMENT_SECONDS) {
30
+ this.segmentSeconds = segmentSeconds;
31
+ }
32
+ async decode(audio, targetSampleRate, onProgress) {
33
+ const durationSeconds = await this.audioDurationOf(audio);
34
+ if (durationSeconds === null)
35
+ return new Float32Array(0);
36
+ const target = new Float32Array(Math.max(1, Math.ceil(durationSeconds * targetSampleRate)));
37
+ let written = 0;
38
+ for await (const segment of this.segmentsOf(audio)) {
39
+ const decoded = await this.decodeWithWebAudio(await segment.bytes.arrayBuffer(), targetSampleRate);
40
+ const skipped = Math.round((segment.usableFromSeconds - segment.startSeconds) * targetSampleRate);
41
+ const offset = Math.round(segment.usableFromSeconds * targetSampleRate);
42
+ written = Math.max(written, this.mixIntoTarget(target, decoded, skipped, offset));
43
+ if (onProgress) {
44
+ onProgress(Math.min(1, (segment.startSeconds + decoded.duration) / durationSeconds));
45
+ }
46
+ }
47
+ if (onProgress)
48
+ onProgress(1);
49
+ return target.subarray(0, written);
50
+ }
51
+ async *segmentsOf(audio) {
52
+ try {
53
+ yield* this.remuxer.remuxSegments(audio, this.segmentSeconds);
54
+ }
55
+ catch (cause) {
56
+ throw this.notSupported('The audio track could not be read out of its container', cause);
57
+ }
58
+ }
59
+ /**
60
+ * Returns the length of the source's primary audio track, or
61
+ * `null` when it carries none.
62
+ */
63
+ async audioDurationOf(audio) {
64
+ const input = new Input({ formats: ALL_FORMATS, source: new BlobSource(audio) });
65
+ try {
66
+ const track = await input.getPrimaryAudioTrack();
67
+ if (!track)
68
+ return null;
69
+ const durationSeconds = await track.computeDuration();
70
+ return durationSeconds > 0 ? durationSeconds : null;
71
+ }
72
+ catch (cause) {
73
+ throw this.notSupported('The source container could not be read', cause);
74
+ }
75
+ finally {
76
+ input.dispose();
77
+ }
78
+ }
79
+ async decodeWithWebAudio(bytes, targetSampleRate) {
80
+ // decodeAudioData resamples to the context's rate, so a context
81
+ // created at the target rate does the resampling in the same pass.
82
+ const context = new OfflineAudioContext(1, 1, targetSampleRate);
83
+ try {
84
+ return await context.decodeAudioData(bytes);
85
+ }
86
+ catch (cause) {
87
+ throw this.notSupported('Audio is not decodable by the Web Audio API', cause);
88
+ }
89
+ }
90
+ /**
91
+ * Downmixes the decoded segment into the target, dropping its
92
+ * first `skipped` frames and laying the rest down from `offset`,
93
+ * clipped to the target's capacity. Returns the index one past the
94
+ * last frame written.
95
+ */
96
+ mixIntoTarget(target, decoded, skipped, offset) {
97
+ const source = Math.max(0, skipped);
98
+ const start = Math.max(0, offset);
99
+ const frames = Math.min(decoded.length - source, target.length - start);
100
+ if (frames <= 0)
101
+ return 0;
102
+ const channels = decoded.numberOfChannels;
103
+ const first = decoded.getChannelData(0);
104
+ for (let frame = 0; frame < frames; frame += 1)
105
+ target[start + frame] = first[source + frame];
106
+ for (let channel = 1; channel < channels; channel += 1) {
107
+ const data = decoded.getChannelData(channel);
108
+ for (let frame = 0; frame < frames; frame += 1)
109
+ target[start + frame] += data[source + frame];
110
+ }
111
+ if (channels > 1) {
112
+ const inverseChannels = 1 / channels;
113
+ for (let frame = 0; frame < frames; frame += 1)
114
+ target[start + frame] *= inverseChannels;
115
+ }
116
+ return start + frames;
117
+ }
118
+ notSupported(what, cause) {
119
+ const reason = cause instanceof Error ? cause.message : String(cause);
120
+ return new DOMException(`${what}: ${reason}`, 'NotSupportedError');
121
+ }
122
+ }
123
+ //# sourceMappingURL=WebAudioAudioDecoder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"WebAudioAudioDecoder.js","sourceRoot":"","sources":["../../../src/modules/transcription/WebAudioAudioDecoder.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAE5D,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAG/F;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,OAAO,oBAAoB;IAYZ;IAVX,MAAM,CAAU,uBAAuB,GAAG,EAAE,CAAC;IAEpC,OAAO,GAAG,IAAI,0BAA0B,EAAE,CAAC;IAE5D;;;;OAIG;IACH,YACmB,iBAAyB,oBAAoB,CAAC,uBAAuB;QAArE,mBAAc,GAAd,cAAc,CAAuD;IACrF,CAAC;IAEJ,KAAK,CAAC,MAAM,CACV,KAAW,EACX,gBAAwB,EACxB,UAAuC;QAEvC,MAAM,eAAe,GAAG,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAC1D,IAAI,eAAe,KAAK,IAAI;YAAE,OAAO,IAAI,YAAY,CAAC,CAAC,CAAC,CAAC;Q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IAAI,eAAe,CAAC;QAC5F,CAAC;QACD,OAAO,KAAK,GAAG,MAAM,CAAC;IACxB,CAAC;IAEO,YAAY,CAAC,IAAY,EAAE,KAAc;QAC/C,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtE,OAAO,IAAI,YAAY,CAAC,GAAG,IAAI,KAAK,MAAM,EAAE,EAAE,mBAAmB,CAAC,CAAC;IACrE,CAAC"}
@@ -2,6 +2,10 @@ export type { Transcriber, TranscriberOptions, TranscriberProgressEvent, Untrans
2
2
  export type { AudioDecoder } from '../transcription/AudioDecoder';
3
3
  export { PreDecodedAudioDecoder } from '../transcription/PreDecodedAudioDecoder';
4
4
  export { MediaBunnyAudioDecoder } from '../transcription/MediaBunnyAudioDecoder';
5
+ export { WebAudioAudioDecoder } from '../transcription/WebAudioAudioDecoder';
6
+ export { FallbackAudioDecoder } from '../transcription/FallbackAudioDecoder';
7
+ export { MediaBunnyAudioOnlyRemuxer } from '../transcription/MediaBunnyAudioOnlyRemuxer';
8
+ export type { AudioOnlySegment } from '../transcription/MediaBunnyAudioOnlyRemuxer';
5
9
  export { PassthroughTranscriber } from '../transcription/PassthroughTranscriber';
6
10
  export { SrtTranscriber } from '../transcription/SrtTranscriber';
7
11
  export { VttTranscriber } from '../transcription/VttTranscriber';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,GACpB,MAAM,oCAAoC,CAAC;AAC5C,YAAY,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO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E,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AACjG,YAAY,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EACL,kBAAkB,EAClB,mBAAmB,EACnB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,wBAAwB,GAC9B,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AACrG,YAAY,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,8BAA8B,EAAE,MAAM,uDAAuD,CAAC"}
@@ -1,5 +1,8 @@
1
1
  export { PreDecodedAudioDecoder } from '../transcription/PreDecodedAudioDecoder';
2
2
  export { MediaBunnyAudioDecoder } from '../transcription/MediaBunnyAudioDecoder';
3
+ export { WebAudioAudioDecoder } from '../transcription/WebAudioAudioDecoder';
4
+ export { FallbackAudioDecoder } from '../transcription/FallbackAudioDecoder';
5
+ export { MediaBunnyAudioOnlyRemuxer } from '../transcription/MediaBunnyAudioOnlyRemuxer';
3
6
  export { PassthroughTranscriber } from '../transcription/PassthroughTranscriber';
4
7
  export { SrtTranscriber } from '../transcription/SrtTranscriber';
5
8
  export { VttTranscriber } from '../transcription/VttTranscriber';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/transcription/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AAEjG,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GAIpB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AAErG,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,8BAA8B,EAAE,MAAM,uDAAuD,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/modules/transcription/index.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,6CAA6C,CAAC;AACnF,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAE/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,+CAA+C,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AACvE,OAAO,EAAE,2BAA2B,EAAE,MAAM,oDAAoD,CAAC;AAEjG,OAAO,EACL,kBAAkB,EAClB,mBAAmB,GAIpB,MAAM,2CAA2C,CAAC;AACnD,OAAO,EAAE,6BAA6B,EAAE,MAAM,sDAAsD,CAAC;AAErG,OAAO,EAAE,0BAA0B,EAAE,MAAM,mDAAmD,CAAC;AAC/F,OAAO,EAAE,8BAA8B,EAAE,MAAM,uDAAuD,CAAC"}
@@ -33,6 +33,17 @@ export interface FallbackDecoderInfo {
33
33
  /** Codec of the input video track that triggered the fallback. */
34
34
  inputCodec: string;
35
35
  }
36
+ /**
37
+ * Which decoder the renderer drives the input through.
38
+ * `'html-video-element'` is the slow path, reached only when WebCodecs
39
+ * cannot decode the input's codec.
40
+ */
41
+ export type VideoFrameDecoderKind = 'web-codecs' | 'html-video-element';
42
+ /** The decoder chosen for a run, and the input codec it was chosen for. */
43
+ export interface VideoFrameDecoderSelection {
44
+ kind: VideoFrameDecoderKind;
45
+ inputCodec: string;
46
+ }
36
47
  export interface RenderJob {
37
48
  video: File;
38
49
  document: Document;
@@ -98,15 +109,27 @@ export interface RenderJob {
98
109
  * `'AbortError'` when the caller resolves with `false`.
99
110
  */
100
111
  confirmFallbackDecoder?: (info: FallbackDecoderInfo) => Promise<boolean>;
112
+ /**
113
+ * Called once per render, before the first frame is decoded, with the
114
+ * decoder the renderer selected for the input. Not invoked when the
115
+ * render fails before a decoder is chosen.
116
+ */
117
+ onVideoFrameDecoderSelected?: (selection: VideoFrameDecoderSelection) => void;
101
118
  }
102
119
  export interface RenderResult {
103
120
  /** Encoded file in memory, or `null` when the job supplied `outputStream`. */
104
121
  blob: Blob | null;
105
122
  mimeType: string;
106
123
  }
124
+ /** Progress of a render, reported once per encoded frame. */
107
125
  export interface RenderProgress {
126
+ /** `[0, 100]`. */
108
127
  percent: number;
109
128
  currentFrame: number;
129
+ /**
130
+ * Estimated from the output duration and the source's average frame
131
+ * rate, so a variable-frame-rate source can end slightly off it.
132
+ */
110
133
  totalFrames: number;
111
134
  }
112
135
  //# sourceMappingURL=RenderJob.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RenderJob.d.ts","sourceRoot":"","sources":["../../../src/modules/video/RenderJob.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0CAA0C,CAAC;AAC9E,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kDAAkD,CAAC;AAEvF,MAAM,MAAM,YAAY,GAAG,KAAK,GAAG,MAAM,CAAC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derJob, RenderResult, RenderProgress, RenderOutputChunk, OutputFormat, RenderQuality, AudioDiscardReason, FallbackDecoderInfo, } from '../video/RenderJob';
2
+ export type { RenderJob, RenderResult, RenderProgress, RenderOutputChunk, OutputFormat, RenderQuality, AudioDiscardReason, FallbackDecoderInfo, VideoFrameDecoderKind, VideoFrameDecoderSelection, } from '../video/RenderJob';
3
3
  export { MediaBunnyVideoRenderer } from '../video/mediabunny/MediaBunnyVideoRenderer';
4
4
  export type { MediaBunnyVideoRendererConfig } from '../video/mediabunny/MediaBunnyVideoRenderer';
5
5
  export { MediaBunnyTranscodeCoordinator } from '../video/mediabunny/MediaBunnyTranscodeCoordinator';
6
6
  export type { MediaBunnyTranscodeCoordinatorConfig, MediaBunnyTranscodeRequest, MediaBunnyTranscodeResult, } from '../video/mediabunny/MediaBunnyTranscodeCoordinator';
7
- export type { FramePainter } from '../video/mediabunny/painter/FramePainter';
7
+ export type { FramePainter, FramePaintRequest } from '../video/mediabunny/painter/FramePainter';
8
8
  export { CaptionsOverlayFramePainter } from '../video/mediabunny/painter/CaptionsOverlayFramePainter';
9
9
  export { CaptionsOverlayFramePainterFactory } from '../video/mediabunny/painter/CaptionsOverlayFramePainterFactory';
10
10
  export { RenderTimeMap } from '../video/RenderTimeMap';
@@ -13,6 +13,8 @@ export { DefaultCodecPolicy } from '../video/mediabunny/codec/DefaultCodecPolicy
13
13
  export type { VideoFrameDecoder, DecodedVideoFrame, } from '../video/mediabunny/frame/VideoFrameDecoder';
14
14
  export type { VideoFrameDecoderFactory, VideoFrameDecoderRequest, } from '../video/mediabunny/frame/VideoFrameDecoderFactory';
15
15
  export { DefaultVideoFrameDecoderFactory } from '../video/mediabunny/frame/DefaultVideoFrameDecoderFactory';
16
+ export { WebCodecsOnlyVideoFrameDecoderFactory } from '../video/mediabunny/frame/WebCodecsOnlyVideoFrameDecoderFactory';
17
+ export { VideoFrameDecoderSelectionFailedError } from '../video/mediabunny/frame/VideoFrameDecoderSelectionFailedError';
16
18
  export { WebCodecsVideoFrameDecoder } from '../video/mediabunny/frame/WebCodecsVideoFrameDecoder';
17
19
  export { HtmlVideoElementVideoFrameDecoder } from '../video/mediabunny/frame/HtmlVideoElementVideoFrameDecoder';
18
20
  export type { VideoTrackEncoder, PaintFrame } from '../video/mediabunny/encoder/VideoTrackEncoder';
@@ -22,7 +24,7 @@ export type { MediaBunnyCanvasVideoTrackEncoderConfig, } from '../video/mediabun
22
24
  export { MediaBunnyCanvasVideoTrackEncoderFactory, } from '../video/mediabunny/encoder/MediaBunnyCanvasVideoTrackEncoderFactory';
23
25
  export type { FrameCompositor } from '../video/mediabunny/frame/FrameCompositor';
24
26
  export { LayeredFrameCompositor } from '../video/mediabunny/frame/LayeredFrameCompositor';
25
- export type { SubtitleLayerSource } from '../video/mediabunny/caption/SubtitleLayerSource';
27
+ export type { SubtitleLayerSource, SubtitleLayerRequest, } from '../video/mediabunny/caption/SubtitleLayerSource';
26
28
  export { BatchedSubtitleLayerSource } from '../video/mediabunny/caption/BatchedSubtitleLayerSource';
27
29
  export { VideoBoundSubtitleLayerSource } from '../video/mediabunny/caption/VideoBoundSubtitleLayerSource';
28
30
  export { ComposedSubtitleLayerSource } from '../video/mediabunny/caption/ComposedSubtitleLayerSource';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/video/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,YAAY,EACV,SAAS,EACT,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,uBAAuB,EAAE,MAAM,mDAAmD,CAAC;AAC5F,YAAY,EAAE,6BAA6B,EAAE,MAAM,mDAAmD,CAAC;AAEvG,OAAO,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAC;AAC1G,YAAY,EACV,oCAAoC,E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