This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Audio Pro

GS_AudioPro — the premium audio gem. Visual graph authoring, procedural scoring, Klatt voice synthesis and geometric acoustics, layered onto everything the free gem already does.

GS_AudioPro is the premium audio gem. It requires GS_Audio and extends it — every base feature keeps working exactly as documented, and Pro adds four capabilities of its own.

Added by ProWhat it gives you
Audio Event GraphAuthor a sound as a visual node graph instead of a component chain.
Score ArrangementMulti-layer adaptive music that responds to game state.
Klatt Voice SynthesisGenerated speech — hundreds of distinct voices, no recordings.
Geometric AcousticsOcclusion and reverb derived from real world geometry.

 

Contents


How Pro Attaches to the Base Gem

GS_ProAudioManagerComponent subclasses the base Audio Manager, which in turn subclasses GS_ManagerComponent. It declares itself incompatible with the base manager, so the two cannot coexist on one entity — a project runs one or the other.

Pro never reaches into the base gem’s internals. It fetches primitives across the accessor seam — the engine, the node graph, the output endpoint, volume channels, the shared Steam Audio context — and attaches its own nodes to them.

Two accessors run the other way, and they are the whole enrichment mechanism:

  • Pro registers its spatial simulator, and the base gem’s per-voice spatializer starts consuming occlusion values from it.
  • Pro exposes a reverb send, and base voices tap into it to feed geometry-driven reverb.

Both are null in a base-only install. The interface they are typed against is declared in the base gem and implemented in Pro — base defines the socket, Pro supplies the plug, and nothing breaks when the plug is absent.

Configuration follows the same shape. The base project settings stay where they are; Pro adds its geometry settings additively on the Pro manager. The base gem never reflects Pro’s knobs.


Enabling Audio Pro

  1. Enable the GS_AudioPro gem alongside GS_Audio.
  2. Put the Pro Audio Manager component on your manager prefab in place of the base one.
  3. Assign your graph libraries and score tracks on that component.

Everything the base manager configures — volume channels, event libraries, project settings — is authored on the Pro component too, since it inherits them. Pro’s geometry settings appear alongside them.

A project runs one manager or the other; the two cannot coexist on an entity.


Bus Map

BusGemCarries
AudioManagerRequestBusBaseListener, event libraries, PlayEvent*, volume, mixing, mix effect routing
AudioGraphRequestBusProEverything to do with .audiograph documents
AudioGraphPlayerRequestBusProPer-entity graph playback, addressed by entity
AudioScoreRequestBusProEverything to do with score arrangements
KlattVoiceSystemRequestBus / KlattVoiceRequestBusProVoice synthesis, system-wide and per-entity

In ScriptCanvas, Pro’s nodes sit under the GS_Play/GS_AudioPro category, with each bus grouped under its own feature name. Base nodes remain under GS_Play/GS_Audio.


Features

Audio Event Graph

Build a sound as a node graph — sources, filters, effects and conditional routing on a canvas, with a Start / Loop / Finish phase lifecycle and runtime variables that reshape the sound while it plays. The same DSP processors the base gem exposes as mix effects appear here as nodes.

Audio Event Graph

Score Arrangement

Multi-layer music assets. An arrangement defines time signature, tempo and fade behaviour and holds layers that can be brought in and out independently, so the score follows game state instead of looping past it.

Score Arrangement

Klatt Voice Synthesis

Formant text-to-speech with 3D spatial audio. It generates voice from parameters rather than playing recordings, so a project can give hundreds of characters distinct voices with no audio assets and no recording sessions.

Klatt Voice

Geometric Acoustics

Sound occluded by the geometry between it and the listener, and reverb derived from the room the listener is actually standing in — driven by authored acoustic volumes and O3DE shapes with material presets.

Geometric Acoustics


See Also

For the base gem this builds on:

For conceptual overviews and usage guides:


Get GS_Audio

GS_Audio — Explore this gem on the product page and add it to your project.

1 - Audio Event Graph

Visual graph editor for authoring complex sound events with filters, effects, routing, and phase lifecycle.

The Audio Event Graph is an FMOD-style visual editor for authoring complex sound events. Each .audiograph file defines one sound event as a node graph — sources, filters, effects, and routing all connected visually. At runtime, the graph maps directly to a miniaudio processing pipeline.

The Audio Event Graph uses the gs_graphcanvas framework with a DataFlowGraph topology. Nodes evaluate in topological order with dirty-propagation — only nodes affected by a change are re-evaluated.

Audio Event Graph Editor in O3DE Editor

 

Contents


Opening the Editor

Open the Audio Event Graph editor from the O3DE Editor menu: GS Tools > Audio Event Graph Editor.

Each graph is a standalone .audiograph file — use File > New to create one, or File > Open to load an existing graph. Multiple graphs can be open simultaneously in separate tabs.


How It Works

Audio Event Graphs use a data-flow model. Connections carry AudioRoute values — handles that represent a point in the miniaudio processing chain. The signal flows left to right:

  1. Entry nodes gate which phase is active (Start, Loop, or Finish)
  2. Source nodes create sound instances and output an AudioRoute
  3. Filter and effect nodes process the audio and pass it along
  4. Routing nodes (If/Switch) direct the signal based on conditions or variables
  5. The Output node wires the final AudioRoute to a mixing bus

Variables can be set from gameplay code at any time, causing affected nodes to re-evaluate without restarting the entire graph.


Node Catalog

Entry Nodes (Phase Gates)

NodePurpose
Aud_StartNodeActive during the Start phase
Aud_LoopNodeActive during the Loop phase
Aud_FinishNodeActive during the Finish phase

Entry nodes output a gate signal. Downstream nodes only produce audio when their entry gate is active.

Source Nodes

Source Nodes in Audio Event Editor

NodePurposeKey Properties
Aud_SoundNodeSingle audio asset playbackVolume, pitch, delay, looping, 3D spatialization
Aud_AudioPoolNodeRandom selection from a pool of audio assetsSame as SoundNode, plus asset pool list
Aud_NoiseNodeProcedural noise generationNoise colour, duration
Aud_SfxrNodeProcedural chiptone from a pool of SFXR profilesProfile pool, picked at random per fire

Filter Nodes

Filter Nodes in Audio Event Editor

NodeFilter Type
Aud_LowPassFilterNodeLow-pass filter
Aud_HighPassFilterNodeHigh-pass filter
Aud_BandPassFilterNodeBand-pass filter
Aud_NotchFilterNodeNotch (band-reject) filter
Aud_PeakingEQNodePeaking EQ
Aud_LowShelfFilterNodeLow shelf filter
Aud_HighShelfFilterNodeHigh shelf filter

All filter nodes take an audio_in input and produce an audio_out output. Filter parameters (cutoff frequency, Q factor, gain) are configurable per-node or bindable to variables.

Time & Space Nodes

Effect Nodes in Audio Event Editor

NodePurpose
Aud_EchoNodeFeedback delay — repeats that decay over time
Aud_ReverbNodeSimulated room ambience

Character & Modulation Nodes

NodePurpose
Aud_WaveShaperNodeNon-linear distortion and saturation
Aud_LofiNodeBit depth and sample rate reduction
Aud_RobotizeNodeVocoder-style robotic character
Aud_FlangerNodeSweeping comb filtering from a modulated short delay
Aud_ChorusNodeThickening from multiple detuned delayed copies
Aud_RingModNodeRing modulation — metallic, inharmonic tones
Aud_TremoloNodeRhythmic amplitude modulation

Utility Nodes

NodePurpose
Aud_PannerNodeStereo placement
Aud_CompressorNodeDynamic range compression
Aud_DCRemovalNodeRemoves DC offset from a signal
Aud_AmplifyNodeStraight gain

These are the same processors the base gem exposes as mix effects — one DSP, two authoring surfaces. Two mix effects have no node form: Binaural, because spatialization is automatic and per-source, and Pitch.

Structure Nodes

NodePurpose
Aud_MixNodeSums several audio routes into one
Aud_SplitNodeFans one audio route out to several destinations

Routing Nodes

The built-in gs_graphcanvas IfNode and SwitchNode work with AudioRoute values. Use them for conditional audio paths based on game state variables (e.g., play different sounds based on surface type or weather).

Terminal Node

NodePurpose
Aud_OutputNodeWires the final audio chain to the mixing bus

Every graph needs exactly one Output node.


Phase Lifecycle

Audio Event Graph Lifecycle Nodes

Audio Event Graphs support a three-phase lifecycle for structured sound playback:

  1. Start — Initial playback. The Aud_StartNode gate is active. One-shot intro sounds play here.
  2. Loop — Repeating section. The Aud_LoopNode gate is active. Ambient loops and sustained sounds live here.
  3. Finish — Outro/tail. The Aud_FinishNode gate is active. Fade-outs and release tails play here.

