パラメータの指定方法に問題があると思いますvoice
。パラメータとパラメータは、GET でクエリ パラメータとして送信できます
。voice
text
例
1.カール
curl -u "{username}":"{password}" "https://stream.watsonplatform.net/text-to-speech/api/v1/synthesize?voice=en-US_AllisonVoice&text=Hello%2C%20this%20is%20Dora.%20How%20are%20you%20today%3F"
ノード
var watson = require('watson-developer-cloud');
var fs = require('fs');
var text_to_speech = watson.text_to_speech({
username: '<username>',
password: '<password>',
version: 'v1'
});
var params = {
text: 'Hello, this is Dora. How are you today?',
voice: 'en-US_AllisonVoice',
accept: 'audio/wav'
};
// Pipe the synthesized text to a file
text_to_speech.synthesize(params).pipe(fs.createWriteStream('output.wav'));
サービスを呼び出す方法のその他の例については、Text to Speech API リファレンスを参照してください。
ここで上記の例を試してください。
https://text-to-speech-demo.mybluemix.net/api/synthesize?voice=en-US_AllisonVoice&text=Hello%2C%20this%20is%20Dora.%20How%20are%20you%20today%3F
デモアプリを利用: https://text-to-speech-demo.mybluemix.net