Hierarchy (view full)

Constructors

  • Parameters

    • options: {
          additionalLanguages?: string[];
          apiKey?: string;
          audioSpeed?: number;
          baseUrl?: string;
          boostedKeywords?: string[];
          connOptions?: APIConnectOptions;
          defaultLanguage?: string;
          forbidSpeechAfterToolCall?: string[];
          generateNoInputPokeText?: boolean;
          generateWelcomeMessage?: boolean;
          languages?: string[];
          minWordsToInterrupt?: number;
          model?: string;
          multilingualMode?: "auto" | "request";
          noInputEndConversationSec?: number;
          noInputPokeSec?: number;
          noInputPokeText?: string;
          phonicAgent?: string;
          phonicTools?: string[];
          project?: string;
          voice?: string;
          welcomeMessage?: string;
      } = {}
      • Optional additionalLanguages?: string[]

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

      • Optional apiKey?: string

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

      • Optional audioSpeed?: number

        Audio playback speed

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

        Keywords to boost in speech recognition

      • Optional connOptions?: APIConnectOptions

        Connection options for the API connection

      • Optional defaultLanguage?: string

        ISO 639-1 default language for recognition and speech

      • Optional forbidSpeechAfterToolCall?: string[]

        Names of tools after which Phonic should NOT auto-generate a spoken reply.

        Use for tools that always hand off / trigger an agent switch (e.g. advancing a task in a TaskGroup). After such a tool, the outgoing agent would otherwise speak a reply that the handoff's session reset immediately cancels, producing a race / double-speak. Forbidding speech lets only the incoming agent speak.

        Only list tools that ALWAYS hand off — a listed tool that returns without handing off will leave the agent silent (no reply is generated). Tools not listed keep the default behavior (a reply is generated after the tool output).

      • 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 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 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 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 voice?: string

        Voice ID for agent outputs

      • Optional welcomeMessage?: string

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

    Returns realtime.RealtimeModel

Accessors

Methods