diff --git a/marytts-builder/src/main/java/marytts/tools/voiceimport/VoiceCompiler.java b/marytts-builder/src/main/java/marytts/tools/voiceimport/VoiceCompiler.java index 9cb1e258..dcedbf6e 100644 --- a/marytts-builder/src/main/java/marytts/tools/voiceimport/VoiceCompiler.java +++ b/marytts-builder/src/main/java/marytts/tools/voiceimport/VoiceCompiler.java @@ -254,7 +254,7 @@ public class VoiceCompiler extends VoiceImportComponent { File[] filesForFilesystem, Map extraVariablesToSubstitute) { this.mvn = mvn; this.compileDir = compileDir; - this.voiceName = voiceName; + this.voiceName = voiceName.replaceAll("[^\\w\\-]", ""); this.voiceVersion = voiceVersion; this.locale = locale; this.gender = gender;