Hierarchy (view full)

Constructors

  • Parameters

    • options: {
          additionalLanguages?: string[];
          additionalParams?: Record<string, unknown>;
          apiKey?: string;
          assistantBackchannelAggressiveness?: number;
          audioSpeed?: number;
          baseUrl?: string;
          boostedKeywords?: string[];
          configsForTools?: PhonicToolConfig[];
          configurationEndpoint?: null | ConfigurationEndpoint;
          connOptions?: APIConnectOptions;
          defaultLanguage?: string;
          enableAssistantBackchannel?: boolean;
          enableRedaction?: boolean;
          forbidSpeechAfterToolCall?: string[];
          generateNoInputPokeText?: boolean;
          generateWelcomeMessage?: boolean;
          intelligenceLevel?: IntelligenceLevel;
          isWelcomeMessageInterruptible?: boolean;
          languages?: string[];
          mcpServers?: string[];
          minWordsToInterrupt?: number;
          model?: string;
          multilingualMode?: "auto" | "request";
          noInputEndConversationSec?: number;
          noInputPokeSec?: number;
          noInputPokeText?: string;
          observabilityIntegrations?: "braintrust"[];
          onConversationCreated?: ((conversationId) => void);
          phonicAgent?: string;
          phonicTools?: string[];
          project?: string;
          pronunciationDictionary?: Item[];
          templateVariables?: Record<string, string>;
          vadMinSilenceDurationMs?: number;
          vadMinSpeechDurationMs?: number;
          vadPrebufferDurationMs?: number;
          vadThreshold?: number;
          voice?: string;
          websocketTimeoutSec?: number;
          welcomeMessage?: string;
      } = {}
      • Optional additionalLanguages?: string[]

        Further ISO 639-1 codes (must not include defaultLanguage)

      • Optional additionalParams?: Record<string, unknown>

        Additional runtime parameters forwarded to Phonic

      • Optional apiKey?: string

        Phonic API key. If not provided, will attempt to read from PHONIC_API_KEY environment variable

      • Optional assistantBackchannelAggressiveness?: number

        How aggressively the assistant backchannels. Only applies when enableAssistantBackchannel is true

      • Optional audioSpeed?: number

        Audio playback speed

      • Optional baseUrl?: string
      • Optional boostedKeywords?: string[]

        Keywords to boost in speech recognition

      • Optional configsForTools?: PhonicToolConfig[]

        Per-tool behavior overrides, one PhonicToolConfig per tool (keyed by name); omitted fields fall back to the plugin defaults. See the README for the available fields.

      • Optional configurationEndpoint?: null | ConfigurationEndpoint

        Endpoint the agent calls to fetch per-conversation configuration. Pass null to disable

      • Optional connOptions?: APIConnectOptions

        Connection options for the API connection

      • Optional defaultLanguage?: string

        ISO 639-1 default language for recognition and speech

      • Optional enableAssistantBackchannel?: boolean

        When true, the assistant produces backchannel responses (e.g. "mm-hmm") while the user speaks

      • Optional enableRedaction?: boolean

        When true, PII/PHI is redacted from transcripts and bleeped from audio after the conversation ends

      • Optional forbidSpeechAfterToolCall?: string[]

        Deprecated

        Use configsForTools with forbid_speech_after_tool_call per tool instead. When set, each listed tool is merged into configsForTools as forbid_speech_after_tool_call: true (an explicit configsForTools entry wins).

      • Optional generateNoInputPokeText?: boolean

        Auto-generate poke text when user is silent

      • Optional generateWelcomeMessage?: boolean

        When true, the welcome message will be automatically generated and welcomeMessage will be ignored

      • Optional intelligenceLevel?: IntelligenceLevel

        LLM intelligence level, standard or high

      • Optional isWelcomeMessageInterruptible?: boolean

        When false, the welcome message cannot be interrupted by the user

      • Optional languages?: string[]

        Deprecated. Use defaultLanguage and additionalLanguages instead. When both of those are omitted and this is set, languages[0] is the default language and languages.slice(1) are additional languages.

      • Optional mcpServers?: string[]

        Names of pre-configured MCP servers to make available to the assistant. Names must be unique

      • Optional minWordsToInterrupt?: number

        Minimum number of user words required to interrupt the assistant

      • Optional model?: string

        The name of the model to use. Defaults to 'merritt'

      • Optional multilingualMode?: "auto" | "request"

        auto: detect language per utterance. request: switch only when the user asks (recommended).

      • Optional noInputEndConversationSec?: number

        Seconds of silence before ending conversation

      • Optional noInputPokeSec?: number

        Seconds of silence before sending poke message

      • Optional noInputPokeText?: string

        Poke message text (ignored when generateNoInputPokeText is true)

      • Optional observabilityIntegrations?: "braintrust"[]

        Observability integrations to forward traces to (currently braintrust)

      • Optional onConversationCreated?: ((conversationId) => void)

        Called with the Phonic conversation ID once the conversation is created

          • (conversationId): void
          • Parameters

            • conversationId: string

            Returns void

      • Optional phonicAgent?: string

        Phonic agent to use for the conversation. Options explicitly set here will override the agent settings.

      • Optional phonicTools?: string[]

        Phonic tool names available to the assistant

      • Optional project?: string

        Project name to use for the conversation. Defaults to main

      • Optional pronunciationDictionary?: Item[]

        List of { word, pronunciation } entries; words must be unique

      • Optional templateVariables?: Record<string, string>

        Variables substituted into the system prompt and welcome message

      • Optional vadMinSilenceDurationMs?: number

        Minimum silence duration for VAD, in milliseconds

      • Optional vadMinSpeechDurationMs?: number

        Minimum speech duration for VAD, in milliseconds

      • Optional vadPrebufferDurationMs?: number

        Voice-activity-detection prebuffer duration, in milliseconds

      • Optional vadThreshold?: number

        Voice-activity-detection threshold

      • Optional voice?: string

        Voice ID for agent outputs

      • Optional websocketTimeoutSec?: number

        Seconds of inactivity before the Phonic websocket is closed

      • Optional welcomeMessage?: string

        Welcome message for the agent to say when the conversation starts. Ignored when generateWelcomeMessage is true

    Returns realtime.RealtimeModel

Accessors

Methods