Commit Graph
100 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
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
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
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
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
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
Reece H. Dunn 1fa7c141f9 docs: Fix the markdown warnings from kramdown. 2018-03-17 11:15:08 +00:00
Reece H. Dunn 3e249bc196 docs: Add notes for the remaining kirshenbaum features in phonemes.md. 2018-03-17 11:00:38 +00:00
Reece H. Dunn cf3cabc140 Revert "Describe the additional Cainteoir Text-to-Speech phonemes for the articulation diacritics."
This reverts commit 39994150ba.
2018-03-17 10:16:41 +00:00
Reece H. Dunn 768957e0fc Don't copy filepath to buf. [coverity]
No modification was being done to buf after the copy of filepath.
It was just being passed to fopen. As such the copy is redundant,
and can lead to buffer overflow issues if the specified filepath
is larger than buf.
2018-03-17 07:13:21 +00:00
Reece H. Dunn d0410d8585 Include dictionary.h in the relevant source files to avoid implicit-function-declaration warnings. 2018-03-17 07:12:45 +00:00
Reece H. Dunn bc1d7cabcc Merge branch 'windows' 2018-03-16 12:58:30 +00:00
Reece H. Dunn 39994150ba Describe the additional Cainteoir Text-to-Speech phonemes for the articulation diacritics. 2018-03-16 12:58:09 +00:00
Reece H. Dunn da980182e3 Document the origin of the phoneme features in phonemes.md. 2018-03-16 12:49:04 +00:00
Reece H. Dunn 63d2b66316 Update the links to Kishenbaum's ASCII-IPA. The site is no longer active, so use the wayback machine (internet archive). 2018-03-16 12:30:28 +00:00
Reece H. Dunn 2d69743ddf README: The audio output configuration has been replaced by pcaudiolib, so remove that section. 2018-03-15 07:36:03 +00:00
Reece H. Dunn a3c1a00d45 android: fix downloading the android gradle plugin version 2.3.3. 2018-03-15 07:29:22 +00:00
Reece H. Dunn a0d8e8df78 android: add the new ssml.c source file 2018-03-15 07:28:08 +00:00
Reece H. Dunn 81cfcecfe7 tests: remove a todo comment that is not relevant (it was added by mistake) 2018-03-15 07:20:09 +00:00
Reece H. Dunn 005c490b90 tests: test grc consonant and vowel audio generation 2018-03-15 07:18:14 +00:00
Reece H. Dunn 0efb5600fc tests: test gn consonant and vowel audio generation 2018-03-15 07:17:56 +00:00
Reece H. Dunn f9386c0797 docs: Fix the symbols for ejc and imp in phonemes.md. 2018-03-14 07:18:44 +00:00
Reece H. Dunn bec93c83cb docs: Clean up the phonemes.md table of contents. 2018-03-14 07:17:31 +00:00
Reece H. Dunn a1a7410212 Revert "docs: Split out the IPA phoneme tables from the phoneme feature description."
This reverts commit 9689cc8860.
2018-03-14 07:16:36 +00:00
Reece H. Dunn 99bbc6294e Fix building on Windows. 2018-03-12 12:26:57 +00:00
Reece H. Dunn 9fdccb7bc3 docs: link to the English espeak transcription guide from the languages document. 2018-03-12 08:00:44 +00:00
Reece H. Dunn 9689cc8860 docs: Split out the IPA phoneme tables from the phoneme feature description. 2018-03-12 07:48:29 +00:00
Reece H. Dunn 7b64aac6c0 en: fix riposted for non US accents 2018-03-11 18:00:55 +00:00
Reece H. Dunn 07e155a150 TranslateWord2: Don't process invalid phonemes.
If ph_code is not located in the phoneme_tab, the resulting ph
value will be NULL. This does not normally happen, but it can
happen if word_phonemes contains garbage data, such as with the
1.49.2 multi-word logic when processing words like 'riposted'.
2018-03-11 18:00:38 +00:00
Reece H. Dunn eaa08a2bc3 translate: Don't crash translating root words that map to another list entry.
If the list file contains a text replacement to another
entry in the list file, e.g.:

	ripost     riposte $text
	riposte    rI#p0st

calling it from a prefix or suffix rule such as 'riposted'
causes word_out[0] to be NULL, as TranslateWord3 has the
information needed to perform the mapping. In this case,
no phonemes have been written in this loop and the phonemes
have been calculated, so don't override them.
2018-03-11 17:58:15 +00:00
Reece H. Dunn ad4155e705 tests: Add test cases for NVDA issue 7805. 2018-03-11 16:11:34 +00:00
Reece H. Dunn 6873c45d1a Merge branch 'docs-english' 2018-03-11 14:27:19 +00:00
Reece H. Dunn f4ff5c6802 Merge branch 'reorganise-tests' 2018-03-11 14:26:56 +00:00
Reece H. Dunn 05e571ca4a compiledict.h: espeak_ng_CompileDictionary is defined in espeak_ng.h, so don't redefine it here. 2018-03-11 14:26:19 +00:00
Reece H. Dunn c73530f7dd Merge remote-tracking branch 'jaacoppi/includes' 2018-03-11 14:22:34 +00:00
Reece H. Dunn 181ae49c81 docs (en.md): move the split vowels section into the short vowels section. 2018-03-11 14:14:40 +00:00
Reece H. Dunn b39ef7aca4 docs (en.md): document the Scottish NURSE vowel in the main rhotic vowel lexical set table. 2018-03-11 14:14:19 +00:00
Reece H. Dunn 7e5d785ae9 tests: extend the English language pronunciation tests to cover all the lexical sets. 2018-03-11 14:13:44 +00:00
Reece H. Dunn 28edb446e6 docs: group the vowel sections in en.md under a general 'vowels' section. 2018-03-11 14:13:15 +00:00
Reece H. Dunn 38a226859a docs: align the lexical set tables in en.md for vim. 2018-03-11 14:13:04 +00:00
Reece H. Dunn 7885f06583 docs: describe the Scottish English lexical sets in en.md. 2018-03-11 14:12:51 +00:00
Reece H. Dunn 3dbb0e6de3 tests: rename {languages => language-pronunciation}.test 2018-03-11 14:09:26 +00:00
Reece H. Dunn 5e1671f08b tests: rename {phoneme-audio => language-phonemes}.test 2018-03-11 14:09:06 +00:00
Reece H. Dunn 15190d4de1 tests: rename {phoneme-output => translate}.test 2018-03-11 14:08:10 +00:00
Reece H. Dunn 439b2d45d1 tests: move the Latvian pronunciation tests to languages.test 2018-03-11 14:06:39 +00:00
Reece H. Dunn 9e1bed69f0 tests: make the language tests phoneme-based.
The phoneme to audio tests are covered in the phoneme-audio tests.
Therefore, the language tests just need to test the text to
phoneme logic.
2018-03-11 14:06:22 +00:00
Reece H. Dunn 9ff086a2f1 Merge remote-tracking branch 'jaacoppi/includes' 2018-03-09 19:28:12 +00:00
Reece H. Dunn f55cce345e tests: test gd consonant and vowel audio generation 2018-03-09 07:06:57 +00:00
Reece H. Dunn 8c41a01ec4 tests: test ga consonant and vowel audio generation 2018-03-08 07:39:38 +00:00
Reece H. Dunn 6dc13c99a9 fr: remove the unused fr-CA phoneme table.
There is no fr-CA language dialect dialect file, nor has there
been in the espeak/espeak-ng history.

