Function admitLowestCostTranscription

  • Select and reserve in one transaction; callers persist their session before this transaction commits.

    Parameters

    • t: CreditTransaction
    • input: {
          scopeId: string;
          reservationId: string;
          entries: readonly string[];
          prices: readonly SttPriceRow[];
          availableVendors: readonly ("openai" | "elevenlabs" | "deepgram")[];
          estimatedSeconds: number;
          language?: null | string;
          creditVersion?: string;
          at: number;
      }
      • scopeId: string
      • reservationId: string
      • entries: readonly string[]
      • prices: readonly SttPriceRow[]
      • availableVendors: readonly ("openai" | "elevenlabs" | "deepgram")[]
      • estimatedSeconds: number
      • Optional language?: null | string
      • Optional creditVersion?: string
      • at: number

    Returns Promise<TranscriptionAdmission>

    The selection and its reservation; a retry with identical inputs answers the stored admission.

    Throws

    When no offered vendor is available, or for a retry with other inputs (admission conflict).