Wwise Unreal Integration Documentation
Localization of Audio Assets
This feature is only available when using Event-Based Packaging

Special considerations when working with localized assets

Special care must be taken when making changes to localized sounds, as it is not currently possible for the soundbank generation process to detect certain changes have been made. Here is a list of the known issues with localized assets and how to avoid them.

The data in localized assets must be cleared after making the following changes :

  • Setting the Required Bank of an Event referencing localized media.
    • Only the Event's data needs to be cleared.
  • After changing a sound source from a Voice to SFX or vice-versa.
    • Any events referencing this source media should have their data cleared.

See Clearing Sound Data for more information on how to clear the sound data of specific assets.

If you are generating soundbanks with WwiseConsole (as opposed to via WAAPI), you must be careful of obsolete generated bank metadata remaining in the GeneratedSoundBanks folder. This metadata will still be parsed during the bank generation process and can lead to unpredictable behaviour. The best practice is to clear this folder on a regular basis.

During soundbank generation, localized banks and media can be loaded and unloaded asymmetrically, leading to erroneous reference counting. If switching languages when in editor does not seem to be functioning properly after generating sound data, try restarting the editor (after saving your changes).

Connecting the Wwise Authoring profiler in Profile and Edit mode can load soundbanks of the current locale in Authoring and which will have unpredictable effects on localized bank load states. When profiling and interacting with localized banks it is recommended to use the Profile Only mode.

How to work with localized assets

Localized soundbanks and events are used in the same way as their normal counterparts, however their language-specific data is stored in a separate asset. All localized asset data is generated under the Localized folder in your Wwise Sound Data Folder. Localized events, banks and media are put inside language-specific folders, allowing for easy exclusion of specific languages from packages.

In order to exclude certain languages from your packaged game, add the [Wwise Sound Data Folder]/Localized/[Language Name] folder to Directories to never cook in your project's packaging settings.

To update the audio language/culture, you can use either the Set Current Audio Culture blueprint node:

or the Set Current Audio Culture Async blueprint node:

or the C++ API FAkAudioDevice::Get()->SetCurrentAudioCulture().

You can pass either a Wwise Language or an Unreal culture to the C++ function or blueprint node.

Due to limitations in the Wwise Sound Engine, if a localized sound is playing, its bank cannot be unloaded and switching languages will fail for that sound. The best practice is to ensure no localized sounds are playing before calling SetCurrentAudioCulture. When switching from language A to language B, subsequent calls to switch to language B will have no effect on sounds that failed to switch, even if they are no longer playing. The only way to fix the localization state for that sound is to switch back to language A.

The mapping of Unreal Culture to Wwise Language can be found in the Wwise Integration Settings.

You can use any variation of ISO 639-1 language codes and optionally an ISO 3166 country codes (ex: fr-CA, en-GB) for the Unreal culture.

When SetCurrentAudioCulture() is called:

  1. The Integration iterates over all the UAkAudioEvents and UAkAudioBanks, unloads the old localized bank data and media assets and then loads the new localized bank data and media assets.
    • The bank data and media assets are hard-referenced by the assets, however the media assets will only load their data if they match the current language.
    • When switching languages, there is therefore a certain delay between when SetCurrentAudioCulture is called and media assets have finished loading their data from the disk
    • The UAkAudioEvent::IsLocalizationReady function is used to check whether all localized media needed by an event is loaded.
      • The blueprint SetCurrentAudioCulture functions use this to check that the language change has completed before continuing.
  2. The Integration sets the CurrentLanguage of AK::StreamMgr.
  3. A Garbage Collection is forced, getting rid of old localized assets in memory.
Because of a limitation in the Unreal Asset Registry, ensure new assets are saved when generating new localized Sound Data. Not doing so will result in missing media when playing in Editor.