menu
 

在 Audiokinetic 社区问答论坛上,用户可对 Wwise 和 Strata 相关问题进行提问和解答。如需从 Audiokinetic 技术支持团队获取答复,请务必使用技术支持申请单页面。

0 投票

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!

分类:General Discussion | 用户: Ando (190 分)

1个回答

0 投票

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

用户: Samuel L. (Audiokinetic) (23.6k 分)
Thanks for pointing that out. Rookie mistake.
...