/** * Constructor to be called with instantiated objects. * * @param locale * locale */ public AcousticModeller(String locale) { this(MaryUtils.string2locale(locale)); }
/** * Constructor to be called with instantiated objects. * * @param locale * locale */ public DummyDuration2AcoustParams(String locale) { super("DummyAllophones2AcoustParams", MaryDataType.DURATIONS, MaryDataType.ACOUSTPARAMS, MaryUtils.string2locale(locale)); }
/** * Constructor to be called with instantiated objects. * * @param locale * locale */ public DummyDuration2AcoustParams(String locale) { super("DummyAllophones2AcoustParams", MaryDataType.DURATIONS, MaryDataType.ACOUSTPARAMS, MaryUtils.string2locale(locale)); }
/** * Constructor to be called with instantiated objects. * * @param locale * locale */ public DummyAllophones2AcoustParams(String locale) { super("DummyAllophones2AcoustParams", MaryDataType.ALLOPHONES, MaryDataType.ACOUSTPARAMS, MaryUtils.string2locale(locale)); }
/** * Constructor to be called with instantiated objects. * * @param locale * locale */ public DummyAllophones2AcoustParams(String locale) { super("DummyAllophones2AcoustParams", MaryDataType.ALLOPHONES, MaryDataType.ACOUSTPARAMS, MaryUtils.string2locale(locale)); }
/** * Constructor to be called with instantiated objects. * * @param locale * locale */ public AcousticModeller(String locale) { this(MaryUtils.string2locale(locale)); }
public KlattDurationModeller(String localeString) throws IOException { super("KlattDurationModeller", MaryDataType.ALLOPHONES, MaryDataType.DURATIONS, MaryUtils.string2locale(localeString)); this.localePrefix = localeString; }
public KlattDurationModeller(String localeString) throws IOException { super("KlattDurationModeller", MaryDataType.ALLOPHONES, MaryDataType.DURATIONS, MaryUtils.string2locale(localeString)); this.localePrefix = localeString; }
public FeatureProcessorManager(String localeString) throws MaryConfigurationException { this(MaryUtils.string2locale(localeString)); }
public FeatureProcessorManager(String localeString) throws MaryConfigurationException { this(MaryUtils.string2locale(localeString)); }
public SimplePhoneme2AP(String localeString) { this(MaryDataType.SIMPLEPHONEMES, MaryDataType.ACOUSTPARAMS, MaryUtils.string2locale(localeString)); }
public HMMDurationF0Modeller(String locale, String hmmVoiceName) throws Exception { this(MaryUtils.string2locale(locale), hmmVoiceName, FeatureRegistry.getFeatureProcessorManager(MaryUtils .string2locale(locale))); }
public HMMDurationF0Modeller(String locale, String hmmVoiceName) throws Exception { this(MaryUtils.string2locale(locale), hmmVoiceName, FeatureRegistry.getFeatureProcessorManager(MaryUtils .string2locale(locale))); }
/** * Try to determine the locale of a document by looking at the xml:lang attribute of the document element. * * @param doc * the document in which to look for a locale. * @return the locale set for the document, or null if no locale is set. */ public static Locale getLocale(Document doc) { if (doc.getDocumentElement().hasAttribute("xml:lang")) return MaryUtils.string2locale(doc.getDocumentElement().getAttribute("xml:lang")); return null; }
/** * Try to determine the locale of a document by looking at the xml:lang attribute of the document element. * * @param doc * the document in which to look for a locale. * @return the locale set for the document, or null if no locale is set. */ public static Locale getLocale(Document doc) { if (doc.getDocumentElement().hasAttribute("xml:lang")) return MaryUtils.string2locale(doc.getDocumentElement().getAttribute("xml:lang")); return null; }
private Locale parseSynthesisRequiredLocale(StringTokenizer t) throws Exception { if (!t.hasMoreTokens()) { throw new Exception("Expected LOCALE=<locale>"); } String localeString = parseProtocolParameter(t.nextToken(), "LOCALE", "locale"); return MaryUtils.string2locale(localeString); }
private Locale parseSynthesisRequiredLocale(StringTokenizer t) throws Exception { if (!t.hasMoreTokens()) { throw new Exception("Expected LOCALE=<locale>"); } String localeString = parseProtocolParameter(t.nextToken(), "LOCALE", "locale"); return MaryUtils.string2locale(localeString); }
/** * The voice's locale. Guaranteed not to be null. * * @return null if localeString is null, return MaryUtils.string2locale(localeString) otherwise */ public Locale getLocale() { String localeString = getProperties().getProperty("locale"); if (localeString == null) { return null; } return MaryUtils.string2locale(localeString); } }
/** * The voice's locale. Guaranteed not to be null. * * @return null if localeString is null, return MaryUtils.string2locale(localeString) otherwise */ public Locale getLocale() { String localeString = getProperties().getProperty("locale"); if (localeString == null) { return null; } return MaryUtils.string2locale(localeString); } }
public LanguageConfig(InputStream propertyStream) throws MaryConfigurationException { super(propertyStream); String localeProp = getProperties().getProperty("locale"); if (localeProp == null) { throw new MaryConfigurationException("property stream does not contain a locale property"); } for (StringTokenizer st = new StringTokenizer(localeProp); st.hasMoreTokens();) { String localeString = st.nextToken(); locales.add(MaryUtils.string2locale(localeString)); } if (locales.isEmpty()) { throw new MaryConfigurationException("property stream does not define any locale"); } }