Function transcribePieces

  • Transcribes the pieces; answers the whole text and each piece's outcome.

    Parameters

    • pieces: Iterable<PieceInput, any, any> | AsyncIterable<PieceInput, any, any>

      The pieces in the order of the recording. An async iterable is asked for its next piece only when the job has room to send it.

    • transcribe: TranscribePiece

      The caller's transcription of one piece.

    • options: TranscribePiecesOptions

      The sentence cut, and how the job runs.

    Returns Promise<{
        text: string;
        pieces: PieceOutcome[];
        seconds: number;
    }>

    text, the pieces' texts joined at their seams, after previousText when one is given; pieces, each piece's outcome in order; seconds, the sum of the outcomes' seconds.

    Throws

    When a piece fails every attempt. The pieces before it have been reported to onPiece by then, and no piece after it is reported.

    Throws

    The reason of options.signal, after interrupting a pending source read and awaiting pieces in flight.

    Throws

    The original source or onPiece error, after awaiting pieces in flight.