Which laguages does FreeTTS Supported.
-
Hi all ! I want use FreeTTS for my application. I can use the code bellow to read the Hello World in English. How can i read another language for example German or French,... My code here :
//////////////////////////////////////////////////////////////////////////////////////////
package com.myprj.demo;//Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 5/16/2009 1:26:02 PM
//Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
//Decompiler options: packimports(3)
//Source File Name: HelloWorld.javaimport java.io.File;
import java.io.PrintStream;
import java.util.Locale;
import javax.speech.Central;
import javax.speech.EngineList;
import javax.speech.synthesis.*;public class HelloWorld
{public HelloWorld()
{
}private static String noSynthesizerMessage()
{
String message = "No synthesizer created. This may be the result of any\nnumber of problems. It's typically due to a missing\n\"speech.properties\" file that should be at either of\nthese locations: \n\n";
message = message + "user.home : " + System.getProperty("user.home") + "\n";
message = message + "java.home/lib: " + System.getProperty("java.home") + File.separator + "lib\n\n" + "Another cause of this problem might be corrupt or missing\n" + "voice jar files in the freetts lib directory. This problem\n" + "also sometimes arises when the freetts.jar file is corrupt\n" + "or missing. Sorry about that. Please check for these\n" + "various conditions and then try again.\n";
return message;
}public static void main(String args[])
{
//listAllVoices("general");
String voiceName = args.length <= 0 ? "kevin16" : args[0];
System.out.println();
System.out.println("Using voice: " + voiceName);
try
{
SynthesizerModeDesc desc = new SynthesizerModeDesc(null, "general", Locale.GERMAN, null, null);
Synthesizer synthesizer = Central.createSynthesizer(desc);
if(synthesizer == null)
{
System.err.println(noSynthesizerMessage());
System.exit(1);
}
synthesizer.allocate();synthesizer.resume(); desc = (SynthesizerModeDesc)synthesizer.getEngineModeDesc(); Voice voices\[\] = desc.getVoices(); Voice voice = null; int i = 0; do { if(i >= voices.length) break;
-
Hi all ! I want use FreeTTS for my application. I can use the code bellow to read the Hello World in English. How can i read another language for example German or French,... My code here :
//////////////////////////////////////////////////////////////////////////////////////////
package com.myprj.demo;//Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov Date: 5/16/2009 1:26:02 PM
//Home Page : http://members.fortunecity.com/neshkov/dj.html - Check often for new version!
//Decompiler options: packimports(3)
//Source File Name: HelloWorld.javaimport java.io.File;
import java.io.PrintStream;
import java.util.Locale;
import javax.speech.Central;
import javax.speech.EngineList;
import javax.speech.synthesis.*;public class HelloWorld
{public HelloWorld()
{
}private static String noSynthesizerMessage()
{
String message = "No synthesizer created. This may be the result of any\nnumber of problems. It's typically due to a missing\n\"speech.properties\" file that should be at either of\nthese locations: \n\n";
message = message + "user.home : " + System.getProperty("user.home") + "\n";
message = message + "java.home/lib: " + System.getProperty("java.home") + File.separator + "lib\n\n" + "Another cause of this problem might be corrupt or missing\n" + "voice jar files in the freetts lib directory. This problem\n" + "also sometimes arises when the freetts.jar file is corrupt\n" + "or missing. Sorry about that. Please check for these\n" + "various conditions and then try again.\n";
return message;
}public static void main(String args[])
{
//listAllVoices("general");
String voiceName = args.length <= 0 ? "kevin16" : args[0];
System.out.println();
System.out.println("Using voice: " + voiceName);
try
{
SynthesizerModeDesc desc = new SynthesizerModeDesc(null, "general", Locale.GERMAN, null, null);
Synthesizer synthesizer = Central.createSynthesizer(desc);
if(synthesizer == null)
{
System.err.println(noSynthesizerMessage());
System.exit(1);
}
synthesizer.allocate();synthesizer.resume(); desc = (SynthesizerModeDesc)synthesizer.getEngineModeDesc(); Voice voices\[\] = desc.getVoices(); Voice voice = null; int i = 0; do { if(i >= voices.length) break;
English is the main language supported and if you want to add another this is what the website mentions: How do I add support for a language other than English? This is not a trivial task as it requires a lexicon for the language as well as various statistical data about the language. The document http://festvox.org/festvox/festvox\_toc.html describes this is more detail. from: http://freetts.sourceforge.net/docs/index.php#How_do_I_add_support_for_a_voice_with[^] Regards