@tscaps/engine 0.1.1 → 0.3.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.
- package/README.md +48 -10
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/modules/bidi/BidiAnalyzer.d.ts +23 -0
- package/dist/modules/bidi/BidiAnalyzer.d.ts.map +1 -0
- package/dist/modules/bidi/BidiAnalyzer.js +2 -0
- package/dist/modules/bidi/BidiAnalyzer.js.map +1 -0
- package/dist/modules/bidi/BidiCharacterClassifier.d.ts +13 -0
- package/dist/modules/bidi/BidiCharacterClassifier.d.ts.map +1 -0
- package/dist/modules/bidi/BidiCharacterClassifier.js +2 -0
- package/dist/modules/bidi/BidiCharacterClassifier.js.map +1 -0
- package/dist/modules/bidi/BidiJsAnalyzer.d.ts +14 -0
- package/dist/modules/bidi/BidiJsAnalyzer.d.ts.map +1 -0
- package/dist/modules/bidi/BidiJsAnalyzer.js +19 -0
- package/dist/modules/bidi/BidiJsAnalyzer.js.map +1 -0
- package/dist/modules/bidi/BidiJsCharacterClassifier.d.ts +8 -0
- package/dist/modules/bidi/BidiJsCharacterClassifier.d.ts.map +1 -0
- package/dist/modules/bidi/BidiJsCharacterClassifier.js +19 -0
- package/dist/modules/bidi/BidiJsCharacterClassifier.js.map +1 -0
- package/dist/modules/bidi/CursiveScriptDetector.d.ts +12 -0
- package/dist/modules/bidi/CursiveScriptDetector.d.ts.map +1 -0
- package/dist/modules/bidi/CursiveScriptDetector.js +20 -0
- package/dist/modules/bidi/CursiveScriptDetector.js.map +1 -0
- package/dist/modules/bidi/HorizontalSide.d.ts +18 -0
- package/dist/modules/bidi/HorizontalSide.d.ts.map +1 -0
- package/dist/modules/bidi/HorizontalSide.js +3 -0
- package/dist/modules/bidi/HorizontalSide.js.map +1 -0
- package/dist/modules/bidi/HorizontalSideResolver.d.ts +21 -0
- package/dist/modules/bidi/HorizontalSideResolver.d.ts.map +1 -0
- package/dist/modules/bidi/HorizontalSideResolver.js +27 -0
- package/dist/modules/bidi/HorizontalSideResolver.js.map +1 -0
- package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.d.ts +24 -0
- package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.d.ts.map +1 -0
- package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.js +34 -0
- package/dist/modules/bidi/StrongCharacterMajorityTextDirectionDetector.js.map +1 -0
- package/dist/modules/bidi/TextDirection.d.ts +9 -0
- package/dist/modules/bidi/TextDirection.d.ts.map +1 -0
- package/dist/modules/bidi/TextDirection.js +2 -0
- package/dist/modules/bidi/TextDirection.js.map +1 -0
- package/dist/modules/bidi/TextDirectionDetector.d.ts +12 -0
- package/dist/modules/bidi/TextDirectionDetector.d.ts.map +1 -0
- package/dist/modules/bidi/TextDirectionDetector.js +2 -0
- package/dist/modules/bidi/TextDirectionDetector.js.map +1 -0
- package/dist/modules/bidi/WordFragment.d.ts +34 -0
- package/dist/modules/bidi/WordFragment.d.ts.map +1 -0
- package/dist/modules/bidi/WordFragment.js +2 -0
- package/dist/modules/bidi/WordFragment.js.map +1 -0
- package/dist/modules/bidi/WordFragmenter.d.ts +43 -0
- package/dist/modules/bidi/WordFragmenter.d.ts.map +1 -0
- package/dist/modules/bidi/WordFragmenter.js +112 -0
- package/dist/modules/bidi/WordFragmenter.js.map +1 -0
- package/dist/modules/bidi/index.d.ts +14 -0
- package/dist/modules/bidi/index.d.ts.map +1 -0
- package/dist/modules/bidi/index.js +8 -0
- package/dist/modules/bidi/index.js.map +1 -0
- package/dist/modules/css/CssBlockSealer.d.ts +30 -0
- package/dist/modules/css/CssBlockSealer.d.ts.map +1 -0
- package/dist/modules/css/CssBlockSealer.js +64 -0
- package/dist/modules/css/CssBlockSealer.js.map +1 -0
- package/dist/modules/css/CssCustomPropertyDefinitionScanner.d.ts +13 -0
- package/dist/modules/css/CssCustomPropertyDefinitionScanner.d.ts.map +1 -0
- package/dist/modules/css/CssCustomPropertyDefinitionScanner.js +24 -0
- package/dist/modules/css/CssCustomPropertyDefinitionScanner.js.map +1 -0
- package/dist/modules/css/CssFilterReferenceScanner.d.ts +15 -0
- package/dist/modules/css/CssFilterReferenceScanner.d.ts.map +1 -0
- package/dist/modules/css/CssFilterReferenceScanner.js +22 -0
- package/dist/modules/css/CssFilterReferenceScanner.js.map +1 -0
- package/dist/modules/css/CssFragmentParser.d.ts +53 -0
- package/dist/modules/css/CssFragmentParser.d.ts.map +1 -0
- package/dist/modules/css/CssFragmentParser.js +127 -0
- package/dist/modules/css/CssFragmentParser.js.map +1 -0
- package/dist/modules/css/CssKeyframeNamespacer.d.ts +21 -0
- package/dist/modules/css/CssKeyframeNamespacer.d.ts.map +1 -0
- package/dist/modules/css/CssKeyframeNamespacer.js +48 -0
- package/dist/modules/css/CssKeyframeNamespacer.js.map +1 -0
- package/dist/modules/css/CssKeyframesScanner.d.ts +29 -0
- package/dist/modules/css/CssKeyframesScanner.d.ts.map +1 -0
- package/dist/modules/css/CssKeyframesScanner.js +102 -0
- package/dist/modules/css/CssKeyframesScanner.js.map +1 -0
- package/dist/modules/css/CssLayer.d.ts +20 -0
- package/dist/modules/css/CssLayer.d.ts.map +1 -0
- package/dist/modules/css/CssLayer.js +21 -0
- package/dist/modules/css/CssLayer.js.map +1 -0
- package/dist/modules/css/CssScoper.d.ts +31 -2
- package/dist/modules/css/CssScoper.d.ts.map +1 -1
- package/dist/modules/css/CssScoper.js +168 -79
- package/dist/modules/css/CssScoper.js.map +1 -1
- package/dist/modules/css/CssSelectorClassScanner.d.ts +25 -0
- package/dist/modules/css/CssSelectorClassScanner.d.ts.map +1 -0
- package/dist/modules/css/CssSelectorClassScanner.js +91 -0
- package/dist/modules/css/CssSelectorClassScanner.js.map +1 -0
- package/dist/modules/css/CssVarReferenceScanner.d.ts +16 -0
- package/dist/modules/css/CssVarReferenceScanner.d.ts.map +1 -0
- package/dist/modules/css/CssVarReferenceScanner.js +27 -0
- package/dist/modules/css/CssVarReferenceScanner.js.map +1 -0
- package/dist/modules/css/index.d.ts +9 -0
- package/dist/modules/css/index.d.ts.map +1 -1
- package/dist/modules/css/index.js +9 -0
- package/dist/modules/css/index.js.map +1 -1
- package/dist/modules/document/CssClass.d.ts +20 -0
- package/dist/modules/document/CssClass.d.ts.map +1 -0
- package/dist/modules/document/CssClass.js +21 -0
- package/dist/modules/document/CssClass.js.map +1 -0
- package/dist/modules/document/CssVariable.d.ts +21 -6
- package/dist/modules/document/CssVariable.d.ts.map +1 -1
- package/dist/modules/document/CssVariable.js +27 -5
- package/dist/modules/document/CssVariable.js.map +1 -1
- package/dist/modules/document/DataAttribute.d.ts +26 -0
- package/dist/modules/document/DataAttribute.d.ts.map +1 -0
- package/dist/modules/document/DataAttribute.js +27 -0
- package/dist/modules/document/DataAttribute.js.map +1 -0
- package/dist/modules/document/Decoration.d.ts +42 -0
- package/dist/modules/document/Decoration.d.ts.map +1 -0
- package/dist/modules/document/Decoration.js +52 -0
- package/dist/modules/document/Decoration.js.map +1 -0
- package/dist/modules/document/Document.d.ts.map +1 -1
- package/dist/modules/document/Document.js +0 -3
- package/dist/modules/document/Document.js.map +1 -1
- package/dist/modules/document/DocumentEditor.d.ts +51 -9
- package/dist/modules/document/DocumentEditor.d.ts.map +1 -1
- package/dist/modules/document/DocumentEditor.js +118 -26
- package/dist/modules/document/DocumentEditor.js.map +1 -1
- package/dist/modules/document/DocumentNodeId.d.ts +23 -0
- package/dist/modules/document/DocumentNodeId.d.ts.map +1 -0
- package/dist/modules/document/DocumentNodeId.js +31 -0
- package/dist/modules/document/DocumentNodeId.js.map +1 -0
- package/dist/modules/document/Line.d.ts +10 -7
- package/dist/modules/document/Line.d.ts.map +1 -1
- package/dist/modules/document/Line.js +13 -25
- package/dist/modules/document/Line.js.map +1 -1
- package/dist/modules/document/Section.d.ts +1 -8
- package/dist/modules/document/Section.d.ts.map +1 -1
- package/dist/modules/document/Section.js +4 -35
- package/dist/modules/document/Section.js.map +1 -1
- package/dist/modules/document/Segment.d.ts +24 -14
- package/dist/modules/document/Segment.d.ts.map +1 -1
- package/dist/modules/document/Segment.js +41 -23
- package/dist/modules/document/Segment.js.map +1 -1
- package/dist/modules/document/Word.d.ts +21 -8
- package/dist/modules/document/Word.d.ts.map +1 -1
- package/dist/modules/document/Word.js +34 -35
- package/dist/modules/document/Word.js.map +1 -1
- package/dist/modules/document/index.d.ts +5 -2
- package/dist/modules/document/index.d.ts.map +1 -1
- package/dist/modules/document/index.js +4 -1
- package/dist/modules/document/index.js.map +1 -1
- package/dist/modules/effect/CarryQuotesEffect.d.ts +1 -7
- package/dist/modules/effect/CarryQuotesEffect.d.ts.map +1 -1
- package/dist/modules/effect/CarryQuotesEffect.js +17 -30
- package/dist/modules/effect/CarryQuotesEffect.js.map +1 -1
- package/dist/modules/effect/GapFreeEffect.d.ts +15 -0
- package/dist/modules/effect/GapFreeEffect.d.ts.map +1 -1
- package/dist/modules/effect/GapFreeEffect.js +29 -4
- package/dist/modules/effect/GapFreeEffect.js.map +1 -1
- package/dist/modules/effect/RemovePunctuationEffect.d.ts +10 -2
- package/dist/modules/effect/RemovePunctuationEffect.d.ts.map +1 -1
- package/dist/modules/effect/RemovePunctuationEffect.js +26 -6
- package/dist/modules/effect/RemovePunctuationEffect.js.map +1 -1
- package/dist/modules/effect/SmartLowercaseEffect.d.ts +7 -6
- package/dist/modules/effect/SmartLowercaseEffect.d.ts.map +1 -1
- package/dist/modules/effect/SmartLowercaseEffect.js +11 -7
- package/dist/modules/effect/SmartLowercaseEffect.js.map +1 -1
- package/dist/modules/pipeline/RenderPipelineBuilder.d.ts +3 -3
- package/dist/modules/pipeline/RenderPipelineBuilder.d.ts.map +1 -1
- package/dist/modules/pipeline/RenderPipelineBuilder.js +13 -8
- package/dist/modules/pipeline/RenderPipelineBuilder.js.map +1 -1
- package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts +19 -25
- package/dist/modules/rendering/BrowserSubtitleFrameRenderer.d.ts.map +1 -1
- package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js +43 -717
- package/dist/modules/rendering/BrowserSubtitleFrameRenderer.js.map +1 -1
- package/dist/modules/rendering/HorizontalPlacementResolver.d.ts +27 -0
- package/dist/modules/rendering/HorizontalPlacementResolver.d.ts.map +1 -0
- package/dist/modules/rendering/HorizontalPlacementResolver.js +31 -0
- package/dist/modules/rendering/HorizontalPlacementResolver.js.map +1 -0
- package/dist/modules/rendering/SubtitleFrameRenderer.d.ts +10 -5
- package/dist/modules/rendering/SubtitleFrameRenderer.d.ts.map +1 -1
- package/dist/modules/rendering/index.d.ts +16 -8
- package/dist/modules/rendering/index.d.ts.map +1 -1
- package/dist/modules/rendering/index.js +8 -2
- package/dist/modules/rendering/index.js.map +1 -1
- package/dist/modules/rendering/styles/BaselineCssComposer.d.ts +41 -0
- package/dist/modules/rendering/styles/BaselineCssComposer.d.ts.map +1 -0
- package/dist/modules/rendering/styles/BaselineCssComposer.js +64 -0
- package/dist/modules/rendering/styles/BaselineCssComposer.js.map +1 -0
- package/dist/modules/rendering/styles/DecorationContainerBaselineCss.d.ts +7 -0
- package/dist/modules/rendering/styles/DecorationContainerBaselineCss.d.ts.map +1 -0
- package/dist/modules/rendering/styles/DecorationContainerBaselineCss.js +35 -0
- package/dist/modules/rendering/styles/DecorationContainerBaselineCss.js.map +1 -0
- package/dist/modules/rendering/styles/FrozenFrameCss.d.ts +28 -0
- package/dist/modules/rendering/styles/FrozenFrameCss.d.ts.map +1 -0
- package/dist/modules/rendering/styles/FrozenFrameCss.js +28 -0
- package/dist/modules/rendering/styles/FrozenFrameCss.js.map +1 -0
- package/dist/modules/rendering/styles/InlineStyleEmitter.d.ts +20 -0
- package/dist/modules/rendering/styles/InlineStyleEmitter.d.ts.map +1 -0
- package/dist/modules/rendering/styles/InlineStyleEmitter.js +44 -0
- package/dist/modules/rendering/styles/InlineStyleEmitter.js.map +1 -0
- package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.d.ts +15 -0
- package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.d.ts.map +1 -0
- package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.js +33 -0
- package/dist/modules/rendering/styles/SegmentPaddingCssRuleBuilder.js.map +1 -0
- package/dist/modules/rendering/{VideoFrameLayerClass.d.ts → styles/VideoFrameLayerBaselineCss.d.ts} +3 -10
- package/dist/modules/rendering/styles/VideoFrameLayerBaselineCss.d.ts.map +1 -0
- package/dist/modules/rendering/styles/VideoFrameLayerBaselineCss.js +15 -0
- package/dist/modules/rendering/styles/VideoFrameLayerBaselineCss.js.map +1 -0
- package/dist/modules/rendering/subtitle/AbstractAnim.d.ts +13 -0
- package/dist/modules/rendering/subtitle/AbstractAnim.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/AbstractAnim.js +2 -0
- package/dist/modules/rendering/subtitle/AbstractAnim.js.map +1 -0
- package/dist/modules/rendering/subtitle/ActiveRenderSession.d.ts +20 -0
- package/dist/modules/rendering/subtitle/ActiveRenderSession.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/ActiveRenderSession.js +31 -0
- package/dist/modules/rendering/subtitle/ActiveRenderSession.js.map +1 -0
- package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.d.ts +21 -0
- package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.js +46 -0
- package/dist/modules/rendering/subtitle/ActiveRenderSessionFactory.js.map +1 -0
- package/dist/modules/rendering/subtitle/AnimationProbe.d.ts +39 -0
- package/dist/modules/rendering/subtitle/AnimationProbe.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/AnimationProbe.js +203 -0
- package/dist/modules/rendering/subtitle/AnimationProbe.js.map +1 -0
- package/dist/modules/rendering/subtitle/AssetGroupBuilder.d.ts +15 -0
- package/dist/modules/rendering/subtitle/AssetGroupBuilder.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/AssetGroupBuilder.js +26 -0
- package/dist/modules/rendering/subtitle/AssetGroupBuilder.js.map +1 -0
- package/dist/modules/rendering/subtitle/BatchPlan.d.ts +32 -0
- package/dist/modules/rendering/subtitle/BatchPlan.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/BatchPlan.js +2 -0
- package/dist/modules/rendering/subtitle/BatchPlan.js.map +1 -0
- package/dist/modules/rendering/subtitle/BatchPlanner.d.ts +32 -0
- package/dist/modules/rendering/subtitle/BatchPlanner.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/BatchPlanner.js +93 -0
- package/dist/modules/rendering/subtitle/BatchPlanner.js.map +1 -0
- package/dist/modules/rendering/subtitle/PreparedStyle.d.ts +36 -0
- package/dist/modules/rendering/subtitle/PreparedStyle.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/PreparedStyle.js +2 -0
- package/dist/modules/rendering/subtitle/PreparedStyle.js.map +1 -0
- package/dist/modules/rendering/subtitle/PreparedStyleFactory.d.ts +31 -0
- package/dist/modules/rendering/subtitle/PreparedStyleFactory.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/PreparedStyleFactory.js +91 -0
- package/dist/modules/rendering/subtitle/PreparedStyleFactory.js.map +1 -0
- package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.d.ts +13 -0
- package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.js +24 -0
- package/dist/modules/rendering/subtitle/SegmentPaintRegionCache.js.map +1 -0
- package/dist/modules/rendering/{SegmentPaintRegionResolver.d.ts → subtitle/SegmentPaintRegionResolver.d.ts} +1 -1
- package/dist/modules/rendering/subtitle/SegmentPaintRegionResolver.d.ts.map +1 -0
- package/dist/modules/rendering/{SegmentPaintRegionResolver.js → subtitle/SegmentPaintRegionResolver.js} +7 -4
- package/dist/modules/rendering/subtitle/SegmentPaintRegionResolver.js.map +1 -0
- package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.d.ts +45 -0
- package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.js +50 -0
- package/dist/modules/rendering/subtitle/SegmentSubtreeDecomposer.js.map +1 -0
- package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.d.ts +108 -0
- package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.js +246 -0
- package/dist/modules/rendering/subtitle/SegmentSubtreeHtmlBuilder.js.map +1 -0
- package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.d.ts +40 -0
- package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.js +132 -0
- package/dist/modules/rendering/subtitle/SegmentWrapperRenderer.js.map +1 -0
- package/dist/modules/rendering/subtitle/SpriteSheetCompositor.d.ts +48 -0
- package/dist/modules/rendering/subtitle/SpriteSheetCompositor.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/SpriteSheetCompositor.js +143 -0
- package/dist/modules/rendering/subtitle/SpriteSheetCompositor.js.map +1 -0
- package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.d.ts +17 -0
- package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.js +58 -0
- package/dist/modules/rendering/subtitle/SpriteSheetSizeProber.js.map +1 -0
- package/dist/modules/rendering/subtitle/SvgFilterMaterializer.d.ts +20 -0
- package/dist/modules/rendering/subtitle/SvgFilterMaterializer.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/SvgFilterMaterializer.js +30 -0
- package/dist/modules/rendering/subtitle/SvgFilterMaterializer.js.map +1 -0
- package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.d.ts +42 -0
- package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.d.ts.map +1 -0
- package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.js +121 -0
- package/dist/modules/rendering/subtitle/VideoFrameVarsBuilder.js.map +1 -0
- package/dist/modules/rendering/types/AlignmentConfig.d.ts +33 -0
- package/dist/modules/rendering/types/AlignmentConfig.d.ts.map +1 -0
- package/dist/modules/rendering/types/AlignmentConfig.js +3 -0
- package/dist/modules/rendering/types/AlignmentConfig.js.map +1 -0
- package/dist/modules/rendering/types/BoxEdges.d.ts.map +1 -0
- package/dist/modules/rendering/types/BoxEdges.js.map +1 -0
- package/dist/modules/rendering/types/DecorationPlacementSide.d.ts +8 -0
- package/dist/modules/rendering/types/DecorationPlacementSide.d.ts.map +1 -0
- package/dist/modules/rendering/types/DecorationPlacementSide.js +2 -0
- package/dist/modules/rendering/types/DecorationPlacementSide.js.map +1 -0
- package/dist/modules/rendering/types/ElementRenderOverrides.d.ts +23 -0
- package/dist/modules/rendering/types/ElementRenderOverrides.d.ts.map +1 -0
- package/dist/modules/rendering/types/ElementRenderOverrides.js +52 -0
- package/dist/modules/rendering/types/ElementRenderOverrides.js.map +1 -0
- package/dist/modules/rendering/types/InlineStyleMap.d.ts.map +1 -0
- package/dist/modules/rendering/types/InlineStyleMap.js.map +1 -0
- package/dist/modules/rendering/{RenderingConfig.d.ts → types/RenderingConfig.d.ts} +8 -1
- package/dist/modules/rendering/types/RenderingConfig.d.ts.map +1 -0
- package/dist/modules/rendering/types/RenderingConfig.js.map +1 -0
- package/dist/modules/rendering/types/ScopedRenderOverride.d.ts +24 -0
- package/dist/modules/rendering/types/ScopedRenderOverride.d.ts.map +1 -0
- package/dist/modules/rendering/types/ScopedRenderOverride.js.map +1 -0
- package/dist/modules/rendering/types/VideoFrameSource.d.ts.map +1 -0
- package/dist/modules/rendering/types/VideoFrameSource.js.map +1 -0
- package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.d.ts +33 -0
- package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.d.ts.map +1 -0
- package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.js +100 -0
- package/dist/modules/splitting/BoundaryScoreLimitByCharsSegmentSplitter.js.map +1 -0
- package/dist/modules/splitting/FixedTailLineSplitter.d.ts +29 -0
- package/dist/modules/splitting/FixedTailLineSplitter.d.ts.map +1 -0
- package/dist/modules/splitting/FixedTailLineSplitter.js +43 -0
- package/dist/modules/splitting/FixedTailLineSplitter.js.map +1 -0
- package/dist/modules/splitting/index.d.ts +4 -0
- package/dist/modules/splitting/index.d.ts.map +1 -1
- package/dist/modules/splitting/index.js +2 -0
- package/dist/modules/splitting/index.js.map +1 -1
- package/dist/modules/subtitle-file/AssSubtitleFileSerializer.d.ts +53 -0
- package/dist/modules/subtitle-file/AssSubtitleFileSerializer.d.ts.map +1 -0
- package/dist/modules/subtitle-file/AssSubtitleFileSerializer.js +133 -0
- package/dist/modules/subtitle-file/AssSubtitleFileSerializer.js.map +1 -0
- package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.d.ts +20 -0
- package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.d.ts.map +1 -0
- package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.js +31 -0
- package/dist/modules/subtitle-file/SbvSubtitleFileSerializer.js.map +1 -0
- package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.d.ts +21 -0
- package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.d.ts.map +1 -0
- package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.js +33 -0
- package/dist/modules/subtitle-file/SrtSubtitleFileSerializer.js.map +1 -0
- package/dist/modules/subtitle-file/SubtitleCue.d.ts +18 -0
- package/dist/modules/subtitle-file/SubtitleCue.d.ts.map +1 -0
- package/dist/modules/subtitle-file/SubtitleCue.js +20 -0
- package/dist/modules/subtitle-file/SubtitleCue.js.map +1 -0
- package/dist/modules/subtitle-file/SubtitleCueBuilder.d.ts +38 -0
- package/dist/modules/subtitle-file/SubtitleCueBuilder.d.ts.map +1 -0
- package/dist/modules/subtitle-file/SubtitleCueBuilder.js +106 -0
- package/dist/modules/subtitle-file/SubtitleCueBuilder.js.map +1 -0
- package/dist/modules/subtitle-file/SubtitleFileJob.d.ts +17 -0
- package/dist/modules/subtitle-file/SubtitleFileJob.d.ts.map +1 -0
- package/dist/modules/subtitle-file/SubtitleFileJob.js +2 -0
- package/dist/modules/subtitle-file/SubtitleFileJob.js.map +1 -0
- package/dist/modules/subtitle-file/SubtitleFileSerializer.d.ts +36 -0
- package/dist/modules/subtitle-file/SubtitleFileSerializer.d.ts.map +1 -0
- package/dist/modules/subtitle-file/SubtitleFileSerializer.js +44 -0
- package/dist/modules/subtitle-file/SubtitleFileSerializer.js.map +1 -0
- package/dist/modules/subtitle-file/SubtitleGranularity.d.ts +11 -0
- package/dist/modules/subtitle-file/SubtitleGranularity.d.ts.map +1 -0
- package/dist/modules/subtitle-file/SubtitleGranularity.js +2 -0
- package/dist/modules/subtitle-file/SubtitleGranularity.js.map +1 -0
- package/dist/modules/subtitle-file/SubtitleRow.d.ts +11 -0
- package/dist/modules/subtitle-file/SubtitleRow.d.ts.map +1 -0
- package/dist/modules/subtitle-file/SubtitleRow.js +14 -0
- package/dist/modules/subtitle-file/SubtitleRow.js.map +1 -0
- package/dist/modules/subtitle-file/SubtitleToken.d.ts +13 -0
- package/dist/modules/subtitle-file/SubtitleToken.d.ts.map +1 -0
- package/dist/modules/subtitle-file/SubtitleToken.js +15 -0
- package/dist/modules/subtitle-file/SubtitleToken.js.map +1 -0
- package/dist/modules/subtitle-file/TextSubtitleFileSerializer.d.ts +19 -0
- package/dist/modules/subtitle-file/TextSubtitleFileSerializer.d.ts.map +1 -0
- package/dist/modules/subtitle-file/TextSubtitleFileSerializer.js +24 -0
- package/dist/modules/subtitle-file/TextSubtitleFileSerializer.js.map +1 -0
- package/dist/modules/subtitle-file/Timecode.d.ts +20 -0
- package/dist/modules/subtitle-file/Timecode.d.ts.map +1 -0
- package/dist/modules/subtitle-file/Timecode.js +32 -0
- package/dist/modules/subtitle-file/Timecode.js.map +1 -0
- package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.d.ts +22 -0
- package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.d.ts.map +1 -0
- package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.js +57 -0
- package/dist/modules/subtitle-file/TtmlSubtitleFileSerializer.js.map +1 -0
- package/dist/modules/subtitle-file/VttSubtitleFileSerializer.d.ts +21 -0
- package/dist/modules/subtitle-file/VttSubtitleFileSerializer.d.ts.map +1 -0
- package/dist/modules/subtitle-file/VttSubtitleFileSerializer.js +39 -0
- package/dist/modules/subtitle-file/VttSubtitleFileSerializer.js.map +1 -0
- package/dist/modules/subtitle-file/index.d.ts +10 -0
- package/dist/modules/subtitle-file/index.d.ts.map +1 -0
- package/dist/modules/subtitle-file/index.js +8 -0
- package/dist/modules/subtitle-file/index.js.map +1 -0
- package/dist/modules/svg-filter/SvgFilter.d.ts +8 -1
- package/dist/modules/svg-filter/SvgFilter.d.ts.map +1 -1
- package/dist/modules/svg-filter/SvgFilter.js +9 -1
- package/dist/modules/svg-filter/SvgFilter.js.map +1 -1
- package/dist/modules/svg-filter/SvgFilterDefinitionsParser.d.ts +1 -0
- package/dist/modules/svg-filter/SvgFilterDefinitionsParser.d.ts.map +1 -1
- package/dist/modules/svg-filter/SvgFilterDefinitionsParser.js +9 -1
- package/dist/modules/svg-filter/SvgFilterDefinitionsParser.js.map +1 -1
- package/dist/modules/svg-filter/SvgFilterDefsRenderer.d.ts +44 -0
- package/dist/modules/svg-filter/SvgFilterDefsRenderer.d.ts.map +1 -0
- package/dist/modules/svg-filter/SvgFilterDefsRenderer.js +47 -0
- package/dist/modules/svg-filter/SvgFilterDefsRenderer.js.map +1 -0
- package/dist/modules/svg-filter/index.d.ts +2 -0
- package/dist/modules/svg-filter/index.d.ts.map +1 -1
- package/dist/modules/svg-filter/index.js +1 -0
- package/dist/modules/svg-filter/index.js.map +1 -1
- package/dist/modules/tagging/PauseTagger.d.ts +24 -0
- package/dist/modules/tagging/PauseTagger.d.ts.map +1 -0
- package/dist/modules/tagging/PauseTagger.js +42 -0
- package/dist/modules/tagging/PauseTagger.js.map +1 -0
- package/dist/modules/tagging/RegexTagger.js +1 -1
- package/dist/modules/tagging/RegexTagger.js.map +1 -1
- package/dist/modules/tagging/SpanTagger.js +1 -1
- package/dist/modules/tagging/SpanTagger.js.map +1 -1
- package/dist/modules/tagging/StructureTagger.d.ts +1 -2
- package/dist/modules/tagging/StructureTagger.d.ts.map +1 -1
- package/dist/modules/tagging/StructureTagger.js +12 -11
- package/dist/modules/tagging/StructureTagger.js.map +1 -1
- package/dist/modules/tagging/WordlistTagger.js +1 -1
- package/dist/modules/tagging/WordlistTagger.js.map +1 -1
- package/dist/modules/tagging/index.d.ts +2 -0
- package/dist/modules/tagging/index.d.ts.map +1 -1
- package/dist/modules/tagging/index.js +1 -0
- package/dist/modules/tagging/index.js.map +1 -1
- package/dist/modules/tags/AndTagCondition.d.ts +10 -0
- package/dist/modules/tags/AndTagCondition.d.ts.map +1 -0
- package/dist/modules/tags/AndTagCondition.js +14 -0
- package/dist/modules/tags/AndTagCondition.js.map +1 -0
- package/dist/modules/tags/HasTagCondition.d.ts +10 -0
- package/dist/modules/tags/HasTagCondition.d.ts.map +1 -0
- package/dist/modules/tags/HasTagCondition.js +18 -0
- package/dist/modules/tags/HasTagCondition.js.map +1 -0
- package/dist/modules/tags/NotTagCondition.d.ts +10 -0
- package/dist/modules/tags/NotTagCondition.d.ts.map +1 -0
- package/dist/modules/tags/NotTagCondition.js +14 -0
- package/dist/modules/tags/NotTagCondition.js.map +1 -0
- package/dist/modules/tags/OrTagCondition.d.ts +10 -0
- package/dist/modules/tags/OrTagCondition.d.ts.map +1 -0
- package/dist/modules/tags/OrTagCondition.js +14 -0
- package/dist/modules/tags/OrTagCondition.js.map +1 -0
- package/dist/modules/{document/Tag.d.ts → tags/StructureTag.d.ts} +4 -10
- package/dist/modules/tags/StructureTag.d.ts.map +1 -0
- package/dist/modules/{document/Tag.js → tags/StructureTag.js} +4 -19
- package/dist/modules/tags/StructureTag.js.map +1 -0
- package/dist/modules/tags/Tag.d.ts +8 -0
- package/dist/modules/tags/Tag.d.ts.map +1 -0
- package/dist/modules/tags/Tag.js +16 -0
- package/dist/modules/tags/Tag.js.map +1 -0
- package/dist/modules/tags/TagCondition.d.ts +12 -0
- package/dist/modules/tags/TagCondition.d.ts.map +1 -0
- package/dist/modules/tags/TagCondition.js +2 -0
- package/dist/modules/tags/TagCondition.js.map +1 -0
- package/dist/modules/tags/TagConditionParser.d.ts +21 -0
- package/dist/modules/tags/TagConditionParser.d.ts.map +1 -0
- package/dist/modules/tags/TagConditionParser.js +75 -0
- package/dist/modules/tags/TagConditionParser.js.map +1 -0
- package/dist/modules/tags/index.d.ts +9 -0
- package/dist/modules/tags/index.d.ts.map +1 -0
- package/dist/modules/tags/index.js +8 -0
- package/dist/modules/tags/index.js.map +1 -0
- package/dist/modules/transcription/AudioDecoder.d.ts +9 -4
- package/dist/modules/transcription/AudioDecoder.d.ts.map +1 -1
- package/dist/modules/transcription/BatchedMonoResampler.d.ts +45 -0
- package/dist/modules/transcription/BatchedMonoResampler.d.ts.map +1 -0
- package/dist/modules/transcription/BatchedMonoResampler.js +116 -0
- package/dist/modules/transcription/BatchedMonoResampler.js.map +1 -0
- package/dist/modules/transcription/CacheStorageModelFileCache.d.ts +38 -0
- package/dist/modules/transcription/CacheStorageModelFileCache.d.ts.map +1 -0
- package/dist/modules/transcription/CacheStorageModelFileCache.js +86 -0
- package/dist/modules/transcription/CacheStorageModelFileCache.js.map +1 -0
- package/dist/modules/transcription/CueDocumentBuilder.d.ts +40 -0
- package/dist/modules/transcription/CueDocumentBuilder.d.ts.map +1 -0
- package/dist/modules/transcription/CueDocumentBuilder.js +77 -0
- package/dist/modules/transcription/CueDocumentBuilder.js.map +1 -0
- package/dist/modules/transcription/CueParseResult.d.ts +16 -0
- package/dist/modules/transcription/CueParseResult.d.ts.map +1 -0
- package/dist/modules/transcription/CueParseResult.js +2 -0
- package/dist/modules/transcription/CueParseResult.js.map +1 -0
- package/dist/modules/transcription/CueTextTokenizer.d.ts +10 -0
- package/dist/modules/transcription/CueTextTokenizer.d.ts.map +1 -0
- package/dist/modules/transcription/CueTextTokenizer.js +21 -0
- package/dist/modules/transcription/CueTextTokenizer.js.map +1 -0
- package/dist/modules/transcription/CueTimecodeReader.d.ts +19 -0
- package/dist/modules/transcription/CueTimecodeReader.d.ts.map +1 -0
- package/dist/modules/transcription/CueTimecodeReader.js +45 -0
- package/dist/modules/transcription/CueTimecodeReader.js.map +1 -0
- package/dist/modules/transcription/CueWordReader.d.ts +12 -0
- package/dist/modules/transcription/CueWordReader.d.ts.map +1 -0
- package/dist/modules/transcription/CueWordReader.js +2 -0
- package/dist/modules/transcription/CueWordReader.js.map +1 -0
- package/dist/modules/transcription/EstimatedCueWordReader.d.ts +16 -0
- package/dist/modules/transcription/EstimatedCueWordReader.d.ts.map +1 -0
- package/dist/modules/transcription/EstimatedCueWordReader.js +17 -0
- package/dist/modules/transcription/EstimatedCueWordReader.js.map +1 -0
- package/dist/modules/transcription/LogitsProcessorListFactory.d.ts +43 -0
- package/dist/modules/transcription/LogitsProcessorListFactory.d.ts.map +1 -0
- package/dist/modules/transcription/LogitsProcessorListFactory.js +72 -0
- package/dist/modules/transcription/LogitsProcessorListFactory.js.map +1 -0
- package/dist/modules/transcription/MediaBunnyAudioDecoder.d.ts +27 -0
- package/dist/modules/transcription/MediaBunnyAudioDecoder.d.ts.map +1 -0
- package/dist/modules/transcription/MediaBunnyAudioDecoder.js +76 -0
- package/dist/modules/transcription/MediaBunnyAudioDecoder.js.map +1 -0
- package/dist/modules/transcription/ModelFileCache.d.ts +20 -0
- package/dist/modules/transcription/ModelFileCache.d.ts.map +1 -0
- package/dist/modules/transcription/ModelFileCache.js +2 -0
- package/dist/modules/transcription/ModelFileCache.js.map +1 -0
- package/dist/modules/transcription/ModelFileCacheUnavailableError.d.ts +18 -0
- package/dist/modules/transcription/ModelFileCacheUnavailableError.d.ts.map +1 -0
- package/dist/modules/transcription/ModelFileCacheUnavailableError.js +18 -0
- package/dist/modules/transcription/ModelFileCacheUnavailableError.js.map +1 -0
- package/dist/modules/transcription/SrtTranscriber.d.ts +24 -15
- package/dist/modules/transcription/SrtTranscriber.d.ts.map +1 -1
- package/dist/modules/transcription/SrtTranscriber.js +32 -90
- package/dist/modules/transcription/SrtTranscriber.js.map +1 -1
- package/dist/modules/transcription/SubtitleFileUnreadableError.d.ts +22 -0
- package/dist/modules/transcription/SubtitleFileUnreadableError.d.ts.map +1 -0
- package/dist/modules/transcription/SubtitleFileUnreadableError.js +22 -0
- package/dist/modules/transcription/SubtitleFileUnreadableError.js.map +1 -0
- package/dist/modules/transcription/TimestampedCueWordReader.d.ts +27 -0
- package/dist/modules/transcription/TimestampedCueWordReader.d.ts.map +1 -0
- package/dist/modules/transcription/TimestampedCueWordReader.js +52 -0
- package/dist/modules/transcription/TimestampedCueWordReader.js.map +1 -0
- package/dist/modules/transcription/Transcriber.d.ts +13 -0
- package/dist/modules/transcription/Transcriber.d.ts.map +1 -1
- package/dist/modules/transcription/TransformersRuntime.d.ts +50 -0
- package/dist/modules/transcription/TransformersRuntime.d.ts.map +1 -0
- package/dist/modules/transcription/TransformersRuntime.js +79 -0
- package/dist/modules/transcription/TransformersRuntime.js.map +1 -0
- package/dist/modules/transcription/VttTranscriber.d.ts +46 -0
- package/dist/modules/transcription/VttTranscriber.d.ts.map +1 -0
- package/dist/modules/transcription/VttTranscriber.js +80 -0
- package/dist/modules/transcription/VttTranscriber.js.map +1 -0
- package/dist/modules/transcription/WhisperChunkStitcher.d.ts +51 -0
- package/dist/modules/transcription/WhisperChunkStitcher.d.ts.map +1 -0
- package/dist/modules/transcription/WhisperChunkStitcher.js +101 -0
- package/dist/modules/transcription/WhisperChunkStitcher.js.map +1 -0
- package/dist/modules/transcription/WhisperDeviceUnavailableError.d.ts +16 -0
- package/dist/modules/transcription/WhisperDeviceUnavailableError.d.ts.map +1 -0
- package/dist/modules/transcription/WhisperDeviceUnavailableError.js +16 -0
- package/dist/modules/transcription/WhisperDeviceUnavailableError.js.map +1 -0
- package/dist/modules/transcription/WhisperInferenceFailedError.d.ts +16 -0
- package/dist/modules/transcription/WhisperInferenceFailedError.d.ts.map +1 -0
- package/dist/modules/transcription/WhisperInferenceFailedError.js +16 -0
- package/dist/modules/transcription/WhisperInferenceFailedError.js.map +1 -0
- package/dist/modules/transcription/WhisperInferenceProgressTracker.d.ts +61 -0
- package/dist/modules/transcription/WhisperInferenceProgressTracker.d.ts.map +1 -0
- package/dist/modules/transcription/WhisperInferenceProgressTracker.js +102 -0
- package/dist/modules/transcription/WhisperInferenceProgressTracker.js.map +1 -0
- package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.d.ts +38 -0
- package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.d.ts.map +1 -0
- package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.js +94 -0
- package/dist/modules/transcription/WhisperLoopAbortLogitsProcessor.js.map +1 -0
- package/dist/modules/transcription/WhisperModelLoadFailedError.d.ts +15 -0
- package/dist/modules/transcription/WhisperModelLoadFailedError.d.ts.map +1 -0
- package/dist/modules/transcription/WhisperModelLoadFailedError.js +15 -0
- package/dist/modules/transcription/WhisperModelLoadFailedError.js.map +1 -0
- package/dist/modules/transcription/WhisperTranscriber.d.ts +106 -7
- package/dist/modules/transcription/WhisperTranscriber.d.ts.map +1 -1
- package/dist/modules/transcription/WhisperTranscriber.js +312 -25
- package/dist/modules/transcription/WhisperTranscriber.js.map +1 -1
- package/dist/modules/transcription/WhisperWindowCoverage.d.ts +79 -0
- package/dist/modules/transcription/WhisperWindowCoverage.d.ts.map +1 -0
- package/dist/modules/transcription/WhisperWindowCoverage.js +129 -0
- package/dist/modules/transcription/WhisperWindowCoverage.js.map +1 -0
- package/dist/modules/transcription/WordTimingEstimator.d.ts +14 -0
- package/dist/modules/transcription/WordTimingEstimator.d.ts.map +1 -0
- package/dist/modules/transcription/WordTimingEstimator.js +33 -0
- package/dist/modules/transcription/WordTimingEstimator.js.map +1 -0
- package/dist/modules/transcription/index.d.ts +9 -2
- package/dist/modules/transcription/index.d.ts.map +1 -1
- package/dist/modules/transcription/index.js +6 -1
- package/dist/modules/transcription/index.js.map +1 -1
- package/dist/modules/video/RenderJob.d.ts +17 -0
- package/dist/modules/video/RenderJob.d.ts.map +1 -1
- package/dist/modules/video/RenderTimeMap.d.ts +50 -0
- package/dist/modules/video/RenderTimeMap.d.ts.map +1 -0
- package/dist/modules/video/RenderTimeMap.js +90 -0
- package/dist/modules/video/RenderTimeMap.js.map +1 -0
- package/dist/modules/video/index.d.ts +8 -1
- package/dist/modules/video/index.d.ts.map +1 -1
- package/dist/modules/video/index.js +4 -0
- package/dist/modules/video/index.js.map +1 -1
- package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.d.ts +102 -0
- package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.d.ts.map +1 -0
- package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.js +207 -0
- package/dist/modules/video/mediabunny/MediaBunnyTranscodeCoordinator.js.map +1 -0
- package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.d.ts +12 -52
- package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.d.ts.map +1 -1
- package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js +25 -190
- package/dist/modules/video/mediabunny/MediaBunnyVideoRenderer.js.map +1 -1
- package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.d.ts +7 -0
- package/dist/modules/video/mediabunny/audio/AudioTrackBridgeFactory.d.ts.map +1 -1
- package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.js +2 -2
- package/dist/modules/video/mediabunny/audio/DefaultAudioTrackBridgeFactory.js.map +1 -1
- package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.d.ts +2 -0
- package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.d.ts.map +1 -1
- package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.js +8 -2
- package/dist/modules/video/mediabunny/audio/PassthroughAudioTrackBridge.js.map +1 -1
- package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.d.ts +3 -0
- package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.d.ts.map +1 -1
- package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.js +9 -2
- package/dist/modules/video/mediabunny/audio/TranscodeAudioTrackBridge.js.map +1 -1
- package/dist/modules/video/mediabunny/codec/CodecPolicy.d.ts +7 -0
- package/dist/modules/video/mediabunny/codec/CodecPolicy.d.ts.map +1 -1
- package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts +4 -2
- package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.d.ts.map +1 -1
- package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js +33 -23
- package/dist/modules/video/mediabunny/frame/CurrentFrameVideoSource.js.map +1 -1
- package/dist/modules/video/mediabunny/frame/FrameCompositor.d.ts +9 -2
- package/dist/modules/video/mediabunny/frame/FrameCompositor.d.ts.map +1 -1
- package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.d.ts +5 -2
- package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.d.ts.map +1 -1
- package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.js +8 -2
- package/dist/modules/video/mediabunny/frame/LayeredFrameCompositor.js.map +1 -1
- package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.d.ts +35 -0
- package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.d.ts.map +1 -0
- package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.js +69 -0
- package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainter.js.map +1 -0
- package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.d.ts +23 -0
- package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.d.ts.map +1 -0
- package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.js +23 -0
- package/dist/modules/video/mediabunny/painter/CaptionsOverlayFramePainterFactory.js.map +1 -0
- package/dist/modules/video/mediabunny/painter/FramePainter.d.ts +46 -0
- package/dist/modules/video/mediabunny/painter/FramePainter.d.ts.map +1 -0
- package/dist/modules/video/mediabunny/painter/FramePainter.js +2 -0
- package/dist/modules/video/mediabunny/painter/FramePainter.js.map +1 -0
- package/dist/modules/video/mediabunny/painter/TopLayerSource.d.ts +24 -0
- package/dist/modules/video/mediabunny/painter/TopLayerSource.d.ts.map +1 -0
- package/dist/modules/video/mediabunny/painter/TopLayerSource.js +2 -0
- package/dist/modules/video/mediabunny/painter/TopLayerSource.js.map +1 -0
- package/package.json +13 -10
- package/dist/modules/document/Tag.d.ts.map +0 -1
- package/dist/modules/document/Tag.js.map +0 -1
- package/dist/modules/rendering/AlignmentConfig.d.ts +0 -21
- package/dist/modules/rendering/AlignmentConfig.d.ts.map +0 -1
- package/dist/modules/rendering/AlignmentConfig.js +0 -2
- package/dist/modules/rendering/AlignmentConfig.js.map +0 -1
- package/dist/modules/rendering/BoxEdges.d.ts.map +0 -1
- package/dist/modules/rendering/BoxEdges.js.map +0 -1
- package/dist/modules/rendering/ElementRenderOverrides.d.ts +0 -15
- package/dist/modules/rendering/ElementRenderOverrides.d.ts.map +0 -1
- package/dist/modules/rendering/ElementRenderOverrides.js +0 -24
- package/dist/modules/rendering/ElementRenderOverrides.js.map +0 -1
- package/dist/modules/rendering/InlineStyleMap.d.ts.map +0 -1
- package/dist/modules/rendering/InlineStyleMap.js.map +0 -1
- package/dist/modules/rendering/RenderingConfig.d.ts.map +0 -1
- package/dist/modules/rendering/RenderingConfig.js.map +0 -1
- package/dist/modules/rendering/ScopedRenderOverride.d.ts +0 -19
- package/dist/modules/rendering/ScopedRenderOverride.d.ts.map +0 -1
- package/dist/modules/rendering/ScopedRenderOverride.js.map +0 -1
- package/dist/modules/rendering/SegmentPaintRegionResolver.d.ts.map +0 -1
- package/dist/modules/rendering/SegmentPaintRegionResolver.js.map +0 -1
- package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.d.ts +0 -58
- package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.d.ts.map +0 -1
- package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.js +0 -132
- package/dist/modules/rendering/SegmentSubtreeHtmlBuilder.js.map +0 -1
- package/dist/modules/rendering/VideoFrameLayerClass.d.ts.map +0 -1
- package/dist/modules/rendering/VideoFrameLayerClass.js +0 -21
- package/dist/modules/rendering/VideoFrameLayerClass.js.map +0 -1
- package/dist/modules/rendering/VideoFrameSource.d.ts.map +0 -1
- package/dist/modules/rendering/VideoFrameSource.js.map +0 -1
- package/dist/modules/transcription/BrowserAudioDecoder.d.ts +0 -13
- package/dist/modules/transcription/BrowserAudioDecoder.d.ts.map +0 -1
- package/dist/modules/transcription/BrowserAudioDecoder.js +0 -34
- package/dist/modules/transcription/BrowserAudioDecoder.js.map +0 -1
- /package/dist/modules/rendering/{BoxEdges.d.ts → types/BoxEdges.d.ts} +0 -0
- /package/dist/modules/rendering/{BoxEdges.js → types/BoxEdges.js} +0 -0
- /package/dist/modules/rendering/{InlineStyleMap.d.ts → types/InlineStyleMap.d.ts} +0 -0
- /package/dist/modules/rendering/{InlineStyleMap.js → types/InlineStyleMap.js} +0 -0
- /package/dist/modules/rendering/{RenderingConfig.js → types/RenderingConfig.js} +0 -0
- /package/dist/modules/rendering/{ScopedRenderOverride.js → types/ScopedRenderOverride.js} +0 -0
- /package/dist/modules/rendering/{VideoFrameSource.d.ts → types/VideoFrameSource.d.ts} +0 -0
- /package/dist/modules/rendering/{VideoFrameSource.js → types/VideoFrameSource.js} +0 -0
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turns Whisper's chunk-relative timestamp stream into a monotonic
|
|
3
|
+
* fraction of the inference work done so far, in
|
|
4
|
+
* `[0, MAX_STREAMING_FRACTION]`.
|
|
5
|
+
*
|
|
6
|
+
* The transformers.js pipeline slices audio into fixed windows of
|
|
7
|
+
* `chunkLengthSeconds` and slides them by `chunkLengthSeconds - 2 *
|
|
8
|
+
* strideLengthSeconds`, decoding each window independently. Whisper's
|
|
9
|
+
* predicted timestamps restart at zero on every window, so a backward
|
|
10
|
+
* step in the observed stream is treated as the boundary between two
|
|
11
|
+
* pipeline windows. Small backward jitter *within* a window (the
|
|
12
|
+
* decoder occasionally re-emits an earlier timestamp) is tolerated up
|
|
13
|
+
* to `INTRA_CHUNK_TOLERANCE_SECONDS`.
|
|
14
|
+
*
|
|
15
|
+
* Progress is measured against the audio each window decodes, not
|
|
16
|
+
* against the position reached in the source. Consecutive windows
|
|
17
|
+
* overlap by `2 * strideLengthSeconds`, and that overlap is decoded
|
|
18
|
+
* twice: a position-based fraction cannot advance until a new window
|
|
19
|
+
* has re-decoded everything the previous one already covered, which
|
|
20
|
+
* shows up as the bar sitting frozen for the first third of every
|
|
21
|
+
* window. Counting each window's own audio makes the fraction track
|
|
22
|
+
* the decoder's actual cost instead.
|
|
23
|
+
*
|
|
24
|
+
* The returned fraction never decreases and never reaches `1`:
|
|
25
|
+
* Whisper still runs a word-timestamp post-processing pass after the
|
|
26
|
+
* last streamed segment, so a strictly-below-one ceiling leaves room
|
|
27
|
+
* for the caller to emit the terminal `1` from outside the streamer
|
|
28
|
+
* once the whole call actually completes.
|
|
29
|
+
*/
|
|
30
|
+
export declare class WhisperInferenceProgressTracker {
|
|
31
|
+
private static readonly INTRA_CHUNK_TOLERANCE_SECONDS;
|
|
32
|
+
private static readonly MAX_STREAMING_FRACTION;
|
|
33
|
+
private readonly windowSeconds;
|
|
34
|
+
private readonly totalWorkSeconds;
|
|
35
|
+
private readonly windowAdvanceSeconds;
|
|
36
|
+
private currentWindowIndex;
|
|
37
|
+
private workBeforeCurrentWindow;
|
|
38
|
+
private lastReportedChunkTime;
|
|
39
|
+
private lastFraction;
|
|
40
|
+
constructor(durationSeconds: number, chunkLengthSeconds: number, strideLengthSeconds: number);
|
|
41
|
+
/** The audio each pipeline window decodes, in window order. */
|
|
42
|
+
get windowLayout(): readonly number[];
|
|
43
|
+
/** How far the pipeline slides between consecutive windows, in seconds. */
|
|
44
|
+
get advanceSeconds(): number;
|
|
45
|
+
/**
|
|
46
|
+
* Feeds a chunk-relative timestamp and returns the resulting monotonic
|
|
47
|
+
* progress fraction over the whole inference.
|
|
48
|
+
*/
|
|
49
|
+
observeChunkEnd(timeWithinChunk: number): number;
|
|
50
|
+
/**
|
|
51
|
+
* Reproduces the window layout the transformers.js ASR pipeline builds
|
|
52
|
+
* for this audio, as the amount of audio each window carries. The last
|
|
53
|
+
* window is short whenever the audio does not end on a window boundary.
|
|
54
|
+
*/
|
|
55
|
+
private measureWindows;
|
|
56
|
+
private isNewPipelineWindow;
|
|
57
|
+
private advanceWindow;
|
|
58
|
+
private currentWindowSeconds;
|
|
59
|
+
private fractionAt;
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=WhisperInferenceProgressTracker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhisperInferenceProgressTracker.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/WhisperInferenceProgressTracker.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,qBAAa,+BAA+B;IAC1C,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,6BAA6B,CAAK;IAC1D,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAQ;IAEtD,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAW;IACzC,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAE9C,OAAO,CAAC,kBAAkB,CAAK;IAC/B,OAAO,CAAC,uBAAuB,CAAK;IACpC,OAAO,CAAC,qBAAqB,CAAK;IAClC,OAAO,CAAC,YAAY,CAAK;gBAGvB,eAAe,EAAE,MAAM,EACvB,kBAAkB,EAAE,MAAM,EAC1B,mBAAmB,EAAE,MAAM;IAO7B,+DAA+D;IAC/D,IAAI,YAAY,IAAI,SAAS,MAAM,EAAE,CAEpC;IAED,2EAA2E;IAC3E,IAAI,cAAc,IAAI,MAAM,CAE3B;IAED;;;OAGG;IACH,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,MAAM;IAShD;;;;OAIG;IACH,OAAO,CAAC,cAAc;IAYtB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,aAAa;IAMrB,OAAO,CAAC,oBAAoB;IAI5B,OAAO,CAAC,UAAU;CAMnB"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Turns Whisper's chunk-relative timestamp stream into a monotonic
|
|
3
|
+
* fraction of the inference work done so far, in
|
|
4
|
+
* `[0, MAX_STREAMING_FRACTION]`.
|
|
5
|
+
*
|
|
6
|
+
* The transformers.js pipeline slices audio into fixed windows of
|
|
7
|
+
* `chunkLengthSeconds` and slides them by `chunkLengthSeconds - 2 *
|
|
8
|
+
* strideLengthSeconds`, decoding each window independently. Whisper's
|
|
9
|
+
* predicted timestamps restart at zero on every window, so a backward
|
|
10
|
+
* step in the observed stream is treated as the boundary between two
|
|
11
|
+
* pipeline windows. Small backward jitter *within* a window (the
|
|
12
|
+
* decoder occasionally re-emits an earlier timestamp) is tolerated up
|
|
13
|
+
* to `INTRA_CHUNK_TOLERANCE_SECONDS`.
|
|
14
|
+
*
|
|
15
|
+
* Progress is measured against the audio each window decodes, not
|
|
16
|
+
* against the position reached in the source. Consecutive windows
|
|
17
|
+
* overlap by `2 * strideLengthSeconds`, and that overlap is decoded
|
|
18
|
+
* twice: a position-based fraction cannot advance until a new window
|
|
19
|
+
* has re-decoded everything the previous one already covered, which
|
|
20
|
+
* shows up as the bar sitting frozen for the first third of every
|
|
21
|
+
* window. Counting each window's own audio makes the fraction track
|
|
22
|
+
* the decoder's actual cost instead.
|
|
23
|
+
*
|
|
24
|
+
* The returned fraction never decreases and never reaches `1`:
|
|
25
|
+
* Whisper still runs a word-timestamp post-processing pass after the
|
|
26
|
+
* last streamed segment, so a strictly-below-one ceiling leaves room
|
|
27
|
+
* for the caller to emit the terminal `1` from outside the streamer
|
|
28
|
+
* once the whole call actually completes.
|
|
29
|
+
*/
|
|
30
|
+
export class WhisperInferenceProgressTracker {
|
|
31
|
+
static INTRA_CHUNK_TOLERANCE_SECONDS = 1;
|
|
32
|
+
static MAX_STREAMING_FRACTION = 0.95;
|
|
33
|
+
windowSeconds;
|
|
34
|
+
totalWorkSeconds;
|
|
35
|
+
windowAdvanceSeconds;
|
|
36
|
+
currentWindowIndex = 0;
|
|
37
|
+
workBeforeCurrentWindow = 0;
|
|
38
|
+
lastReportedChunkTime = 0;
|
|
39
|
+
lastFraction = 0;
|
|
40
|
+
constructor(durationSeconds, chunkLengthSeconds, strideLengthSeconds) {
|
|
41
|
+
this.windowAdvanceSeconds = Math.max(1, chunkLengthSeconds - 2 * strideLengthSeconds);
|
|
42
|
+
this.windowSeconds = this.measureWindows(durationSeconds, chunkLengthSeconds);
|
|
43
|
+
this.totalWorkSeconds = this.windowSeconds.reduce((total, seconds) => total + seconds, 0);
|
|
44
|
+
}
|
|
45
|
+
/** The audio each pipeline window decodes, in window order. */
|
|
46
|
+
get windowLayout() {
|
|
47
|
+
return this.windowSeconds;
|
|
48
|
+
}
|
|
49
|
+
/** How far the pipeline slides between consecutive windows, in seconds. */
|
|
50
|
+
get advanceSeconds() {
|
|
51
|
+
return this.windowAdvanceSeconds;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Feeds a chunk-relative timestamp and returns the resulting monotonic
|
|
55
|
+
* progress fraction over the whole inference.
|
|
56
|
+
*/
|
|
57
|
+
observeChunkEnd(timeWithinChunk) {
|
|
58
|
+
if (this.isNewPipelineWindow(timeWithinChunk)) {
|
|
59
|
+
this.advanceWindow();
|
|
60
|
+
}
|
|
61
|
+
this.lastReportedChunkTime = timeWithinChunk;
|
|
62
|
+
this.lastFraction = Math.max(this.lastFraction, this.fractionAt(timeWithinChunk));
|
|
63
|
+
return this.lastFraction;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* Reproduces the window layout the transformers.js ASR pipeline builds
|
|
67
|
+
* for this audio, as the amount of audio each window carries. The last
|
|
68
|
+
* window is short whenever the audio does not end on a window boundary.
|
|
69
|
+
*/
|
|
70
|
+
measureWindows(durationSeconds, chunkLengthSeconds) {
|
|
71
|
+
const advance = this.windowAdvanceSeconds;
|
|
72
|
+
const windows = [];
|
|
73
|
+
for (let start = 0;; start += advance) {
|
|
74
|
+
windows.push(Math.min(chunkLengthSeconds, durationSeconds - start));
|
|
75
|
+
if (start + chunkLengthSeconds >= durationSeconds)
|
|
76
|
+
return windows;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
isNewPipelineWindow(timeWithinChunk) {
|
|
80
|
+
const tolerance = WhisperInferenceProgressTracker.INTRA_CHUNK_TOLERANCE_SECONDS;
|
|
81
|
+
return timeWithinChunk < this.lastReportedChunkTime - tolerance;
|
|
82
|
+
}
|
|
83
|
+
// Whisper can report more boundaries than the layout predicts; staying on
|
|
84
|
+
// the last window keeps the fraction below its ceiling instead of overshooting.
|
|
85
|
+
advanceWindow() {
|
|
86
|
+
if (this.currentWindowIndex >= this.windowSeconds.length - 1)
|
|
87
|
+
return;
|
|
88
|
+
this.workBeforeCurrentWindow += this.currentWindowSeconds();
|
|
89
|
+
this.currentWindowIndex += 1;
|
|
90
|
+
}
|
|
91
|
+
currentWindowSeconds() {
|
|
92
|
+
return this.windowSeconds[this.currentWindowIndex] ?? 0;
|
|
93
|
+
}
|
|
94
|
+
fractionAt(timeWithinChunk) {
|
|
95
|
+
if (this.totalWorkSeconds <= 0)
|
|
96
|
+
return 0;
|
|
97
|
+
const workWithinWindow = Math.min(Math.max(timeWithinChunk, 0), this.currentWindowSeconds());
|
|
98
|
+
const fraction = (this.workBeforeCurrentWindow + workWithinWindow) / this.totalWorkSeconds;
|
|
99
|
+
return Math.min(WhisperInferenceProgressTracker.MAX_STREAMING_FRACTION, fraction);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=WhisperInferenceProgressTracker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhisperInferenceProgressTracker.js","sourceRoot":"","sources":["../../../src/modules/transcription/WhisperInferenceProgressTracker.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Tensor } from '@huggingface/transformers';
|
|
2
|
+
/**
|
|
3
|
+
* Cuts short a generation that has degenerated into a repetition loop.
|
|
4
|
+
*
|
|
5
|
+
* Detection: the tail of the generated sequence contains at least
|
|
6
|
+
* `MIN_FULL_PERIODS` verbatim repetitions of some unit AND spans at
|
|
7
|
+
* least `MIN_REPETITION_TOKENS` tokens. On detection every logit
|
|
8
|
+
* except end-of-sequence is forced to `-Infinity`, so the next step
|
|
9
|
+
* emits end-of-sequence and the generation stops without burning the
|
|
10
|
+
* rest of the token budget on garbage.
|
|
11
|
+
*
|
|
12
|
+
* The guard only ends generations early; it never alters the content
|
|
13
|
+
* of a healthy one.
|
|
14
|
+
*
|
|
15
|
+
* Deliberately not a subclass of the inference library's processor base.
|
|
16
|
+
* Extending it would make this file load the library, and none of the
|
|
17
|
+
* detection below needs anything from it — `apply` is the whole of it.
|
|
18
|
+
* A thin subclass built once the library is loaded adapts this to what
|
|
19
|
+
* the pipeline expects.
|
|
20
|
+
*/
|
|
21
|
+
export declare class WhisperLoopAbortLogitsProcessor {
|
|
22
|
+
private readonly endOfSequenceTokenId;
|
|
23
|
+
private fired;
|
|
24
|
+
constructor(endOfSequenceTokenId: number);
|
|
25
|
+
/**
|
|
26
|
+
* Inspects one generation step and, on a detected loop, rewrites the
|
|
27
|
+
* logits so the next token can only be end-of-sequence. Returns the
|
|
28
|
+
* same tensor it was given, rewritten in place or untouched.
|
|
29
|
+
*/
|
|
30
|
+
apply(inputIds: bigint[][], logits: Tensor): Tensor;
|
|
31
|
+
/** True when the guard fired since the previous call; reading resets it. */
|
|
32
|
+
consumeFired(): boolean;
|
|
33
|
+
private endsInRepetitionLoop;
|
|
34
|
+
private detectionWindowFor;
|
|
35
|
+
private isPeriodic;
|
|
36
|
+
private forceEndOfSequence;
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=WhisperLoopAbortLogitsProcessor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhisperLoopAbortLogitsProcessor.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/WhisperLoopAbortLogitsProcessor.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,2BAA2B,CAAC;AAiBxD;;;;;;;;;;;;;;;;;;GAkBG;AACH,qBAAa,+BAA+B;IAG9B,OAAO,CAAC,QAAQ,CAAC,oBAAoB;IAFjD,OAAO,CAAC,KAAK,CAAS;gBAEO,oBAAoB,EAAE,MAAM;IAEzD;;;;OAIG;IACH,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM;IASnD,4EAA4E;IAC5E,YAAY,IAAI,OAAO;IAMvB,OAAO,CAAC,oBAAoB;IAc5B,OAAO,CAAC,kBAAkB;IAM1B,OAAO,CAAC,UAAU;IAOlB,OAAO,CAAC,kBAAkB;CAM3B"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
// Full repetitions the tail must show before the pattern is trusted as
|
|
2
|
+
// degenerate. Two verbatim repetitions of a phrase can be legitimate
|
|
3
|
+
// emphasis; five cannot realistically be. This is a floor — longer
|
|
4
|
+
// per-period windows still need at least this many repetitions.
|
|
5
|
+
const MIN_FULL_PERIODS = 5;
|
|
6
|
+
// Total token count the repeating tail must reach before it counts. Short
|
|
7
|
+
// repeated tails — a 3-word chorus repeated a handful of times, a hymn
|
|
8
|
+
// refrain — can be legitimate speech and stay below this bar. The
|
|
9
|
+
// combination `MIN_FULL_PERIODS` full periods AND `MIN_REPETITION_TOKENS`
|
|
10
|
+
// total tokens filters those out while still catching the multi-hundred-
|
|
11
|
+
// token degenerate loops Whisper falls into. This is a floor on total
|
|
12
|
+
// length, not a cap on period size.
|
|
13
|
+
const MIN_REPETITION_TOKENS = 50;
|
|
14
|
+
/**
|
|
15
|
+
* Cuts short a generation that has degenerated into a repetition loop.
|
|
16
|
+
*
|
|
17
|
+
* Detection: the tail of the generated sequence contains at least
|
|
18
|
+
* `MIN_FULL_PERIODS` verbatim repetitions of some unit AND spans at
|
|
19
|
+
* least `MIN_REPETITION_TOKENS` tokens. On detection every logit
|
|
20
|
+
* except end-of-sequence is forced to `-Infinity`, so the next step
|
|
21
|
+
* emits end-of-sequence and the generation stops without burning the
|
|
22
|
+
* rest of the token budget on garbage.
|
|
23
|
+
*
|
|
24
|
+
* The guard only ends generations early; it never alters the content
|
|
25
|
+
* of a healthy one.
|
|
26
|
+
*
|
|
27
|
+
* Deliberately not a subclass of the inference library's processor base.
|
|
28
|
+
* Extending it would make this file load the library, and none of the
|
|
29
|
+
* detection below needs anything from it — `apply` is the whole of it.
|
|
30
|
+
* A thin subclass built once the library is loaded adapts this to what
|
|
31
|
+
* the pipeline expects.
|
|
32
|
+
*/
|
|
33
|
+
export class WhisperLoopAbortLogitsProcessor {
|
|
34
|
+
endOfSequenceTokenId;
|
|
35
|
+
fired = false;
|
|
36
|
+
constructor(endOfSequenceTokenId) {
|
|
37
|
+
this.endOfSequenceTokenId = endOfSequenceTokenId;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Inspects one generation step and, on a detected loop, rewrites the
|
|
41
|
+
* logits so the next token can only be end-of-sequence. Returns the
|
|
42
|
+
* same tensor it was given, rewritten in place or untouched.
|
|
43
|
+
*/
|
|
44
|
+
apply(inputIds, logits) {
|
|
45
|
+
for (let batch = 0; batch < inputIds.length; batch++) {
|
|
46
|
+
if (!this.endsInRepetitionLoop(inputIds[batch] ?? []))
|
|
47
|
+
continue;
|
|
48
|
+
this.fired = true;
|
|
49
|
+
this.forceEndOfSequence(batch, logits);
|
|
50
|
+
}
|
|
51
|
+
return logits;
|
|
52
|
+
}
|
|
53
|
+
/** True when the guard fired since the previous call; reading resets it. */
|
|
54
|
+
consumeFired() {
|
|
55
|
+
const fired = this.fired;
|
|
56
|
+
this.fired = false;
|
|
57
|
+
return fired;
|
|
58
|
+
}
|
|
59
|
+
endsInRepetitionLoop(sequence) {
|
|
60
|
+
const maxPeriod = Math.floor(sequence.length / MIN_FULL_PERIODS);
|
|
61
|
+
for (let period = 1; period <= maxPeriod; period++) {
|
|
62
|
+
const windowSize = this.detectionWindowFor(period);
|
|
63
|
+
if (windowSize > sequence.length)
|
|
64
|
+
continue;
|
|
65
|
+
if (this.isPeriodic(sequence, sequence.length - windowSize, period))
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
return false;
|
|
69
|
+
}
|
|
70
|
+
// Smallest multiple of `period` that satisfies both floors: at least
|
|
71
|
+
// `MIN_FULL_PERIODS` full repetitions, and at least `MIN_REPETITION_TOKENS`
|
|
72
|
+
// total tokens. Rounding up to a multiple of `period` keeps `isPeriodic`
|
|
73
|
+
// aligned to full repetitions.
|
|
74
|
+
detectionWindowFor(period) {
|
|
75
|
+
const byPeriodFloor = period * MIN_FULL_PERIODS;
|
|
76
|
+
const byTokenFloor = period * Math.ceil(MIN_REPETITION_TOKENS / period);
|
|
77
|
+
return Math.max(byPeriodFloor, byTokenFloor);
|
|
78
|
+
}
|
|
79
|
+
isPeriodic(sequence, from, period) {
|
|
80
|
+
for (let i = from + period; i < sequence.length; i++) {
|
|
81
|
+
if (sequence[i] !== sequence[i - period])
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
return true;
|
|
85
|
+
}
|
|
86
|
+
forceEndOfSequence(batch, logits) {
|
|
87
|
+
const row = logits[batch];
|
|
88
|
+
if (!row)
|
|
89
|
+
return;
|
|
90
|
+
row.data.fill(-Infinity);
|
|
91
|
+
row.data[this.endOfSequenceTokenId] = 0;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=WhisperLoopAbortLogitsProcessor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhisperLoopAbortLogitsProcessor.js","sourceRoot":"","sources":["../../../src/modules/transcription/WhisperLoopAbortLogitsProcessor.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raised when preparing the Whisper pipeline fails — the model files
|
|
3
|
+
* could not be fetched, the runtime could not instantiate them, or an
|
|
4
|
+
* upstream library rejected the load for any other reason.
|
|
5
|
+
*
|
|
6
|
+
* The `.name` string is set explicitly, and exposed as `ERROR_NAME` on
|
|
7
|
+
* the class, so consumers can recognise the failure across a Worker
|
|
8
|
+
* boundary (where structured cloning preserves the string fields but
|
|
9
|
+
* not the class identity) with a single source of truth.
|
|
10
|
+
*/
|
|
11
|
+
export declare class WhisperModelLoadFailedError extends Error {
|
|
12
|
+
static readonly ERROR_NAME = "WhisperModelLoadFailedError";
|
|
13
|
+
readonly name = "WhisperModelLoadFailedError";
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=WhisperModelLoadFailedError.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhisperModelLoadFailedError.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/WhisperModelLoadFailedError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,qBAAa,2BAA4B,SAAQ,KAAK;IACpD,MAAM,CAAC,QAAQ,CAAC,UAAU,iCAAiC;IAC3D,QAAQ,CAAC,IAAI,iCAA0C;CACxD"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Raised when preparing the Whisper pipeline fails — the model files
|
|
3
|
+
* could not be fetched, the runtime could not instantiate them, or an
|
|
4
|
+
* upstream library rejected the load for any other reason.
|
|
5
|
+
*
|
|
6
|
+
* The `.name` string is set explicitly, and exposed as `ERROR_NAME` on
|
|
7
|
+
* the class, so consumers can recognise the failure across a Worker
|
|
8
|
+
* boundary (where structured cloning preserves the string fields but
|
|
9
|
+
* not the class identity) with a single source of truth.
|
|
10
|
+
*/
|
|
11
|
+
export class WhisperModelLoadFailedError extends Error {
|
|
12
|
+
static ERROR_NAME = 'WhisperModelLoadFailedError';
|
|
13
|
+
name = WhisperModelLoadFailedError.ERROR_NAME;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=WhisperModelLoadFailedError.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WhisperModelLoadFailedError.js","sourceRoot":"","sources":["../../../src/modules/transcription/WhisperModelLoadFailedError.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,MAAM,OAAO,2BAA4B,SAAQ,KAAK;IACpD,MAAM,CAAU,UAAU,GAAG,6BAA6B,CAAC;IAClD,IAAI,GAAG,2BAA2B,CAAC,UAAU,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { Document } from '../document/index';
|
|
2
2
|
import type { AudioDecoder } from '../transcription/AudioDecoder';
|
|
3
|
-
import type {
|
|
3
|
+
import type { ModelFileCache } from '../transcription/ModelFileCache';
|
|
4
|
+
import type { Transcriber, TranscriberOptions, TranscriberProgressEvent, UntranscribedRegion } from '../transcription/Transcriber';
|
|
4
5
|
export declare const WHISPER_SAMPLE_RATE = 16000;
|
|
5
|
-
export type WhisperModel = 'tiny' | 'base' | 'small' | 'distil-small.en' | 'distil-medium.en';
|
|
6
|
+
export type WhisperModel = 'tiny' | 'base' | 'small' | 'medium' | 'distil-small.en' | 'distil-medium.en';
|
|
6
7
|
export type WhisperDevice = 'auto' | 'wasm' | 'webgpu';
|
|
7
8
|
export interface WhisperTranscriberConfig {
|
|
8
9
|
model?: WhisperModel;
|
|
@@ -21,24 +22,122 @@ export interface WhisperTranscriberConfig {
|
|
|
21
22
|
* in a Web Worker (where browser audio APIs are unavailable) with a pre-
|
|
22
23
|
* decoded byte-stream decoder.
|
|
23
24
|
*
|
|
24
|
-
* Progress reporting is real-only
|
|
25
|
-
* download from HuggingFace
|
|
26
|
-
*
|
|
27
|
-
*
|
|
25
|
+
* Progress reporting is real-only for both stages. The loading stage
|
|
26
|
+
* tracks model weight download from HuggingFace. The inferring stage
|
|
27
|
+
* hooks a `WhisperTextStreamer` into `model.generate` so each
|
|
28
|
+
* pipeline-window boundary that Whisper predicts translates into an
|
|
29
|
+
* `[0, 1]` fraction of the audio processed so far. Clips short enough to
|
|
30
|
+
* fit in a single window emit no boundaries — the field stays at zero
|
|
31
|
+
* and the consumer can only render that as indeterminate.
|
|
32
|
+
*
|
|
33
|
+
* Coverage policy: every pipeline window's decoding is audited. A
|
|
34
|
+
* non-final window that ended by its own end-of-sequence but left
|
|
35
|
+
* audio before the next window's start gets one re-decode over real
|
|
36
|
+
* audio from that point. A window cut from outside — the repetition-
|
|
37
|
+
* loop guard or the token ceiling — is degenerate: its unclosed tail
|
|
38
|
+
* is dropped and its region is deliberately left untranscribed, never
|
|
39
|
+
* retried. A re-decode that degenerates too is discarded the same way.
|
|
40
|
+
* The final window is reported the same way when cut or stopped
|
|
41
|
+
* mid-segment; a clean close there is trusted as the end of speech.
|
|
28
42
|
*/
|
|
29
43
|
export declare class WhisperTranscriber implements Transcriber {
|
|
30
44
|
private readonly decoder;
|
|
31
45
|
private readonly model;
|
|
32
46
|
private readonly device;
|
|
47
|
+
private readonly chunkStitcher;
|
|
48
|
+
private readonly transformers;
|
|
49
|
+
private processorLists;
|
|
33
50
|
private pipelinePromise;
|
|
34
|
-
constructor(decoder: AudioDecoder, { model, device }?: WhisperTranscriberConfig);
|
|
51
|
+
constructor(decoder: AudioDecoder, { model, device }?: WhisperTranscriberConfig, modelFileCache?: ModelFileCache);
|
|
35
52
|
onProgress?: (event: TranscriberProgressEvent) => void;
|
|
53
|
+
onUntranscribedRegion?: (region: UntranscribedRegion) => void;
|
|
36
54
|
transcribe(audio: Blob, options?: TranscriberOptions): Promise<Document>;
|
|
55
|
+
/**
|
|
56
|
+
* Builds the progress tracker for this audio, or `null` when a single
|
|
57
|
+
* pipeline window covers everything — no window boundary is ever
|
|
58
|
+
* reported then, so the progress bar stays indeterminate.
|
|
59
|
+
*/
|
|
60
|
+
private buildProgressTracker;
|
|
61
|
+
/**
|
|
62
|
+
* Builds a `WhisperTextStreamer` that translates Whisper's per-window
|
|
63
|
+
* timestamp emissions into `[0, 1]` inference progress and feeds the
|
|
64
|
+
* per-window coverage record.
|
|
65
|
+
*
|
|
66
|
+
* `on_finalize` fires at the end of every `model.generate` call — one
|
|
67
|
+
* per pipeline window while the long-form layering stays opted out —
|
|
68
|
+
* which makes it the exact window delimiter the coverage record needs.
|
|
69
|
+
* It is deliberately not wired to progress: the terminal `progress: 1`
|
|
70
|
+
* can only come from the caller, after the whole call returns.
|
|
71
|
+
*/
|
|
72
|
+
private buildProgressStreamer;
|
|
73
|
+
/**
|
|
74
|
+
* Builds the anti-loop guard for a generation, or `null` when the
|
|
75
|
+
* model's end-of-sequence token cannot be located — the guard can
|
|
76
|
+
* only abort by forcing that token.
|
|
77
|
+
*/
|
|
78
|
+
private buildLoopGuard;
|
|
79
|
+
private loadPipelineOrFail;
|
|
80
|
+
private runInferenceOrFail;
|
|
81
|
+
/**
|
|
82
|
+
* Loads the pipeline once and reuses it for every later call.
|
|
83
|
+
*
|
|
84
|
+
* A failed load is *not* kept. The weights arrive over the network
|
|
85
|
+
* and the common failure is a transfer that dies partway, which the
|
|
86
|
+
* next attempt may well complete; caching the rejection would make
|
|
87
|
+
* every retry fail instantly without ever reaching the network
|
|
88
|
+
* again, leaving a reload as the only way out.
|
|
89
|
+
*/
|
|
37
90
|
private loadPipeline;
|
|
38
91
|
private resolveDevice;
|
|
39
92
|
private isWebGPUAvailable;
|
|
40
93
|
private buildPipelineOptions;
|
|
94
|
+
/**
|
|
95
|
+
* The factory is built from the loaded library, so it is reached
|
|
96
|
+
* through the same load the pipeline came from rather than held from
|
|
97
|
+
* construction. By the time any generation runs, that load is settled.
|
|
98
|
+
*/
|
|
99
|
+
private buildProcessorList;
|
|
41
100
|
private handleLoadProgress;
|
|
101
|
+
/**
|
|
102
|
+
* The audio regions the main pass left uncovered. Empty when the
|
|
103
|
+
* number of generation passes does not match the expected window
|
|
104
|
+
* layout — that means the underlying pipeline changed its long-form
|
|
105
|
+
* behaviour and per-window attribution can no longer be trusted.
|
|
106
|
+
*/
|
|
107
|
+
private detectUncoveredGaps;
|
|
108
|
+
/**
|
|
109
|
+
* Replaces the content of every uncovered gap. The main pass's words
|
|
110
|
+
* inside a gap come from tokens past their window's last closed
|
|
111
|
+
* segment — the same unclosed tail the reference Whisper decoder
|
|
112
|
+
* discards before re-decoding — so they are dropped. Dropping is safe
|
|
113
|
+
* because the word-timestamp alignment is monotonic in token order:
|
|
114
|
+
* no word of a closed segment lands past that segment's end.
|
|
115
|
+
*
|
|
116
|
+
* A rescuable gap gets one extra pass over real audio. A
|
|
117
|
+
* non-rescuable gap does not — its region is reported and left
|
|
118
|
+
* untranscribed rather than retried.
|
|
119
|
+
*/
|
|
120
|
+
private redecodeGaps;
|
|
121
|
+
private isInsideAnyGap;
|
|
122
|
+
/**
|
|
123
|
+
* Runs one extra decoding pass over a full window of real audio
|
|
124
|
+
* starting at the gap and keeps the words that fall inside it. Words
|
|
125
|
+
* past the gap's end are dropped — the next pipeline window already
|
|
126
|
+
* covers that region.
|
|
127
|
+
*
|
|
128
|
+
* Best-effort by design: the main transcription is already in hand, so
|
|
129
|
+
* a failed rescue logs and contributes nothing instead of failing the
|
|
130
|
+
* whole call.
|
|
131
|
+
*/
|
|
132
|
+
private rescueGap;
|
|
133
|
+
private reportUntranscribed;
|
|
134
|
+
/**
|
|
135
|
+
* Shifts slice-relative rescue chunks to absolute time and keeps the
|
|
136
|
+
* ones anchored inside the gap. A chunk with no usable timestamp
|
|
137
|
+
* cannot be placed and is dropped.
|
|
138
|
+
*/
|
|
139
|
+
private chunksWithinGap;
|
|
140
|
+
private mergeChunks;
|
|
42
141
|
private buildDocument;
|
|
43
142
|
}
|
|
44
143
|
//# sourceMappingURL=WhisperTranscriber.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WhisperTranscriber.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/WhisperTranscriber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAA8C,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"WhisperTranscriber.d.ts","sourceRoot":"","sources":["../../../src/modules/transcription/WhisperTranscriber.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAA8C,MAAM,yBAAyB,CAAC;AAE/F,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AACxE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAC5E,OAAO,KAAK,EACV,WAAW,EACX,kBAAkB,EAClB,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,oCAAoC,CAAC;AAU5C,eAAO,MAAM,mBAAmB,QAAS,CAAC;AAE1C,MAAM,MAAM,YAAY,GACpB,MAAM,GACN,MAAM,GACN,OAAO,GACP,QAAQ,GACR,iBAAiB,GACjB,kBAAkB,CAAC;AAEvB,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEvD,MAAM,WAAW,wBAAwB;IACvC,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,MAAM,CAAC,EAAE,aAAa,CAAC;CACxB;AA4FD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,qBAAa,kBAAmB,YAAW,WAAW;IASlD,OAAO,CAAC,QAAQ,CAAC,OAAO;IAR1B,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAe;IACrC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAgB;IACvC,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAuB;IACrD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAsB;IACnD,OAAO,CAAC,cAAc,CAA2C;IACjE,OAAO,CAAC,eAAe,CAA4C;gBAGhD,OAAO,EAAE,YAAY,EACtC,EAAE,KAAc,EAAE,MAAe,EAAE,GAAE,wBAA6B,EAClE,cAAc,CAAC,EAAE,cAAc;IASjC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,wBAAwB,KAAK,IAAI,CAAC;IACvD,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAExD,UAAU,CAAC,KAAK,EAAE,IAAI,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,QAAQ,CAAC;IAqB9E;;;;OAIG;IACH,OAAO,CAAC,oBAAoB;IAU5B;;;;;;;;;;OAUG;YACW,qBAAqB;IAuBnC;;;;OAIG;IACH,OAAO,CAAC,cAAc;YAeR,kBAAkB;YASlB,kBAAkB;IAoBhC;;;;;;;;OAQG;IACH,OAAO,CAAC,YAAY;YAyBN,aAAa;YAoBb,iBAAiB;YAWjB,oBAAoB;IAiBlC;;;;OAIG;YACW,kBAAkB;IAShC,OAAO,CAAC,kBAAkB;IAS1B;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;IAkB3B;;;;;;;;;;;OAWG;YACW,YAAY;IAuB1B,OAAO,CAAC,cAAc;IAMtB;;;;;;;;;OASG;YACW,SAAS;IAiCvB,OAAO,CAAC,mBAAmB;IAI3B;;;;OAIG;IACH,OAAO,CAAC,eAAe;IAevB,OAAO,CAAC,WAAW;IAMnB,OAAO,CAAC,aAAa;CAatB"}
|