Closed trivikr closed 3 years ago
Rather than creating a synthesized speech URL, it would be interesting if the app plays the stream of audio. Amazon Polly documentation https://aws.amazon.com/polly/features/
As per this StackOverflow discussion, the srcObject of HTMLMediaElement can be overwritten. It's also mentioned in MDN at HTMLMediaElement.srcObject
However, TypeScript is throwing error Invalid left-hand side in assignment expression
when it's tried with useRef. Experimental commit: https://github.com/trivikr/aws-sdk-js-notes-app/commit/42aa17047714a102a45c6ae04721e56a5a481b17
Is your feature request related to a problem? Please describe.
The real-time audio transcription using Amazon Transcribe was added in https://github.com/aws-samples/aws-sdk-js-notes-app/pull/7 It's not a problem, but it would be good to have an example of converting text to speech using Amazon Polly.
Getting Started Developer Guide for AWS SDK for JavaScript (v3) contains an example of using Amazon Polly in the frontend.
Describe the solution you'd like
Ability to read notes using text to speech with Amazon Polly.