Re: [tuxdroid-user] Automatically detect language
Status: Beta
Brought to you by:
ks156
From: Georges D. <geo...@la...> - 2007-08-15 08:02:00
|
> 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 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =2D-- api/python/trunk/tuxapi_class.py (r=C3=A9vision 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: =2D 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= =20 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= =20 only contain two languages, then this script doesn't work as we want. I see= =20 no way to know whether it list all the languages, or only two. Any idea ? |