我正在尝试使用Amazon的PHPSDK将AmazonPollyWeb服务集成到我的一个项目中。但是当我使用PollyClientSDK时,在客户端createSynthesizeSpeechPreSignedUrl()中只实现了一个方法,它返回一个url,而不是音频剪辑。当我尝试将url粘贴到浏览器窗口时,出现以下错误:"message":"Thesecuritytokenincludedintherequestisinvalid."请看我的代码片段:error_reporting(E_ALL);ini_set('display_errors',1);header('Content-
我正在使用AWS的JAVASDK创建一个Polly客户端。像这样:BasicAWSCredentialsawsCreds=newBasicAWSCredentials("","IAMsecretkey>");AmazonPollyClientapClient=(AmazonPollyClient)AmazonPollyClientBuilder.standard().withCredentials(newAWSStaticCredentialsProvider(awsCreds)).build();SynthesizeSpeechRequesttssRequest=newSynthes
因此,我在这里困扰着一个令人困惑的情况。我正在构建一个AmazonLex机器人,当拥有AmazonPolly以音频格式提供最终确认时,它只会给音频输出,但文本不会显示LEX控制台。例如,在我的Python代码中,这是最终确认文章:ifoutputDialogMode=='Text':returnclose(session_attributes,'Fulfilled',{'contentType':'PlainText','content':'Yourreservationhasbeenconfirmedfrom"+str(start_time)+"to"+str(end_time)+".You
这是我的脚本:AWS.config.region='eu-west-1';AWS.config.accessKeyId='FOO';AWS.config.secretAccessKey='BAR';varpolly=newAWS.Polly({apiVersion:'2016-06-10'});varparams={OutputFormat:'mp3',/*required*/Text:'Helloworld',/*required*/VoiceId:'Joanna',/*required*/SampleRate:'22050',TextType:'text'};polly.synth
这是我的脚本:AWS.config.region='eu-west-1';AWS.config.accessKeyId='FOO';AWS.config.secretAccessKey='BAR';varpolly=newAWS.Polly({apiVersion:'2016-06-10'});varparams={OutputFormat:'mp3',/*required*/Text:'Helloworld',/*required*/VoiceId:'Joanna',/*required*/SampleRate:'22050',TextType:'text'};polly.synth