]> err.no Git - mapper/commitdiff
Use smaller buffer. Use UTF8
authorKaj-Michael Lang <milang@onion.tal.org>
Thu, 9 Aug 2007 16:22:19 +0000 (19:22 +0300)
committerKaj-Michael Lang <milang@onion.tal.org>
Thu, 9 Aug 2007 16:22:19 +0000 (19:22 +0300)
src/speak.c

index 007df04bdb0b3ad78f248a0a375599a94a694785..f3c7d004a1c1d6546d780362894126c0d684040e 100644 (file)
@@ -137,13 +137,13 @@ return 0;
 gboolean
 speak_init(void)
 {
-erate=espeak_Initialize(AUDIO_OUTPUT_RETRIEVAL, 1000, NULL, 0);
+erate=espeak_Initialize(AUDIO_OUTPUT_RETRIEVAL, 100, NULL, 0);
 if (erate==-1) 
        return FALSE;
 
 espeak_SetSynthCallback(espeak_cb);
 espeak_SetVoiceByName("en");
-espeak_SetParameter(espeakRATE,140,0);
+espeak_SetParameter(espeakRATE,125,0);
 espeak_SetParameter(espeakVOLUME,100,0);
 if (speak_create_pipeline()==FALSE)
        return FALSE;
@@ -166,12 +166,11 @@ speaking=FALSE;
 gboolean
 speak_text(gchar *text)
 {
-#if 0
 if (speaking==TRUE)
        return FALSE;
-#endif
+
 g_printf("Speaking: %s (%d)\n", text, strlen(text));
-espeak_Synth(text, strlen(text)+1, 0, POS_CHARACTER, 0, espeakCHARS_8BIT, NULL, NULL);
+espeak_Synth(text, strlen(text)+1, 0, POS_CHARACTER, 0, espeakCHARS_UTF8, NULL, NULL);
 
 if (gst_element_set_state (ge.pipeline, GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
        g_print("Failed to play\n");