Closed alexanderkoller closed 4 years ago
it's the classloading and I believe it's >9 but yes.
@akoehn This may be more urgent than we think: Up-to-date versions of JEP do not work with Java 8.
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: jep/Run has been compiled by a more recent version of the Java Runtime (class file version 56.0), this version of the Java Runtime only recognizes class file versions up to 52.0
pro-tip: set your JAVA_HOME to something java-8 based but use java-11 binary...
The issue is with how MaryTTS, I wonder if there's a bug filed against that.
I just checked the MaryTTS issues, and the problem is not with reflection or classloading, it is with the way Java reports version strings. They have fixed the issue; now let's find out when they can make a new release.
More specifically, our issue is mentioned here.
See #208 for the rest of the "reflection" problems.
try something like this to avoid the issue with Jampack (and to avoid pulling in 5.2 via the voices -- I just fixed this for one voice but should work for all; make sure to pull in lang-en explicitly and exclude it from voices for English):
diff --git a/plugins/DialogOS_MaryTTSPlugin/build.gradle b/plugins/DialogOS_MaryTTSPlugin/build.gradle
index f6eed86..248a014 100644
--- a/plugins/DialogOS_MaryTTSPlugin/build.gradle
+++ b/plugins/DialogOS_MaryTTSPlugin/build.gradle
@@ -5,7 +5,21 @@ dependencies {
implementation project(':com.clt.xml')
implementation project(':com.clt.script')
- implementation group: 'de.dfki.mary', name: 'voice-dfki-prudence-hsmm', version: '5.2'
+ implementation 'gov.nist.math:Jampack:1.0'
+ implementation('com.github.marytts.marytts:marytts-runtime:1df2faf45a') {
+ exclude group: 'com.github.marytts.marytts', module: 'Jampack'
+ }
+ implementation('com.github.marytts.marytts:marytts-lang-de:1df2faf45a') {
+ exclude group: 'com.github.marytts.marytts', module: 'Jampack'
+ exclude group: 'de.dfki.mary', module: 'marytts-runtime'
+ }
+ implementation(group: 'de.dfki.mary', name: 'voice-bits1-hsmm', version: '5.2') { //Deutsch,weiblich
+ exclude group: 'de.dfki.mary', module: 'marytts-lang-de'
+ exclude group: 'de.dfki.mary', module: 'marytts-runtime'
+ }
+// implementation group: 'de.dfki.mary', name: 'voice-bits3-hsmm', version: '5.2' //Deutsch,männlich
+
+/* implementation group: 'de.dfki.mary', name: 'voice-dfki-prudence-hsmm', version: '5.2'
implementation group: 'de.dfki.mary', name: 'voice-dfki-obadiah-hsmm', version: '5.2'
implementation group: 'de.dfki.mary', name: 'voice-dfki-spike-hsmm', version: '5.2'
implementation group: 'de.dfki.mary', name: 'voice-dfki-poppy-hsmm', version: '5.2'
@@ -17,6 +31,6 @@ dependencies {
implementation group: 'de.dfki.mary', name: 'voice-bits3-hsmm', version: '5.2' //Deutsch,männlich
implementation group: 'de.dfki.mary', name: 'voice-dfki-pavoque-neutral-hsmm', version: '5.2'
implementation group: 'de.dfki.mary', name: 'voice-upmc-pierre-hsmm', version: '5.2' //Französisch,männlich
-
+*/
}
This is fixed for now in b76f36f21fd82c109ac87b316dfc72451b659b90, using a variant of Timo's patch. Once there is a new MaryTTS release, we should change the dependencies to that.
I have added a bit of documentation for this on the Wiki.
this is fixed by the move to MaryTTS master (hoping for a 5.3 release to come soon) which re-enables MaryTTS with Java>9. However, at present there are hardly any voices on public maven repositories and they can't be built via jitpack :-|
DialogOS does not seem to work with recent Java versions. Here is the error that I get with Java version "12" 2019-03-19 on MacOS.
My guess is that both our own code and MaryTTS use reflection in a way that is not supported by Java >= 9.
Do others have the same problem? Then we should fix this.