1 Reply Latest reply on Aug 20, 2010 7:13 PM by darrylburke

    Problem changing synthesiser voices

      I have written a TTS 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);


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