speechd-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/4] flite_set_voice should be a no-op.


From: Christopher Brannon
Subject: [PATCH 2/4] flite_set_voice should be a no-op.
Date: Tue, 8 Jun 2010 10:03:48 -0500

The previous version of flite_set_voice had the following behavior.
If the male1 voice was requested, it freed the voice data and
re-registered the same voice that was registered in module_init.
Otherwise, it did nothing.

This was not correct.
We only support one voice, and that voice is established in module_init.
The voice structure is managed by the flite library, and we shouldn't
try to free it.
---
 src/modules/flite.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/src/modules/flite.c b/src/modules/flite.c
index f9c8cb4..94d189f 100644
--- a/src/modules/flite.c
+++ b/src/modules/flite.c
@@ -427,13 +427,15 @@ flite_set_pitch(signed int pitch)
     feat_set_float(flite_voice->features, "int_f0_target_mean", f0);
 }
 
+/*
+ * flite_set_voice is a no-op.  We only support one flite voice, and
+ * that voice is established in module_init.  Furthermore, the voice
+ * data is managed by the flite library.
+ */
 static void
 flite_set_voice(EVoiceType voice)
 {
-    if (voice == MALE1){
-        free(flite_voice);
-        flite_voice = (cst_voice*) register_cmu_us_kal();
-    }
+    return;
 }
 
 
-- 
1.7.1




reply via email to

[Prev in Thread] Current Thread [Next in Thread]