protected AllophoneSet getAllophoneSetFor(Locale locale) throws MaryConfigurationException { return MaryRuntimeUtils.needAllophoneSet(locale.toString() + ".allophoneset"); } }
protected AllophoneSet getAllophoneSetFor(Locale locale) throws MaryConfigurationException { return MaryRuntimeUtils.needAllophoneSet(locale.toString() + ".allophoneset"); } }
/** * Try to determine the Allophone set to use for the given locale. * * @param locale * locale * @return the allophone set defined for the given locale, or null if no such allophone set can be determined. * @throws MaryConfigurationException * if an allophone set exists for the given locale in principle, but there were problems loading it. */ public static AllophoneSet determineAllophoneSet(Locale locale) throws MaryConfigurationException { AllophoneSet allophoneSet = null; String propertyPrefix = MaryProperties.localePrefix(locale); if (propertyPrefix != null) { String propertyName = propertyPrefix + ".allophoneset"; allophoneSet = needAllophoneSet(propertyName); } return allophoneSet; }
/** * Try to determine the Allophone set to use for the given locale. * * @param locale * locale * @return the allophone set defined for the given locale, or null if no such allophone set can be determined. * @throws MaryConfigurationException * if an allophone set exists for the given locale in principle, but there were problems loading it. */ public static AllophoneSet determineAllophoneSet(Locale locale) throws MaryConfigurationException { AllophoneSet allophoneSet = null; String propertyPrefix = MaryProperties.localePrefix(locale); if (propertyPrefix != null) { String propertyName = propertyPrefix + ".allophoneset"; allophoneSet = needAllophoneSet(propertyName); } return allophoneSet; }
public void startup() throws Exception { allophoneSet = MaryRuntimeUtils.needAllophoneSet(MaryProperties.localePrefix(getLocale()) + ".allophoneset"); if (factory == null) { factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); } if (docBuilder == null) { docBuilder = factory.newDocumentBuilder(); } super.startup(); }
public void startup() throws Exception { allophoneSet = MaryRuntimeUtils.needAllophoneSet(MaryProperties.localePrefix(getLocale()) + ".allophoneset"); if (factory == null) { factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); } if (docBuilder == null) { docBuilder = factory.newDocumentBuilder(); } super.startup(); }
super(componentName, inputType, outputType, MaryRuntimeUtils.needAllophoneSet(allophonesProperty).getLocale()); allophoneSet = MaryRuntimeUtils.needAllophoneSet(allophonesProperty);
public FeatureProcessorManager(Locale locale) throws MaryConfigurationException { this.locale = locale; setupGenericFeatureProcessors(); AllophoneSet allophoneSet = MaryRuntimeUtils.needAllophoneSet(MaryProperties.localePrefix(locale) + ".allophoneset"); setupPhoneFeatureProcessors(allophoneSet, null, null, null); }
public FeatureProcessorManager(Locale locale) throws MaryConfigurationException { this.locale = locale; setupGenericFeatureProcessors(); AllophoneSet allophoneSet = MaryRuntimeUtils.needAllophoneSet(MaryProperties.localePrefix(locale) + ".allophoneset"); setupPhoneFeatureProcessors(allophoneSet, null, null, null); }
super(componentName, inputType, outputType, MaryRuntimeUtils.needAllophoneSet(allophonesProperty).getLocale()); allophoneSet = MaryRuntimeUtils.needAllophoneSet(allophonesProperty);
AllophoneSet allophoneSet = MaryRuntimeUtils.needAllophoneSet("de.allophoneset");
AllophoneSet allophoneSet = MaryRuntimeUtils.needAllophoneSet("de.allophoneset");
public void startup() throws Exception { super.startup(); // We depend on the Synthesis module: MaryModule synthesis; try { synthesis = ModuleRegistry.getModule(marytts.modules.Synthesis.class); } catch (NullPointerException npe) { synthesis = new Synthesis(); } assert synthesis != null; if (synthesis.getState() == MaryModule.MODULE_OFFLINE) synthesis.startup(); // load klatt rules klattRuleParams = new Properties(); klattRuleParams.load(new FileInputStream(MaryProperties.needFilename(localePrefix + ".cap.klattrulefile"))); // load phone list allophoneSet = MaryRuntimeUtils.needAllophoneSet(localePrefix + ".allophoneset"); klattDurationParams = new KlattDurationModeller.KlattDurationParams(MaryProperties.needFilename(localePrefix + ".cap.klattdurfile")); // instantiate the Map in which settings are associated with elements: // (when the objects serving as keys are not in ordinary use any more, // the key-value pairs are deleted from the WeakHashMap earlier or // later; that means we do not need to keep track of the hashmaps per // thread) prosodyMap = new WeakHashMap(); }
public void startup() throws Exception { super.startup(); // We depend on the Synthesis module: MaryModule synthesis; try { synthesis = ModuleRegistry.getModule(marytts.modules.Synthesis.class); } catch (NullPointerException npe) { synthesis = new Synthesis(); } assert synthesis != null; if (synthesis.getState() == MaryModule.MODULE_OFFLINE) synthesis.startup(); // load klatt rules klattRuleParams = new Properties(); klattRuleParams.load(new FileInputStream(MaryProperties.needFilename(localePrefix + ".cap.klattrulefile"))); // load phone list allophoneSet = MaryRuntimeUtils.needAllophoneSet(localePrefix + ".allophoneset"); klattDurationParams = new KlattDurationModeller.KlattDurationParams(MaryProperties.needFilename(localePrefix + ".cap.klattdurfile")); // instantiate the Map in which settings are associated with elements: // (when the objects serving as keys are not in ordinary use any more, // the key-value pairs are deleted from the WeakHashMap earlier or // later; that means we do not need to keep track of the hashmaps per // thread) prosodyMap = new WeakHashMap(); }
String userdictProperty, String lexiconProperty, String ltsProperty, String removetrailingonefromphonesProperty) throws IOException, MaryConfigurationException { super(componentName, inputType, outputType, MaryRuntimeUtils.needAllophoneSet(allophonesProperty).getLocale()); allophoneSet = MaryRuntimeUtils.needAllophoneSet(allophonesProperty);
String userdictProperty, String lexiconProperty, String ltsProperty, String removetrailingonefromphonesProperty) throws IOException, MaryConfigurationException { super(componentName, inputType, outputType, MaryRuntimeUtils.needAllophoneSet(allophonesProperty).getLocale()); allophoneSet = MaryRuntimeUtils.needAllophoneSet(allophonesProperty);
this.wantToBeDefault = MaryProperties.getInteger(header + ".wants.to.be.default", 0); try { allophoneSet = MaryRuntimeUtils.needAllophoneSet(header + ".allophoneset"); } catch (MaryConfigurationException e) { allophoneSet = MaryRuntimeUtils.needAllophoneSet(MaryProperties.localePrefix(getLocale()) + ".allophoneset"); } catch (MaryConfigurationException e2) { throw new MaryConfigurationException("No allophone set specified -- neither for voice '" + getName()
this.wantToBeDefault = MaryProperties.getInteger(header + ".wants.to.be.default", 0); try { allophoneSet = MaryRuntimeUtils.needAllophoneSet(header + ".allophoneset"); } catch (MaryConfigurationException e) { allophoneSet = MaryRuntimeUtils.needAllophoneSet(MaryProperties.localePrefix(getLocale()) + ".allophoneset"); } catch (MaryConfigurationException e2) { throw new MaryConfigurationException("No allophone set specified -- neither for voice '" + getName()
public void startup() throws Exception { allophoneSet = MaryRuntimeUtils.needAllophoneSet(MaryProperties.localePrefix(getLocale()) + ".allophoneset"); if (factory == null) { factory = DocumentBuilderFactory.newInstance(); factory.setNamespaceAware(true); } if (docBuilder == null) { docBuilder = factory.newDocumentBuilder(); } super.startup(); }
public FeatureProcessorManager(Locale locale) throws MaryConfigurationException { this.locale = locale; setupGenericFeatureProcessors(); AllophoneSet allophoneSet = MaryRuntimeUtils.needAllophoneSet(MaryProperties.localePrefix(locale) + ".allophoneset"); setupPhoneFeatureProcessors(allophoneSet, null, null, null); }