Commit Graph
1530 Commits
Author SHA1 Message Date
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
Juho Hiltunen 985e7d5b39 set functions in ssml.c static.
The only entry point in the file is ProcessSsmlTags().
2018-03-03 23:46:58 +02:00
Juho Hiltunen ace9bc087a fix syntax for pointer incrementation
previous syntax was a quick fix when changing from globals to pointers.
2018-03-03 23:45:42 +02:00
Juho Hiltunen a47ff4f41d move ProcessSsmlTag() from readclause.to to ssml.c
use parameters instead of globals
2018-03-03 23:45:03 +02:00
Juho Hiltunen a6b1896ce3 move SetProsodyParameter() 2018-03-03 23:44:16 +02:00
Juho Hiltunen 6c4d22b6d2 move ReplaceKeyName() 2018-03-03 23:43:48 +02:00
Juho Hiltunen 21e391b631 move GetSsmlAttributes() 2018-03-03 23:43:14 +02:00
Juho Hiltunen d6ed3a3320 move PopParamStack() 2018-03-03 23:42:58 +02:00
Juho Hiltunen b793920ff7 move PushParamStack() 2018-03-03 23:41:55 +02:00
Juho Hiltunen 2b10dba10f move ProcessParamStack() 2018-03-03 23:40:52 +02:00
Juho Hiltunen da125f1a1b move GetVoiceFromStack() 2018-03-03 23:39:09 +02:00
Juho Hiltunen 16a5b5d15c move attr_prosody_value() 2018-03-03 23:38:52 +02:00
Juho Hiltunen fdc2bb06d9 move GetVoiceAttributes() 2018-03-03 23:38:34 +02:00
Juho Hiltunen f00d5798de add ssml.h for defines 2018-03-03 23:38:09 +02:00
Juho Hiltunen a4eca79304 moved attrcopy_utf8() 2018-03-03 23:31:13 +02:00
Juho Hiltunen 07a19b3208 moved attrnumber() from readclause.c to ssml.c 2018-03-03 23:30:16 +02:00
Juho Hiltunen a8239c4502 start moving SSML related parsing to ssml.c
move: attrcmp() and attrlookup()
new file ssml.c added to Makefile.am
2018-03-03 23:29:10 +02: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
Reece H. Dunn 18515a0429 Merge remote-tracking branch 'jaacoppi/bugfix' 2018-02-20 07:17:54 +00:00
Reece H. Dunn 7435f1a9d4 Merge remote-tracking branch 'jaacoppi/booleans' 2018-02-20 07:16:38 +00:00
Juho Hiltunen 8999a3b8fb when end_clause_after_tag is set: end clause after the tag, not before the tag
Fixes #401.
2018-02-19 20:51:29 +02:00
Juho Hiltunen 78749f14f8 readability fix: use boolean instead of 0 and 1 for loop control 2018-02-17 18:17:00 +02:00
Sascha Brawer 2e2afe5cdf Fix typo: “Kirshenbaum” encoding, not “Hirshenbaum” 2018-02-16 16:34:55 +01:00
Reece H. Dunn 5459acb6a7 ru: document the special characters 2018-02-06 20:46:00 +00:00
Reece H. Dunn b8d5d96dea Merge remote-tracking branch 'jaacoppi/maintainability' 2018-01-14 13:43:13 +00:00
Juho Hiltunen da287fb851 Unify terminology for stress
synthesize.h now contains the definitions STRESS_IS_... that should be used with code related to syllable stress.

Note that isBreak and other defines were renumbered so that stress definitions could have values 0-6.

Possible TODOs:
1. Unify with terms used with phonemes, i.e. keywords like isDiminished in compiledata.c and stress_type in phsource/phonemes
2. Add functionality and documentation about STRESS_IS_PRIORITY and STRESS_IS_EMPHASIZED
2018-01-14 15:26:03 +02:00
Juho Hiltunen 88315250ff readability fix: use boolean instead of 0 and 1 for loop control 2018-01-14 15:22:37 +02:00
Juho Hiltunen afb4fe75e2 fi: fix behaviour of S_2_TO_HEAVY (adding secondary stress)
Stress flag S_2_TO_HEAVY is currently only used by finnish.

