Version

menu_open
Wwise SDK 2019.1.11
ak.wwise.core.audio.import

Create Wwise objects and import audio files. This function is using the same importation processor available through the Tab Delimited import in the Audio File Importer. The function returns an array of all objects created, replaced or re-used. Use the options to specify how the objects are returned. For more information, refer to Importing Audio Files and Creating Structures.

Arguments

Name Type Description
default object Default values for each item in "imports". Use this object to avoid repeating common properties of every imported element.
default.originalsSubFolder string Specifies the originals sub-folder in which to place the imported audio file. This folder is relative to the originals folder in which the file would normally be imported. Example: if importing an SFX, then the audio file will be imported to the folder Originals\SFX\originalsPath.
default.switchAssignation string Defines a Switch Group or State Group that will be associated to a Switch Container, within the Actor-Mixer Hierarchy only. Also defines which Switch Container's child will be assigned to which Switch or State from the associated group. Refer to Tab Delimited Import in the Wwise Help documentation for more information.
default.importLocation any of: Object ID (GUID), name, or path used as root relative object paths.
string The name of the object qualified by its type in the form of type:name. Only object types that have globally-unique names are supported. Ex: Event:Play_Sound_01
string An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
string A project path to a Wwise object, including the category and the work-unit. For example: \Actor-Mixer Hierarchy\Default Work Unit\New Sound SFX.
default.audioFileBase64 string Base64 encoded WAV audio file data to import with its target file path relative to the Originals folder, separated by a vertical bar. E.g. 'MySound.wav|UklGRu...'.
default.objectPath string The path and name of the object(s) to be created. The path uses backslashes and can either be absolute or relative. Object types can be specified before the name. For example:
\\Actor-Mixer Hierarchy\\Default Work Unit\\<Random Container>MyContainer\\<Sound>MySound. 
Refer to Wwise Objects Reference for the available types.
default.event string Defines the path and name of an Event to be created for the imported object. Refer to Tab Delimited Import in the Wwise Help documentation for more information.
default.dialogueEvent string Defines the path and name of a Dialogue Event to be created for the imported object. Refer to Tab Delimited Import in the Wwise Help documentation for more information.
default.audioSourceNotes string The "Notes" field of the created audio source object.
default.notes string The "Notes" field of the created object.
default.objectType string Specifies the type of the object to create when importing an audio file. This type can also be specified directly in the objectPath. Refer to Wwise Objects Reference for the available types.
default.audioFile string Path to media file to import. This path must be accessible from Wwise. For using WAAPI on Mac, please refer to Using WAAPI on Mac .
default.importLanguage string Import language for audio file import (from among the project's defined languages, found in the WPROJ file LanguageList).
default.regex(^@[:_a-zA-Z0-9]+$) any of: Specify a Wwise object property and its value. Property names are prefixed with . Refer to Wwise Objects Reference for the properties available. For example: @Volume:3
The value of a property.
null A null value. No reference to an object.
string A string value.
number A numerical value.
boolean A boolean value.
imports * array Array of import commands.
imports [...] object Import command. The members of this object are combined with those of "default", with this object's members having precedence. In addition to the listed properties, you can also set wobject properties and references using @Property; for instance, set the volume by adding the @Volume property. References that have constraints from other references, such as a Switch Container's State/Switch which is constrained to being a child of a State/Switch Group, should not be set because WAAPI does not ensure that a reference is set in the required order.
imports[...].originalsSubFolder string Specifies the originals sub-folder in which to place the imported audio file. This folder is relative to the originals folder in which the file would normally be imported. Example: if importing an SFX, then the audio file will be imported to the folder Originals\SFX\originalsPath.
imports[...].switchAssignation string Defines a Switch Group or State Group that will be associated to a Switch Container, within the Actor-Mixer Hierarchy only. Also defines which Switch Container's child will be assigned to which Switch or State from the associated group. Refer to Tab Delimited Import in the Wwise Help documentation for more information.
imports[...].importLocation any of: Object ID (GUID), name, or path used as root relative object paths.
string The name of the object qualified by its type in the form of type:name. Only object types that have globally-unique names are supported. Ex: Event:Play_Sound_01
string An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
string A project path to a Wwise object, including the category and the work-unit. For example: \Actor-Mixer Hierarchy\Default Work Unit\New Sound SFX.
imports[...].audioFileBase64 string Base64 encoded WAV audio file data to import with its target file path relative to the Originals folder, separated by a vertical bar. E.g. 'MySound.wav|UklGRu...'.
imports[...].objectPath * string The path and name of the object(s) to be created. The path uses backslashes and can either be absolute or relative. Object types can be specified before the name. For example:
\\Actor-Mixer Hierarchy\\Default Work Unit\\<Random Container>MyContainer\\<Sound>MySound. 
Refer to Wwise Objects Reference for the available types.
imports[...].event string Defines the path and name of an Event to be created for the imported object. Refer to Tab Delimited Import in the Wwise Help documentation for more information.
imports[...].dialogueEvent string Defines the path and name of a Dialogue Event to be created for the imported object. Refer to Tab Delimited Import in the Wwise Help documentation for more information.
imports[...].audioSourceNotes string The "Notes" field of the created audio source object.
imports[...].notes string The "Notes" field of the created object.
imports[...].objectType string Specifies the type of the object to create when importing an audio file. This type can also be specified directly in the objectPath. Refer to Wwise Objects Reference for the available types.
imports[...].audioFile string Path to media file to import. This path must be accessible from Wwise. For using WAAPI on Mac, please refer to Using WAAPI on Mac .
imports[...].importLanguage string Import language for audio file import (from among the project's defined languages, found in the WPROJ file LanguageList).
imports[...].regex(^@[:_a-zA-Z0-9]+$) any of: Specify the value of the property. Refer to Wwise Objects Reference for the properties available.
The value of a property.
null A null value. No reference to an object.
string A string value.
number A numerical value.
boolean A boolean value.
autoAddToSourceControl boolean Determines if Wwise will automatically perform an Add or Checkout operation on the imported files with the source control. Defaults to false.
importOperation string Determines how import object creation is performed. For each object created:
  • createNew: will create a new object; the object will be given the desired name if possible, otherwise a new unique name will be used.
  • useExisting: will use the object if it exists, updating the specified properties; otherwise it will create a new object. This is the default value.
  • replaceExisting: will create a new object; if an existing object has the same name then the existing object is destroyed.
    Possible values:
  • createNew
  • useExisting
  • replaceExisting

(Required *)

Arguments Schema

Options

Name Type Description
platform any of: The ID (GUID) or name of the platform.
string The name of the platform.
string The id of the platform.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
return array Specifies what is being returned for every object. Refer to Wwise Objects Reference for more information on the properties and references available.
The array of return expressions defines which elements of the Wwise object will be returned. This can include built-in accessors, such as the name or id, or object properties, such as the Volume or Pitch.
return [...] any of: A return expression.
string Specifies one or many of the built-in accessors for Wwise objects.
Possible values:
  • id
  • name
  • notes
  • type
  • shortId
  • classId
  • category
  • filePath
  • workunit
  • parent
  • owner
  • path
  • isPlayable
  • childrenCount
  • totalSize
  • mediaSize
  • objectSize
  • structureSize
  • sound:convertedWemFilePath
  • sound:originalWavFilePath
  • soundbank:bnkFilePath
  • music:transitionRoot
  • music:playlistRoot
  • audioSource:playbackDuration
  • audioSource:maxDurationSource
  • audioSource:trimValues
  • audioSource:maxRadiusAttenuation
  • audioSource:language
  • workunit:isDefault
  • workunit:type
  • workunit:isDirty
  • switchContainerChild:context
string Specifies one or many dot-separated accessors that form a query and yields a value or an object reference. Specifying a single @ returns the value of the property for the associated object. Specifying a double @ returns the value of the property for the source of override. Refer to Wwise Objects Reference .
language any of: The ID (GUID) or name of the language.
string The name of the language.
string The id of the language.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.

Options Schema

Result

Name Type Description
objects array Array of objects.
objects [...] object Import command. The members of this object are combined with those of "default", with this object's members having precedence. In addition to the listed properties, you can also set wobject properties and references using @Property; for instance, set the volume by adding the @Volume property. References that have constraints from other references, such as a Switch Container's State/Switch which is constrained to being a child of a State/Switch Group, should not be set because WAAPI does not ensure that a reference is set in the required order.
A Wwise object. Use the return options to specify which property is required.
objects[...].soundbank:bnkFilePath string Absolute path to the generated SoundBank file associated with the SoundBank object. Only valid for SoundBank objects. For using WAAPI on Mac, please refer to Using WAAPI on Mac .
objects[...].objectSize integer The amount of space (in bytes) the meta-data of the object will take up in a SoundBank. This does not include media files. Note that SoundBanks need to be generated for this value to be accurate.
objects[...].audioSource:maxDurationSource object Audio source with longest duration. This applies to all objects that can contain Audio Source objects, either directly as a source or indirectly through descendants.
objects[...].audioSource:maxDurationSource.id string The ID (GUID) of the audio source object with longest duration.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].audioSource:maxDurationSource.trimmedDuration number The duration in seconds of the longest trimmed source.
objects[...].music:transitionRoot object The music transition root containing all other music transitions recursively.
objects[...].music:transitionRoot.id string The ID (GUID) of the object.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].workunit:type string The type of the Work Unit. Please note that, like Work Units, physical folders have the type "WorkUnit". Physical folders will have the workunit:type "folder".
Possible values:
  • folder
  • rootFile
  • nestedFile