Phases transition automatically: Start plays once, then Loop repeats (if looping is enabled), then Finish plays when FinishAudioGraph() is called. Not all phases are required — a simple one-shot sound only needs a Start node.


Using Variables

Variables let gameplay code control sound behavior at runtime. Common uses:

  • Filter parameters — Bind a filter’s cutoff frequency to a variable, then adjust it from code (e.g., underwater muffling)
  • Routing conditions — Use a variable as the condition for an If/Switch node to select different sound paths
  • Source selection — Gate different source nodes based on game state

Declare variables in the Variable Panel, then either bind them to input slots (right-click > Convert to Reference) or use Get/Set variable nodes.

At runtime, set variables via the Audio Manager API:

AudioManagerRequestBus::Broadcast(&AudioManagerRequests::SetAudioGraphVariable, instanceId, "underwater", 0.8f);

Setting a variable marks dependent nodes dirty and re-evaluates only the affected portion of the graph.


Extending with Custom Nodes

To add a custom audio node:

  1. Create a class inheriting from BaseNode and IDataFlowNode
  2. Register it with GS_AUTO_REGISTER_NODE_FOR(MyAudioNode, "audiograph")
  3. Implement Process(GraphExecutionContext& context)
  4. Follow the empty any pattern for inactive outputs:
void MyAudioNode::Process(GraphExecutionContext& context)
{
    auto inputAny = context.GetInputValueAny(this, "audio_in");
    if (inputAny.empty())
    {
        context.SetOutputValueAny(this, "audio_out", AZStd::any{});  // CRITICAL: truly empty
        return;
    }
    // Process audio...
    context.SetOutputValue(this, "audio_out", outputRoute);
}

The empty any pattern ensures that inactive paths don’t mask valid audio from other connections in multi-input slots.

For full details on node creation, see gs_graphcanvas Nodes.


Playing a Graph

There are three ways to reach a graph. They form an escalation ladder — most projects should use the last one.

ApproachSurfaceUse when
Player componentAudioGraphPlayerComponent on an entityAlmost always. No handles to manage.
LibraryPlayGraph(name) / AcquireGraph(name)You want named access across a project.
Raw pathPlayAudioGraph(assetPath)Low-level. You manage the path yourself.

AudioGraphPlayerComponent

The recommended surface. Drop it on an entity, point it at a graph, and it handles the rest.

Authored fieldMeaning
GraphThe .audiograph to play.
Auto PlayStart on activation.
SpatializeTrack this entity’s own transform.
LoopingRun the Loop phase.

It acquires lazily on the first Play or variable set, applies spatialization and looping, and holds its own handle — there is no acquire/release to write. Its per-entity bus offers Play, Finish, Stop, and SetVariable in float, int, bool and string forms.

With no Pro manager present it is inert and warns rather than failing.

Graph libraries

An AudioGraphLibrary (.agl) maps names to graphs, so gameplay code refers to "door_creak" rather than a path. Libraries are assigned to the Pro manager and can be added or removed at runtime.

Because .audiograph is a source-only file — no builder, no product asset — the library uses a custom picker that browses source files directly rather than the product catalog. This is the same approach ScriptCanvas uses for .scriptcanvas, and it is worth copying if you build an asset that references source files.

Current limitation: the picker stores an absolute source path.


Instance Lifecycle

This is the behaviour most likely to surprise you, so it is worth stating plainly.

There are two kinds of instance:

  • Fire-and-forget — created by PlayGraph / PlayAudioGraph, destroyed when it stops.
  • Owned — created by AcquireGraph / AcquireAudioGraph, and kept until you explicitly release it.

For an owned instance, Stop, Finish, a fade-out or a natural end all quiesce it to idle rather than destroying it. Sounds stop, pooled resources return, entry gates deactivate and the phase resets — but the instance, its variables and its spatial and loop configuration are all retained. Only ReleaseAudioGraph or manager shutdown actually destroys it.

The reason: a play → loop → end → replay cycle should keep its variables across calls. What you hear is identical to destruction; the difference is that replaying does not mean reconfiguring.

GetGraph(name) returns the live instance for a name, acquiring on first call. Repeat calls return the same id, and because owned instances persist, a handle normally stays valid for the lifetime of whatever is holding it.

All instance ids are 64-bit unsigned integers, and 0 means failure.


Runtime API

Everything below is on AudioGraphRequestBus — a GS_AudioPro bus, not the Audio Manager’s.

Named access: AddGraphLibrary, RemoveGraphLibrary, PlayGraph(name), AcquireGraph(name), GetGraph(name)

Raw path: PlayAudioGraph(assetPath), AcquireAudioGraph(assetPath)

Transport: FireAudioGraph(id), StopAudioGraph(id), StopAllAudioGraphs(), FinishAudioGraph(id), StopAudioGraphFade(id, fadeTime), ReleaseAudioGraph(id)

Variables: SetAudioGraphVariable (float), SetAudioGraphVariableInt, SetAudioGraphVariableBool, SetAudioGraphVariableString — each taking (instanceId, name, value)

Spatialization: SetAudioGraphEntity(id, entity), SetAudioGraphPosition(id, position), ClearAudioGraphSpatialization(id)

State: SetAudioGraphLooping(id, bool), IsAudioGraphActive(id)

Per-entity playback goes through AudioGraphPlayerRequestBus instead, addressed by entity id.


See Also

2 - Score Arrangement

Multi-layer musical score system for dynamic music – tempo, time signatures, fade control, and layer selection.

The Score Arrangement system provides multi-layer dynamic music for GS_Play projects. A ScoreArrangementTrack asset defines a musical score with configurable tempo, time signature, fade behavior, and multiple layers that can be enabled or disabled at runtime. This allows game music to adapt to gameplay state – adding or removing instrumental layers, changing intensity, or crossfading between sections.

Score tracks are assigned to the Pro Audio Manager and controlled through AudioScoreRequestBus. They are not on the base audio manager’s bus.

For usage guides and setup examples, see The Basics: GS_Audio.

Score Arrangement asset in the O3DE Asset Editor

 

Contents


Data Model

ScoreArrangementTrack

A multi-layer musical score asset. Each track defines the musical structure and contains one or more layers that play simultaneously.

FieldValue
TypeId{DBB48082-1834-4DFF-BAD2-6EA8D83F1AD0}
ExtendsAZ::Data::AssetData
ReflectionRequires GS_AssetReflectionIncludes.h — see Serialization Helpers
FieldTypeDescription
Track NameAZStd::stringIdentifier for this score track.
Time SignatureTimeSignaturesThe time signature for this score (e.g. 4/4, 3/4, 6/8).
BPMfloatTempo in beats per minute.
Fade In TimefloatDuration in seconds for the score to fade in when playback begins.
Fade Out TimefloatDuration in seconds for the score to fade out when playback stops.
LoopboolWhether the score loops back to the beginning when it reaches the end.
LayersAZStd::vector<ScoreLayer>The musical layers that compose this score.
Active LayersAZStd::vector<int>Indices of layers that are active (audible) at the start of playback.

ScoreLayer

A single musical layer within a score arrangement. Each layer represents one track of audio (e.g. drums, bass, melody) that can be independently enabled or disabled.

FieldValue
TypeId{C8B2669A-FAEA-4910-9218-6FE50D2E588E}
FieldTypeDescription
Layer NameAZStd::stringIdentifier for this layer within the score.
Audio AssetAZ::Data::Asset<AudioClipAsset>The audio clip for this layer.
VolumefloatBase volume level for this layer (0.0 to 1.0).
Fade TimefloatDuration in seconds for this layer to fade in or out when toggled.

TimeSignatures (Enum)

Supported musical time signatures for score arrangement tracks.

FieldValue
TypeId{6D6B5657-746C-4FCA-A0AC-671C0F064570}
ValueBeats per MeasureBeat UnitDescription
FourFour4Quarter note4/4 – Common time. The most widely used time signature.
FourTwo4Half note4/2 – Four half-note beats per measure.
TwelveEight12Eighth note12/8 – Compound quadruple meter. Four groups of three eighth notes.
TwoTwo2Half note2/2 – Cut time (alla breve). Two half-note beats per measure.
TwoFour2Quarter note2/4 – Two quarter-note beats per measure. March time.
SixEight6Eighth note6/8 – Compound duple meter. Two groups of three eighth notes.
ThreeFour3Quarter note3/4 – Waltz time. Three quarter-note beats per measure.
ThreeTwo3Half note3/2 – Three half-note beats per measure.
NineEight9Eighth note9/8 – Compound triple meter. Three groups of three eighth notes.

API Reference

Request Bus: AudioScoreRequestBus

Singleton bus – single address, single handler. Implemented by the Pro Audio Manager.

MethodParametersDescription
AddScoreArrangementTrackAZ::Data::Asset<ScoreArrangementTrack>Register a score track.
RemoveScoreArrangementTrackconst AZStd::string& scoreNameUnregister a score track.
PlayScorescoreName, fadeTime = 0Start a score with its authored active layers.
PlayScoreAndTracksscoreName, vector<trackName>, fadeTime = 0Start a score with a specific layer set.
PlayTracktrackName, fadeTime = 0Bring one layer in.
StopTracktrackName, fadeTime = 0Take one layer out.
StopScorefadeTime = 0Stop the whole score.

The adaptive-music loop is PlayScore once, then PlayTrack and StopTrack as game state changes. Layers stay in time with each other because they share the arrangement’s tempo and time signature – bringing a percussion layer in mid-bar does not knock it out of sync.


See Also

For conceptual overviews and usage guides:

For component references:


Get GS_Audio

GS_Audio — Explore this gem on the product page and add it to your project.

3 - Geometric Acoustics

Occlusion and reflections derived from world geometry — acoustic volumes and shapes, 15 material presets, listener-centric reverb, and an honest account of what is and is not simulated.

The base gem places sounds by direction and distance. Geometric acoustics adds the room: sound muffled by the geometry between it and the listener, and reverb derived from the space the listener is actually standing in rather than an effect an author dialled in.

Geometry is authored, not inferred. You mark up the acoustically significant parts of a level with volumes and shapes carrying material presets — you do not hand the simulation your render meshes.

 

Contents


Turning It On

Geometric acoustics is off by default. It is enabled on the Pro manager’s settings, which are additive to the base project settings.

SettingDefaultMeaning
Geometry EnabledfalseMaster switch for the whole system.
Occlusion EnabledtrueMuffle sounds behind geometry.
Occlusion Type—Raycast or Volumetric.
Occlusion Radius1.0Source sphere radius for volumetric occlusion, in metres.
Max Occlusion Samples16Rays used when sampling an occlusion volume.
Reflections EnabledtrueDerive reverb from geometry.
Reflection ModeListenerSee reflections.
Reflection Wet1.0How much reverb is added to the dry signal.
Reflection Smooth Time0.75Seconds to ease toward a new room. 0 snaps.
Reflection Order1Recursion depth, 0–4.
Simulation Update Rate30.0 HzHow often the simulator recomputes.

Authoring Geometry

Two components mark up a level. Both carry a material preset, plus a custom material for the Custom case.

ComponentWhat it contributes
Audio GeometryAn authored box volume.
Audio Shape GeometryReads an existing O3DE Shape component. A Quad becomes a single-layer plane, a Box becomes a box, and anything else falls back to its bounding box.

The Shape variant is usually the faster path — a wall you have already blocked out with a Shape becomes acoustically real by adding one component.

Registration goes through a request bus that takes raw vertices rather than entities. That is deliberate: it is what will let streaming systems fold geometry in and out of the simulation without the acoustics layer knowing anything about entity lifetimes.


Acoustic Materials

Fifteen presets, plus Custom.

GroupPresetsCharacter
Hard / reflectiveGeneric, Brick, Concrete, Ceramic, Glass, Plaster, Wood, Metal, RockBounce sound. Long, bright reverb.
AbsorptiveGravel, CarpetSoak sound up. Short, dull reverb.
Soft barriersCurtain, Blanket, Door, DrapeTransmit meaningfully — they muffle rather than silence.
Custom—Dial all seven coefficients by hand: absorption low/mid/high, scattering, and transmission low/mid/high.

The soft-barrier group is the interesting one for designers. A curtain over a doorway does not block the sound behind it, it dulls it — which is the effect people usually reach for a low-pass filter to fake.


Occlusion

Each voice is simulated against the geometry between it and the listener, and muffled accordingly.

ModeBehaviourCost
RaycastA single ray. A source is occluded or it is not.Cheap.
VolumetricSamples a sphere of the configured radius.Higher, scaling with sample count.

Volumetric is what gives partial occlusion at edges — a sound leaking around a doorframe rather than switching off as it passes behind the jamb. If occlusion feels binary and abrupt, this is the setting to change.

Occlusion ducks the direct signal.


Reflections

Reverb is derived from the geometry around the listener — one shared room, recomputed as the listener moves through the level. Reflection Mode has a PerSource value reserved for future work; it currently falls back to Listener.

Two behaviours are worth understanding because they are deliberate design choices, not side effects:

Reverb eases between rooms. Crossing a geometry boundary blends the reverb toward the new room over the Reflection Smooth Time rather than snapping. Set it to 0 if you want an instant change.

Reverb does not fade with distance. Each voice taps its raw source into a wet-only reverb, so the room stays constant across its whole volume while only the dry signal falls off with distance. This is what makes a large room sound like the same room from either end of it. The reverb send does taper at the far edge of a sound’s range — flat until three quarters of max distance, then eased to zero — so an event’s distance settings still bound how far it feeds the room.


How It Stays Safe

Worth knowing if you are budgeting for this system.

Reflections use a parametric reverb model — a handful of decay-time floats — rather than convolution. No impulse response ever crosses to the audio thread, and there is no ambisonic decode in the path.

The reflection simulation runs on a worker thread at up to 15 Hz, committing its results under a mutex. Occlusion and direct-path values are lock-free single-writer floats. Everything else stays on the main thread.

The practical consequence: enabling geometric acoustics adds a bounded, predictable cost rather than a per-sound one that scales alarmingly.


What This Does Not Do

State these to yourself before evaluating the result — each is a deliberate v1 boundary, not a defect.

  • Reverb cannot tell your room from the one next door. It is listener-centric, so a source sealed in an adjacent room still contributes to the same shared reverb. Distinguishing them is what per-source reflections would do, and that is not built.
  • An occluded source still feeds the room. Occlusion ducks the direct signal only. Within max distance, a muffled source still excites the reverb.
  • Geometry is what you author. Render meshes and PhysX colliders are not consulted — v1 is authored volumes and O3DE Shapes.
  • No offline baking. There are no precomputed reverb probes.
  • Reverb is the tail, not early reflections. The parametric model gives you the decay, not discrete early reflections.
  • CPU only. There is no GPU acceleration path.

See Also

For related systems:

For conceptual overviews and usage guides:


Get GS_Audio

GS_Audio — Explore this gem on the product page and add it to your project.

4 - Klatt Voice Synthesis

Custom text-to-speech via Klatt formant synthesis with 3D spatial audio, phoneme mapping, and voice profiling.

The Klatt Voice Synthesis system provides custom text-to-speech using Klatt formant synthesis with full 3D spatial audio. Speech is generated by SoLoud and relayed into the miniaudio graph through a custom node, so it travels the same signal chain as every other sound – see the Audio Signal Model.

All types on this page are in the GS_AudioPro namespace.

The system has two layers:

  • KlattVoiceSystemComponent – A singleton that manages the shared SoLoud engine instance and tracks the 3D audio listener position.
  • KlattVoiceComponent – A per-entity component that generates speech, queues segments, applies voice profiles, and emits spatialized audio from the entity’s position.

Voice characteristics are defined through KlattVoiceProfile assets containing frequency, speed, waveform, formant, and phoneme mapping configuration. Phoneme maps convert input text to ARPABET phonemes for the Klatt synthesizer, with support for custom pronunciation overrides.

For usage guides and setup examples, see The Basics: GS_Audio.

Klatt Voice Profile asset in the O3DE Asset Editor

 

Contents


Components

KlattVoiceSystemComponent

Singleton component that manages the shared SoLoud engine and 3D listener tracking.

FieldValue
TypeId{F4A5D6E7-8B9C-4D5E-A1F2-3B4C5D6E7F8A}
ExtendsAZ::Component, AZ::TickBus::Handler
BusKlattVoiceSystemRequestBus (Single/Single)

KlattVoiceComponent

Per-entity voice component with spatial audio, phoneme mapping, and segment queue.

FieldValue
TypeId{4A8B9C7D-6E5F-4D3C-2B1A-0F9E8D7C6B5A}
ExtendsAZ::Component, AZ::TickBus::Handler
Request BusKlattVoiceRequestBus (Single/ById, entity-addressed)
Notification BusKlattVoiceNotificationBus (Multiple/Multiple)

API Reference

Request Bus: KlattVoiceSystemRequestBus

System-level voice management. Singleton bus – Single address, single handler.

MethodParametersReturnsDescription
GetSoLoudEngine–SoLoud::Soloud*Returns a pointer to the shared SoLoud engine instance.
SetListenerPositionconst AZ::Vector3& positionvoidUpdates the 3D audio listener position for spatial voice playback.
SetListenerOrientationconst AZ::Vector3& forward, const AZ::Vector3& upvoidUpdates the 3D audio listener orientation.
GetListenerPosition–AZ::Vector3Returns the current listener position.
IsEngineReady–boolReturns whether the SoLoud engine has been initialized and is ready.

Request Bus: KlattVoiceRequestBus

Per-entity voice synthesis controls. Entity-addressed bus – Single handler per entity ID.

MethodParametersReturnsDescription
Speakconst AZStd::string& textvoidConverts text to speech and plays it. Uses the component’s configured voice profile.
SpeakWithParamsconst AZStd::string& text, const KlattVoiceParams& paramsvoidConverts text to speech using the specified voice parameters instead of the profile defaults.
StopSpeaking–voidImmediately stops any speech in progress and clears the segment queue.
IsSpeaking–boolReturns whether this entity’s voice is currently producing speech.
QueueSegmentconst AZStd::string& textvoidAdds a speech segment to the queue. Queued segments play in order after the current segment finishes.
ClearQueue–voidClears all queued speech segments without stopping current playback.
SetVoiceProfileconst AZ::Data::Asset<KlattVoiceProfile>& profilevoidChanges the voice profile used by this component.
GetVoiceProfile–AZ::Data::Asset<KlattVoiceProfile>Returns the currently assigned voice profile asset.
SetSpatialConfigconst KlattSpatialConfig& configvoidUpdates the 3D spatial audio configuration for this voice.
GetSpatialConfig–KlattSpatialConfigReturns the current spatial audio configuration.
SetVolumefloat volumevoidSets the output volume for this voice (0.0 to 1.0).
GetVolume–floatReturns the current output volume.

Notification Bus: KlattVoiceNotificationBus

Events broadcast by voice components. Multiple handler bus – any number of components can subscribe.

EventParametersDescription
OnSpeechStartedconst AZ::EntityId& entityIdFired when an entity begins speaking.
OnSpeechFinishedconst AZ::EntityId& entityIdFired when an entity finishes speaking (including all queued segments).
OnSegmentStartedconst AZ::EntityId& entityId, int segmentIndexFired when a new speech segment begins playing.
OnSegmentFinishedconst AZ::EntityId& entityId, int segmentIndexFired when a speech segment finishes playing.

Data Types

KlattVoiceParams

Core voice synthesis parameters controlling the Klatt formant synthesizer output.

FieldValue
TypeId{8A9C7F3B-4E2D-4C1A-9B5E-6D8F9A2C1B4E}
FieldTypeDescription
Base FrequencyfloatFundamental frequency (F0) in Hz. Controls the base pitch of the voice.
SpeedfloatSpeech rate multiplier. 1.0 is normal speed.
DeclinationfloatPitch declination rate. Controls how pitch drops over the course of an utterance.
WaveformKlattWaveformGlottal waveform type used by the synthesizer.
Formant ShiftfloatShifts all formant frequencies up or down. Positive values raise pitch character, negative values lower it.
Pitch VariancefloatAmount of random pitch variation applied during speech for natural-sounding intonation.

KlattVoiceProfile

A voice profile asset combining synthesis parameters with a phoneme mapping.

FieldValue
TypeId{2CEB777E-DAA7-40B1-BFF4-0F772ADE86CF}
ReflectionRequires GS_AssetReflectionIncludes.h — see Serialization Helpers
FieldTypeDescription
Voice ParamsKlattVoiceParamsThe synthesis parameters for this voice profile.
Phoneme MapAZ::Data::Asset<KlattPhonemeMap>The phoneme mapping asset used for text-to-phoneme conversion.

KlattVoicePreset

A preset configuration for quick voice setup.

FieldValue
TypeId{2B8D9E4F-7C6A-4D3B-8E9F-1A2B3C4D5E6F}
FieldTypeDescription
Preset NameAZStd::stringDisplay name for this preset.
ProfileKlattVoiceProfileThe voice profile configuration stored in this preset.

KlattSpatialConfig

3D spatial audio configuration for voice positioning.

FieldValue
TypeId{7C9F8E2D-3A4B-5F6C-1E0D-9A8B7C6D5E4F}
FieldTypeDescription
Enable 3DboolWhether this voice uses 3D spatialization. When false, audio plays as 2D.
Min DistancefloatDistance at which attenuation begins. Below this distance the voice plays at full volume.
Max DistancefloatDistance at which the voice reaches minimum volume.
Attenuation ModelintThe distance attenuation curve type (linear, inverse, exponential).
Doppler FactorfloatIntensity of the Doppler effect applied to this voice. 0.0 disables Doppler.

KlattPhonemeMap

Phoneme mapping asset for text-to-ARPABET conversion with custom overrides.

FieldValue
TypeId{F3E9D7C1-2A4B-5E8F-9C3D-6A1B4E7F2D5C}
ReflectionRequires GS_AssetReflectionIncludes.h — see Serialization Helpers
FieldTypeDescription
Base MapBasePhonemeMapThe base phoneme dictionary to use as the foundation for conversion.
OverridesAZStd::vector<PhonemeOverride>Custom pronunciation overrides for specific words or patterns.

