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
    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.