gnome-speech r318 - in trunk: . drivers/swift
- From: wwalker svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-speech r318 - in trunk: . drivers/swift
- Date: Thu, 6 Nov 2008 16:14:41 +0000 (UTC)
Author: wwalker
Date: Thu Nov 6 16:14:41 2008
New Revision: 318
URL: http://svn.gnome.org/viewvc/gnome-speech?rev=318&view=rev
Log:
Fix for bug #559583 - Swift synthesis driver causes Python client to get
"TypeError: could not demarshal return value" on call to getAllVoices.
Modified:
trunk/ChangeLog
trunk/drivers/swift/swiftsynthesisdriver.c
Modified: trunk/drivers/swift/swiftsynthesisdriver.c
==============================================================================
--- trunk/drivers/swift/swiftsynthesisdriver.c (original)
+++ trunk/drivers/swift/swiftsynthesisdriver.c Thu Nov 6 16:14:41 2008
@@ -119,7 +119,8 @@
voice = swift_port_find_first_voice (d->tts_port, NULL, NULL);
while (voice) {
const char *lang;
- const char *gender;
+ const char *raw_gender;
+ GString *gender;
GNOME_Speech_VoiceInfo *info = GNOME_Speech_VoiceInfo__alloc();
@@ -127,13 +128,15 @@
info->language = CORBA_string_dup (lang);
info->name = CORBA_string_dup(
swift_voice_get_attribute (voice, "name"));
- gender = swift_voice_get_attribute (voice, "speaker/gender");
- if (!strcmp (gender, "male"))
+ raw_gender = swift_voice_get_attribute (voice, "speaker/gender");
+ gender = g_string_ascii_down(g_string_new(raw_gender));
+ if (!strcmp (gender->str, "male"))
info->gender = GNOME_Speech_gender_male;
- else if (!strcmp (gender, "female"))
+ else if (!strcmp (gender->str, "female"))
info->gender = GNOME_Speech_gender_female;
else
- info->gender = -1;
+ info->gender = GNOME_Speech_gender_male;
+ g_string_free(gender, TRUE);
l = g_slist_prepend (l, info);
voice = swift_port_find_next_voice (d->tts_port);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]