【问题标题】:AWS PHP SDK - Polly Ignores Neural EngineAWS PHP SDK - Polly 忽略神经引擎
【发布时间】: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


    【解决方案1】:

    有趣的是,当我使用完全相同的代码时,我的请求正文是不同的:

    {"LanguageCode":"en-US","Text":"Why do you ignore the neural engine?","OutputFormat":"mp3","OutputS3BucketName":0,"OutputS3KeyPrefix":"polly-test\/","VoiceId":"Matthew","Engine":"neural"}
    

    由于某种原因,引擎参数正在从您的输入中删除。这可能是因为您在引入参数之前使用的是旧版本的 SDK;这将被添加到3.108.2。您使用的是哪个版本的 SDK?

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-11-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多