Yury Popov
04ce972800
ssml: handle invalid break strength
2022-12-10 21:44:10 +03:00
Yury Popov
ca1f590101
code cleanup: standartize definitions
2022-11-27 14:54:51 +03:00
Yury Popov
fdc2984386
code cleanup: static uri_callback
2022-11-19 17:52:16 +03:00
Yury Popov
44b514febf
Compensate SSML break time for libsonic
2022-11-12 09:59:01 +03:00
Alexander Epaneshnikov
1a739d6c24
Add unquoted attributes support in SSML parser ( #1515 )
...
Also check for empty skip_marker name in SSML_MARK.
Fixes #975
2022-11-09 00:12:25 +03:00
Yury Popov
99c282640b
SSML: Check that skip marker is not empty
2022-11-08 23:50:42 +03:00
Yury Popov
ac3de913f2
Support unqouted attributes in SSML parser
2022-11-08 23:46:16 +03:00
Yury Popov
61de330443
Sync rate for SSML break duration
2022-11-08 17:51:17 +03:00
Juho Hiltunen
9e3ade9004
cleanup: reduce variable scopes in ssml.c
...
Contributes to #9 .
2022-10-23 19:34:59 +03:00
Juho Hiltunen
4a9f0e21be
code cleanup: move Is*() helper functions to common.c
2022-09-17 18:57:20 +03:00
Juho Hiltunen
b52d1f3afd
code cleanup: move strncpy0 to common.c
2022-09-04 07:12:39 +03:00
Samuel Thibault
f4133364d1
Add more const qualifiers
2022-06-11 16:20:19 +02:00
Samuel Thibault
24e1eaa0cc
Mark static arrays undefined when they are reused
...
So valgrind can potentially catch e.g. missing \0.
2022-06-09 09:48:43 +02:00
Samuel Thibault
a660fc04cc
Add more const qualifiers on static arrays
...
So we know they are just tables, get protected from overflows, and get shared between processes
2022-06-09 08:43:50 +02:00
Samuel Thibault
15804e57a2
Constify tables
...
So they are protected from overflows, and shared between processes
2022-04-10 22:48:40 +02:00
Samuel Thibault
e8253c6513
ssml: Use a larger buffer
...
When building espeak-ng in a directory that has a long path, 80 bytes to
store it is quite short.
2022-04-10 16:16:00 +02:00
Juho Hiltunen
4d0a4df86b
Revert "code cleanup: remove unnecessary current_voice_id in readclause.c"
...
See #950 .
2021-06-07 17:43:28 +03:00
Juho Hiltunen
6e197d967e
code cleanup: move soundicon logic to a new file
...
Soundicons are used for external audio with SSML <audio> tag and for
replacing punctuation names with sound files in LoadConfig().
Currently there's a bug wih soundicon slots: if both LoadConfig and
<audio> are used, the punctuation reserves all slots and no sound from
<audio> is played.
2021-03-21 18:53:05 +02:00
Juho Hiltunen
19e2f697f6
code cleanup: remove unnecessary current_voice_id in readclause.c
...
Instead of passing a temporary variable current_voice_id to SSML
processing logic and then copying the value to voice_change, pass
voice_change directly. GetVoiceAttributes() both sets voice_change and
retuns CLAUSE_TYPE_VOICE_CHANGE that is used by TranslateClause() for
error checking.
tests/ssml/language-switch.ssml covers the intended behavior of language
switching and will fail when either voice_change or CLAUSE_TYPE_VOICE_CHANGE
is not set correctly.
2021-02-25 19:33:09 +02:00
Juho Hiltunen
cffdfb837b
code cleanup: move function declarations from speech.h to new file mnemonics.h
...
This adds a corresponding header file for mnemonics.c that was introduced in d5d93be .
2021-02-22 16:56:19 +02:00
Juho Hiltunen
54d93cf2b4
code cleanup: move ssml reference handling logic to a new function ParseSsmlReference()
...
It's unclear why c2 needs to be set after an entity reference.
2020-08-23 20:43:29 +03:00
Juho Hiltunen
34657e7ea4
code cleanup: move check for SSML comments and declarations to
...
ProcessSsmlTag()
Note the line in readclause.c:
if ((c2 == '/') || iswalpha(c2) || c2 == '!' || c2 == '?') {
It might be enough to pass everything to ProcessSsmlTag. What are the
cases that are skipped because of this?
2020-08-23 20:42:24 +03:00
Juho Hiltunen
75d66c89d0
code cleanup: Move self_closing checks to ProcessSsmlTag()
...
This is a bit slower since we don't pass n_xml_buf as an argument but
rather get it with a call to wcslen. It is much cleaner though, since
the name ProcessSsmlTag() implies that all processing should be done
there.
2020-08-23 20:41:52 +03:00
Juho Hiltunen
ee944700f8
code cleanup: Check all local includes with include-what-you-use
...
Going through files in src/libespeak-ng/, include-what-you-use removed a
few unnecessary includes and included explanations on why a certain
header should be included. This makes tracking globals and dependencies easier.
Running the codebase through IWYU should be repeated after each major
code restIncludes to standard c library weren't checked to avoid
breaking builds with other platforms.
See https://github.com/include-what-you-use/include-what-you-use
2020-07-24 07:29:47 +03: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
Juho Hiltunen
706df97b20
headers: add new file readclause.h with declarations of functions in readclause.c
2018-03-10 07:18:07 +02:00
Reece H. Dunn
d47e48a377
ssml: Update the copyright notice.
2018-03-04 09:27:52 +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
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