Browse Source

code cleanup: remove unused language option l_length_mods.

It is not used by any language. There is no need to check for it in
LoadVoice().
master
Juho Hiltunen 4 years ago
parent
commit
0e7202f9a9
3 changed files with 1 additions and 8 deletions
  1. 1
    0
      CHANGELOG.md
  2. 0
    3
      src/libespeak-ng/translate.h
  3. 0
    5
      src/libespeak-ng/voices.c

+ 1
- 0
CHANGELOG.md View File

@@ -12,6 +12,7 @@ The espeak-ng project is a fork of the espeak project.
* Add support for speechPlayer.
* Add more tests to check the various parts of espeak-ng.
* Various changes to clean up the codebase (Juho Hiltunen)
* Remove support for l_length_mods language option
* Restructure "option brackets" language option to "brackets" and "bracketsAnnounced".
* Restructure "stressLength" and "stressAdd" language option
* New Language option: "lowercaseSentence" for ending a sentence if a period is followed by a lower case letter.

+ 0
- 3
src/libespeak-ng/translate.h View File

@@ -306,9 +306,6 @@ typedef struct {
// 0=default, 1=no check, other allow this character as an extra initial letter (default is 's')
#define LOPT_UNPRONOUNCABLE 5

// select length_mods tables, (length_mod_tab) + (length_mod_tab0 * 100)
#define LOPT_LENGTH_MODS 6

// increase this to prevent sonorants being shortened before shortened (eg. unstressed) vowels
#define LOPT_SONORANT_MIN 7


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

@@ -42,7 +42,6 @@
#include "dictionary.h" // for strncpy0, LoadDictionary
#include "mnemonics.h" // for LookupMnemName, MNEM_TAB
#include "phoneme.h" // for REPLACE_PHONEMES, n_replace_pho...
#include "setlengths.h" // for SetLengthMods
#include "speech.h" // for GetFileLength, PATHSEP
#include "mbrola.h" // for LoadMbrolaTable
#include "synthdata.h" // for SelectPhonemeTableName, LookupP...
@@ -163,7 +162,6 @@ static MNEM_TAB keyword_tab[] = {
{ "l_regressive_v", 0x100+LOPT_REGRESSIVE_VOICING },
{ "l_unpronouncable", 0x100+LOPT_UNPRONOUNCABLE },
{ "l_sonorant_min", 0x100+LOPT_SONORANT_MIN },
{ "l_length_mods", 0x100+LOPT_LENGTH_MODS },
{ "apostrophe", 0x100+LOPT_APOSTROPHE },
{ "brackets", 0x100+LOPT_BRACKET_PAUSE },
{ "bracketsAnnounced", 0x100+LOPT_BRACKET_PAUSE_ANNOUNCED },
@@ -936,9 +934,6 @@ voice_t *LoadVoice(const char *vname, int control)
voice_languages[langix] = 0;
}

if ((value = translator->langopts.param[LOPT_LENGTH_MODS]) != 0)
SetLengthMods(translator, value);

voice->width[0] = (voice->width[0] * 105)/100;

return voice;

Loading…
Cancel
Save