Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Java
  4. Which laguages does FreeTTS Supported.

Which laguages does FreeTTS Supported.

Scheduled Pinned Locked Moved Java
questionjavahtmlcomhelp
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sharkbc
    wrote on last edited by
    #1

    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.java

    import 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;
    
    4 1 Reply Last reply
    0
    • S sharkbc

      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.java

      import 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;
      
      4 Offline
      4 Offline
      4277480
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups