Browse Source

Add parameter `all` for --voices to show all voices

Update documentation to show already existing features and for
newly introduced `all` parameter.
master
Valdis Vitolins 5 years ago
parent
commit
c13b3e534b
2 changed files with 12 additions and 0 deletions
  1. 7
    0
      src/espeak-ng.1.ronn
  2. 5
    0
      src/libespeak-ng/voices.c

+ 7
- 0
src/espeak-ng.1.ronn View File

@@ -122,6 +122,13 @@ words are provided then text is spoken from stdin a line at a time.
* `--voices[=<language code>]`:
Lists the available voices. If =&lt;language code&gt; is present then only
those voices which are suitable for that language are listed.
If `xx-yy` language code is passed, then voices with `yy` of `xx` language variants
are shown with higher priority than just `xx`.
If `variant` is passed, then all voice variants are shown.
If `mb` or `mbrola` is passed, then all voices using the MBROLA voice synthesizer
are shown.
If `all` is passed, then all eSpeak NG voices, voice variants and MBROLA
voices are shown.

* `--voices=<directory>`:
Lists the voices in the specified subdirectory.

+ 5
- 0
src/libespeak-ng/voices.c View File

@@ -1184,6 +1184,11 @@ static int SetVoiceScores(espeak_VOICE *voice_select, espeak_VOICE **voices, int
if (((control & 1) == 0) && (memcmp(vp->identifier, "mb/", 3) == 0))
continue;

if (memcmp(voice_select->languages,"all", 3) == 0) {
voices[nv++] = vp;
continue;
}

if ((score = ScoreVoice(voice_select, language, n_parts, lang_len, voices_list[ix])) > 0) {
voices[nv++] = vp;
vp->score = score;

Loading…
Cancel
Save