Type alias TranscribePiece

TranscribePiece: ((piece, request) => Promise<PieceTranscript>)

The caller's transcription of one piece. request.prompt is the context to hand the provider, when there is any; request.attempt is 1 for a piece's first try; request.signal is the job's own. A call that throws is made again while the piece has tries left and the job's signal has not aborted.

Type declaration

    • (piece, request): Promise<PieceTranscript>
    • Parameters

      • piece: PieceInput
      • request: {
            prompt?: string;
            attempt: number;
            signal?: AbortSignal;
        }
        • Optional prompt?: string
        • attempt: number
        • Optional signal?: AbortSignal

      Returns Promise<PieceTranscript>