Is there anyway to tell Amazon's Polly service to dump the audio file to S3 directly?
Using the SDK you can get a stream of the response, which I can then upload to S3, but I was hoping to skip the step and do it directly.
I've tried sending Polly S3-presigned post url as the file location but haven't gotten it to work.
Update: This became possible since the question was asked. See Amazon Polly Now Supports Input Character Limit of 100K and Stores Output Files in S3.
Hey you can have a look in startSpeechSynthesisTask
This is possible as of July 17, 2018, per 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 is correct - while I do not know if there is native support in the AWS Polly Ruby SDK, it is certainly supported via the REST API. Per the docs for the StartSpeechSynthesisTask action, StartSpeechSynthesisTask:
...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).
Request syntax is:
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"
}