Audiokinetic's Community Q&A is the forum where users can ask and answer questions within the Wwise and Strata communities. If you would like to get an answer from Audiokinetic's Technical support team, make sure you use the Support Tickets page.

WAAPI can't get audio file on mac using NodeJS or Python

0 votes

I wrote a script which should allow me to create new audio files under an object. Unfortunately I can't get the file from my local drive. I wrote two scripts one in Python and one in NodeJS none of them seem to work.

Here is my code

function importSound(session){
  var newImport = {
    importOperation: "createNew",
    default: {
      importLanguage: "SFX"
    },
    imports: [
      {
        objectPath: "{6A59D4C5-5927-4C64-82AF-4A0CBFBD4C05}",
        audioFile: 'Y:\\Game\\Audio\\WWise\\Game\\Originals\\intros\\intro1.wav'
      },
      {
        objectPath: "{6A59D4C5-5927-4C64-82AF-4A0CBFBD4C05}",
        audioFile: 'Y:\\Game\\Audio\\WWise\\Game\\Originals\\intros\\intro2.wav'
      }
    ]
  }

  console.log(newImport)

  session.call('ak.wwise.core.object.import', [], newImport ).then(
    function(res) {
      console.log(res)
    },
    function (error) {
      console.log('error: ', error);
    }
  ).then(
    function() {
      connection.close();
    }
  );
}

 

I get the following error

{
  importOperation: 'createNew',
  default: { importLanguage: 'SFX' },
  imports: [
    {
      objectPath: '{6A59D4C5-5927-4C64-82AF-4A0CBFBD4C05}',
      audioFile: 'Y:\\Game\\Audio\\WWise\\Game\\Originals\\intros\\intro1.wav'
    },
    {
      objectPath: '{6A59D4C5-5927-4C64-82AF-4A0CBFBD4C05}',
      audioFile: 'Y:\\Game\\Audio\\WWise\\Game\\Originals\\intros\\intro2.wav'
    }
  ]
}
error:  Error {
  error: 'ak.wwise.invalid_procedure_uri',
  args: [],
  kwargs: {
    message: 'The procedure URI is unknown.',
    details: { procedureUri: 'ak.wwise.core.object.import' }
  }
}

Location of files on drive

 

I also wrote the same script in python but I  get the same error. What is the correct way to reference images on a mac drive? I read the documentation but following that just leads to this error.

 

Here is what the documentation explains

WAAPI uses Windows-style paths to access files, with the root folder "/" represented by drive Z and the home folder drive Y. For example, in order to load project "/Volumes/path/to/MyProject.wproj", you must use path "Z:\Volumes\path\to\MyProject.wproj".

In case of doubt, you can refer to the project path as displayed in the recent projects in Wwise.

My project is located in Y:\\Game\\Audio\\WWise\\Game\\

Also, I'm on a macbook Silicon if that has any implications.

Any help will be greatly appreciated!

asked Aug 5, 2022 in General Discussion by Ando (190 points)

1 Answer

0 votes

The error "The procedure URI is unknown." indicates the URI (the first argument to the client's call function) isn't a defined function. Indeed, "ak.wwise.core.object.import" is not a defined function, you instead meant "ak.wwise.core.audio.import".

https://www.audiokinetic.com/library/edge/?source=SDK&id=ak_wwise_core_audio_import.html

answered Aug 8, 2022 by Samuel L. (Audiokinetic) (23,300 points)
Thanks for pointing that out. Rookie mistake.
...