Juho Hiltunen
43d7c29d52
Increase targetSdk to 30 and support signature scheme v2 ( #1413 )
...
[This removes the warning that this app may not be compatible because it
was developed for an older
android-version.](https://developer.android.com/about/versions/10/behavior-changes-all#low-target-sdk-warnings )
Also, this adds support for signature scheme v2 and v3 [which reduces
the attack surface along with other
benefits](https://source.android.com/docs/security/features/apksigning#v1 ).
Lastly this adds 64-bit support for the APK, so this app can be
installed on 64-bit-only hardware.
2022-10-11 06:37:17 +03:00
Juho Hiltunen
c05690be34
cleanup: move LoadConfig to langopts.c
...
LoadConfig() should be refactored to support both voice and language options set
in LoadVoice() and LoadLanguageOptions().
2022-10-10 21:36:25 +03:00
Juho Hiltunen
0f1f006afe
Merge branch 'spellingStress'
2022-10-10 21:25:29 +03:00
Juho Hiltunen
dc60881171
et: fi: move spellingStress from code to language configuration
2022-10-10 21:20:53 +03:00
Juho Hiltunen
53e40ead80
docs: add spellingStress
2022-10-10 21:20:53 +03:00
Juho Hiltunen
015bb42a70
new configurable language option: spellingStress
2022-10-10 21:20:20 +03:00
Juho Hiltunen
f342b5d319
cleanup: make spelling_stress bool and set default value
2022-10-10 21:04:25 +03:00
Juho Hiltunen
e03ab8a8c4
tests: add a test for langopts.spelling_stress
2022-10-10 21:04:25 +03:00
Juho Hiltunen
c701b09c25
cleanup: reorganize LOPT defines
2022-10-10 20:08:22 +03:00
Juho Hiltunen
4d70ceceb5
Remove LOPT_IT_DOUBLING and delete unused functionality.
...
Code checked for both langopt LOPT_IT_DOUBLING and attribe $double.
LOPT_IT_DOUBLING is redundant. $double already has a test in
dictionary.test
Code had a check for tr->langopts.param[LOPT_IT_DOUBLING] & 2 but that bit value is
not used in any language. That logic was removed.
2022-10-10 19:57:23 +03:00
Juho Hiltunen
3b2557cfdd
et: fi: move configuration from code to language file
2022-10-10 19:49:42 +03:00
Juho Hiltunen
644f02c26a
fixup case V_TUNES
...
previous changing of variable names caused an error in the program logic.
2022-10-10 19:45:01 +03:00
Juho Hiltunen
78c9b55c5f
fixup language options status and maintainer.
2022-10-10 19:34:21 +03:00
Juho Hiltunen
b4c223a256
fixup: move some language option keywords to the correct MNEM_TAB.
...
Caused when creating LoadLanguageOptions().
2022-10-09 22:03:18 +03:00
Juho Hiltunen
7115e46879
fi: uncomment number configuration.
...
Accidentally commented out in ac82698f .
2022-10-09 20:41:22 +03:00
Juho Hiltunen
74fc17bbf1
Create langopts.c for language option configuration ( #1419 )
...
Loading Voice and Language options is complicated. They are not
separated in the code.
This PR creates langopts.c for holding language option related
configuration. In the future:
1. all new language options should go to langopts.c
2. voice options should have a similar file
3. LoadVoice should know if it's loading a voice or a language.
2022-10-09 16:48:18 +03:00
Juho Hiltunen
a19e4b8df2
resize and initialize a two-dimensional array to pass sanitizer
2022-10-09 16:38:53 +03:00
Juho Hiltunen
eae4595dc9
cleanup: move shared enums and MNEM_TABs to header file
2022-10-09 16:38:53 +03:00
Juho Hiltunen
78c6873427
cleanup: call CheckTranslator at start of LoadLangugeOptions
2022-10-09 16:38:53 +03:00
Juho Hiltunen
3182dee147
code cleanup: move CheckTranslator() to langopts.c
2022-10-09 16:38:53 +03:00
Juho Hiltunen
159ab0ee76
cleanup: move langopts.params handling to LoadLanguageOptions()
...
These have no tests and should be refactore to be similar to other
langopts.
2022-10-09 16:38:53 +03:00
Juho Hiltunen
b820b68182
cleanup: move words to LoadLanguageOptions()
2022-10-09 16:38:53 +03:00
Juho Hiltunen
ac82698f99
cleanup: move numbers to LoadLanguageOptions()
...
Note: This feature has no tests.
2022-10-09 16:38:53 +03:00
Juho Hiltunen
bdf18eafb1
cleanup: moved dictmin to LoadLanguageOptions()
...
Note: This feature has no tests. It doesn't look very useful and I think
could be removed.
2022-10-09 16:38:53 +03:00
Juho Hiltunen
e1d936dc52
cleanup: moved dictrules to LoadLanguageOptions()
2022-10-09 16:38:53 +03:00
Juho Hiltunen
f28841162f
moved tunes to LoadLanguageOptions()
2022-10-09 16:38:53 +03:00
Juho Hiltunen
c92180f918
cleanup: move n_tunes and tunes to where they are used
2022-10-09 16:38:53 +03:00
Juho Hiltunen
ec897eff32
fixup, add langopts.h to version control
2022-10-09 16:38:53 +03:00
Juho Hiltunen
e38142acd1
cleanup: moved intonation to LoadLanguageOptions()
2022-10-09 16:38:53 +03:00
Juho Hiltunen
8e3399bb98
cleanup: move stressRule to LoadLanguageOptions()
2022-10-09 16:38:53 +03:00
Juho Hiltunen
9caada3b31
cleanup: move stressOpt to LoadLanguageOptions()
2022-10-09 16:38:53 +03:00
Juho Hiltunen
46bc25e173
cleanup: move stressAmp to LoadLanguageOptions()
2022-10-09 16:38:53 +03:00
Juho Hiltunen
2a462e4afe
cleanup: move stressAdd to LoadLanguageOptions()
2022-10-09 16:38:52 +03:00
Juho Hiltunen
db57230320
fixup error message for Bad Voice attribute.
...
We currently have two switch statements. Every key should go to only one
of them.
2022-10-09 16:38:52 +03:00
Juho Hiltunen
77282aca34
cleanup: move stressLength to LoadLanguageOptions()
2022-10-09 16:38:52 +03:00
Juho Hiltunen
4a2890250b
code cleanup: new file langopts.c for handling language options.
...
The switch case in LoadVoice() currently mixes voice and language
options. This change will start separating them into two functions.
CheckTranslator will be moved to langopts.c. In the future there should
be no need to use it in voices.c. There will be other temporary
solutions also.
2022-10-09 16:38:52 +03:00
Juho Hiltunen
e5ae5b8557
tr: fix bağışlamak and bağışlayın
...
This removes these words from dictionary and uses translation rules
instead. Result is to shorten the i.
See #1337 and #1388 .
2022-10-04 17:19:10 +03:00
Juho Hiltunen
b17ed2d682
Update Changelog
2022-09-29 07:18:23 +03:00
Juho Hiltunen
a434ca4cbb
fix #1370 Cmn voice not correctly translated
...
1. Rewrite cmn_rules. Vowel will be spoken as Mandarin only when it's
with a tone number. Otherwise, it will be regarded as English. This will
make English words translated more correctly.
2. Fix issue of word item in cmn_listx not taking effect.
3. Fix dictionary_skipwords bug. It should be injected when re-structing
method TranslateWord3.
2022-09-29 07:09:34 +03:00
Juho Hiltunen
f5442cfe4e
Merge branch 'master' into master
2022-09-29 06:22:28 +03:00
Juho Hiltunen
b52441f9ac
tr: do not prolong â and î.
...
See #1388 and #875 .
2022-09-27 20:35:42 +03:00
Juho Hiltunen
4f9044c99f
Updates italian source dictionaries ( #1395 )
...
Add some rules and exceptions for italian language.
2022-09-25 20:30:57 +03:00
Juho Hiltunen
e46ed1ab16
Merge branch 'master' into master
2022-09-24 21:47:27 +03:00
Juho Hiltunen
80976d7fbf
docs: add a section about tests when adding a new language
...
Closes #1194 .
2022-09-24 08:25:26 +03:00
jaacoppi
df8af89ddd
Merge pull request #1379
...
Code cleanup: relocate functions & remove unused #defines
2022-09-17 20:03:10 +03:00
jaacoppi
57115a8eaf
Merge pull request #1376 from bkmgit/patch-1
...
Fix vowels link
2022-09-17 19:29:42 +03:00
Juho Hiltunen
545f38a46b
code cleanup: remove unused #defines
...
Note: Strange that FLAG_ALT7 is used but ALT4-ALT6 are not. Same with
R6p.
2022-09-17 19:19:44 +03:00
Juho Hiltunen
4a9f0e21be
code cleanup: move Is*() helper functions to common.c
2022-09-17 18:57:20 +03:00
Juho Hiltunen
57c7285ff9
code cleanup: move ApplySpecialAttribute2()
2022-09-17 18:20:38 +03:00
Juho Hiltunen
741bea9510
code cleanup: make LookupFlags() static
2022-09-17 18:09:23 +03:00
Juho Hiltunen
597cb2f440
code cleanup: move Unpronouncable() and Unpronouncable2()
2022-09-17 18:05:01 +03:00
Juho Hiltunen
9d03b09537
code cleanup: move ChangeWordStress()
2022-09-17 18:05:01 +03:00
Juho Hiltunen
c5db9220bf
code cleanup: move Read4Bytes()
2022-09-17 17:41:43 +03:00
Juho Hiltunen
14ede3e372
code cleanup: move is_str_totally_null()
2022-09-17 17:28:52 +03:00
Juho Hiltunen
64f12fec87
code cleanup: move towlower2()
2022-09-17 17:22:01 +03:00
Juho Hiltunen
ac3b9f6199
code cleanup: move utf8_* functions.
...
utf8_nbytes() is only used in dictionary.c. Others are moved to common.c
2022-09-17 11:24:59 +03:00
Juho Hiltunen
b52d1f3afd
code cleanup: move strncpy0 to common.c
2022-09-04 07:12:39 +03:00
Juho Hiltunen
c4d8976fbc
code cleanup: Add new source file common.h for misc functions.
2022-09-03 21:19:37 +03:00
Juho Hiltunen
47b1b5baeb
code cleanup: move TranslateWord3() and others o translateword.c
...
Use parameters instead of globals. Note the change from sizeof(word_phonemes) to size_word_phonemes.
2022-09-03 11:54:10 +03:00
Juho Hiltunen
5e7c105723
code cleanup: move TranslateLetter() and others to translateword.c
2022-09-03 11:46:16 +03:00
Juho Hiltunen
fb06936c51
code cleanup: start moving translateWord3() to a new source file.
...
The file will be organized to have one callable function only. This
should make code structure simpler.
Existing code will be changed to use function parameters instead of
global variables.
Possible problems include too much dependencies with numbers.c.
2022-09-03 11:41:30 +03:00
Juho Hiltunen
c4be2c90ad
code cleanup: remove irrelevant comment
2022-09-02 21:10:10 +03:00
Juho Hiltunen
54963ebee2
code cleanup: remove unused int prev_clause_pause
2022-09-02 21:02:44 +03:00
Juho Hiltunen
0e07d929fd
code cleanup: refactor checking phoneme_mode into a function
2022-09-01 20:50:27 +03:00
Juho Hiltunen
1443c970cd
cmn: search for dictionary matches instead of translating characters.
...
cmn (Mandarin chinese) has been broken since 4825905 .
This fix makes mandarin behave more like Cantonese. Instead of
translating characters, we search for dictionary matches.
The functionality of normal vs Chao tones should be investigated more.
Looks like latin characters as pinyin still uses Chao tones whereas
the characters in cmn_list and cmn_listx do not.
See #1044 for discussion. See also #1028 and #1163 .
2022-08-31 21:15:29 +03:00
Juho Hiltunen
366658e85a
cmn: yue: add tests for latin characters as English or pinyin/jyutping
2022-08-31 21:15:23 +03:00
Juho Hiltunen
69c79ab931
code cleanup: remove unused phonemetable ph_yoruba
2022-08-29 21:26:00 +03:00
Juho Hiltunen
89522c6431
code cleanup: remove unused phonemetable ph_burmese
...
Myanmar/Burmese (my) uses phonemetable ph_myanmar instead.
2022-08-29 21:24:20 +03:00
Juho Hiltunen
0dbe71827e
remove unused phonemetable for kinyarwanda.
...
Fixup for commit 89768755 .
2022-08-28 21:53:11 +03:00
Juho Hiltunen
4e7740fa96
code cleanup: remove unused phonemetable ak (akan)
2022-08-28 21:40:00 +03:00
Juho Hiltunen
2ef9d75067
code cleanup: remove dead code related to language 'wo'
...
This is the only reference to the language.
2022-08-28 21:34:03 +03:00
Juho Hiltunen
8976875590
code cleanup: remove dead code related to Kiryarwanda
...
This is the only reference to the language.
2022-08-28 21:34:03 +03:00
Juho Hiltunen
3eb43c1ef5
code cleanup: remove dead code related to Tibetan
...
Language 'bo' has no data files. Tibetan might have been supported
before but clearly isn't any longer.
2022-08-28 20:40:58 +03:00
Juho Hiltunen
7492475728
code cleanup: make a function for checking tr->chars_ignore
...
ReadClause() is very long and should be shortened for code readability
2022-08-28 20:13:32 +03:00
Juho Hiltunen
a161118976
code cleanup: move lookupwchar2 to readclause.c
...
It's used only in readclause.c
TODO: Rename so the meaning of the function is easier to understand.
2022-08-28 20:13:16 +03:00
Juho Hiltunen
aa24065d5b
tests: Add tests for ignored or replaced characters (tr->chars_ignore)
2022-08-28 20:13:04 +03:00
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
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
923c779098
he: remove two lines that prevent compilation of the dictionary.
2021-07-31 17:01:45 +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
4f5f1e8310
doc: add documentation for language option "stressOpt"
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
88cb55ee0f
tests: add missing phoneme tests.
...
Added tests are copied from existing tests from the same language family
or English. The tested phonemes should be adapted for better test
coverage.
2021-07-23 16:57:36 +03:00
Juho Hiltunen
ddde4b1060
tests: add a test to make sure each language has a phoneme test
2021-07-23 16:57:23 +03:00
Juho Hiltunen
cb30653736
io: use capital for language name (Ido instead of ido).
2021-07-23 16:57:10 +03:00
Juho Hiltunen
76fbe50bd4
Update changelog
2021-07-19 16:32:49 +03:00
Juho Hiltunen
ed37d4533e
fix a type in Changelog (Chuvash = cv, not cu)
2021-07-18 11:36:09 +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