I'm trying to work with Amazon Polly to create a sample dialogue between two individuals for my web app.
aws polly synthesize-speech \
--text-type ssml \
--text '<speak>Hello, how are you?</speak>' --voice-id Joanna \
--text '<speak>I am well.</speak>' --voice-id Miguel \
--output-format mp3 \
dialogue.mp3
Has anyone worked with Amazon Polly before to do two voices? Can you share sample code if so? Thanks so much!
To my knowledge AWS Polly SSML does not currently support independent voice-ids in a single rendering. I believe you would need to render each voice separately and sequence them during playback.
This might not be as much of an extra burden as you might expect as you may find that the API length limits also require that you split apart long text into smaller pieces anyway.