Skip to content

Class UTryllGenerateAndSpeakParams

ClassList > UTryllGenerateAndSpeakParams

More...

  • #include <TryllGenerateAndSpeakParams.h>

Inherits the following classes: UTryllNodeParamsBase

Public Attributes

Type Name
FTryllModelAdaptation Adaptation
FTryllContextOverrides Context
int32 ContextSize = 0
FString DefaultExit
int32 FirstChunkMaxChars = 0
FString Grammar
ETryllHistoryRole HistoryRole = ETryllHistoryRole::Assistant
FTryllSlotInput Input
int32 MinSentenceChars = 12
FTryllModelName ModelName
FTryllOutputFilterOverrides OutputFilter
FTryllSlotName OutputName
ETryllPlacement Placement = ETryllPlacement::BeforeUserAsSystem
FTryllSamplingOverrides Sampling
FString SystemPrompt
FString SystemPromptTextId
FString Template
FString TemplateTextId
bool bOverrideGrammar = false
bool bOverrideInput = false
bool bOverrideModelName = false
bool bOverrideOutputName = false
bool bOverrideSystemPrompt = false
bool bOverrideTemplate = false
bool bSubstituteAgentVariables = false
bool bSystemPromptLocalized = false
bool bTemplateLocalized = false

Public Functions

Type Name
virtual ETryllNodeType GetNodeType () override const
virtual bool IsTtsConsumer () override const
virtual flatbuffers::Offset< void > Pack (flatbuffers::FlatBufferBuilder & Fbb, Tryll::NodeParams::NodeParams & OutType) override const

Public Functions inherited from UTryllNodeParamsBase

See UTryllNodeParamsBase

Type Name
virtual TArray< FString > GetExitTargetOptions () const
virtual ETryllNodeType GetNodeType () const
FString GetOwnerNodeName () const
virtual bool IsTtsConsumer () const
virtual flatbuffers::Offset< void > Pack (flatbuffers::FlatBufferBuilder & Fbb, ::Tryll::NodeParams::NodeParams & OutType) const
virtual void PostLoad () override
virtual void Serialize (FArchive & Ar) override
ETryllNodeType return static_cast (0)

Public Static Functions inherited from UTryllNodeParamsBase

See UTryllNodeParamsBase

Type Name
const FTryllGraphDescription * FindEnclosingGraph (const UObject * Obj)

Protected Functions inherited from UTryllNodeParamsBase

See UTryllNodeParamsBase

Type Name
virtual void ApplyOldDefaults (int32 SavedVersion)
virtual bool UpgradeFrom (int32 SavedVersion)

Detailed Description

LLM-driven text generation + streaming TTS synthesis in a single fused node. Streams LLM tokens, segments them into sentences, synthesizes each sentence on a dedicated TTS strand, and emits PCM frames via OnTtsAudio callbacks. The voice (model, speaker, delivery mode, visemes) belongs to the agent: CreateAgentRequest.voice. Agent creation fails without one (3025).

Public Attributes Documentation

variable Adaptation

FTryllModelAdaptation UTryllGenerateAndSpeakParams::Adaptation;

Changes how the model behaves for this node (LoRA adapters; later control vectors). Null = base model. Structural: applied to the llama context at creation, so a change means a new context. Appended last so existing field IDs do not move.


variable Context

FTryllContextOverrides UTryllGenerateAndSpeakParams::Context;

Backend context construction. Null table inherits, except CreateContext still defaults n_outputs_max to 1. Structural.


variable ContextSize

int32 UTryllGenerateAndSpeakParams::ContextSize;

KV-cache / context window (n_ctx) for the LLM in tokens. 0 = fall back to the model variant's context_size, else the server default_n_ctx. Validated against the model's trained maximum at agent creation.


variable DefaultExit

FString UTryllGenerateAndSpeakParams::DefaultExit;

Default exit target — routes here after generation + synthesis complete. Empty string = END. Graph exit "default" — target node name; empty = END.


variable FirstChunkMaxChars

int32 UTryllGenerateAndSpeakParams::FirstChunkMaxChars;

Time-to-first-audio knob. When > 0, the FIRST chunk may also end at a comma, semicolon or colon followed by a space, or at an em dash, and is cut at the next space once it is this wide, so speech starts sooner. Neither cut fires before 5 words or min_sentence_chars. Later chunks keep whole sentences. No effect on text without spaces (CJK). 0 = off. 48 is the measured starting point: about 40% less model-side wait on Supertonic and Pocket. Check how it sounds with your voice before shipping it.


variable Grammar

FString UTryllGenerateAndSpeakParams::Grammar;

variable HistoryRole

ETryllHistoryRole UTryllGenerateAndSpeakParams::HistoryRole;

Controls whether/how this node's slot replays in later turns' projected transcript. No send field — GenerateAndSpeak always streams text (streaming and non-streaming delivery would need incompatible projection-replay handling, so only the streamed mode is supported).


variable Input

FTryllSlotInput UTryllGenerateAndSpeakParams::Input;

Upstream inter-node slot this field consumes. Empty = context default.


variable MinSentenceChars

