[Freeswitch-svn] [commit] r2771 - freeswitch/trunk/src/mod/asr_tts/mod_cepstral

Freeswitch SVN anthm at freeswitch.org
Wed Sep 20 21:38:37 EDT 2006


Author: anthm
Date: Wed Sep 20 21:38:37 2006
New Revision: 2771

Modified:
   freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c

Log:
pad beginning of tts buffer with silence in mod_cepstral

Modified: freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c
==============================================================================
--- freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c	(original)
+++ freeswitch/trunk/src/mod/asr_tts/mod_cepstral/mod_cepstral.c	Wed Sep 20 21:38:37 2006
@@ -215,6 +215,14 @@
 	cepstral->done = 0;
 	
 	cepstral->tts_stream = NULL;
+
+	if (cepstral->audio_buffer) {
+		switch_byte_t data[1280];
+		memset(data, 255, sizeof(data));
+		switch_mutex_lock(cepstral->audio_lock);
+		switch_buffer_write(cepstral->audio_buffer, data, sizeof(data));
+		switch_mutex_unlock(cepstral->audio_lock);
+	}
 	
 	if (!strncasecmp(text, fp, len)) {
 		text += len;



More information about the Freeswitch-svn mailing list