Click here to Skip to main content
16,005,467 members
Home / Discussions / Java
   

Java

 
GeneralRe: Finally resolved..I hope..lol Pin
snssewell18-Sep-09 19:20
snssewell18-Sep-09 19:20 
QuestionOutput String returned from encryption/decryption Fuction into a text file???Help please!!!! Pin
ChiSmile18-Sep-09 16:36
ChiSmile18-Sep-09 16:36 
AnswerRe: Output String returned from encryption/decryption Fuction into a text file???Help please!!!! Pin
427748018-Sep-09 17:54
427748018-Sep-09 17:54 
Questionhow to move cookie value from https to http page? [modified] Pin
sangeethanarayan17-Sep-09 21:54
sangeethanarayan17-Sep-09 21:54 
AnswerRe: https to http Pin
Nagy Vilmos17-Sep-09 21:57
professionalNagy Vilmos17-Sep-09 21:57 
AnswerRe: how to move cookie value from https to http page? Pin
427748018-Sep-09 18:32
427748018-Sep-09 18:32 
GeneralRe: how to move cookie value from https to http page? Pin
sangeethanarayan20-Sep-09 19:06
sangeethanarayan20-Sep-09 19:06 
QuestionWhich laguages does FreeTTS Supported. Pin
sharkbc17-Sep-09 17:01
sharkbc17-Sep-09 17:01 
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;
             if(voices[i].getName().equals(voiceName))
             {
                 voice = voices[i];
                
                 break;
             }
             i++;
         } while(true);
         if(voice == null)
         {
             System.err.println("Synthesizer does not have a voice named " + voiceName + ".");
             System.exit(1);
         }
         synthesizer.getSynthesizerProperties().setVoice(voice);
         synthesizer.speakPlainText("Hello world", null);
         synthesizer.waitEngineState(0x10000L);
         synthesizer.deallocate();
         System.exit(0);
     }
     catch(Exception e)
     {
         e.printStackTrace();
     }
 }
}



1.So if i want to the program read the "Datum" String in German my code must be change to :



<br />
 SynthesizerModeDesc desc = new SynthesizerModeDesc(null, "general", Locale.GERMAN, null, null);<br />
<br />
synthesizer.speakPlainText("Datum", null);<br />


Is it ok or another ways?

2.How many languages FreeTTS support ? which are they?


Best regards !
AnswerRe: Which laguages does FreeTTS Supported. Pin
427748017-Sep-09 18:22
427748017-Sep-09 18:22 
QuestionMy code won't complile right in JCreator Pin
Dale Leach II17-Sep-09 13:38
Dale Leach II17-Sep-09 13:38 
AnswerRe: My code won't complile right in JCreator Pin
427748017-Sep-09 15:55
427748017-Sep-09 15:55 
AnswerRe: My code won't complile right in JCreator Pin
David Skelly17-Sep-09 22:37
David Skelly17-Sep-09 22:37 
QuestionLooking for reading Material on Concurrent Programming in Java Pin
that_dude_tj17-Sep-09 8:43
that_dude_tj17-Sep-09 8:43 
AnswerRe: Looking for reading Material on Concurrent Programming in Java Pin
427748017-Sep-09 15:45
427748017-Sep-09 15:45 
GeneralRe: Looking for reading Material on Concurrent Programming in Java Pin
that_dude_tj18-Sep-09 13:59
that_dude_tj18-Sep-09 13:59 
Questionhow to implement text to speech converter in java Pin
gharekiran16-Sep-09 23:13
gharekiran16-Sep-09 23:13 
AnswerRe: how to implement text to speech converter in java Pin
TorstenH.17-Sep-09 0:05
TorstenH.17-Sep-09 0:05 
AnswerRe: how to implement text to speech converter in java Pin
427748017-Sep-09 15:44
427748017-Sep-09 15:44 
QuestionImplementing a "Paint Can"-type tool Pin
max2929716-Sep-09 14:21
max2929716-Sep-09 14:21 
AnswerRe: Implementing a "Paint Can"-type tool Pin
427748016-Sep-09 16:34
427748016-Sep-09 16:34 
GeneralRe: Implementing a "Paint Can"-type tool Pin
max2929716-Sep-09 16:40
max2929716-Sep-09 16:40 
AnswerRe: Implementing a "Paint Can"-type tool Pin
max2929716-Sep-09 16:57
max2929716-Sep-09 16:57 
GeneralRe: Implementing a "Paint Can"-type tool Pin
427748016-Sep-09 17:57
427748016-Sep-09 17:57 
GeneralRe: Implementing a "Paint Can"-type tool Pin
sharkbc17-Sep-09 0:11
sharkbc17-Sep-09 0:11 
Questiontapi in java Pin
kareemmahammed11-Sep-09 17:59
kareemmahammed11-Sep-09 17:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.