The fr-CA phoneme table defined the additional phonemes [U], [y"],
[E:], and [A]. The fr-FR phoneme table mapped these to [u], [y],
[E], and [a] respectively. This meant to describe the phonemes that
have not been merged in fr-CA, but have merged in fr-FR, as described
in https://en.wikipedia.org/wiki/Quebec_French_phonology.

The only use of these phonemes in the French dictionary was with
the word "tramway" using [E:]. This has been replaced with [E] to
match the rest of the dictionary file transcriptions, and those
phonemes for fr-CA have been removed.

If fr-CA is supported in the future, the French dictionary would
need to be modified to reverse the merger of the phonemes that are
not merged in fr-CA, with the merge logic being performed in the
fr-FR phoneme table like in the code being removed in this commit.
2018-03-08 07:12:49 +00:00
Reece H. Dunn c5f88c51dd translate.c: Don't loop to the end of sbuf, as sbuf gets null terminated, so needs a byte for the null character. [msvc /analyze]. 2018-03-07 12:56:26 +00:00
Reece H. Dunn c49164334b Ensure each name in proc_names can fit an item_string [msvc /analyze]. 2018-03-07 12:50:58 +00:00
Reece H. Dunn 583a23f0cd Use ENV_LEN in the fwrite call in LoadEnvelope2 to be consistent with the rest of the function. 2018-03-07 12:36:58 +00:00
Reece H. Dunn 96ae5c65be windows: ignore static-analysis build output 2018-03-07 12:32:09 +00:00
Reece H. Dunn 19e425a169 windows: add ssml.c to the project to fix building on Windows 2018-03-07 12:27:39 +00:00
Reece H. Dunn 6e3bcb1243 tests: test fr consonant and vowel audio generation 2018-03-07 08:04:43 +00:00
Reece H. Dunn 4bf83271ec tests: test fi consonant and vowel audio generation 2018-03-07 07:42:53 +00:00
Reece H. Dunn 41f19d4137 tests: test fa consonant and vowel audio generation 2018-03-07 07:34:13 +00:00
Reece H. Dunn 477395e29a tests: test eu consonant and vowel audio generation 2018-03-07 07:03:11 +00:00
Reece H. Dunn 605fa2d7dc tests: test et consonant and vowel audio generation 2018-03-06 07:56:28 +00:00
Reece H. Dunn 219d187a61 tests: test es consonant and vowel audio generation 2018-03-06 07:44:01 +00:00
Reece H. Dunn 04dd5168a0 tests: test eo consonant and vowel audio generation 2018-03-06 07:32:37 +00:00
Reece H. Dunn e05b478f22 tests: use autoconf-style output when checking for the sha1 command. 2018-03-06 07:19:43 +00:00
Reece H. Dunn f71068a500 tests: test en consonant and vowel audio generation 2018-03-06 07:18:57 +00:00
Reece H. Dunn 2b6f862ad4 tests: test el consonant and vowel audio generation 2018-03-05 07:49:12 +00:00
Reece H. Dunn beb8ed816f tests: test de consonant and vowel audio generation 2018-03-05 07:42:26 +00:00
Reece H. Dunn 2692a92072 Merge commit 'f5539fc5fb2f8bf40d35a287ec08dad71c624d4c' 2018-03-05 07:30:20 +00:00
Reece H. Dunn 62c169e52e tests: test da consonant and vowel audio generation 2018-03-05 07:08:53 +00:00
Reece H. Dunn 52c2b722a9 tests: test cs consonant and vowel audio generation 2018-03-04 12:25:45 +00:00
Reece H. Dunn 6a9621d213 Merge remote-tracking branch 'valdisvi/master' 2018-03-04 09:41:16 +00:00
Reece H. Dunn b23f475e1a ssml.h: Reformat the header file. 2018-03-04 09:32:29 +00:00
Reece H. Dunn d47e48a377 ssml: Update the copyright notice. 2018-03-04 09:27:52 +00:00
Reece H. Dunn 017c6a9383 ssml.h: Add a copyright header and include guards. 2018-03-04 09:25:06 +00:00
Reece H. Dunn 49b97105e5 ssml: Move ssmltags to ssml.c where it is used.
This avoids 'unused parameter' errors in readclause.c.
2018-03-04 09:18:34 +00:00
Reece H. Dunn 80dec4ce7c tests: test cs consonant and vowel audio generation 2018-03-03 08:27:43 +00:00
Reece H. Dunn 813d473ee1 phonemes.md: don't wrap features in the Other Symbols table. 2018-03-03 08:00:19 +00:00