1
我試圖從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
}
你能幫助理解我做錯了什麼嗎?