SongGuess
    Preparing search index...
    interface StreamScopedCaptions {
        delete(language: string): Promise<void>;
        generate(language: string): Promise<StreamCaption>;
        list(language?: string): Promise<StreamCaption[]>;
        upload(language: string, input: ReadableStream): Promise<StreamCaption>;
    }
    Index

    Methods

    • Removes the captions or subtitles from a video.

      Parameters

      • language: string

        The BCP 47 language tag to remove.

      Returns Promise<void>

      A promise that resolves when deletion completes.

      if the video or caption is not found

      if an unexpected error occurs

    • Generate captions or subtitles for the provided language via AI.

      Parameters

      • language: string

        The BCP 47 language tag to generate.

      Returns Promise<StreamCaption>

      The generated caption entry.

      if the video is not found

      if the language is invalid

      if a generated caption already exists

      if the video duration is too long

      if the video is missing audio

      if the requested language is not supported

      if an unexpected error occurs

    • Lists the captions or subtitles. Use the language parameter to filter by a specific language.

      Parameters

      • Optionallanguage: string

        The optional BCP 47 language tag to filter by.

      Returns Promise<StreamCaption[]>

      The list of captions or subtitles.

      if the video or caption is not found

      if an unexpected error occurs

    • Uploads the caption or subtitle file to the endpoint for a specific BCP47 language. One caption or subtitle file per language is allowed.

      Parameters

      • language: string

        The BCP 47 language tag for the caption or subtitle.

      • input: ReadableStream

        The caption or subtitle stream to upload.

      Returns Promise<StreamCaption>

      The created caption entry.

      if the video is not found

      if the language or file is invalid

      if an unexpected error occurs