The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Vocal Java
Subject:  Error on your src
Date:  2006-04-19 20:35:36
From:  javajeff
Response to: Error on your src


Hello,

I'm sorry you are having trouble with my software, but I stand by my code. Although you can explicitly create a SynthesizerModeDesc, the Java Speech Guide also permits null to be passed to Central's createSynthesizer() method, which (according to the guide) causes Central to choose a suitable engine for the default locale.

Based on your "Voice cannot be initialized because it's an abstact class." error message, I am assuming that you are experiencing some kind of configuration problem -- I may be wrong, but this sounds like a configuration problem to me.

I am also assuming that your default locale is not English. I tested my software using my default locale, which happens to be English, and had no trouble. If my assumption about your default locale not being English is correct, please try the following experiment: insert Locale.setDefault (Locale.ENGLISH); ahead of the createSynthesizer() call. Let me know what happens.

All the best.

Jeff

P.S.

Regarding changing the locale to GERMAN or ITALY, you can insert the previous setDefault() method (for testing). But you also need to make sure you have a suitable voice installed. I did not discuss this topic in my article because I have not delved into this topic -- this is why I recommend that one consult the Java Speech documentation.

P.P.S.

In hindsight, maybe I should have explicitly coded Locale.setDefault (Locale.ENGLISH); before createSynthesizer() in each of TextSpeaker and Speaker (because FreeTTS 1.2.1 comes with a default English voice, but no voices in other languages -- at least I couldn't find them). But then, I didn't want to bias the software towards a specific locale -- and I assume voices for other locales are available and can be installed according to FreeTTS documentation.

 Feed java.net RSS Feeds