flogy / gatsby-mdx-tts

🗣 Adds speech output to your Gatsby site using Amazon Polly.
https://gatsby-mdx-tts.netlify.com
MIT License
10 stars 2 forks source link

Handle long texts #6

Open flogy opened 4 years ago

flogy commented 4 years ago

AWS Polly's SynthesizeSpeech task only supports texts with up to 3'000 characters. We should make sure that also longer texts can be handled. E.g. by using asynchronous synthesis. See: https://docs.aws.amazon.com/polly/latest/dg/asynchronous.html

Could also be handled by splitting up the text or something like that.

ghost commented 3 years ago

I can have a look at this task if you want.

Would it even make sense to differentiate between text that is less than 3'000 characters wrong and longer text? Or couldn't we just use the asynchronous API everywhere? Because the asynchronous API requires an S3 bucket, this would also solve the caching issue. Using the SNS topic functionality would ensure that the plugin gets notified as soon as the conversion is done. I'm not sure how much more it would cost though, if at all.