RawAudioPath
RawAudioPath
#Overview
name: RawAudioPath
The value of this variable can be defined or overridden in .ini config files. 2
.ini config files referencing this setting variable.
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of RawAudioPath is to specify the directory path where raw audio files for localized dialogue are stored. This setting variable is primarily used in the localization and audio import systems of Unreal Engine 5.
Based on the callsites, the RawAudioPath variable is used in the Localization module and the UnrealEd module, specifically in the ImportLocalizedDialogueCommandlet. These subsystems rely on this setting variable for importing localized dialogue audio.
The value of this variable is set in the localization configuration file, which is generated by the GenerateImportDialogueConfigFile function in the LocalizationConfigurationScript namespace. It is also defined as a config property in the FImportDialogueSettings struct, suggesting that it can be set through project settings or configuration files.
RawAudioPath interacts with other variables such as ImportedDialogueFolder and bImportNativeAsSource, which are part of the same ImportDialogueSettings structure. These variables work together to define the import process for localized dialogue.
Developers must be aware that:
- The RawAudioPath should point to a directory containing culture sub-folders, each containing raw WAV files to import.
- The path must exist and be valid for the import process to work correctly.
- This setting is crucial for the ImportLocalizedDialogueCommandlet to function properly.
Best practices when using this variable include:
- Ensure the path is set correctly in the localization configuration.
- Maintain a consistent folder structure with culture sub-folders containing the raw audio files.
- Regularly validate the path to ensure it remains valid as the project evolves.
- Use relative paths when possible to maintain portability across different development environments.
- Coordinate with the localization team to ensure the correct audio files are placed in the specified directory before running the import process.
#Setting Variables
#References In INI files
Location: <Workspace>/Projects/Lyra/Config/Localization/EngineOverrides_ImportDialogue.ini:25, section: [GatherTextStep0]
- INI Section:
GatherTextStep0
- Raw value: ``
- Is Array:
False
Location: <Workspace>/Projects/Lyra/Config/Localization/Game_ImportDialogue.ini:25, section: [GatherTextStep0]
- INI Section:
GatherTextStep0
- Raw value: ``
- Is Array:
False
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Source/Developer/Localization/Private/LocalizationConfigurationScript.cpp:1045
Scope (from outer to inner):
file
namespace LocalizationConfigurationScript
function FLocalizationConfigurationScript GenerateImportDialogueConfigFile
Source code excerpt:
ConfigSection.Add(TEXT("CommandletClass"), TEXT("ImportLocalizedDialogue"));
ConfigSection.Add(TEXT("RawAudioPath"), Target->Settings.ImportDialogueSettings.RawAudioPath.Path);
ConfigSection.Add(TEXT("ImportedDialogueFolder"), Target->Settings.ImportDialogueSettings.ImportedDialogueFolder);
ConfigSection.Add(TEXT("bImportNativeAsSource"), Target->Settings.ImportDialogueSettings.bImportNativeAsSource ? TEXT("true") : TEXT("false"));
Script.AddGatherTextStep(0, MoveTemp(ConfigSection));
}
#Loc: <Workspace>/Engine/Source/Developer/Localization/Public/LocalizationTargetTypes.h:372
Scope: file
Source code excerpt:
/** Path to the folder to import the audio from. This folder is expected to contain culture sub-folders, which in turn contain the raw WAV files to import. */
UPROPERTY(config, EditAnywhere, Category="Dialogue")
FDirectoryPath RawAudioPath;
/** Folder in which to create the generated sound waves. This is relative to the root of the L10N culture folder (or the root content folder if importing native dialogue as source dialogue). */
UPROPERTY(config, EditAnywhere, Category="Dialogue")
FString ImportedDialogueFolder;
/** Should the dialogue for the native culture be imported as if it were source audio? If false, the native culture dialogue will be imported as localized data for the native culture. */
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/ImportLocalizedDialogueCommandlet.cpp:110
Scope (from outer to inner):
file
function int32 UImportLocalizedDialogueCommandlet::Main
Source code excerpt:
// Source path to the raw audio files that we're going to import
FString RawAudioPath;
if (!GetPathFromConfig(*SectionName, TEXT("RawAudioPath"), RawAudioPath, ConfigPath))
{
UE_LOG(LogImportLocalizedDialogueCommandlet, Error, TEXT("No raw audio path specified."));
return -1;
}
if (!FPaths::DirectoryExists(RawAudioPath))
{
UE_LOG(LogImportLocalizedDialogueCommandlet, Error, TEXT("Invalid raw audio path specified: %s."), *RawAudioPath);
return -1;
}
// Folder in which to place automatically imported sound wave assets
FString ImportedDialogueFolder;
if (!GetStringFromConfig(*SectionName, TEXT("ImportedDialogueFolder"), ImportedDialogueFolder, ConfigPath))
#Loc: <Workspace>/Engine/Source/Editor/UnrealEd/Private/Commandlets/ImportLocalizedDialogueCommandlet.cpp:169
Scope (from outer to inner):
file
function int32 UImportLocalizedDialogueCommandlet::Main
Source code excerpt:
FCultureImportInfo& CultureImportInfo = CultureImportInfoMap.Add(CultureName);
CultureImportInfo.Name = CultureName;
CultureImportInfo.AudioPath = RawAudioPath / CultureName;
CultureImportInfo.ArchiveFileName = SourcePath / CultureName / ArchiveName;
CultureImportInfo.LocalizedRootContentPath = RootContentDir / TEXT("L10N") / CultureName;
CultureImportInfo.LocalizedRootPackagePath = RootAssetPath / TEXT("L10N") / CultureName;
CultureImportInfo.LocalizedImportedDialoguePackagePath = CultureImportInfo.LocalizedRootPackagePath / ImportedDialogueFolder;
CultureImportInfo.bIsNativeCulture = CultureName == NativeCulture;
}