Results 1 to 9 of 9
- 09-23-2010, 11:10 AM #1
Member
- Join Date
- May 2010
- Posts
- 14
- Rep Power
- 0
FreeTTS / speech.. only rendering Numbers??
Is render the right word? do you render speech??
anyway.. got a weird issue when trying out FreeTTS. Using a simple class I ripped from the web (code below), I eventually got this up and running (took a while to realise I needed to dump all the jars in my jre/lib folder), but it only seems to 'speak' when I put just numbers in the string (ie. "112245"). If I try "Hello", or any 'words', it doesn't error but doesn't say anything either!!
Any ideas what I've done wrong??
Also, if I try "1234567890", it actually says (in synth male voice)...
"one two fourfivesixeight nine zero".
Has anyone else run into these issues?
thanks.
Java Code:import javax.speech.*; import javax.speech.synthesis.*; import java.util.*; public class TellTime { public static void main(String[] args) { try { String sayTime = "1234567890"; Synthesizer synth = Central.createSynthesizer(null); synth.allocate(); synth.resume(); synth.speakPlainText(sayTime,null); synth.waitEngineState(Synthesizer.QUEUE_EMPTY); synth.deallocate(); } catch (Exception e) { e.printStackTrace(); } } }
- 09-23-2010, 11:49 AM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,468
- Rep Power
- 16
That's not the way you do it.
Dependencies (outside of the core JRE libraries) are referenced using the -cp switch for javac and java commands, or by setting the classpath in a batch file for running them. You don't dump jars into the jre lib, or set the system paths.
As for your problem, have you tried running any of their demos locally? Like the Hello World one?
- 09-23-2010, 12:16 PM #3
Member
- Join Date
- May 2010
- Posts
- 14
- Rep Power
- 0
ahh I see, bad practice. thanks for the pointer.
No I haven't tried the demo's, good idea maybe the answers in there.
Otherwise I'm pretty much restricted to writing a talking calculator.
- 09-23-2010, 12:26 PM #4
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
Which voice are you using? The "kevin" or "kevin16" voices should be capable to speak (more or less) random text ...
kind regards,
Jos
- 09-23-2010, 01:00 PM #5
Moderator
- Join Date
- Apr 2009
- Posts
- 10,468
- Rep Power
- 16
I might have to give this thing a try at some point...getting the PC to say random nonsense appeals to me.
- 09-23-2010, 01:33 PM #6
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
- 09-23-2010, 01:44 PM #7
Moderator
- Join Date
- Apr 2009
- Posts
- 10,468
- Rep Power
- 16
I might attempt it then, only to give up in frustration...a bit like most of my attempts at networking.
- 09-23-2010, 02:25 PM #8
Member
- Join Date
- May 2010
- Posts
- 14
- Rep Power
- 0
JosAH - are you able to try my TellTime class I posted above, to see if yours will say anything apart from numbers?
Tolls - if this is half as much fun as the speech tool on my old amiga 500 (25 years ago!), then all the pain of jars and classpaths and null pointers will almost be worth it!
- 09-23-2010, 02:55 PM #9
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
FreeTTS MBROLA problem
By Fillis52 in forum New To JavaReplies: 1Last Post: 01-16-2011, 04:48 AM -
how to play text using freetts
By kattavijay in forum Java ServletReplies: 1Last Post: 03-19-2009, 08:49 AM -
Help with JTable rendering
By daniel2008 in forum AWT / SwingReplies: 8Last Post: 01-18-2009, 03:51 AM -
JLabel Rendering
By random4534 in forum New To JavaReplies: 3Last Post: 12-16-2008, 08:55 AM -
printing two smallest numbers from a series of numbers
By trofyscarz in forum New To JavaReplies: 2Last Post: 10-14-2008, 11:46 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks