Commit Graph
104 Commits
Author SHA1 Message Date
Juho Hiltunen 520a30e0b0 code cleanup: use existing defines espeakRATE_MINIMUM, espeakRATE_NORMAL and espeakRATE_MAXIMUM. 2018-10-06 11:34:25 +03:00
Samuel Thibault d844a47804 Make it possible to restart speech even when audio open failed once
When notably the audio card is busy, we should report the issue to the
application, but still permit the application to retry submitting text
to synth, and eventually succeed to open it.

This change simply fixes the update of the out_samplerate variable to track
whether audio is open, and if not when text is submitted by the application,
try again to open it.
2018-05-03 21:27:02 +02:00
Juho Hiltunen d196d93ed5 maintainability: move variables to files where they are used, allowing removal of unnecessary extern declarations 2018-03-24 15:05:23 +02:00
Reece H. Dunn d23735ae1b Release the translator memory in espeak{_ng,}_Terminate. 2018-03-22 07:26:22 +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 231a1d0944 headers: add new file dictionary.h with declarations of functions in dictionary.c 2018-03-10 12:47:02 +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 78749f14f8 readability fix: use boolean instead of 0 and 1 for loop control 2018-02-17 18:17:00 +02:00
Reece H. Dunn e6c75fa350 speech.c: Fix -Wmissing-prototypes warnings. 2017-10-11 07:20:19 +01:00
Reece H. Dunn 74f9f5e34b wavegen.c: Fix -Wmissing-prototypes warnings. 2017-10-10 21:37:46 +01:00
Reece H. Dunn 5c14e92f6b voices.c: Fix -Wmissing-prototypes warnings. 2017-10-06 07:23:57 +01:00
Reece H. Dunn 8585b0b47d Fix the return status code from Synthesize when the voices cannot be found. 2017-08-19 12:27:39 +01:00
Reece H. Dunn fbd2e679fc Don't crash if loading the default voice fails. 2017-05-21 12:44:10 +01:00
Reece H. Dunn dced9f58fd Clean up the decoder memory in espeak_Terminate. 2017-05-21 12:07:15 +01:00
Reece H. Dunn 63e2826753 Ensure that the old translator is not used after calling espeak_Terminate. 2017-05-21 12:01:46 +01:00
Reece H. Dunn ae6116bf97 Fix calling espeak_Synth without first setting a voice, with tests. 2017-05-21 10:47:47 +01:00
Reece H. Dunn 6ab1314843 Move outbuf_size to where it is actually used. 2017-05-21 10:02:27 +01:00
Reece H. Dunn 9fc2efb1fa Don't re-initialize my_audio if espeak_ng_InitializeOutput is called multiple times. 2017-05-21 09:49:35 +01:00
Reece H. Dunn 9af96da469 Make the encoding.h API public. 2017-05-02 18:40:16 +01:00
Reece H. Dunn 62d4aff9a9 Remove the now unused option_multibyte variable. 2017-04-01 15:12:49 +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 3ce7fab7db Return the actual error from GetFileLength instead of 0. 2017-02-04 16:03:56 +00:00
Reece H. Dunn df6a2228b7 Use -EISDIR instead of -2 in GetFileLength for directories. 2017-02-04 16:02:56 +00:00
Reece H. Dunn dee3799f82 issue #172: flush audio on cancel requests.
This is a partial fix for an audio regression. The other part of
the fix requires a change in pcaudiolib to reopen the audio device
on flush requests for affected audio drivers/devices.
2017-01-24 07:24:29 +00:00
Reece H. Dunn d42ba93959 Don't use the HOME directory as the espeak-ng-data path. 2017-01-20 18:27:10 +00:00
Reece H. Dunn 773da20c16 Support using home (data) paths other than 'espeak-ng-data'. 2017-01-19 22:04:20 +00:00
Reece H. Dunn 96e34565ed Use a default buffer length of 60mS to fix using MBROLA voices. 2017-01-16 19:41:34 +00:00
Reece H. Dunn d828156576 Reduce buffer length to 50mS and don't override it when using eSpeak for audio. 2017-01-12 07:40:14 +00:00
Reece H. Dunn dae9cda060 Revert "issue 172: fix sluggish speech for stopped speech."
This reverts commit f9ab812e00.
2017-01-12 07:14:02 +00:00
Reece H. Dunn a506dc5241 Fix setting saved_parameters in espeak_ng_Initialize.
This fixes a regression introduced in commit
e341068d57.

This is needed for the case when espeak_Cancel is called before
calling espeak_Synth.
2017-01-12 07:07:35 +00:00
Reece H. Dunn 36d5a8b67b Revert "Don't reset the parameters unless they have been set."
This reverts commit 26e453dd2f.
2017-01-12 06:55:55 +00:00
Reece H. Dunn 26e453dd2f Don't reset the parameters unless they have been set.
This is based on a patch by Samuel Thibault.

This is needed when espeak_Cancel is called before espeak_Synth,
like can be done in brltty.
2017-01-11 07:30:19 +00:00
Reece H. Dunn f9ab812e00 issue 172: fix sluggish speech for stopped speech.
This restores the behaviour removed in commit
ca831d236a.

When using eSpeak for audio and eSpeak in a server, using the async
speech requests, that code stopped the audio as soon as possible
from a cancel request. This allows servers like brltty to be more
responsive.
2016-12-24 09:00:55 +00:00
Reece H. Dunn d2478cc453 Flush the audio if speech has stopped, drain the audio if speech is still active. 2016-12-23 19:34:13 +00:00
Reece H. Dunn bc674081cd Check the return from synth_callback in the second call to that function in Synthesize. 2016-12-23 19:17:18 +00:00
Reece H. Dunn a48576a364 Return ENS_SPEECH_STOPPED from Synthesize when the speech callback returns >1 to stop the audio. 2016-12-23 18:56:58 +00:00
Reece H. Dunn 52abe35300 Revert "Stop audio output before fifo_stop is called"
This reverts commit 1b5ea47ea4.

This patch is causing lockups when using this with servers like brltty.
2016-12-21 16:00:51 +00:00
Reece H. Dunn f6536be5b2 Support determining the install path when installed to the 32-bit Windows program files directory. 2016-12-17 14:36:46 +00:00
Rui Batista 1b5ea47ea4 Stop audio output before fifo_stop is called
This allows process_espeak_command to stop as soon as possible

Using emacspeak server with espeak-ng (still not published) found that audio was only being stoped after a command is processed (i.e. using pcaudiolib).
This fixes this issue.
2016-12-11 18:17:08 +00:00
Reece H. Dunn 6cf06a49ef Add compatibility for the missing S_ISFIFO on Windows. 2016-09-10 10:24:46 +01:00
Reece H. Dunn 4920ecc79c Move espeak-data to espeak-ng-data to avoid conflicting with upstream espeak. 2016-09-10 09:44:13 +01: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
Christopher Brannon 3ed0b5cd0f espeak_ng_Cancel(): discard the audio, don't close the device!
This function should just discard the currently playing audio,
rather than close the audio device.  After all,
we will probably want to synthesize something else later.
2016-07-18 07:45:44 -07:00
Reece H. Dunn d4bc2c328e speech: Avoid warnings when using my_mode as a flag-based enumeration. 2016-06-05 08:53:23 +01:00
Reece H. Dunn 496ff35634 WVoiceChanged is not used, so remove it. 2016-02-27 10:32:12 +00:00
Reece H. Dunn b7b2567eb1 Build the Visual Studio 2015 Windows project with pcaudiolib xaudio2 support. 2016-02-13 18:34:16 +00:00