objects[...].owner object The owner of the object. This applies to objects being locally owned by other objects, such as custom effects, custom attenuations, etc.
objects[...].owner.id string The ID (GUID) of the object.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].owner.name string The name of the object.
objects[...].mediaSize integer The total converted size (in bytes) of the media files of this object and all of its children. Note that SoundBanks need to be generated for this value to be accurate.
objects[...].sound:originalWavFilePath string Absolute path to the original wav file. Only valid for Sound and Audio Source objects. For using WAAPI on Mac, please refer to Using WAAPI on Mac .
objects[...].structureSize integer The amount of space (in bytes) the meta-data of the object and all of its children will take up in a SoundBank. This does not include media files. Note that SoundBanks need to be generated for this value to be accurate.
objects[...].id string The ID (GUID) of the object.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].category string The category of the object. Ex: 'Actor-Mixer Hierarchy'
objects[...].switchContainerChild:context object The context object associated with the child of a Switch Container. This object holds the properties associated with the child that are context-dependent for the Switch Container (for example: property for the 1st only checkbox).
objects[...].switchContainerChild:context.id string The ID (GUID) of the object.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].totalSize integer The amount of space (in bytes) this object and all of its children will take up in a SoundBank. This does not include the objectSize. Note that SoundBanks need to be generated for this value to be accurate.
objects[...].type string The type of the object. Refer to Wwise Objects Reference for more information on the types available.
objects[...].workunit:isDefault boolean True if the work unit is the default.
objects[...].isPlayable boolean True if the object can be played in Transport.
objects[...].audioSource:trimValues object Range of time for which the audio source is trimmed.
objects[...].audioSource:trimValues.trimBegin number The time value in seconds of the start trim.
objects[...].audioSource:trimValues.trimEnd number The time value in seconds of the end trim.
objects[...].audioSource:maxRadiusAttenuation object Attenuation with the largest radius. This applies to all objects that can contain Audio Source objects, either directly as a source or indirectly through descendants.
objects[...].audioSource:maxRadiusAttenuation.radius number The radius of the attenuation object.
objects[...].audioSource:maxRadiusAttenuation.id string The ID (GUID) of the attenuation object with the largest radius.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].parent object The parent of the object in the hierarchy.
objects[...].parent.id string The ID (GUID) of the object.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].parent.name string The name of the object.
objects[...].filePath string The path to the file containing the object. The path can be a Work Unit file or a project file. For using WAAPI on Mac, please refer to Using WAAPI on Mac .
objects[...].workunit:isDirty boolean True if a Work Unit or a Project (wproj file) is dirty, meaning it is modified but not saved.
objects[...].workunit object The parent Work Unit containing the object. The 'id' and the 'name' will be returned.
objects[...].workunit.id string The ID (GUID) of the object.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].workunit.name string The name of the object.
objects[...].shortId integer The short ID of the object.
objects[...].sound:convertedWemFilePath string Absolute path to the converted wem file. Specify the platform in the options. Only valid for Sound and Audio Source objects. For using WAAPI on Mac, please refer to Using WAAPI on Mac .
objects[...].audioSource:playbackDuration object The duration root that contains the min and max durations and duration type. This applies to all objects that can contain Audio Source objects, either directly as a source or indirectly through descendants.
objects[...].audioSource:playbackDuration.playbackDurationMin number The minimum possible time playback can take.
objects[...].audioSource:playbackDuration.playbackDurationMax number The maximum possible time playback can take.
objects[...].audioSource:playbackDuration.playbackDurationType string The type of duration.
objects[...].path string The path of the object from the project root. Ex: '\Actor-Mixer Hierarchy\Default Work Unit\Sound1'
objects[...].music:playlistRoot object The music playlist root containing all other music playlist items recursively. This applies to Music Playlist Containers only.
objects[...].music:playlistRoot.id string The ID (GUID) of the object.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].classId integer The class ID of the object.
Unsigned Integer 32-bit.
Range: [0,4294967295]
objects[...].name string The name of the object.
objects[...].audioSource:language object Language associated to the audio source. This only applies to Audio Source objects directly.
objects[...].audioSource:language.id string The ID (GUID) of the Language object to which the Audio Source object is associated.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].audioSource:language.name string The name of the Language object to which the Audio Source object is associated.
objects[...].notes string The notes of the object.
objects[...].childrenCount number The number of children for the object.
objects[...].regex(^((@?@?[a-zA-Z0-9:_]+)|[a-zA-Z]+(.+))(.@?@?[a-zA-Z0-9:_]+|[a-zA-Z]+(.+))*$) any of: Specifies dot-separated accessors that form a query and yields a property value or an object reference. A single @ specifies the value of the property for the associated object. A double @ specifies the value of the property using the source of override. Refer to Wwise Objects Reference for more information on the properties and references for all types available.
string A string value.
number A numeric value.
boolean A boolean value.
object An object reference value.
objects[...].regex(^((@?@?[a-zA-Z0-9:_]+)|[a-zA-Z]+(.+))(.@?@?[a-zA-Z0-9:_]+|[a-zA-Z]+(.+))*$).id string The ID (GUID) of the object.
An object GUID of the form: {aabbcc00-1122-3344-5566-77889900aabb}.
objects[...].regex(^((@?@?[a-zA-Z0-9:_]+)|[a-zA-Z]+(.+))(.@?@?[a-zA-Z0-9:_]+|[a-zA-Z]+(.+))*$).name string The name of the object.

Result Schema

See Also

Examples

Refer to Using the Wwise Authoring API (WAAPI) for more information about WAAPI.


Was this page helpful?

Need Support?

Questions? Problems? Need more info? Contact us, and we can help!

Visit our Support page

Tell us about your project. We're here to help.

Register your project and we'll help you get started with no strings attached!

Get started with Wwise