Hierarchy

  • BaseService
    • TranscriptService

Constructors

Methods

  • Create a transcript.

    Parameters

    Returns Promise<Transcript>

    A promise that resolves to the transcript.

    Use transcribe instead to transcribe a audio file that includes polling, or submit to transcribe a audio file without polling.

  • Parameters

    • input: string
    • Optionalinit: RequestInit

    Returns Promise<Response>

  • Type Parameters

    • T

    Parameters

    • input: string
    • Optionalinit: RequestInit

    Returns Promise<T>

  • Submits a transcription job for an audio file. This will not wait until the transcript status is "completed" or "error".

    Parameters

    • params: TranscribeParams

      The parameters to start the transcription of an audio file.

    Returns Promise<Transcript>

    A promise that resolves to the queued transcript.

  • Retrieve subtitles of a transcript.

    Parameters

    • id: string

      The identifier of the transcript.

    • format: SubtitleFormat = "srt"

      The format of the subtitles.

    • Optionalchars_per_caption: number

      The maximum number of characters per caption.

    Returns Promise<string>

    A promise that resolves to the subtitles text.

  • Transcribe an audio file. This will create a transcript and wait until the transcript status is "completed" or "error".

    Parameters

    Returns Promise<Transcript>

    A promise that resolves to the transcript. The transcript status is "completed" or "error".

  • Wait until the transcript ready, either the status is "completed" or "error".

    Parameters

    • transcriptId: string

      The ID of the transcript.

    • Optionaloptions: PollingOptions

      The options to wait until the transcript is ready.

    Returns Promise<Transcript>

    A promise that resolves to the transcript. The transcript status is "completed" or "error".

  • Search through the transcript for a specific set of keywords. You can search for individual words, numbers, or phrases containing up to five words or numbers.

    Parameters

    • id: string

      The identifier of the transcript.

    • words: string[]

      Keywords to search for.

    Returns Promise<WordSearchResponse>

    A promise that resolves to the sentences.