1
OpenWhiskアクションからWatsonシステムパッケージ(テキスト/スピーチ)に含まれるアクションを呼び出そうとしています。OpenWhiskは、ワトソンのテキストをアクションの発動アクションに呼び出す
私はサービスをバインドされているとセットアップの資格情報をので、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
}
私が間違っていることを理解するのに役立つことができますか?