- Newest
- Most votes
- Most comments
You are correct that the generative engine in Amazon Polly does not support speech marks, including viseme data. This is why you're encountering the ValidationException when trying to use the 'viseme' speech mark type with the generative engine.
The generative engine is a newer addition to Amazon Polly and has some limitations compared to the standard and neural engines. One of these limitations is the lack of support for speech marks.
If you need viseme data, you should use either the standard or neural engine instead of the generative engine. As you mentioned, you were able to get viseme data when using the neural engine. This is the correct approach.
To resolve the error and generate viseme data, you should modify your code to use the 'neural' engine instead of 'generative'. Here's how you could adjust your command:
const visemeCommand = new SynthesizeSpeechCommand({ Engine: 'neural', OutputFormat: 'json', LanguageCode: 'en-GB', VoiceId: 'Amy', Text: 'Hello there', TextType: 'text', SpeechMarkTypes: ['viseme'] })
By changing the Engine parameter to 'neural', you should be able to successfully generate the viseme data for your text-to-speech conversion.
Remember that not all voices are available for all engines, so make sure that the voice you're using (in this case, 'Amy') is supported by the neural engine. If it's not, you may need to choose a different voice that is compatible with the neural engine to get the viseme data.
Sources
Speech mark types - Amazon Polly
Speech Marks - Amazon Polly
SynthesizeSpeech - Amazon Polly
i see now Speech Marks does have a footnote that says
Speechmarks are available when using either neural or standard text-to-speech formats.
Relevant content
asked a year ago
asked 2 years ago
- AWS OFFICIALUpdated 5 years ago
