I'm trying to write an ssml tag-based text that I want to send to my Amazon Polly account using API . API is working fine and I'm getting responses. Here are the ssml tags provided in the Amazon website .
I want to set a custom duration for each sentence(I mean for example I want each sentence to get read in exactly 7s I mean if we have 3 questions and 3 corresponding answers , whe should have 7*6 s duration file. But the options provided in ssml that are related , are just maximum duration or breaks or speech rate
I tried something but it seems doesnt work fine . I tried to mix break and maximum duration:
<speak>
<prosody amazon:max-duration="7s">
What is the capital of France?
<break time="7s"/>
</prosody>
<prosody amazon:max-duration="7s">
The capital of France is Paris.
<break time="7s"/>
</prosody>
<prosody amazon:max-duration="7s">
What is the largest ocean?
<break time="7s"/>
</prosody>
<prosody amazon:max-duration="7s">
The largest ocean is the Pacific Ocean.
<break time="7s"/>
</prosody>
<prosody amazon:max-duration="7s">
Who wrote Hamlet?
<break time="7s"/>
</prosody>
<prosody amazon:max-duration="7s">
Hamlet was written by William Shakespeare.
<break time="7s"/>
</prosody>
another thing is the questions will be changed during time , so if it was just these 3 questions , I would try to fix that manualy but the whole process must be automated.
So for clarity , I want to set exact duration of each sentence to be 7s but it is now maximum duration=7
What to do?