<break> Inconsistencies?

0

It seems that there is some inconsistencies in how the Amazon Polly Console (and files processed through the CLI or API) is handling non-coded pauses when using <break> or where the </speak> is placed in the file.

Here are some examples to illustrate the problem - it doesn't matter if a neural voice or standard voice is used.

Example 1:

<speak>Article 1
Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.
</speak
>```

A pause is inserted after Article 1 since there is a paragraph break which is the expected result.  
  
Example 2:

<speak>Article 1 Video provides a powerful way to help you prove your point. When you click Online Video <break time = ".3s"/> you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document. </speak

A <break> is inserted in place of the comma. When this occurs, the paragraph break after Article 1 is ignored so there is no pause between Article 1 and Video. This is unexpected.

Example 3:

<speak>Article 1
Video provides a powerful way to help you prove your point. When you click Online Video, you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.</speak
>```

Similar to Example 1, a pause **should ** occur after Article 1 since there is a paragraph break.  This does not occur.  Notice that there is no line break before </speak>.  
  
Any clarification would be most helpful as results are inconsistent now and it would be time consuming to have to insert
`<p></p>`
 throughout to get expected results.  
  
Edited by: vabtm on Jul 3, 2020 1:57 PM
vabtm
asked 4 years ago219 views
3 Answers
0

Hi vabtm,

Thank you for reaching out to us. A single newline doesn't enforce a paragraph break, it may happen that the text is split to multiple chunks which could result in having a pause after "Article 1", our recommendation is to use either p tag or more than one single newline to introduce the pause. Examples:

<speak>
<p>Article 1</p>
<p>Video provides a powerful way to help you prove your point. When you click Online Video <break time = ".3s"/> you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.</p>
</speak>

or

<speak>
Article 1

Video provides a powerful way to help you prove your point. When you click Online Video <break time = ".3s"/> you can paste in the embed code for the video you want to add. You can also type a keyword to search online for the video that best fits your document.
</speak>

Thanks,
Tarek

answered 4 years ago
0

Thanks for responding, Tarek. I did some additional testing to confirm by using this example:

<speak>Apple Oranges Grapes</speak
>```

That produces what you would expect - "Apple Oranges Grapes"

<speak>Apple Oranges Grapes</speak

This also produces "Apple Oranges Grapes" as in the example above.

To get the break, you need to have at least two newlines to create a pause as in this example.

<speak>Apple 

Oranges 

Grapes</speak
>```

vabtm
answered 4 years ago
0

Hi Vabtm,

Yes, your examples shows how it works indeed. Please reach out to us, if you have any other related issues.

Best,
Fatih

answered 4 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions