swift_port_find_first_voice() fails

Voices aren't working properly?

swift_port_find_first_voice() fails

Postby philippe » Tue Jun 23, 2009 10:19 am

The following API call (in unimrcp's Cepstral plugin) appears to not been able to retrieve the voice details: swift_port_find_first_voice()

2009-06-23 07:38:54:773060 [INFO] Register Plugin [../plugin/mrcpcepstral.so] [Cepstral-Swift-1]
2009-06-23 07:38:54:774621 [INFO] Open Swift Engine [5.1.0-release]
2009-06-23 07:38:54:774742 [WARN] No Swift Voice Available

The voice (Allison-8kHz) has been install and appears to be working. I ran the following test succesfully:

swift "hello world" -o myfile.wav

voice location:
[root@ctp5sm3 Allison-8kHz]# pwd
/usr/local/swift/voices/Allison-8kHz
[root@ctp5sm3 Allison-8kHz]#

Licence has been configured as well.

Code from Cepstral plugin:
/** Show Swift available voices */
static void mrcp_swift_voices_show(swift_engine *engine)
{
swift_port *port;
swift_voice *voice;
const char *license_status;

/* open swift port*/
if((port = swift_port_open(engine, NULL)) == NULL) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"Failed to Open Swift Port");
return;
}

/* find the first voice on the system */
if((voice = swift_port_find_first_voice(port, NULL, NULL)) == NULL) {
apt_log(APT_LOG_MARK,APT_PRIO_WARNING,"No Swift Voice Available");
swift_port_close(port);
return;
}
/* go through all of the voices on the system and print some info about each */
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"Swift Available Voices:");
for(; voice; voice = swift_port_find_next_voice(port)) {
if(swift_voice_get_attribute(voice, "license/key")) {
license_status = "licensed";
}
else {
license_status = "unlicensed";
}
apt_log(APT_LOG_MARK,APT_PRIO_INFO,"%s: %s, age %s, %s, %sHz, %s",
swift_voice_get_attribute(voice, "name"),
swift_voice_get_attribute(voice, "speaker/gender"),
swift_voice_get_attribute(voice, "speaker/age"),
swift_voice_get_attribute(voice, "language/name"),
swift_voice_get_attribute(voice, "sample-rate"),
license_status);
}

swift_port_close(port);
}


Thanks,

Philippe
philippe
 
Posts: 2
Joined: Tue Jun 23, 2009 10:08 am

Postby AdamW » Tue Jun 23, 2009 10:47 am

Philippe,

I noticed that you have installed swift in /usr/local/ rather than /opt/swift. Is it possible that the software using uniMRCP is not aware of, and therefore not accessing the voice path? (This can be set with the environment variable SWIFT_VOXPATH).

Two ways to test:

1 - link your installation into /opt/swift

ln -s /usr/local/swift /opt/swift

If that works, it's a path issue. (we look for /opt/swift when all else fails)

2 - set the environment variable

export SWIFT_VOXPATH="/usr/local/swift/voices";

PS: I'm not the uniMRCP expert here :)
AdamW
 

Postby philippe » Tue Jun 23, 2009 11:08 am

setting the SWIFT_VOXPATH worked.

Thanks,


Philippe
philippe
 
Posts: 2
Joined: Tue Jun 23, 2009 10:08 am


Return to Troubleshooting

Who is online

Users browsing this forum: No registered users and 11 guests

cron