Current behaviour skips adding secondary stress if the following syllable is heavy. The behaviour should be to skip adding secondary stress if the rest of the word (excluding last syllable) contains a heavy syllable.

Source of grammar rule and examples of expected behaviour: http://scripta.kotus.fi/visk/sisallys.php?p=13
2018-01-14 14:48:36 +02:00
Chen, Chien-ting 4519d2a8e4 add hakka sandhi and footnotes 2018-01-06 14:44:54 +00:00
Chen, Chien-ting e8fbe6a5af add hakka sandhi 2018-01-06 14:44:31 +00:00
Valdis Vitolins 02b987f565 dv: comment about unused code added 2018-01-06 14:41:57 +00:00
Valdis Vitolins 2f8d410055 bpy: fixed abbreviation for Manipuri language 2018-01-06 14:40:15 +00:00
Valdis Vitolins 75e42d6870 hak: Initial support added for Hakka Chinese by Chen Chien-ting 2017-12-29 12:46:42 +02:00
Valdis Vitolins 5a0af78af9 3-letter language code constants replaced with C macro L3() 2017-12-29 12:08:23 +02:00
Reece H. Dunn ecd0902a10 Revert "Move most stress rule definitions from tr_languages.c to language files"
This reverts commit 0f55204522.

This breaks using voice files like mb-de5-en. It could also use
named values for the stress rules (e.g. 'first-syllable').
2017-12-21 21:58:46 +00:00
Juho Hiltunen 0f55204522 Move most stress rule definitions from tr_languages.c to language files
Keyword stressRule in voices.c handles setting langopts->stress_rule.

tr_languages.c still contains the setting for some languages that don't have a language file yet.

Contributes to:
Issue #218, https://github.com/espeak-ng/espeak-ng/issues/218
2017-12-10 21:05:21 +02:00
Juho Hiltunen 2ec4ad38ea Use stressRule instead of stressrule for consistency 2017-12-10 21:05:20 +02:00
Juho Hiltunen 6042eb8d1e Move handling of SetLetterVowel() to language files
Contributes to:
Issue #218, https://github.com/espeak-ng/espeak-ng/issues/218

Changes:
language files have a new keyword letterVowel. It can be a latin alphabet from a-z or a hex value (used by bulgarian).
Errors in parsing the values are only reported, nothing is done about them.

About testing:
I haven't noticed any differences in the output audio with letterVowel set or unset in any tested language. The code seems to work and the correct bits seem to be set, but I don't know how to confirm from the final audio.

TODO:
1. Write better documentation in docs/voices.md
2. The code uses new_translator. Should it use translator instead?
2017-12-10 21:04:36 +02:00
Juho Hiltunen 4f56345fb5 Use stdbool instead of int (Issue #8)
See issue #8, https://github.com/espeak-ng/espeak-ng/issues/8

There might still be some ints that could be changed to boolean.

Possible regressions in fifo.c:
int fifo_is_busy() and int fifo_is_command_enabled() used to return an int. Now they return a boolean. This might cause problems on systems where stdbool true/false is something else than 1/0.
2017-12-09 17:34:05 +02:00
Reece H. Dunn 5e2c963006 Fix pronouncing words like 'newsletter'. Reverts 60a584c032. 2017-12-07 20:52:01 +00:00
Reece H. Dunn 4c98f5ffae Remove additional blank lines. 2017-11-26 14:07:17 +00:00
Valdis Vitolins 60e9e3ebcb Fix for issue #338: Chinese Cantonese dictionary (zhy_dict) problem 2017-11-26 15:19:43 +02:00
Reece H. Dunn 7a33e60234 Reapply the emoji fix from commit 119c200e, only changing the code causing the issue. 2017-11-04 08:31:13 +00:00
Reece H. Dunn 50a2d8e291 Revert "Use strcpy instead of memcpy+strlen."
This reverts commit 119c200e00.
2017-11-04 08:14:59 +00:00
Reece H. Dunn b5c415a98d Rename OPCODE_ to INSTN_. 2017-10-28 12:38:39 +01:00
Reece H. Dunn 351126b3b1 Move polint from synthesize.h to spect.h. 2017-10-25 07:31:03 +01:00
Reece H. Dunn 90d53e145f Move the klatt methods from synthesize.h to klatt.h. 2017-10-25 07:12:45 +01:00