Amazon Polly 直接到 S3

Amazon Polly to S3 Directly

有没有告诉亚马逊的 Polly 服务直接将音频文件转储到 S3?

使用 SDK 可以获得响应流,然后我可以将其上传到 S3,但我希望跳过这一步直接执行。

我已经尝试发送 Polly S3 预签名 post url 作为文件位置,但没有成功。

更新: 自从提出问题后,这成为可能。参见 Amazon Polly Now Supports Input Character Limit of 100K and Stores Output Files in S3

嘿,你可以看看 启动语音合成任务

从 2018 年 7 月 17 日起,根据 https://aws.amazon.com/about-aws/whats-new/2018/07/amazon-polly-now-supports-input-character-limit-of-100k-and-stores-output-files-in-s3/:

这是可能的

Starting today, you can...store the output files in S3.

@Mohit 是正确的 - 虽然我不知道 AWS Polly Ruby SDK 中是否有本机支持,但肯定通过 REST API 支持它。根据 StartSpeechSynthesisTask 操作的 docsStartSpeechSynthesisTask:

...This operation requires all the standard information needed for speech synthesis, plus the name of an Amazon S3 bucket for the service to store the output of the synthesis task and two optional parameters (OutputS3KeyPrefix and SnsTopicArn).

请求语法为:

POST /v1/synthesisTasks HTTP/1.1
Content-type: application/json

{
   "Engine": "string",
   "LanguageCode": "string",
   "LexiconNames": [ "string" ],
   "OutputFormat": "string",
   "OutputS3BucketName": "string",
   "OutputS3KeyPrefix": "string",
   "SampleRate": "string",
   "SnsTopicArn": "string",
   "SpeechMarkTypes": [ "string" ],
   "Text": "string",
   "TextType": "string",
   "VoiceId": "string"
}