1

Bluemix アプリを作成して適切な資格情報を取得し、Fiddler Text to Speech (TTS) を使用してプロンプトを記録しました。録音は、デフォルトの「マイケル」の声を使用します。アリソンが欲しい。

「声」を渡そうとすると、選択として「マイケル」を指定した場合でも、次のエラーが発生します。

{
  "code_description": "Bad request",
  "code": 400,
  "error": "The argument(s) [u'voice'} are not allowed."
}

これは私のペイロードです:

{
"text": "Hello,, this is Dora. How are you today?",
"voice": "en-US_AllisonVoice"
}

開発者アカウントを持っていますが、「音声」を使用するにはサインアップする必要がありますか? デフォルトの「Michael」を渡しても?

4

1 に答える 1

2

パラメータの指定方法に問題があると思いますvoice。パラメータとパラメータは、GET でクエリ パラメータとして送信できます
voicetext

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

于 2015-10-27T18:10:36.677 に答える