【发布时间】:2021-12-08 03:18:24
【问题描述】:
我不知道为什么 AWS 会忽略“神经”引擎并仅输出标准语音。我尝试过其他 NTTS 声音和其他地区。同样的事情一遍又一遍。正如您在调试结果request.body was set to... 中所见,'Engine' => 'neural' 设置被忽略且未显示。请帮忙。谢谢。
SpeechSynthesisTask, Polly Voices
try {
$result = $client->startSpeechSynthesisTask([
'LanguageCode' => 'en-US',
'Text' => 'Why do you ignore the neural engine?',
'OutputFormat' => 'mp3',
'OutputS3BucketName' => xyz-bucket,
'OutputS3KeyPrefix' => 'polly-test/',
'VoiceId' => 'Matthew',
'Engine' => 'neural'
]);
$taskId = $result['SynthesisTask']['TaskId'];
print('<p>Task started: ' . $taskId . '</p>');
var_dump($result);
} catch (AwsException $e) {
// output error message if fails
echo $e->getMessage();
echo "\n";
调试结果显示:
request.body was set to {"LanguageCode":"en-US","Text":"Why do you ignore the neural engine?","OutputFormat":"mp3","OutputS3BucketName":"xyz-bucket","OutputS3KeyPrefix":"polly-test\/","VoiceId":"Matthew"}
【问题讨论】:
标签: amazon-web-services aws-php-sdk amazon-polly