Have tried this native code on Windows platform, but not hearing anything. 
Anyone know if this native code should work ?

using System;
using System.Windows;
using System.Speech.Synthesis;

public class TTSImpl {

    private SpeechSynthesizer tts = null;
    private bool ok = false;

    public void say(String param) {
        if (tts == null) {
           tts = new SpeechSynthesizer();
           if (tts != null) {
              ok = true;
              tts.Rate = 1;
              tts.Volume = 100;
              speak(param);
           }
        } else {
           speak(param);
        }
    }

    public bool isSupported() {
        return true;
    }

    void speak(String text) {

        if (!ok) {
            return;
        }
        tts.Speak(text);
    }
}


-- 
You received this message because you are subscribed to the Google Groups 
"CodenameOne Discussions" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
Visit this group at https://groups.google.com/group/codenameone-discussions.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/codenameone-discussions/49a0207c-313f-4d19-ae94-9398afe3391d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to