aws-amplify / amplify-js

A declarative JavaScript library for application development using cloud services.
https://docs.amplify.aws/lib/q/platform/js
Apache License 2.0
9.43k stars 2.13k forks source link

SSML support for Polly feature in Predictions #6075

Open ryanhollander opened 4 years ago

ryanhollander commented 4 years ago

Hello, A minor feature request for your consideration.

Is your feature request related to a problem? Please describe. Although Supported in Polly, it is not possible to provide SSML from the Amplify Client to the Predictions/Polly TTS Feature.

Describe the solution you'd like It would be great if a method could be added to the API to indicate the payload is SSML vs. TEXT. It would be great if some validation could be added to reject the text with an error if it does not conform.

For example: import Predictions from '@aws-amplify/predictions';

Predictions.convert(
    {
       textToSpeech: {
           source: {
               text: `<ssml><s>Hello World.</s></ssml>`,
               TextType: 'ssml'
           }
        }
    }
).....;

This translates directly to the Polly service call: https://docs.aws.amazon.com/polly/latest/dg/API_SynthesizeSpeech.html#polly-SynthesizeSpeech-request-TextType

Describe alternatives you've considered The only alternative is writing my own Polly integration so I can add the ssml type.

Additional context N/A

Thank you!

SwaySway commented 4 years ago

Transferring this issue over to the JS team as this feature request is related to the library.

patricklynch commented 3 years ago

Has this feature yet been implemented?

ryanhollander commented 3 years ago

@patricklynch doesn't look like it... :-( I'd at least like to see the SSML flag added...