Commit Graph
2042 Commits
Author SHA1 Message Date
Juho Hiltunen 1de9f4b52c Revert "cleanup: reduce code duplication with a new function"
This reverts commit 8021528f5e.

Failing on CI/CD.
2022-10-30 10:56:59 +02:00
Juho Hiltunen 8021528f5e cleanup: reduce code duplication with a new function
StatusCreateTerminatedMsg.

This is not covered by current tests.
2022-10-30 10:12:11 +02:00
Juho Hiltunen 55f1f8e113 cleanup: reduce code duplication with AddToVoicesList()
Checking for return value & continue might be redundant.
2022-10-30 10:12:11 +02:00
Juho Hiltunen d47d2d0a40 cleanup: remove duplicate StringToWord()
Found with pmd-cpd static analysis
2022-10-30 10:12:11 +02:00
Juho Hiltunen 03ebb2fd11 cleanup: reduce variable scopes dictionary.c 2022-10-30 10:12:06 +02:00
Juho Hiltunen f23ff88755 cleanup: reduce variable scopes in synthdata.c 2022-10-30 10:11:53 +02:00
Juho Hiltunen 5d4791ccd1 cleanup: reduce variable scopes in synthesize.c 2022-10-30 10:11:44 +02:00
Juho Hiltunen 54265990b5 cleanup: reduce variable scopes in wavegen.c 2022-10-30 10:11:44 +02:00
Juho Hiltunen fa575b54cb cleanup: fix knownConditionTrueFalse code smells 2022-10-30 10:11:44 +02:00
Juho Hiltunen 7c7ab9e177 cleanup: fix duplicateCondition code smell 2022-10-30 10:11:44 +02:00
Yury Popov ae97fa16b4 Remove phoneme compile_report stuff 2022-10-30 10:11:44 +02:00
Yury Popov a178ea1b13 Remove system() call from compiledata.c 2022-10-30 10:11:44 +02:00
Yury Popov 3857b83c19 Respect custom N_PATH_HOME definition if passed 2022-10-30 10:11:44 +02:00
Yury Popov 4e5bc19047 Allow out-of-tree intonations compilation 2022-10-28 12:34:56 +03:00
Juho Hiltunen 507a5f5410 cleanup: fix unreadVariable code smell for variant_name in SelectVoiceByName() 2022-10-26 17:55:00 +03:00
Juho Hiltunen 14f12376a3 cleanup: change int skip to bool 2022-10-26 17:55:00 +03:00
Juho Hiltunen 8ddcf6ed94 cleanup: reduce variable scopes in voices.c 2022-10-26 17:54:55 +03:00
Juho Hiltunen 9900d55ccf cleanup: reduce variable scopes in setlengths.c 2022-10-25 20:02:54 +03:00
Juho Hiltunen 78a037924e cleanup: fix code smell knownConditionTrueFalse for strlen() >= 0
Strlen never retuns a negative value. Also combined if statements to
reduce complexity. This code currently has no tests.
2022-10-25 19:51:02 +03:00
Juho Hiltunen 07da7edeea cleanup: fix code smell knownConditionTrueFalse
Inner 'n_bytes >= 0' will always be true.
2022-10-25 19:51:02 +03:00
Juho Hiltunen 59177db8ef cleanup: fix code smell knownConditionTrueFalse
Inner 'p->stresslevel>=4' will always be true. Thus checking for
count_stressed is redundant.
2022-10-25 19:51:02 +03:00
Juho Hiltunen ef809dcd7e SetSpeed() refactoring (#1465)
Unify common parts of two implementations. Split into smaller functions.
2022-10-25 19:32:32 +03:00
Juho Hiltunen 8170775113 code cleanup: refactor and remove duplication by unifying SetSpeed()
implemantations.

It is unclear why the two implementations differ.
2022-10-25 19:24:55 +03:00
Juho Hiltunen 0c82988b44 cleanup: refactor and remove duplication from SetSpeed() implementations. 2022-10-25 19:24:55 +03:00
Juho Hiltunen 84f58824af cleanup: refactor and remove duplication from SetSpeed() implementations. 2022-10-25 19:24:55 +03:00
Juho Hiltunen 9e9fb16b56 cleanup: use parameters instead of globals with SetSpeedMods 2022-10-25 19:24:55 +03:00
Juho Hiltunen a4c70d7921 cleanup: remove setting samplerate with Sonic.
we currently only support 22050 as samplerate so this code has no
effect. This should be readded to setSpeed() with and without Sonic if
multiple samplerates are supported in the future.
2022-10-25 18:24:27 +03:00
Juho Hiltunen bc16f819dd cleanup: refactor and remove duplication from SetSpeed() implementations.
There are two SetSpeed(), one for Sonic and one without. The differences
are very small.

In SetSpeedMods(), sample rate is adjusted for Sonic only:
 speed.min_sample_len = (speed.min_sample_len * samplerate_native) / 22050;

Since samplerate_native is 22050 at the moment this line has no effect.
2022-10-24 21:49:12 +03:00
Samuel Thibault 4f3aa3335e Fix long numbers (#1458)
nvda happened to be speaking 3647 because strtoi was actually
overflowing. Better make sure to have proper ascii to number translation
before continuing.

Fixes #1385
2022-10-23 19:33:02 +02:00
Samuel Thibault 0127aea5c9 Fix long numbers
nvda happened to be speaking 3647 because strtoi was actually
overflowing. Better make sure to have proper ascii to number translation
before continuing.

Fixes #1385
2022-10-23 19:25:25 +02:00
Juho Hiltunen 9e3ade9004 cleanup: reduce variable scopes in ssml.c
Contributes to #9.
2022-10-23 19:34:59 +03:00
Juho Hiltunen 185c93e702 cleanup: reduce variable scopes in readclause.c
Contributes to #9.
2022-10-23 19:15:18 +03:00
Juho Hiltunen 9be76c0b30 cleanup: fix cppcheck unusedVariable code smells 2022-10-23 18:44:30 +03:00
Juho Hiltunen 0551a234eb cleanup: reduce variable scopes in translateword.c
Contributes to #9.
2022-10-23 18:34:15 +03:00
Juho Hiltunen b4053da400 cleanup: fix cppcheck identicalInnerCondition code smells 2022-10-23 18:09:06 +03:00
Juho Hiltunen 77df00ad79 cleanup: fix cppcheck unreadVariable code smell in common.c 2022-10-23 17:32:41 +03:00
Juho Hiltunen 80a632ed26 cleanup: reduce variable scopes in common.c
Contributes to #9.
2022-10-23 17:32:41 +03:00
Juho Hiltunen 39ea6e3a90 cleanup: reduce variable scopes in translate.c
Contributes to #9.

Found with cppcheck static code analyzer variableScope parameter.
2022-10-23 17:28:20 +03:00
Juho Hiltunen ef1b562714 cleanup: remove code duplication by using SetPlist2() 2022-10-23 12:14:59 +03:00
Juho Hiltunen 319ce7b09f cleanup: refactor duplicate loops to CalcWordLength().
Note: This code has no tests. Tests would pass even without a call to
this function.
2022-10-23 12:14:59 +03:00
Juho Hiltunen 139eef57d2 cleanup: refactor checking for _^_ to function SwitchLanguage() 2022-10-23 12:14:59 +03:00
Juho Hiltunen e2862bbc51 cleanup: refactor checking FLAG_COMBINE into a function 2022-10-22 11:49:27 +03:00
Yury Popov 9b3b916163 Add ng API to enable phoneme events 2022-10-17 18:48:23 +03:00
Yury Popov dde5f8a983 Fix for possible unaligned pointer load in DoPhonemeMarker 2022-10-17 16:26:48 +03:00
A11CF0 c5de4ff6c2 Avoid clashes between gender selection code and thousand variant flags
Fixes #1420 also Set max_digits to 32 for russian since it's safe to do now.
2022-10-16 22:12:23 +03:00
Sergei B 3199d7889b Belarusian: improvements
- fixed/removed not working rules in be_list
- added stress to the words in be_list
- fixed multi thousand transcription
- removed not working rules in be_rules
- added rules of palatalization, phonemes lengthen
- fixed dropping of [a] at the end of words
- fixed message "Full dictionary is not installed for"
- added configuration in tr_languages.c
- fixed/added phonemes for `Q`, `ts`, `ts;`, `dz`, `dz.`, `;` etc
2022-10-14 00:32:08 +03:00
Beqa Gozalishvili d44cc383bd Georgian: increase numbers to use maximum digits 2022-10-11 15:16:46 +04: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 dc60881171 et: fi: move spellingStress from code to language configuration 2022-10-10 21:20:53 +03:00
Juho Hiltunen 015bb42a70 new configurable language option: spellingStress 2022-10-10 21:20:20 +03:00