/** * Convenience access to this config's properties. * * @param systemPropertiesOverride * whether to use system properties in priority if they exist. If true, any property requested from this properties * accessor will first be looked up in the system properties, and only if it is not defined there, it will be * looked up in this config's properties. * @return PropertiesAccessor(props, systemPropertiesOverride, maryBaseMap) */ public PropertiesAccessor getPropertiesAccessor(boolean systemPropertiesOverride) { Map<String, String> maryBaseMap = new HashMap<String, String>(); maryBaseMap.put("MARY_BASE", MaryProperties.maryBase()); return new PropertiesAccessor(props, systemPropertiesOverride, maryBaseMap); }
/** * Convenience access to this config's properties. * * @param systemPropertiesOverride * whether to use system properties in priority if they exist. If true, any property requested from this properties * accessor will first be looked up in the system properties, and only if it is not defined there, it will be * looked up in this config's properties. * @return PropertiesAccessor(props, systemPropertiesOverride, maryBaseMap) */ public PropertiesAccessor getPropertiesAccessor(boolean systemPropertiesOverride) { Map<String, String> maryBaseMap = new HashMap<String, String>(); maryBaseMap.put("MARY_BASE", MaryProperties.maryBase()); return new PropertiesAccessor(props, systemPropertiesOverride, maryBaseMap); }
/** * Reads from configuration file all the data files in this class this method is used when running HTSengine stand alone. * * @param voiceName * voiceName * @param marybase * marybase * @param configFile * configFile * @throws Exception * Exception */ public void initHMMData(String voiceName, String marybase, String configFile) throws Exception { Properties props = new Properties(); FileInputStream fis = new FileInputStream(marybase + configFile); props.load(fis); fis.close(); Map<String, String> maryBaseReplacer = new HashMap<String, String>(); maryBaseReplacer.put("jar:", marybase); initHMMData(new PropertiesAccessor(props, false, maryBaseReplacer), voiceName); }
/** * Reads from configuration file all the data files in this class this method is used when running HTSengine stand alone. * * @param voiceName * voiceName * @param marybase * marybase * @param configFile * configFile * @throws Exception * Exception */ public void initHMMData(String voiceName, String marybase, String configFile) throws Exception { Properties props = new Properties(); FileInputStream fis = new FileInputStream(marybase + configFile); props.load(fis); fis.close(); Map<String, String> maryBaseReplacer = new HashMap<String, String>(); maryBaseReplacer.put("jar:", marybase); initHMMData(new PropertiesAccessor(props, false, maryBaseReplacer), voiceName); }
/** * Convenience access to this config's properties. * * @param systemPropertiesOverride * whether to use system properties in priority if they exist. If true, any property requested from this properties * accessor will first be looked up in the system properties, and only if it is not defined there, it will be * looked up in this config's properties. * @return PropertiesAccessor(props, systemPropertiesOverride, maryBaseMap) */ public PropertiesAccessor getPropertiesAccessor(boolean systemPropertiesOverride) { Map<String, String> maryBaseMap = new HashMap<String, String>(); maryBaseMap.put("MARY_BASE", MaryProperties.maryBase()); return new PropertiesAccessor(props, systemPropertiesOverride, maryBaseMap); }
/** * Reads from configuration file all the data files in this class this method is used when running HTSengine stand alone. * * @param voiceName * voiceName * @param marybase * marybase * @param configFile * configFile * @throws Exception * Exception */ public void initHMMData(String voiceName, String marybase, String configFile) throws Exception { Properties props = new Properties(); FileInputStream fis = new FileInputStream(marybase + configFile); props.load(fis); fis.close(); Map<String, String> maryBaseReplacer = new HashMap<String, String>(); maryBaseReplacer.put("jar:", marybase); initHMMData(new PropertiesAccessor(props, false, maryBaseReplacer), voiceName); }