Member Junction
    Preparing search index...

    Interface AITextToSpeechRunParams

    Parameters for AITextToSpeechRunner.RunTextToSpeech: the driver's own TextToSpeechParams (text, voice, voice settings and the rest), plus the runner's options.

    The runner sets the driver's model_id per candidate, to the candidate's API name; a model with none leaves the driver's default. Voices belong to a vendor, so pin ModelID when the voice matters.

    interface AITextToSpeechRunParams {
        AgentID?: string;
        AgentRunID?: string;
        APIKeys?: AIAPIKey[];
        apply_text_normalization?: "auto" | "on" | "off";
        CancellationToken?: AbortSignal;
        ContextUser: UserInfo;
        CredentialScope?: AICredentialScope;
        instructions?: string;
        language_code?: string;
        latency?: number;
        model_id?: string;
        ModelID?: string;
        next_request_ids?: string[];
        OnPromptRunCreated?: (promptRunId: string) => void | Promise<void>;
        output_format?: string;
        ParentRunID?: string;
        previous_request_id?: string;
        previous_text?: string;
        PromptID?: string;
        pronunciation_dictionary_locators?: any[];
        stream?: boolean;
        text: string;
        TimeoutMS?: number;
        voice: string;
        voice_settings?: VoiceSettings;
    }

    Hierarchy (View Summary)

    Index

    Properties

    AgentID?: string

    The agent the call is made for, recorded as the run row's AgentID.

    AgentRunID?: string

    The agent run this call belongs to. MJ: AI Prompt Runs has no agent-run column, so it is recorded in the row's Messages, for reading only. To join the row to the run, use OnPromptRunCreated.

    APIKeys?: AIAPIKey[]

    Keys by driver class, passed through as the base runner's apiKeys. A key reaches only the candidates of its own driver class. They rank as they do for chat prompts, just above the environment keys: a credential bound to the prompt-model, the model-vendor or the vendor, or a default credential of the vendor's credential type, wins over them.

    apply_text_normalization?: "auto" | "on" | "off"

    Text normalization setting to control how numbers and special characters are handled

    CancellationToken?: AbortSignal

    Optional signal for cancelling the request. The driver is responsible for honoring it: it passes the signal to the provider's SDK or HTTP call, so an aborted request is torn down rather than left running. A driver that stops because the signal fired reports the failure classified as Cancelled (see BuildCancellationErrorInfo), which is never failed over.

    ContextUser: UserInfo

    The user the run is made and recorded for. Required.

    CredentialScope?: AICredentialScope

    Passed through as the base runner's CredentialScope. 'RuntimeOnly' restricts the run to APIKeys: a candidate whose driver class has no key there is skipped, never run on the platform's credentials.

    instructions?: string

    Special instructions for the voice generation

    language_code?: string

    ISO 639-1 language code for the speech generation

    latency?: number

    Optimization level (0-4), where 0 is no optimization and 4 is maximum optimization

    model_id?: string

    Model ID to use, defaults to "eleven_monolingual_v1"

    ModelID?: string

    Pins the model by ID. Failover then stays within that model's vendors. Leave it unset to let the carrier prompt's bindings choose.

    next_request_ids?: string[]

    Array of IDs for next generations

    OnPromptRunCreated?: (promptRunId: string) => void | Promise<void>

    Called with the run row's ID as soon as the row exists, before the model call: the hook an agent step uses to point its TargetLogID at the row. An error it throws is logged, never raised.

    output_format?: string

    Output format specified as codec_samplerate_bitrate (e.g., "mp3_44100_128")

    ParentRunID?: string

    A parent MJ: AI Prompt Runs row, recorded as this run's ParentID.

    previous_request_id?: string

    ID of the previous generation request

    previous_text?: string

    Text that came before this generation, used for maintaining continuity

    PromptID?: string

    The MJ: AI Prompts row whose bindings choose the model and whose failover settings apply. Defaults to the runner's default carrier prompt, found by name.

    pronunciation_dictionary_locators?: any[]

    Array of pronunciation dictionary locators for custom word pronunciations

    stream?: boolean

    Whether to stream the response

    text: string

    Text content to convert to speech

    TimeoutMS?: number

    A bound, in milliseconds, on each driver call, as AIPromptParams.timeoutMS bounds each chat call: every failover candidate gets its own. A call that runs longer fails with an AIPromptTimeoutError, which reads as a network error and so fails over. For audio a driver splits, the bound covers the whole transcription. Unset or not positive means no bound, unless the runner declares a DefaultPromptTimeoutMS.

    The timeout is composed into the signal the driver is handed as its params' CancellationToken, so a request that times out is torn down by a driver that honors it, not left running.

    voice: string

    Voice ID or name to use for speech generation

    voice_settings?: VoiceSettings

    Voice configuration settings