Member Junction
    Preparing search index...

    Return payload for each CreateSpeech request

    Index

    Constructors

    Properties

    content: string

    If the request was successful, this will contain the results. For CreateSpeech requests, an audio file in a base 64 encoded string and for SpeechToText requests, the text that was transcribed.

    data?: Buffer
    errorInfo?: AIErrorInfo

    How a failure is classified, when the request failed: ErrorAnalyzer's reading of the error the provider's SDK threw, which keeps its HTTP status. A caller deciding whether to try another vendor reads this, as the failover loop reads BaseResult.errorInfo: a rate limit or an outage is worth another vendor, and a request the vendor rejected as invalid is not. The message alone cannot tell them apart. Undefined on success, and from a driver that reports only errorMessage.

    errorMessage?: string

    If the request failed, this will contain the error message

    success: boolean

    True if the request was successful, false otherwise

    usage?: ModelUsage

    Usage for the request, when the provider reported enough to build it.

    Audio models are billed by duration rather than by token, so this is normally a ModelUsage.ForMedia instance in Seconds — the quantity a per-minute or per-hour price unit type prices. Left undefined when the provider did not report a duration, so that cost calculation declines rather than billing the request as free.