Loading ...
Sorry, an error occurred while loading the content.
 

text to speech

Expand Messages
  • Dika
    ma f sebelumnya karena saya member baru dsni saya mohon izin bertanya ia buat semua saya mau tanya gi mana sih cara buat text to speech di netbeans ?? mohon
    Message 1 of 4 , Feb 1, 2012
      ma'f sebelumnya karena saya member baru dsni
      saya mohon izin bertanya ia buat semua

      saya mau tanya gi mana sih cara buat text to speech di netbeans ??
      mohon pencecahanya ia


      salam kenal
    • Hans Kristanto
      Bisa pake library buat java, bisa bikin sendiri juga pake algoritma. Bisa mampir ke bawah kalo sempet buat baca2 : [1]
      Message 2 of 4 , Feb 1, 2012
        Bisa pake library buat java, bisa bikin sendiri juga pake algoritma. Bisa mampir ke bawah kalo sempet buat baca2 :

        [2]  http://tcts.fpms.ac.be/synthesis/introtts_old.html 

        2012/2/1 Dika <cool.dika@...>
         

        ma'f sebelumnya karena saya member baru dsni
        saya mohon izin bertanya ia buat semua

        saya mau tanya gi mana sih cara buat text to speech di netbeans ??
        mohon pencecahanya ia

        salam kenal




        --
        Hans Kristanto

      • onsir salman
        saya sudah coba freetts code spt ini import java.io.File; import java.io.PrintStream; import java.util.Locale; import javax.speech.Central; import
        Message 3 of 4 , Feb 1, 2012
          saya sudah coba freetts code spt ini

          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";

          //7th step can be resolved using System.out.println (System.getProperty(
          //“java.home” ) );
          return message;
          }

          public static void listAllVoices(String modeName)
          {
          System.out.println();
          System.out.println("All " + modeName + " Mode JSAPI Synthesizers and Voices:");
          SynthesizerModeDesc required = new SynthesizerModeDesc(null, modeName, Locale.US, null, null);
          EngineList engineList = Central.availableSynthesizers(required);
          for(int i = 0; i < engineList.size(); i++)
          {
          SynthesizerModeDesc desc = (SynthesizerModeDesc)engineList.get(i);
          System.out.println(" " + desc.getEngineName() + " (mode=" + desc.getModeName() + ", locale=" + desc.getLocale() + "):");
          Voice voices[] = desc.getVoices();
          for(int j = 0; j < voices.length; j++)
          System.out.println(" " + voices[j].getName());

          }

          }

          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.US, 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();
          }
          }
          }

          tetapi pada saat di run tampil pesan

          No synthesizer created. This may be the result of any
          number of problems. It's typically due to a missing
          "speech.properties" file that should be at either of
          these locations:

          user.home : C:\Documents and Settings\User
          java.home/lib: C:\Program Files\Java\jdk1.6.0_23\jre\lib

          Another cause of this problem might be corrupt or missing
          voice jar files in the freetts lib directory. This problem
          also sometimes arises when the freetts.jar file is corrupt
          or missing. Sorry about that. Please check for these
          various conditions and then try again.

          dan gak ada suaranya.

          Apakah ada yang kurang terima kasih
        • onsir salman
          pake kode ini http://szyzygycode.wordpress.com/2009/09/19/implementing-text-to-speech-quickly-with-freetts/ bisa.
          Message 4 of 4 , Feb 1, 2012
          Your message has been successfully submitted and would be delivered to recipients shortly.