PhonemeOverride

A custom pronunciation rule that overrides the base phoneme map for a specific word or pattern.

FieldValue
TypeId{A2B5C8D1-4E7F-3A9C-6B2D-1F5E8A3C7D9B}
FieldTypeDescription
WordAZStd::stringThe word or pattern to match.
PhonemesAZStd::stringThe ARPABET phoneme sequence to use for this word.

Enumerations

KlattWaveform

Glottal waveform types available for the Klatt synthesizer.

FieldValue
TypeId{8ED1DABE-3347-44A5-B43A-C171D36AE780}
ValueDescription
SawSawtooth waveform. Bright, buzzy character.
TriangleTriangle waveform. Softer than sawtooth, slightly hollow.
SinSine waveform. Pure tone, smooth and clean.
SquareSquare waveform. Hollow, reed-like character.
PulsePulse waveform. Variable duty cycle for varied timbres.
NoiseNoise waveform. Breathy, whisper-like quality.
WarbleWarble waveform. Modulated tone with vibrato-like character.

BasePhonemeMap

Available base phoneme dictionaries for text-to-ARPABET conversion.

FieldValue
TypeId{D8F2A3C5-1B4E-7A9F-6D2C-5E8A1B3F4C7D}
ValueDescription
SoLoud_DefaultThe default letter-to-phoneme mapping built into SoLoud. Covers standard English pronunciation.
CMU_FullThe full CMU Pronouncing Dictionary — over 130,000 entries. Not yet functional.

KTT Voice Tags

KTT (Klatt Text Tags) are inline commands embedded in strings passed to KlattVoiceComponent::SpeakText. They are parsed by KlattCommandParser::Parse and stripped from the spoken text before synthesis begins — they are never heard.

Format: <ktt attr1=value1 attr2=value2>

Multiple attributes can be combined in a single tag. Attribute names are case-insensitive. String values may optionally be wrapped in quotes. An empty value (e.g. speed=) resets that parameter to the voice profile default.


speed=X

Override the speech speed multiplier from this point forward.

Range0.1 – 5.0
Default resetspeed= (restores profile default)
1.0Normal speed
Normal speech <ktt speed=2.0> fast bit <ktt speed=> back to default.

decl=X / declination=X

Pitch declination — how much pitch falls over the course of the utterance. Both decl and declination are accepted.

Range0.0 – 1.0
0.0Steady pitch (no fall)
0.8Strong downward drift
Rising <ktt decl=0.0> steady <ktt decl=0.8> falling voice.

waveform="TYPE"

Change the glottal waveform used by the synthesizer, setting the overall character of the voice.

ValueCharacter
sawDefault, neutral voice
triangleSofter, smoother
sin / sinePure tone, robotic
squareHarsh, mechanical
pulseRaspy, textured
noiseWhispered, breathy
warbleWobbly, character voice
<ktt waveform="noise"> whispered section <ktt waveform="saw"> normal voice.

vowel=X

First formant (F1) frequency multiplier. Shifts the quality of synthesised vowel sounds.

1.0Normal
> 1.0More open vowel quality
< 1.0More closed vowel quality
<ktt vowel=1.4> different vowel colour here.

accent=X

Second formant (F2) frequency multiplier. Shifts accent or dialect colouration.

1.0Normal
< 1.0Shifted accent colouring
<ktt accent=0.8> shifted accent here.

pitch=X

F0 pitch variance amount. Controls how much pitch varies during synthesis.

1.0Normal variance
> 1.0More expressive intonation
< 1.0Flatter, more monotone
<ktt pitch=2.0> very expressive speech <ktt pitch=0.1> flat monotone.

pause=X

Insert a pause of X seconds at this position in the voice playback. Value is required — there is no default.

Hello.<ktt pause=0.8> How are you?

Combined Example

Dialogue string using typewriter text commands and KTT voice tags together:

[b]Warning:[/b] [color=#FF0000]do not[/color] proceed.[pause=1]
<ktt waveform="square" pitch=1.8>This is a mechanical override.<ktt pause=0.5><ktt waveform="saw" pitch=1.0>
[speed=3]Resuming normal protocol.[/speed]

See Also

For conceptual overviews and usage guides:

For component references:

  • Audio Manager – Manager lifecycle that the voice system participates in

Get GS_Audio

GS_Audio — Explore this gem on the product page and add it to your project.