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

* Add support for speechPlayer. * Add support for speechPlayer.
* Add more tests to check the various parts of espeak-ng. * Add more tests to check the various parts of espeak-ng.
* Various changes to clean up the codebase (Juho Hiltunen) * 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 "option brackets" language option to "brackets" and "bracketsAnnounced".
* Restructure "stressLength" and "stressAdd" language option * Restructure "stressLength" and "stressAdd" language option
* New Language option: "lowercaseSentence" for ending a sentence if a period is followed by a lower case letter. * 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

// 0=default, 1=no check, other allow this character as an extra initial letter (default is 's') // 0=default, 1=no check, other allow this character as an extra initial letter (default is 's')
#define LOPT_UNPRONOUNCABLE 5 #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 // increase this to prevent sonorants being shortened before shortened (eg. unstressed) vowels
#define LOPT_SONORANT_MIN 7 #define LOPT_SONORANT_MIN 7



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

#include "dictionary.h" // for strncpy0, LoadDictionary #include "dictionary.h" // for strncpy0, LoadDictionary
#include "mnemonics.h" // for LookupMnemName, MNEM_TAB #include "mnemonics.h" // for LookupMnemName, MNEM_TAB
#include "phoneme.h" // for REPLACE_PHONEMES, n_replace_pho... #include "phoneme.h" // for REPLACE_PHONEMES, n_replace_pho...
#include "setlengths.h" // for SetLengthMods
#include "speech.h" // for GetFileLength, PATHSEP #include "speech.h" // for GetFileLength, PATHSEP
#include "mbrola.h" // for LoadMbrolaTable #include "mbrola.h" // for LoadMbrolaTable
#include "synthdata.h" // for SelectPhonemeTableName, LookupP... #include "synthdata.h" // for SelectPhonemeTableName, LookupP...
{ "l_regressive_v", 0x100+LOPT_REGRESSIVE_VOICING }, { "l_regressive_v", 0x100+LOPT_REGRESSIVE_VOICING },
{ "l_unpronouncable", 0x100+LOPT_UNPRONOUNCABLE }, { "l_unpronouncable", 0x100+LOPT_UNPRONOUNCABLE },
{ "l_sonorant_min", 0x100+LOPT_SONORANT_MIN }, { "l_sonorant_min", 0x100+LOPT_SONORANT_MIN },
{ "l_length_mods", 0x100+LOPT_LENGTH_MODS },
{ "apostrophe", 0x100+LOPT_APOSTROPHE }, { "apostrophe", 0x100+LOPT_APOSTROPHE },
{ "brackets", 0x100+LOPT_BRACKET_PAUSE }, { "brackets", 0x100+LOPT_BRACKET_PAUSE },
{ "bracketsAnnounced", 0x100+LOPT_BRACKET_PAUSE_ANNOUNCED }, { "bracketsAnnounced", 0x100+LOPT_BRACKET_PAUSE_ANNOUNCED },
voice_languages[langix] = 0; voice_languages[langix] = 0;
} }


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

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


return voice; return voice;

Loading…
Cancel
Save