An NPC whose voice reacts to the acoustics around it. If you stand two steps away but behind a wall, it starts shouting, because the sound has to travel all the way around a corner to reach you.
The vocal effort is picked from the effective acoustic distance, meaning how far the sound actually has to travel, rather than the straight line distance to the listener.
The NPC also chooses what to say based on the acoustic situation, with separate lines for being behind a wall, being just around a corner, and the moment the player steps out of sight.
The voice itself runs through the same diffraction and occlusion system, so you hear it bend around corners and muffle through walls as the player moves.
The voice lines are pre-generated locally with an AI voice model, using recordings of my own voice as the reference, with one render per line for each effort level. There are some noticeable artifacts, especially in the shouted lines.
Built in Unreal Engine 5 with C++ and MetaSound. The voice bank is generated by a Python tool using Chatterbox.
The diffraction system this is built on: • Real-Time Sound Diffraction System in Unre...
Portfolio: https://joelschultz.net
#UnrealEngine5 #GameAudio #AudioProgramming