Commit Graph
3503 Commits
Author SHA1 Message Date
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
chrislm c281a90a5e IT: Added rules for pronominal verbs and exceptions. 2018-03-18 19:17:42 +01:00
Valdis Vitolins ae74c1f415 Merge branch 'master' of https://github.com/espeak-ng/espeak-ng 2018-03-18 19:51:47 +02:00
Reece H. Dunn 9426399056 docs: describe the X-SAMPA transcription scheme. 2018-03-18 16:04:53 +00:00
Reece H. Dunn 44b75463f6 docs: Extend the phonemes document to cover the remaining IPA suprasegmentals for completeness. 2018-03-18 12:53:36 +00:00
Reece H. Dunn 3fcf990370 docs: Fix the spacing of the symbol column in the fortis and lenis section of the phonemes document. 2018-03-18 11:41:25 +00:00
Reece H. Dunn 3918810893 docs: Fix the position of the p and f ejectives in the IPA consonant table. 2018-03-18 09:06:27 +00:00
Valdis Vitolins 4ac932ea2c ru: add more unstressed words 2018-03-18 01:27:39 +02:00
Valdis Vitolins 9529232d81 ru: put together auxiliary words, sort and remove duplicates 2018-03-18 01:27:31 +02:00
Valdis Vitolins 09bd8cee9f ru: leave only intonation settings in ru_list, because spelling is set in ru_rules 2018-03-18 01:27:11 +02:00
Valdis Vitolins 6cc1c00900 ru: spell singe consonant particles б, в, ж, к, с with schwa 2018-03-18 01:26:58 +02:00
Valdis Vitolins 65d5e6729e ru: sort and format rules 2018-03-18 01:26:48 +02:00
Valdis Vitolins 56fedaeb7c ru: as single letters can be words with different pronunciation, move them to ru_rules file 2018-03-18 01:26:08 +02:00
Reece H. Dunn dd6ed3f438 docs: Split out the ASCII-IPA ':' character into a suprasegmentals section and document the stress markers. 2018-03-17 17:40:17 +00:00
Reece H. Dunn dc67d294c2 docs: describe the Kirshenbaum (ASCII-IPA) transcription scheme. 2018-03-17 17:27:44 +00:00