Commit Graph
3517 Commits
Author SHA1 Message Date
Juho Hiltunen d08b8e43ca maintainability: pass seq_len_adjust to LookupSpect() instead of using globals 2018-03-25 12:41:01 +03:00
Juho Hiltunen b23e8a7269 maintainability: pass Translator as to towlower2() instead of using a global 2018-03-25 12:40:57 +03:00
Reece H. Dunn b7a8751f4d Remove a redundant comment -- history is available in git. 2018-03-24 14:32:43 +00:00
Juho Hiltunen f73ebfd126 maintainability: pass current_alphabet as argument to TranslateLetter() instead of using global 2018-03-24 15:05:53 +02:00
Juho Hiltunen d196d93ed5 maintainability: move variables to files where they are used, allowing removal of unnecessary extern declarations 2018-03-24 15:05:23 +02:00
Juho Hiltunen 1bad240de8 maintainability: remove some unused variables and unnecessary extern declarations 2018-03-24 15:03:48 +02:00
Juho Hiltunen c4ec7bfe34 remove option_phoneme_variants that is never set and always evaluates true 2018-03-24 15:03:12 +02:00
Juho Hiltunen 7ee0d7905c remove unused int option_tone2
It is set in voices.c but never used. docs/voices.md indicates that the keyword intonation only takes one parameter, confirming that option_tone2 is unused.
2018-03-24 14:25:50 +02:00
Reece H. Dunn c5fb29d66c Update the CHANGELOG.md file. 2018-03-23 08:03:44 +00:00
Reece H. Dunn 5555eb939f tests: test hak consonant and vowel audio generation 2018-03-23 07:21:40 +00:00
Reece H. Dunn 639ee7e0f8 tests: test gu consonant and vowel audio generation 2018-03-23 07:11:16 +00:00
Reece H. Dunn 7dbf87255d Release the memory in text in fuzzrunner.c. 2018-03-22 20:54:05 +00:00
Reece H. Dunn dfe66289c8 Don't set final_ph2 to before phonetic in the stack if ix=1. 2018-03-22 20:52:28 +00:00
Reece H. Dunn 2d7f3e9d54 Don't skip blanks past charix_top in TranslateClause. 2018-03-22 20:49:15 +00:00
Reece H. Dunn 7dad0dfd40 Prevent TranslateRoman reading stack data from Lookup. 2018-03-22 20:12:35 +00:00
Reece H. Dunn b24db06a84 Copy name to tr->dictionary_name if not equal
This is a similar change to b60d2452c3.
In this case, it is when tr->dictionary_name is passed as the name
parameter in LoadDictionary.

This happens in the SetTranslator2 function when loading the
dictionary for the second language translator object.
2018-03-22 19:48:56 +00:00
Reece H. Dunn bb19c7a336 Release the memory allocated by p_text in espeak-ng.c. 2018-03-22 19:37:25 +00:00
Reece H. Dunn 062cb8dfc9 Merge remote-tracking branch 'valdisvi/master' 2018-03-22 19:09:29 +00:00
Reece H. Dunn 879cb9c08a Don't free 'tr' if null in DeleteTranslator. 2018-03-22 19:01:59 +00:00
Valdis Vitolins c3d537db56 Add link to online testing 2018-03-22 11:09:08 +02:00
Valdis Vitolins ad1fa7f25f Expose SpectSeqCreate(), SpectSeqDestroy() and LoadSpectSeq() functions for eSpeakNG Java Editor 2018-03-22 10:25:13 +02:00
Reece H. Dunn d23735ae1b Release the translator memory in espeak{_ng,}_Terminate. 2018-03-22 07:26:22 +00:00
Reece H. Dunn 87a2586bb0 Fix formatting of free_rules. 2018-03-22 07:19:26 +00:00
Reece H. Dunn 444e4544d2 Simplify the !v comparison and check PATHSEP
SetVoiceStack looks for "!v" in variant_name and skips the first
three characters if "!v" is found. The problem here is that it
does not check that the third character is the path separator, so
may advance into unknown memory if variant_name is exactly "!v".

This fixes that problem by checking for the path separator. It
also simplifies the logic by checking the bytes explicitly.

NOTE: This is not strictly needed, as the only code paths this is
relevant for is in espeak_ng_SetVoiceByName, and the variant name
comes from ExtractVoiceVariantName, which sets up the variant name
correctly.
2018-03-21 21:35:26 +00:00
Reece H. Dunn c9ca77a4d4 Compare variant_name with "!v" only if long enough
Various places call SetVoiceStack with "" for the variant_name. This
causes -fsanitize=address to fail with an overflow as the call to
memcmp is checking the first 2 bytes, and there is only 1 byte
available.
2018-03-21 21:16:08 +00:00
Reece H. Dunn a08d2c7bfb Ensure the allocated rules are properly cleaned up in compile_dictrules. 2018-03-21 20:58:55 +00:00
Reece H. Dunn b60d2452c3 Copy name in LoadDictionary if not dictionary_name
compiledict.c sets dict_name to dictionary_name if dict_name is
not set, and passes that to LoadDictionary. LoadDictionary then
copies the passed in name to dictionary_name.

