Juho Hiltunen
0577cd90a6
code cleanup: remove unused variable markers_used
2022-01-03 21:14:18 +02:00
Juho Hiltunen
dbcfa71f92
code cleanup: remove unused n_envelopes, N_ENVELOPES, envelope_paths and
...
envelope_dat.
envelope_dat and envelope_paths were only set but never used.
LoadEnvelope() and LoadEnvelope2() no longer need fname as an argument.
2022-01-02 21:21:35 +02:00
Juho Hiltunen
8fc69e2999
code cleanup: remove unnecessary temporary variable yy
2022-01-02 19:34:09 +02:00
Sergei Trofimovich
ccb1c31ba3
compiledict.c: change 'temp' to "${dict}temp" temporary file
...
This way we can compile multiple dictionaries at a time without
stepping on 'temp' file from different compilation steps:
$ make -j8 -B
...
make[1]: *** [Makefile:3082: espeak-ng-data/an_dict] Segmentation fault (core dumped)
make[1]: *** Deleting file 'espeak-ng-data/an_dict'
make[1]: *** [Makefile:3082: espeak-ng-data/az_dict] Segmentation fault (core dumped)
make[1]: *** Deleting file 'espeak-ng-data/az_dict'
2021-11-07 12:55:57 +00:00
Samuel Thibault
572fe31c1b
mbrola: Report error when loading an mbrola voice fails
...
Otherwise espeak_SetVoiceByName returns EE_OK even if the mbrola voice
file could not be loaded and thus setting the voice actually failed.
2021-10-16 22:40:55 +02:00
Juho Hiltunen
d80f1a80a2
Use ESPEAKNG_DEFAULT_VOICE instead of hard coded "en".
...
This will make it easier to set a default voice other than
English. This is important for cases when a language will fall back to
the default voice.
Some references to L('e', 'n') still need to be changed.
2021-08-10 19:57:53 +03:00
Juho Hiltunen
3038d40081
code cleanup: remove unnecessary #defines.
...
Found by parsing the results from this bash script:
for define in $(grep define *.h | awk'{print $2}');
do if ! grep -q $define *.c
then
echo "$define not found";
fi
done
2021-07-31 17:29:33 +03:00
Juho Hiltunen
e91d0a5861
code cleanup: don't add a \0 to voices_language in LoadVoice().
...
This is unnecessary since the string is already null terminated in the
V_LANGUAGE switch case. sscanf creates a null terminated string in
language_name, which is then copied to voice_language by strcpy (keeping
the \0).
2021-07-30 17:18:47 +03:00
Juho Hiltunen
eae0665be5
code cleanup: move voices->width in LoadVoice()
...
It's probably unnecessary code and could be removed. However, it would
break tests. This is a temporary solution.
The solution is to do it once in VoiceReset() and then if the "formant"
keyword changes voice->width.
2021-07-28 22:11:47 +03:00
Juho Hiltunen
c28412db78
Don't set stress_flags with language option "stressRule".
...
Language option "stressOpt" already handles separate flags instead of a
single integer. There's no reason to have two ways of setting the same
option.
2021-07-27 22:15:28 +03:00
Juho Hiltunen
537617afc5
et: fi: move stressopt from tr_languages.c to language files
...
This is to make sure "stressopt" language option works. Current tests
would fail if it didn't.
2021-07-27 22:15:28 +03:00
Juho Hiltunen
602847371d
rename language option stressopt to stressOpt
2021-07-27 22:15:28 +03:00
Juho Hiltunen
a6abb1e89b
code cleanup: use ReadNumbers() for language options "dictrules", "stressopt"
...
language option "numbers" could be changed to use the same function, but
it needs tests.
2021-07-27 22:15:28 +03:00
Juho Hiltunen
fdc1afd407
code cleanup: new function ReadNumbers()
...
ReadNumbers8) parses an unknown number of numbers from language files.
Used mostly for setting flags.
Used mostly for setting flags.
2021-07-27 22:15:28 +03:00
Juho Hiltunen
ac643ea5ad
code cleanup: remove unnecessary call to SelectPhonemeTable()
...
It is called multiple times in LoadVoice().
2021-07-26 17:43:15 +03:00
Juho Hiltunen
80895db0a8
code cleanup: move SetSpeed() inside the switch case in LoadVoice()
...
SetSpeed is needed when "speed" keyword changes voice->speed_percent.
2021-07-26 17:07:42 +03:00
Juho Hiltunen
01f094346d
nb: fix regression for language options.
...
182aba4cc started calling Norwegian nb instead of no. The result is that
code in tr_languages.c was never run.
2021-07-23 18:32:33 +03:00
Juho Hiltunen
1a5db2f498
code cleanup: move dict_min_size handline in LoadVoice().
2021-07-11 19:43:04 +03:00
Juho Hiltunen
0e7202f9a9
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().
2021-07-11 19:09:44 +03:00
Juho Hiltunen
863655903a
code cleanup: move SetLengthMods to setlengths.c
2021-07-11 17:05:00 +03:00
Juho Hiltunen
72434616b0
code cleanup: move voice->freq2 and voice->height2 handline in LoadVoice().
...
VoiceReset() now sets them initially. VoiceFormant() changes them if
"formant" option is used.
2021-07-11 16:30:17 +03:00
Juho Hiltunen
f269acf22c
code cleanup: remove unneeded switch case for stress_rule = 10.
...
There are nolanguages that use stress_rule = 10.
2021-06-29 15:55:05 +03:00
Juho Hiltunen
c6ef7061ca
code cleanup: use #defines for stress positions.
...
The #defines should be renamed to better convey their meaning.
2021-06-29 15:54:45 +03:00
Juho Hiltunen
b74ad1777d
eu: remove duplicate stress_rule from tr_languages.c
...
It's already set in espeak-ng-data/lang/eu
2021-06-29 15:14:46 +03:00
agonzalezd
2fb981855b
eu: Updated Basque phonetics and stress rule
2021-06-29 15:14:26 +03:00
Łukasz Golonka
289d9d865e
Revert "code cleanup: change global int current_phoneme table to static"
...
This works around issue 915
2021-06-07 17:49:20 +03:00
Juho Hiltunen
4d0a4df86b
Revert "code cleanup: remove unnecessary current_voice_id in readclause.c"
...
See #950 .
2021-06-07 17:43:28 +03:00
Reece H. Dunn
a13f9bb62a
Fix -Wint-conversion warnings.
2021-05-30 17:55:41 +01:00
Reece H. Dunn
f581436deb
Fix -Wmissing-prototypes warnings.
2021-05-30 17:30:55 +01:00
Reece H. Dunn
720405c5c6
Fix -Wreturn-type warnings.
2021-05-30 17:22:48 +01:00
Reece H. Dunn
53283a910a
Fix -Wunused-but-set-variable warnings.
2021-05-30 17:19:54 +01:00
Reece H. Dunn
ed6e096b5b
Fix -Wunused-function warnings.
2021-05-30 17:15:52 +01:00
Reece H. Dunn
5791bf28de
Fix -Wunused-parameter warnings.
2021-05-30 17:10:25 +01:00
Juho Hiltunen
389ce6b738
code cleanup: remove unused FLAG_HYPHENATED and related code.
...
The flag is never set anywhere so the if-clause will always evaluate to false.
2021-05-28 20:52:49 +03:00
Juho Hiltunen
ac5eeb865e
code cleanup: new function CheckTranslator()
...
When a language or voice file in espeak-ng-data is loaded the keyword
"translator" must be set so that other language options can modify the
values in struct Translator.
CheckTranslator() provides standardized error for all switch cases that
modify a value in struct Translator.
2021-05-22 13:38:03 +03:00
Juho Hiltunen
fb233a7b0c
code cleanup: move stressLength, stressAdd and stressAmp handling in LoadVoice()
...
From now on, stressLength must be set before stressAdd because
stressLength will overwrite any previous value. Usually stressLength is
set in a language file and stressAdd in a voice file.
Previously the order of the two commands didn't matter.
2021-05-22 13:38:03 +03:00
Juho Hiltunen
7c32085dcd
code cleanup: use translator instead of langopts in LoadVoice()
...
Since new_translator isn't used anymore langopts will always point to
translator anyway.
2021-05-22 13:38:03 +03:00
Juho Hiltunen
f16b27b840
code cleanup: remove unnecessary new_translator in LoadVoice()
...
It looks like this was used in situations where both "language" and
"translator" voice options were found. Since bda8b6f76a "translator"
hasn't been supported.
2021-05-22 13:38:03 +03:00
Valdis Vitolins
f6d092a9c1
Merge pull request #942
2021-05-18 23:26:07 +03:00
Valdis Vitolins
83f9312130
Merge pull request #930
2021-05-17 18:42:59 +03:00
Valdis Vitolins
68518a6cc9
Merge pull request #940
2021-05-16 14:59:59 +03:00
Christopher Brannon
8810fa330e
Fix another out-of-bounds read in SSML parsing.
...
A malformed tag like <foo could cause espeak to read past
the end of the string.
2021-05-15 15:19:57 -07:00
Juho Hiltunen
2a7080f411
Merge pull request #932
2021-05-15 21:17:50 +03:00
Christopher Brannon
2d7286d571
Fix out-of-bounds read when processing malformed SSML.
2021-05-15 21:12:59 +03:00
Juho Hiltunen
d91b7cf288
Rename zh (Mandarin) to cmn across the codebase.
...
See discussion in #933 .
2021-05-11 20:14:54 +03:00
Juho Hiltunen
875174c3e9
Rename zhy (Cantonese) to yue across the codebase.
...
See discussion in #933 .
2021-05-11 19:19:55 +03:00
Reece H. Dunn
379403d102
Merge tag 'de5e36b4ad69c4acfdd728b2ca3e0e472d91afd1'
...
ucd-tools 11.0.0.1
2021-05-04 18:56:51 +01:00
Reece H. Dunn
2b2eac1d8b
Fix the note in case.py/case.c.
2021-05-04 17:54:15 +01:00
Reece H. Dunn
1a895f37b9
Fix running the tests with -fsanitize=address.
2021-05-04 17:51:28 +01:00
Philippe Antoine
2cd39373eb
Exlcude ucd-tools overread from this PR
2021-05-04 16:29:29 +02:00