In this tutorial, we will learn different lines of command to put in the notes section of your slides to have better control over the text-to-speech generation.
I - Deactivating content & speech synchronization
By default, the content’s time of display on the slide is synchronized with the automatic speech so that content appears gradually as the speech progresses. The result may not suit your needs, so you may want to deactivate this option during import.
II – Changing the narrator's gender
You can choose the voice gender of your automatic speech speaker with the %%TTS_FEMALE% or the %%TTS_MALE% line of command. You’ll have to put it at the beginning of the note section of your first slide. Don’t forget: all the commands will have two percentage signs (%%) at the beginning and only one (%) at the end
III – Changing words’ pronunciation
You can change the pronunciation of words. For example, if you have an acronym in your text that is written with and without spaces between letters, you can search and replace every word so they all have the same pronunciation.
For example, to pronounce "aim" and A dot I dot M dot as A I M, start by searching the words like this, with the %%TTSFIND% and %%TTSFIND-END% command
Then replace all the words you searched with the %%TTSREPLACE%, and the %%TTSREPLACE-END% command.
%%TTSREPLACE%”A I M”,”A I M”%%TTSREPLACE-END%
IV – Changing speech rate
To change the speech rate, you can use the %%TTSPROSODYRATE% command in the note section of your first slide. For example, to slow your speech down by 30%, write 0.7 inside the command prompt.
If you want to speed it up by 10%, write 1.1 inside the command prompt.
V – Picking a specific voice for the narrator
To pick a specific voice for your automatic speech, you can go to this address, listen to samples and get the voice code you want for your narrator.
Then enter the code you chose in the notes section of your first slide to change the voice for the whole video. Use the %%TTSVOICE% command like this.In this example, the code corresponds to an English voice with an Indian accent.
To change the voice only on a specific slide, write: %%SLIDETTSVOICE% instead of %%TTSVOICE% in the note section of the targeted slide.
VI – Using different voices in a single text
You can use different voices in a single text. For example, to generate a conversation between two persons or to handle several languages in the same sentence. For that purpose, you can use SSML tags directly in the note section and the voice codes found at the same address as we’ve seen before.
Here is an example of what we can write in the note section with SSML tags.
<voicename="en-US-Wavenet-J">Hi, I’m using a male American voice</voice>
<voicename="en-IN-Wavenet-D">and now I’m using a female Indian voice</voice>
VII – Pausing the speech
You can manually add pauses in your speech to synchronize it with the slide content. Use SSML directly in the note section and use the break tag.
To know more about SSML, go to this address. https://cloud.google.com/text-to-speech/docs/ssml