text to speech - Watson TTS doesn't allow to choose voice -
created bluemix app proper credentials , using fiddler text speech(tts) record prompts. recordings use default "michael" voice. want allison.
if try passing in "voice", following error, when specify "michael" choice:
{ "code_description": "bad request", "code": 400, "error": "the argument(s) [u'voice'} not allowed." }
this payload:
{ "text": "hello,, dora. how today?", "voice": "en-us_allisonvoice" }
i have developer account, need sign use "voice"? if pass in default "michael"?
i think problem in way specifing voice
parameter.
voice
, text
parameters can send query parameters in get.
examples
1. curl
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"
node
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, dora. how today?', voice: 'en-us_allisonvoice', accept: 'audio/wav' }; // pipe synthesized text file text_to_speech.synthesize(params).pipe(fs.createwritestream('output.wav'));
see text speech api reference more examples on how call service.
try example above here:
https://text-to-speech-demo.mybluemix.net/api/synthesize?voice=en-us_allisonvoice&text=hello%2c%20this%20is%20dora.%20how%20are%20you%20today%3f
powered demo app: https://text-to-speech-demo.mybluemix.net
Comments
Post a Comment