Results 1 to 2 of 2
  1. #1
    Fillis52 is offline Member
    Join Date
    Jul 2010
    Posts
    3
    Rep Power
    0

    Default Problem changing synthesiser voices with Java Speech

    I have written a Text-To-Speech application, and have included the option to change the voice of the synthesiser. The user selects a voice name from the list of available voices, and the position of the voice in the SynthesiserModeDesc voice array is noted, as well as the position of the SynthesiserModeDesc in the EngineList array.

    The numbers being passed across are correct, and have included several system.out's to print the name of the current voice being used, which show that the voice has supposedly changed. Despite this, when it comes to output, the text is spoken in the same voice, no matter what voice has been selected and changed from the list.

    Here is the code which is supposed to change the voice.

    public Output(String toBe, Interface listener, int smde, int ve) throws IllegalArgumentException, EngineException, InterruptedException {
    beSpoken = toBe;
    this.listener = listener;
    System.out.println("" + smde);

    EngineList syns = Central.availableSynthesizers(null);
    SynthesizerModeDesc synDesc;

    final SynthesizerModeDesc desc = (SynthesizerModeDesc) syns.elementAt(smde);
    synDesc = desc;


    synth = Central.createSynthesizer(synDesc);
    synth.getSynthesizerProperties().setVoice(synDesc. getVoices()[ve]);
    System.out.println(synth.getSynthesizerProperties( ).getVoice());
    synth.allocate();

    synth.waitEngineState(synth.ALLOCATED);
    }

    Any help on the matter wouldn't go amiss :)

    Thanks,
    Fiona

  2. #2
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,189
    Rep Power
    19

Similar Threads

  1. java speech Synthesizer
    By chaminga in forum Advanced Java
    Replies: 29
    Last Post: 01-04-2012, 06:32 PM
  2. Speech Recognition In Java
    By hackernewbie in forum Advanced Java
    Replies: 6
    Last Post: 01-18-2010, 11:06 PM
  3. Replies: 0
    Last Post: 12-11-2009, 11:29 PM
  4. Java Speech Recognizer
    By Lynx09 in forum Advanced Java
    Replies: 0
    Last Post: 03-30-2009, 08:10 PM
  5. Replies: 0
    Last Post: 03-08-2009, 01:52 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •