@langwatch/scenario
    Preparing search index...

    Interface VoiceUserSimulator

    A voice-capable user simulator that converts text to a voiced ModelMessage (TTS + audio bytes). Used by the interruption path to generate the user barge-in phrase as real audio before feeding it to the agent adapter.

    interface VoiceUserSimulator {
        voice: string;
        voiceifyText(
            text: string,
            cfg?: { tts?: { voice?: string } },
        ): Promise<ModelMessage>;
    }
    Index

    Properties

    Methods

    Properties

    voice: string

    The voice identifier to use for TTS synthesis. Non-empty string signals that this simulator has a voice channel configured.

    Methods

    • Convert text to a voiced ModelMessage using the given voice config (falls back to the simulator's own defaults when cfg is omitted).

      The cfg parameter accepts a generic structural shape ({ tts?: { voice?: string } }) rather than importing VoiceConfig from the voice layer — keeping this file in the domain layer without introducing an upward dependency.

      Parameters

      • text: string
      • Optionalcfg: { tts?: { voice?: string } }

      Returns Promise<ModelMessage>