int32 UTryllGenerateAndSpeakParams::MinSentenceChars;

Minimum width of the text since the last cut before a sentence end closes a chunk; a CJK or other 3–4-byte character counts as 2. The default 12 is two or three English words. Lower values reduce first-utterance latency at the cost of more, smaller TTS calls.


variable ModelName

FTryllModelName UTryllGenerateAndSpeakParams::ModelName;

variable OutputFilter

FTryllOutputFilterOverrides UTryllGenerateAndSpeakParams::OutputFilter;

Opt-in bounded artifact cleanup applied to streamed LLM output before variable substitution, slot/history write, wire delivery, and TTS. Missing/null = all flags off (defaults).


variable OutputName

FTryllSlotName UTryllGenerateAndSpeakParams::OutputName;

Effective output slot name for this node. Empty = the node's own name.


variable Placement

ETryllPlacement UTryllGenerateAndSpeakParams::Placement;

Where the rendered template body is placed relative to the resolved input.


variable Sampling

FTryllSamplingOverrides UTryllGenerateAndSpeakParams::Sampling;

Sparse sampling overrides applied on top of the model-catalog defaults.


variable SystemPrompt

FString UTryllGenerateAndSpeakParams::SystemPrompt;

variable SystemPromptTextId

FString UTryllGenerateAndSpeakParams::SystemPromptTextId;

Text ID in the workflow text table. The provider's text is what is sent.


variable Template

FString UTryllGenerateAndSpeakParams::Template;

variable TemplateTextId

FString UTryllGenerateAndSpeakParams::TemplateTextId;

Text ID in the workflow text table. The provider's text is what is sent.


variable bOverrideGrammar

bool UTryllGenerateAndSpeakParams::bOverrideGrammar;

Optional GBNF grammar. When non-empty, the generated (and spoken) output is constrained to this grammar at every decode step. Empty = unconstrained. Must contain a root rule. Mutable — rebuilt per turn. Narrower fit than on Generate: use it to constrain spoken output to a fixed set of barks / canned lines. Validated at agent creation and on mutation (3007). Set to true to override the inherited Grammar value.


variable bOverrideInput

bool UTryllGenerateAndSpeakParams::bOverrideInput;

Slot name this node consumes as its primary text. Empty = "user_message". Structural: immutable after creation — rebinding would re-wire the slot dataflow that is validated once at agent creation. Set to true to override the inherited Input value.


variable bOverrideModelName

bool UTryllGenerateAndSpeakParams::bOverrideModelName;

LLM model catalog name. Empty = use the agent's default_model_name. Set to true to override the inherited ModelName value.


variable bOverrideOutputName

bool UTryllGenerateAndSpeakParams::bOverrideOutputName;

Name this node's output slot is stored under. Empty = the node's own name. Structural: immutable after creation — renaming would re-wire the slot dataflow that is validated once at agent creation. Set to true to override the inherited OutputName value.


variable bOverrideSystemPrompt

bool UTryllGenerateAndSpeakParams::bOverrideSystemPrompt;

Prepended before the user turn during projection. Empty = none. Set to true to override the inherited SystemPrompt value.


variable bOverrideTemplate

bool UTryllGenerateAndSpeakParams::bOverrideTemplate;

Mustache template applied to the user-area message at projection time. Empty = no template. Set to true to override the inherited Template value.


variable bSubstituteAgentVariables

bool UTryllGenerateAndSpeakParams::bSubstituteAgentVariables;

When true, replace __VARIABLE__ markers in streamed LLM output with the rendered values of agent variables that declared allow_output_substitution. Matching is ASCII case-insensitive. Default false. Transformed text is authoritative for the slot, wire answer, history, and TTS input (substitution runs before synthesis).


variable bSystemPromptLocalized

bool UTryllGenerateAndSpeakParams::bSystemPromptLocalized;

Ticked: SystemPromptTextId is resolved by the text provider and that text is sent.


variable bTemplateLocalized

bool UTryllGenerateAndSpeakParams::bTemplateLocalized;

Ticked: TemplateTextId is resolved by the text provider and that text is sent.


Public Functions Documentation

function GetNodeType

inline virtual ETryllNodeType UTryllGenerateAndSpeakParams::GetNodeType () override const

Implements UTryllNodeParamsBase::GetNodeType


function IsTtsConsumer

inline virtual bool UTryllGenerateAndSpeakParams::IsTtsConsumer () override const

True when this node speaks through the agent's voice (Speak, GenerateAndSpeak). A graph with such a node needs a voice profile. From the schema's (tts_consumer).

Implements UTryllNodeParamsBase::IsTtsConsumer


function Pack

virtual flatbuffers::Offset< void > UTryllGenerateAndSpeakParams::Pack (
    flatbuffers::FlatBufferBuilder & Fbb,
    Tryll::NodeParams::NodeParams & OutType
) override const

Implements UTryllNodeParamsBase::Pack



The documentation for this class was generated from the following file C:/_tryll/_monorepo3/tryll/clients/unreal/Source/TryllClient/Public/Generated/Nodes/TryllGenerateAndSpeakParams.h