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
99bbc6294e
Fix building on Windows.
2018-03-12 12:26:57 +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
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
Juho Hiltunen
29cba35a9e
headers: add new file mbrola.h with declarations of functions in compilembrola.c and synth_mbrola.c
2018-03-11 11:44:48 +02:00
Juho Hiltunen
f00ff91fe4
headers: add new file wavegen.h with declarations of functions in wavegen.c
2018-03-11 11:27:56 +02:00
Juho Hiltunen
9012f3f0bf
headers: continue with synthdata.h
2018-03-10 13:54:58 +02:00
Juho Hiltunen
e04ae259e0
headers: add new file compiledict.h with declarations of functions in compiledict.c
2018-03-10 12:51:24 +02:00
Juho Hiltunen
655dbf6b7a
remove unnecessary include of synthesize.h
2018-03-10 12:47:08 +02:00
Juho Hiltunen
231a1d0944
headers: add new file dictionary.h with declarations of functions in dictionary.c
2018-03-10 12:47:02 +02:00
Juho Hiltunen
cd991bd2c9
headers: add new file numbers.h with declarations of functions in numbers.c
2018-03-10 09:27:23 +02:00
Juho Hiltunen
07160f9286
headers: add new file synthdata.h with declarations of functions in synthdata.c
2018-03-10 08:23:24 +02:00
Juho Hiltunen
d395efa481
headers: add new file phonemelist.h with declarations of functions in phonemelist.c
2018-03-10 08:02:24 +02:00
Juho Hiltunen
098904dfe0
headers: add new file setlengths.h with declarations of functions in setlengths.c
2018-03-10 08:02:17 +02:00
Juho Hiltunen
9d12d23d2a
headers: add new file intonation.h with declarations of functions in intonation.c
2018-03-10 07:49:04 +02: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
Juho Hiltunen
079d5a92c5
remove more unnecessary speech.h includes
2018-03-09 21:08:38 +02:00
Juho Hiltunen
30ad5c39f6
move struct MatchRecord to dictionary.c since it's the only file that uses it
2018-03-09 21:08:38 +02:00
Juho Hiltunen
342f077755
remove unused declarations of ChangePhonemes_ru() and struct CHANGEPH
...
these are the only references in the code.
2018-03-09 21:08:38 +02:00
Juho Hiltunen
d1fd650219
Replace references to USHORT, DOUBLEX and UCHAR with unsigned short, double and unsigned char.
...
This makes the codebase more consistent. Including speech.h is not necessary anymore in some files. Includes have been removed.
2018-03-09 21:08:38 +02:00
Juho Hiltunen
738492100a
make all headers (almost) self-contained by using include guards and #include statements within headers
2018-03-09 21:08:15 +02: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
19e425a169
windows: add ssml.c to the project to fix building on Windows
2018-03-07 12:27:39 +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
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