Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server didn't recognize added id locale #587

Closed
yusufardi97 opened this issue Aug 29, 2016 · 12 comments
Closed

Server didn't recognize added id locale #587

yusufardi97 opened this issue Aug 29, 2016 · 12 comments

Comments

@yusufardi97
Copy link

Hi,
after successful testing for my folder, i reinstall the marytts folder then running the server. But apparently i still cannot find my id locale in the localhost:59125/locales even after add my module (marytts-language pom file) and dependency (marytts-assembly/assembly-runtime pom file). I could find the target jar and jar for sources, so i didn't know what i'm missing.

is there anything that i could do?

@psibre
Copy link
Member

psibre commented Aug 30, 2016

What happens when you run the unit tests for your Indonesian language component, one of which presumably asserts that the config is loaded successfully?

@yusufardi97
Copy link
Author

how do i run the unit test? is it same with the mvn test that used in language-id component? if so it is appeared to be successful for me. Here is the result of the mvn test:

[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building marytts-lang-id 5.2-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-java-7-or-higher) @ marytts-lang-id ---
[INFO] 
[INFO] --- buildnumber-maven-plugin:1.4:create (default) @ marytts-lang-id ---
[INFO] Executing: /bin/sh -c cd '/media/yusufardi97/LinuxData/marytts/marytts-languages/marytts-lang-id' && 'git' 'rev-parse' '--verify' 'HEAD'
[INFO] Working directory: /media/yusufardi97/LinuxData/marytts/marytts-languages/marytts-lang-id
[INFO] Storing buildNumber: bf73a1366f11f3b3e501050bd3483c678dcbcb32 at timestamp: 1472544522097
[INFO] Storing buildScmBranch: master
[INFO] 
[INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ marytts-lang-id ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 8 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ marytts-lang-id ---
[INFO] Changes detected - recompiling the module!
[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
[INFO] 
[INFO] --- maven-resources-plugin:2.7:testResources (default-testResources) @ marytts-lang-id ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) @ marytts-lang-id ---
[INFO] Changes detected - recompiling the module!
[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
[INFO] 
[INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ marytts-lang-id ---

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=128m; support was removed in 8.0
Running TestSuite
Tests run: 21, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 6.561 sec - in TestSuite

Results :

Tests run: 21, Failures: 0, Errors: 0, Skipped: 1

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 26.378 s
[INFO] Finished at: 2016-08-30T15:09:01+07:00
[INFO] Final Memory: 20M/348M
[INFO] ------------------------------------------------------------------------

@psibre
Copy link
Member

psibre commented Aug 30, 2016

Sure, that works. So if the tests that your language config can be loaded pass successfully, then something else is going wrong. When you run the MaryTTS server, are you sure your marytts-lang-id.jar is on the classpath?

@yusufardi97
Copy link
Author

how do i check the classpath? if it is by adding module and dependency in the pom.xml i already do that, but to no avail.

@psibre
Copy link
Member

psibre commented Aug 30, 2016

OK, let me rephrase the question. How exactly are you running the MaryTTS server when you expect to see your Indonesian locale but it's not available?

@yusufardi97
Copy link
Author

yusufardi97 commented Aug 30, 2016

ah, i see

after adding module and dependency into pom file, i reinstall whole project, then running the marytts-server within /target/marytts-5.2-SNAPSHOT/bin then after that i run localhost:59125/locales to check the available locales but the locale went missing.

But after re-read your last comment, i went to check again in the target/snapshot/lib folder only to found out the jar (or xml in the installed) is missing and only found in language-id. is there any step that i miss? or should i manually copy the jar produced in language-id into the target folder?

@yusufardi97
Copy link
Author

yusufardi97 commented Sep 1, 2016

I'm trying to include the jar into target/marytts-5.2-SNAPSHOT/lib before running the server, but it throw this error message:

s-5.2-SNAPSHOT/bin$ ./marytts-server 
java version "1.8.0_74"
Java(TM) SE Runtime Environment (build 1.8.0_74-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.74-b02, mixed mode)

MARY server 5.2-SNAPSHOT starting as a HTTP server...Exception in thread "main" java.lang.Exception: Cannot instantiate feature processor manager 'marytts.features.FeatureProcessorManager(id)'
    at marytts.server.Mary.setupFeatureProcessors(Mary.java:187)
    at marytts.server.Mary.startup(Mary.java:294)
    at marytts.server.Mary.startup(Mary.java:204)
    at marytts.server.Mary.main(Mary.java:513)
Caused by: marytts.exceptions.MaryConfigurationException: Cannot instantiate object from 'marytts.features.FeatureProcessorManager(id)': No such property: in.allophoneset
    at marytts.util.MaryRuntimeUtils.instantiateObject(MaryRuntimeUtils.java:130)
    at marytts.server.Mary.setupFeatureProcessors(Mary.java:178)
    ... 3 more
Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at marytts.util.MaryRuntimeUtils.instantiateObject(MaryRuntimeUtils.java:124)
    ... 4 more
Caused by: marytts.exceptions.MaryConfigurationException: No such property: in.allophoneset
    at marytts.util.MaryRuntimeUtils.needAllophoneSet(MaryRuntimeUtils.java:315)
    at marytts.features.FeatureProcessorManager.<init>(FeatureProcessorManager.java:51)
    at marytts.features.FeatureProcessorManager.<init>(FeatureProcessorManager.java:44)
    ... 9 more
Exception in thread "Thread-1" java.lang.IllegalStateException: MARY system is not running
    at marytts.server.Mary.shutdown(Mary.java:371)
    at marytts.server.Mary$2.run(Mary.java:290)

is this because the locale didn't read properly as suggested by

Caused by: marytts.exceptions.MaryConfigurationException: Cannot instantiate object from 'marytts.features.FeatureProcessorManager(id)': No such property: in.allophoneset

it would be really helpful if anyone can give me insight about this

@seblemaguer
Copy link
Member

hello,

normally you have a configuration file in your resources (in.config). In this file, you have to indicate the path of the xml file containing the allophoneset definition. So a line like that should be present:

in.allophoneset = jar:/marytts/language/in/lexicon/allophones.in.xml

you should defined

@yusufardi97
Copy link
Author

yusufardi97 commented Sep 1, 2016

thank you for answering my question, the allophone id that i define already inside the jar with id.allophoneset = jar:/marytts/language/id/lexicon/allophone.id.xml but instead it looking for the in.allophoneset, which different from what it should be.

@seblemaguer
Copy link
Member

are you sure you do not have a typo in your files "in" instead of "id" ? like the name of the language in the id.config file for example ?

@yusufardi97
Copy link
Author

yusufardi97 commented Sep 1, 2016

i'm sure about it, and it result in the same error.

I solved this by using in locale instead of id locale (different folder with almost same content) and copying in.jar into target/marytts-5.2-SNAPSHOT/lib. I could see the in locale as available locale within localhost:59125/locales and checking available features for the locale, so i think i'll continue the step with in locale.

btw i think this is occur because jdk that used still using in as reference for Indonesian language tag as stated here

@neouyghur
Copy link

this problem also happens to me. I found my jar file in marytts-languages/marytts-lang-ug/target (ug is my locale), then I copied to the target/marytts-5.2-SNAPSHOT/lib. Then my locale appears normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants