Examples of TTSService


Examples of org.openhab.io.multimedia.tts.TTSService

  @ActionDoc(text="says a given text through the default TTS service with a given voice")
  static public void say(@ParamDoc(name="text") Object text,
               @ParamDoc(name="voice") String voice,
               @ParamDoc(name="device") String device) {
    if(StringUtils.isNotBlank(text.toString())) {
      TTSService ttsService = getTTSService(MultimediaActivator.getContext(), System.getProperty("osgi.os"));
      if(ttsService==null) {
        ttsService = getTTSService(MultimediaActivator.getContext(), "any");
      }
      if(ttsService!=null) {
        ttsService.say(text.toString(), voice, device);
      } else {
        logger.error("No TTS service available - tried to say: {}", text);
      }
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.