Commit Graph
7 Commits
Author SHA1 Message Date
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
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
Sascha Brawer 1791e30e42 Add a fuzz target for SSML input
https://github.com/espeak-ng/espeak-ng/issues/407
2018-03-12 21:30:34 +01:00
Sascha Brawer 7e669f1812 Add tests on SSML parsing
A corpus of SSML input files will also be needed for fuzzing.
https://github.com/espeak-ng/espeak-ng/issues/407
2018-03-02 11:32:36 +01:00
Sascha Brawer 1b923fb0d6 Fix compiler warning
Before this change, the clang compiler produced the following warning:

```
In file included from src/libespeak-ng/espeak_api.c:35:
src/libespeak-ng/event.h:65:28: warning: declaration of 'struct timespec' will
      not be visible outside of this function [-Wvisibility]
void clock_gettime2(struct timespec *ts);
                           ^
src/libespeak-ng/event.h:66:28: warning: declaration of 'struct timespec' will
      not be visible outside of this function [-Wvisibility]
void add_time_in_ms(struct timespec *ts, int time_in_ms);
                           ^
2 warnings generated.
```
2018-02-27 15:54:04 +01:00
Sascha Brawer 2e2afe5cdf Fix typo: “Kirshenbaum” encoding, not “Hirshenbaum” 2018-02-16 16:34:55 +01:00
Sascha Brawer a88c38629e Fix link in documentation
The stray space confuses GitHub’s markdown parser.
2018-02-16 15:21:13 +01:00