OpenWhisk从动作调用watson文本到语音动作

我正尝试从OpenWhisk操作中调用包含在Watson系统包(文本到语音)中的操作。

我已经绑定了服务,并设置了凭据,所以从CLI中我可以看到

wsk list entities in namespace: xxxxxx packages /xxxxxx/myWatson private binding 

这是我的OpenWhisk操作:

 function main(param) { //code here for my action. At the end, I invoke the text to speech if (...) { textToSpeech(param.text); } else { return whisk.error(error); } return whisk.async(); } function textToSpeech(text){ whisk.invoke({ name:'myWatson/textToSpeech', parameters:{ payload: text, voice: 'en-US_MichaelVoice', accept: 'audio/wav', encoding: 'base64' }, blocking: true, next: function(error, activation){ if(error){ return whisk.error(error); } else{ return whisk.done({msg:'success'}); } } }); } 

我得到以下错误

 "response": { "result": { "error": "The requested resource does not exist. (undefined)" }, "status": "application error", "success": false } 

你能帮助理解我做错了什么吗?

该行为的名称应完全限定,以包含名称空间。 在你的CLI输出中,看起来你的软件包是/xxxxxx/myWatson所以你在whisk.invoke中的whisk.invoke应该是/xxxxxx/myWatson/textToSpeech