summaryrefslogtreecommitdiffstats
path: root/pico/tts
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-08-17 15:13:38 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2009-08-17 15:13:38 -0700
commit6bcede2399e50d28a3ce5ce6668d10f2c2f37ea7 (patch)
treed47afb53693a258ffbef0a909cc4c855ed2422aa /pico/tts
parent93af9c708423f3b4b3663a119105034c55fcf8e8 (diff)
parent7bc39b0d41efe0d8733490d54e14bc392d9f0b6d (diff)
downloadexternal_svox-6bcede2399e50d28a3ce5ce6668d10f2c2f37ea7.zip
external_svox-6bcede2399e50d28a3ce5ce6668d10f2c2f37ea7.tar.gz
external_svox-6bcede2399e50d28a3ce5ce6668d10f2c2f37ea7.tar.bz2
Merge change 21591 into eclair
* changes: Integrate SVOX update that offers two modes to reset the engine: soft and full. Soft reset is lighter-weight than the previous pico_resetEngine() function as it only clears the input (text) and output (audio data) buffers of the synthesis engine. The synthesis loop is now taking advantage of the soft reset whenever it is interrupted, rather than performing a full engine reset after each call to stop().
Diffstat (limited to 'pico/tts')
-rw-r--r--pico/tts/com_svox_picottsengine.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/pico/tts/com_svox_picottsengine.cpp b/pico/tts/com_svox_picottsengine.cpp
index f7df2a4..0c4b5fc 100644
--- a/pico/tts/com_svox_picottsengine.cpp
+++ b/pico/tts/com_svox_picottsengine.cpp
@@ -1356,7 +1356,7 @@ tts_result TtsEngine::synthesizeText( const char * text, int8_t * buffer, size_t
while (text_remaining) {
if (picoSynthAbort) {
- ret = pico_resetEngine( picoEngine );
+ ret = pico_resetEngine( picoEngine, PICO_RESET_SOFT );
break;
}
@@ -1374,7 +1374,7 @@ tts_result TtsEngine::synthesizeText( const char * text, int8_t * buffer, size_t
inp += bytes_sent;
do {
if (picoSynthAbort) {
- ret = pico_resetEngine( picoEngine );
+ ret = pico_resetEngine( picoEngine, PICO_RESET_SOFT );
break;
}
/* Retrieve the samples and add them to the buffer. */
@@ -1391,7 +1391,7 @@ tts_result TtsEngine::synthesizeText( const char * text, int8_t * buffer, size_t
if (cbret == TTS_CALLBACK_HALT) {
LOGI("Halt requested by caller. Halting.");
picoSynthAbort = 1;
- ret = pico_resetEngine( picoEngine );
+ ret = pico_resetEngine( picoEngine, PICO_RESET_SOFT );
break;
}
bufused = 0;
@@ -1419,7 +1419,7 @@ tts_result TtsEngine::synthesizeText( const char * text, int8_t * buffer, size_t
LOGV("Synth loop: sending TTS_SYNTH_DONE after error");
picoSynthDoneCBPtr( userdata, 16000, AudioSystem::PCM_16_BIT, 1, buffer, bufused,
TTS_SYNTH_DONE);
- pico_resetEngine( picoEngine );
+ pico_resetEngine( picoEngine, PICO_RESET_SOFT );
return TTS_FAILURE;
}
}