Čeština   Deutsch   Español   Italiano   Français   Polski   Português   Türk
Български   Русский   Український   عربى   中國人  

Text annotations to change voices while reading aloud in @Voice

Contents:

Introduction and demo
Define voice aliases
Get voice definitions
Enter voice change instructions
Controlling voice speed, pitch and volume
Inserting pauses in reading
Possible uses

Introduction and demo

When reading aloud a text, @Voice may change the voice, when encountering a special annotation. These annotations have a general format as follows:

{{@instruction;optional comment}}

The annotations are visible on @Voice text screen, but are not read aloud. Instead, if the option for processing these annotations is on, the voices are changed as instructed, otherwise these annotations are silently ignored. The semicolon ; and any text after it is optional and ignored, so you may enter there any comment you want. The two closing curly braces }} are mandatory.

The option to turn on/off voice changes is on @Voice Settings menu - Speech settings - START tab. It can be turned on only if the user has @Voice Premium License, otherwise the voice change instructions are ignored.

Here is a sample text annotated with voice changes, and a recording of @Voice reading it with and without voice changes:

{{@+Rachel=com.google.android.tts,en_GB,en-gb-x-gbg-network; any comment}}
{{@+Olga=com.github.olga_yakovleva.rhvoice.android,en_US,Slt}}
{{@+Angel=com.google.android.tts, es_ES, es-es-x-eed-local}}

Voice changes test. This sentence without any annotations is read in the default
 English voice,pre-selected by the user under @Voice "Change voice or language" 
 screen.

{{@Rachel}}This will be read in Google network femail voice, defined in the first 
line of the sample text.
{{@Olga#s=1.5}}And this one will be read in RHVoice female English voice, at 1.5x 
speed. This voice is pretty boring... Now let's try something in Spanish.

{{@Angel}}Hola amigo, esta noticia es realmente espléndida, y lo de agregar el 
control de voz y velocidad es super genial!

{{@default}}
Now back to the default English voice I had selected in @Voice app, when recording
this sample.
With voice changes:
Without voice changes:
 

Define voice aliases

The instructions defining voices have the following format:

{{@+Alias=engine.package.name,language_code,voice-name[;optional comment]}}

Where Alias is a  name you give to this voice yourself, language_code is the ISO language code (e.g. en_US), and voice-name  is the original name under which the selected TTS engine knows this voice. Examples:

{{@+Rachel=com.google.android.tts,en_GB,en-gb-x-gbg-network; any comment}}
{{@+Olga_1=com.github.olga_yakovleva.rhvoice.android,en_US,Slt}}
{{@+Greg-3=com.google.android.tts,en_US,en-us-x-tpd-local; optional comment}}

Get voice definitions

In @Voice app, press the round button with up arrow near bottom-right, then press the “Change voice or language” button. Select the language and voice for which you need a definition, then press the "Voice definitions for annotations" button. Enter the voice alias you would like to use, then look below, where the full definition is spelled out. Press "Copy definition" button, then switch to a text editing app that you use for entering voice annotations and paste this line of code near the start of readable text.

Enter voice change instructions

When you have all the voices defined and inserted in your text, you may start adding instructions to change the voices where they are need. The instruction to change the voice is simply:

{{@Alias}}

 for example for the voices defined above it would be

{{@Rachel}}
 {{@Olga_1}}

 etc. There is also the instruction

{{@default}}

or short: {{@}}, which restores the default voice that the user selected for the current language using the "Change voice or language" screen in @Voice app.

These instructions can be also used to change the language, for example if one sentence in the text is in English and another in Spanish, you could insert voice annotations to read them with the English and Spanish TTS voices respectively.

Controlling voice speed, pitch and volume

These instructions look like

 {{@VoiceAlias#s=number,p=number,v=number}}
 {{@#s=number,p=number,v=number}}

If used without the voice name, this instruction restores the default TTS voice. The number is always a real number between the allowed minimum and maximum value, and the meaning is as follows:

s - speed of reading aloud, values from 0.25 to 4

p - voice pitch, falues from 0.25 to 3

v - volume, values from 0 to 1, e.g. volume 0.5 is approximately half of normal volume.

The instructions of s, p and v are all optional, if you omit any of them, it will be set to the default value of 1. Examples:

{{@Rachel#s=1.25,p=0.8,v=0.5}}
{{@#s=0.75}}

The second instruction above will set the default TTS voice selected by the user, slow down the speed to 0.75x, and reset pitch and volume to 1.

Inserting pauses in reading

There is also a very simple pause instruction, to pause reading for any number of milliseconds. The format is

{{~number}}

for example

{{@~2000}}

means pause reading for 2000 ms (2 seconds).

Possible uses

Create audio-novelas with specific voices for each character...

Create foreign language lessons for yourself or others, with explanations in your native language and foreign language text spoken in multiple native female and male voices, possibly with different accents, different speeds...

What else? Use your imagination... Have fun!