This causes -fsanitize=address to fail with overlapping memory
addresses passed to strncpy (copying the string to itself). As
such, don't copy the name in this case.
2018-03-21 20:37:44 +00:00
Reece H. Dunn cd17e7c935 docs: remove the references to Z-SAMPA.
Z-SAMPA is a more complex specification than Kirshenbaum, X-SAMPA,
and CXS. Additionally, it specifies phonemes such as palatal and
velar trills that are not defined by IPA and in the context of the
velar trill is marked as being impossible.

As such, Z-SAMPA will not be supported in eSpeak NG for now. That
may change in the future once support for the other transcription
schemes has been implemented.
2018-03-21 07:56:39 +00:00
Reece H. Dunn e5ebf76722 docs: Use 'subtag' instead of 'tag' to correctly refer to BCP47 variant and private use names. 2018-03-20 07:30:57 +00:00
Sascha Brawer 8aa4521d31 Make phoneme properties unsigned
Fixes two sanitizer warnings:

```
src/libespeak-ng/compiledata.c:2291:27: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
src/libespeak-ng/compiledata.c:2424:34: runtime error: left shift of 1 by 31 places cannot be represented in type 'int'
```
2018-03-20 02:29:32 +01:00
Reece H. Dunn 0d9c91bac9 Pass AM_CFLAGS to ssml-fuzzer.test. 2018-03-19 22:12:33 +00:00
Reece H. Dunn d5c52ab39f Fix building ssml-fuzzer with libFuzzer. 2018-03-19 21:50:08 +00:00
Reece H. Dunn 39b8768a79 README: Document building with -fsanitize options. 2018-03-19 21:01:20 +00:00
Reece H. Dunn 7429a58510 Merge commit '22009de5f84974e77147fd5264781fb1c09a7764' 2018-03-19 20:51:53 +00:00
Reece H. Dunn 22009de5f8 Fix running the tests with -fsanitize=address. 2018-03-19 20:22:54 +00:00
Reece H. Dunn 45b9b114cf docs: Prefix the private use tags with 'x-'. 2018-03-19 18:44:36 +00:00
Reece H. Dunn 69a9395de9 docs: Rename 'BCP47 {Variants => Tags}'.
This makes it clearer that both variant and private-use tags are
used.
2018-03-19 18:39:22 +00:00
Sascha Brawer a1e1b40073 Use correct BCP47 variant subtag for X-Sampa; shorten other variants
According to page 5 of [RFC5645](https://tools.ietf.org/html/bcp47#page-1-5),
variant subtags must have 5 to 8 characters. A 9-character subtag is
sytactically ill-formed and should be rejected by conforming parsers.

Technically, BCP47 does not allow the use of unregistered variant subtags.
For `fonkirsh`, I’ve filed a
[language variant subtag registration request](https://mailarchive.ietf.org/arch/msg/ietf-languages/1IrLl3n4wJ4Fr1xXV34QquJn8Bc)
with the IETF. If IETF rejects my request, we could probably add
Kirshenbaum to Unicode’s registry for [RFC6497](https://tools.ietf.org/html/rfc6497).

Not sure what to do about the other non-registered variants. If they’re
commonly used, it might be an option to register them as well, but
they seem to be even more exotic than Kirshenbaum, and we wouldn’t to
bloat the BCP47 registry too much. If espeak-ng really wants to handle these
alphabets, it would probably make sense to use BCP47 private-use extensions,
such as `x-fonzsamp`. According to IETF BCP47, private-use subtags can have
up to (but not more than) 8 characters, so I’m shortening these too.
2018-03-19 12:37:14 +01:00
Reece H. Dunn fb5c128f62 Merge remote-tracking branch 'valdisvi/master' 2018-03-19 07:45:19 +00:00
Reece H. Dunn c868c54362 Merge remote-tracking branch 'Christianlm/master' 2018-03-19 07:42:01 +00:00
Reece H. Dunn be106e388e docs: describe the Conlang X-SAMPA transcription scheme. 2018-03-19 07:41:39 +00:00
Reece H. Dunn 74f04f64fd docs: Fix the placement of the alveolar click in the Kirshenbaum consonant table. 2018-03-19 07:40:21 +00:00
Valdis Vitolins 6ba9db469c ru: add stress rule for помощь 2018-03-18 23:27:58 +02:00
Valdis Vitolins 6bb9681b1d ru: clean pronunciation for е, add ребенок as exception word 2018-03-18 23:27:23 +02:00
Valdis Vitolins 52375bdf2f ru: create letter groups for noun suffixes 2018-03-18 23:24:15 +02:00
Valdis Vitolins c2735711ce ru: fix pronunciation of stressed о 2018-03-18 22:23:39 +02:00
Valdis Vitolins bba7b6337f ru: make ь (soft mark) absolutely silent befor iotated vowel
This affect e.g. pronunciation of я (ja) because j then starts from
pause
2018-03-18 22:14:14 +02:00
Valdis Vitolins fe57476c93 ru: format rules 2018-03-18 22:01:55 +02:00
Valdis Vitolins b8cf1ec352 ru: fix inaudible m; (soft m) 2018-03-18 21:42:09 +02:00
Valdis Vitolins 1c58e2a04b ru: reformat and sort list of words 2018-03-18 21:12:42 +02:00