[mary-dev] Improving Mary TTS for use as a component in larger systems

Marc Schroeder marc.schroeder at dfki.de
Tue Jun 1 17:50:02 CEST 2010


Herwin,

thanks a lot, these are very valuable and reasonable suggestions.

I think what I will do is to keep the existing startup() as a method for 
backwards compatibility, but it would just redirect to a new 
startup(boolean doAddJars, String maryLogPrefix, ...) method.

For now you have a modified version, right? So we'll try to get this 
into the next release.

Thanks again, and best wishes,
Marc

On 01.06.10 17:37, H.vanWelbergen at ewi.utwente.nl wrote:
> We are currently using Mary TTS as one of the speech synthesis systems
> within our BML realizer Elckerlyc
> (http://hmi.ewi.utwente.nl/showcase/Elckerlyc). It would be very nice if
> you could make the following changes to startup and logging to
> accommodate such embedding of Mary TTS in a better way:
> - Create a Mary.startup() that does not call addJarsToClasspath(), in
> larger systems, this method is jar file clash prone. I'd prefer to keep
> track of my own jar files.
> - I'd prefer the logging to write to "marytts.main",
> "marytts.ModuleRegistry" etc, rather than to "main", "ModuleRegistry",
> ... This would help me to embed the Mary logs in the Elckerlyc logs and
> to easily set log properties on all marytts logging.
> - I'd prefer it if the logger as setup in Mary.startup() does not
> enforce a hard-coded log destination and format on me. This could be set
> up using log4j properties instead. Getting rid of the PatternLayout
> there allowed me to redirect Mary logs to SLF4J.
>
> I've updated my Mary.startup to support some of these points:
> public static void simpleStartup() throws Exception
> {
>      		if (currentState != STATE_OFF) throw new
> IllegalStateException("Cannot start system: it is not offline");
>          currentState = STATE_STARTING;
>
>          MaryProperties.readProperties();
>
>          // Configure Logging:
>          logger = Logger.getLogger("dfki.marytts");
>          logger.info("Mary starting up...");
>          logger.info("Specification version " +
> Version.specificationVersion());
>          logger.info("Implementation version " +
> Version.implementationVersion());
>          logger.info("Running on a Java " +
> System.getProperty("java.version")
>                  + " implementation by " +
> System.getProperty("java.vendor")
>                  + ", on a " + System.getProperty("os.name") + " platform
> ("
>                  + System.getProperty("os.arch") + ", " +
> System.getProperty("os.version")
>                  + ")");
>          logger.debug("MARY_BASE: "+MaryProperties.maryBase());
>
>          StringBuilder installedMsg = new StringBuilder();
>          for (String filename : new
> File(MaryProperties.maryBase()+"/installed").list()) {
>              if (installedMsg.length()>  0) {
>                  installedMsg.append(", ");
>              }
>              installedMsg.append(filename);
>          }
>          logger.debug("Content of installed/ folder: "+installedMsg);
>          StringBuilder confMsg = new StringBuilder();
>          for (String filename : new
> File(MaryProperties.maryBase()+"/conf").list()) {
>              if (confMsg.length()>  0) {
>                  confMsg.append(", ");
>              }
>              confMsg.append(filename);
>          }
>          logger.debug("Content of conf/ folder: "+confMsg);
>          logger.debug("Full dump of system properties:");
>          for (Object key : new
> TreeSet<Object>(System.getProperties().keySet())) {
>              logger.debug(key + " = " + System.getProperties().get(key));
>          }
>          logger.debug("XML libraries used:");
>          logger.debug("DocumentBuilderFactory: " +
> DocumentBuilderFactory.newInstance().getClass());
>          try {
>              Class xercesVersion =
> Class.forName("org.apache.xerces.impl.Version");
>
> logger.debug(xercesVersion.getMethod("getVersion").invoke(null));
>          } catch (Exception e) {
>              // Not xerces, no version number
>          }
>          logger.debug("TransformerFactory:     " +
> TransformerFactory.newInstance().getClass());
>          try {
>              // Nov 2009, Marc: This causes "[Deprecated] Xalan:
> org.apache.xalan.Version" to be written to the console.
>              //Class xalanVersion =
> Class.forName("org.apache.xalan.Version");
>
> //logger.debug(xalanVersion.getMethod("getVersion").invoke(null));
>          } catch (Exception e) {
>              // Not xalan, no version number
>          }
>
>          // Essential environment checks:
>          EnvironmentChecks.check();
>
>          Runtime.getRuntime().addShutdownHook(new Thread() {
>              public void run() {
>                  shutdown();
>              }
>          });
>
>
>          setupFeatureProcessors();
>
>          // Instantiate module classes and startup modules:
>          startModules();
>
>          logger.info("Startup complete.");
>          currentState = STATE_RUNNING;
>      }
>
> Regards,
> Herwin van Welbergen
> _______________________________________________
> Mary-dev mailing list
> Mary-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/mary-dev

-- 
please note my NEW phone number: +49-681-85775-5303

Dr. Marc Schröder, Senior Researcher at DFKI GmbH
Coordinator EU FP7 Project SEMAINE http://www.semaine-project.eu
Project leader for DFKI in SSPNet http://sspnet.eu
Project leader PAVOQUE http://mary.dfki.de/pavoque
Associate Editor IEEE Trans. Affective Computing http://computer.org/tac
Editor W3C EmotionML Working Draft http://www.w3.org/TR/emotionml/
Portal Editor http://emotion-research.net
Team Leader DFKI TTS Group http://mary.dfki.de

Homepage: http://www.dfki.de/~schroed
Email: marc.schroeder at dfki.de
Phone: +49-681-85775-5303
Postal address: DFKI GmbH, Campus D3_2, Stuhlsatzenhausweg 3, D-66123 
Saarbrücken, Germany
--
Official DFKI coordinates:
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Trippstadter Strasse 122, D-67663 Kaiserslautern, Germany
Geschaeftsfuehrung:
Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster (Vorsitzender)
Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313


More information about the Mary-dev mailing list