@moonshine-ai/moonshine-js
    Preparing search index...

    Class VideoCaptioner

    Transcribes a <video> element, rendering the results as captions on the video.

    Hierarchy (View Summary)

    Index

    Constructors

    • Creates a transcriber that overlays transcription output as captions on a <video> element.

      Parameters

      • videoElement: HTMLVideoElement
      • modelURL: string
      • useVAD: boolean = false
      • wrapperStyle: Partial<CSSStyleDeclaration> = {}
      • captionsStyle: Partial<CSSStyleDeclaration> = {}
      • commitElementStyle: Partial<CSSStyleDeclaration> = {}
      • updateElementStyle: Partial<CSSStyleDeclaration> = {}
      • precision: string = "quantized"

      Returns VideoCaptioner

    Properties

    audioContext: AudioContext
    isActive: boolean = false

    Methods

    • Returns the most recent AudioBuffer that was input to the underlying model for text generation. This is useful in cases where we want to double-check the audio being input to the model while debugging.

      Parameters

      • buffer: Float32Array

      Returns AudioBuffer

      An AudioBuffer