Ejemplo n.º 1
0
 public Mary4To5VoiceConverter(List<VoiceComponentDescription> voiceDescriptions, File voiceZip) {
   voiceDescription = null;
   mary4Zip = voiceZip;
   for (VoiceComponentDescription d : voiceDescriptions) {
     if (d.getPackageFilename().equals(mary4Zip.getName())) {
       voiceDescription = d;
       break;
     }
   }
   if (voiceDescription == null) {
     throw new IllegalArgumentException(
         "No matching voice description for file " + mary4Zip.getName());
   }
   if (!MaryUtils.isLog4jConfigured()) {
     BasicConfigurator.configure();
   }
   logger = Logger.getLogger(this.getClass());
   logger.info(
       voiceDescription.getName()
           + " "
           + voiceDescription.getVersion()
           + " ("
           + voiceDescription.getLocale()
           + " "
           + voiceDescription.getGender()
           + ")");
 }