Łukasz Golonka
289d9d865e
Revert "code cleanup: change global int current_phoneme table to static"
...
This works around issue 915
2021-06-07 17:49:20 +03:00
Reece H. Dunn
a13f9bb62a
Fix -Wint-conversion warnings.
2021-05-30 17:55:41 +01: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
1724f79528
code cleanup: remove unnecessary current_phoneme_table
...
The SelectPhonemeTable(voice->phoneme_tab_ix) has no effect for tests.
Passing other values here breaks tests. That means that the relevant
calls SelectPhonemeTable() are already made in other functions.
voice->phoneme_tab_ix is set in LoadVoice().
2021-03-21 11:20:45 +02:00
Juho Hiltunen
8ce104a315
code cleanup: remove wavefile_ix, move wavefile_amp
...
wavefile_ix is always equal to fmt_params->wav_addr.
wavefile_amp is only used once so it can be set right
before calling DoSample2().
2021-03-20 20:29:33 +02:00
freddii
61efed30fa
fixed spelling mistakes
2021-01-13 01:55:34 +01:00
Juho Hiltunen
725bdda564
code cleanup: remove unused variables
...
this_ph_data, N_WAV_BUF, option.device, harm_sqrt_n, max_hval, next_pause
2020-07-24 07:29:59 +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
Juho Hiltunen
5d03047c19
code cleanup: remove unused int vowel_transition[4]
...
There's two variables with the same name:
1) in struct PHONEME_DATA, used by *phdata, *phdata_next and *phdata_prev
2) an unnecessary one that's only being memset() twice but never used
for anything
2020-07-21 16:14:25 +03:00
Juho Hiltunen
a4041952c5
code cleanup: remove unused references to f_log
...
f_log is only used in compiledict.c.
2020-07-21 15:50:39 +03:00
Juho Hiltunen
c0ff3696b9
code cleanup: change global int current_phoneme table to static
...
It's only used in SpeakNextClause() and related to SelectPhonemeTable().
Another solution void be to keep SelectPhonemeTable() as a void function
and do a current_phoneme_table = voice->phoneme_tab_ix after the call to
SelectPhonemeTable().
2020-07-21 12:39:51 +03:00
Tobias Platen
a6dbed8168
add output hooks for wavegen
2020-07-07 21:53:03 +02:00
Reece H. Dunn
8e13f7147c
Add constants for use with PHONEME_LIST.newword.
2018-08-19 08:29:09 +01:00
Reece H. Dunn
9344dab0c3
Revert "maintainability: pass seq_len_adjust to LookupSpect() instead of using globals"
...
This reverts commit d08b8e43ca .
This commit causes gcc-4.8 to output a different SHA1 hash on the
language-phonemes test for `af` (the first language tested). It
does not break on clang or on gcc-7 so may be a compiler bug,
however the Travis CI build server is using it on Ubuntu Trusty
(14.04 LTS) and so may other older OSes.
2018-03-25 13:34:52 +01:00
Juho Hiltunen
d08b8e43ca
maintainability: pass seq_len_adjust to LookupSpect() instead of using globals
2018-03-25 12:41:01 +03: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
231a1d0944
headers: add new file dictionary.h with declarations of functions in dictionary.c
2018-03-10 12:47:02 +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
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
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
78749f14f8
readability fix: use boolean instead of 0 and 1 for loop control
2018-02-17 18:17:00 +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
74f9f5e34b
wavegen.c: Fix -Wmissing-prototypes warnings.
2017-10-10 21:37:46 +01:00
Reece H. Dunn
9af96da469
Make the encoding.h API public.
2017-05-02 18:40:16 +01:00
Reece H. Dunn
ec8a7b810f
Use the text decoder object at the top-level Synthesize/espeak_TextToPhonemes call, not in TranslateClause.
2017-04-01 15:11:01 +01:00
Reece H. Dunn
7c16ac543c
Use the text decoder API in readclause.c.
2017-03-31 13:17:37 +01:00
Reece H. Dunn
8933185de4
Remove the unused f_in argument to the Read/Translate/SpeakNextClause functions.
2017-03-31 07:13:36 +01:00
Reece H. Dunn
71c010b712
Remove unused wchar.h and wctype.h includes.
2017-02-10 08:03:40 +00:00
Reece H. Dunn
5e5289bcb5
compiledata: remove unused feature names.
2017-01-25 23:24:02 +00:00
Ondřej Lysoněk
3817ee1e16
Moved speak_lib.h to espeak-ng directory
...
Moved include/espeak/speak_lib.h to include/espeak-ng/speak_lib.h and
created a symlink from the original location.
2016-08-28 10:57:10 +01:00
Reece H. Dunn
4cde8b6d13
option_quiet is no longer used (always set to 0), so remove it
2016-02-06 10:45:32 +00:00
Reece H. Dunn
c4a7ffba33
Inline the call to SynthOnTimer.
2016-02-03 21:35:52 +00:00
Reece H. Dunn
a51717346c
SpeakNextClause should not call WavegenOpenSound.
...
This function call does not affect the audio output in non-async
modes. Audio output in that case is handled within the SynthOnTimer
helper function.
2016-02-03 21:23:03 +00:00
Reece H. Dunn
c09d255e38
Remove timer_on from synthesize.c as this matches the SpeakNextClause return value.
2016-02-03 21:17:14 +00:00
Reece H. Dunn
a471ba02bf
SynthStatus is not called, so remove it.
2016-02-03 21:13:56 +00:00
Reece H. Dunn
8df810f776
Remove paused from synthesize.c as it is now no longer used.
2016-02-03 21:07:02 +00:00
Reece H. Dunn
2eca970fc8
Remove the control 3-5 logic in SpeakNextClause as those values are not passed to the function.
2016-02-03 20:57:46 +00:00
Reece H. Dunn
69355ed568
Fix a null pointer dereference in DoVoiceChange(synthesize.c). [Coverity]
2016-01-22 20:37:01 +00:00
Reece H. Dunn
96c43f3eb2
Clean up the include files to make them consistent.
2016-01-16 17:54:39 +00:00
Reece H. Dunn
9c7179189b
Add a stdint.h compatibility shim.
2016-01-09 13:09:50 +00:00
Reece H. Dunn
72db232ec3
Move include/espeak{-ng => }/speak_lib.h.
2016-01-04 19:45:23 +00:00
Reece H. Dunn
c2811d074e
Make LoadPhData return an espeak_ng_STATUS code.
2016-01-01 13:17:11 +00:00
Reece H. Dunn
522e7c4d51
Revert commit 14a2fb39cf
...
This commit has been reported to cause distortions in phoneme
pitches and speeds.
2015-12-28 17:54:17 +00:00
Fredrik Nyqvist
14a2fb39cf
Declare variables at their first point of use
...
Also use size_t instead of int in some places
where it make sense
2015-12-28 12:05:17 +01:00
Reece H. Dunn
3e99752d0c
Check and fix source code formatting.
2015-12-27 22:34:53 +00:00
Reece H. Dunn
f0c2c4cca2
Remove extra newlines from the files to provide consistent spacing.
2015-12-23 11:32:03 +00:00
Reece H. Dunn
d345d74f64
Remove braces around single-line if/while/for/etc. and related cleanup.
2015-12-22 20:40:10 +00:00
Reece H. Dunn
9a837c8182
Remove parentheses around return statements.
2015-12-22 16:24:01 +00:00