> From my point of view, I think tux.tts.select_voice should only allow the
> languages that are in tux.tts.authorized_voices_list to be selected, as
> the others won't. Then it can return an error if the language doesn't
> exist, or return the URL if the language exists but is not installed.
I think this patch is what you want:
Index: api/python/trunk/tuxapi_class.py
===================================================================
--- api/python/trunk/tuxapi_class.py (révision 462)
+++ api/python/trunk/tuxapi_class.py (copie de travail)
@@ -4258,8 +4258,12 @@
"""
if speaker not in SPK_VOICE_LIST:
if self.parent.print_warnings:
- print " Invalid speaker"
+ print " Invalid voice"
return
+ if speaker not in self.authorized_voices_list:
+ if self.parent.print_warnings:
+ print " This voice is not available on the system. You can
download it at http://www.tuxisalive.com/downloads"
+ return
if (pitch<100) or (pitch>330):
if self.parent.print_warnings:
print " Pitch not in range (100 - 330)"
> This list returns all installed languages, and as soon as you select one,
> the list is updated and only includes English and the second language you
> choosed. (The Acapela license only allow you to use English and a second
> language simultaneously.)
I couldn't see the list update by myself (I didn't try so much), but if it
only contain two languages, then this script doesn't work as we want. I see
no way to know whether it list all the languages, or only two.
Any idea ?
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
tux-droid-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tux-droid-user