Sorry to be a bit stupid, but it’s not really working for me yet.
Thanks @kaykoch for the hint!
1. what works?
Docker file with the line
RUN ./marytts install:bits1-hsmm bits3-hsmm
Then in bash: (@Bozor Thanks for the tip! In the folder where I execute the commands there is only docker-compose.yaml and dockerfile so this should not be a problem.)
docker-compose stop marytts && docker image build -t marytts:1.4 . && docker-compose up -d
Then I can open the web interface of MaryTTS and see both voices.
2.1 More voices do not work
Docker file with the line
RUN ./marytts install:bits1 bits1-hsmm bits3 bits3-hsmm dfki-pavoque-neutral dfki-pavoque-neutral-hsmm dfki-pavoque-styles
Afterwards again in bash (the build takes longer, you see that more work is done)
docker-compose stop marytts && docker image build -t marytts:1.4 . && docker-compose up -d
However, the web interface is not available. Via Portainer I get the following log for martts (which does not help me):
* What went wrong:
Execution failed for task ':server'.
> Process 'command '/usr/lib/jvm/java-8-openjdk-armhf/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
BUILD FAILED
Total time: 22.758 secs
Starting a new Gradle Daemon for this build (subsequent builds will be faster).
MARY server 5.2 starting as a HTTP server...Exception in thread "main" java.lang.Exception: Problem starting module Synthesis
at marytts.server.Mary.startModules(Mary.java:151)
at marytts.server.Mary.startup(Mary.java:297)
at marytts.server.Mary.startup(Mary.java:204)
at marytts.server.Mary.main(Mary.java:513)
Caused by: java.lang.OutOfMemoryError: Java heap space
at marytts.unitselection.select.JoinCostFeatures.loadFromByteBuffer(JoinCostFeatures.java:218)
at marytts.unitselection.select.JoinCostFeatures.load(JoinCostFeatures.java:143)
at marytts.unitselection.select.JoinCostFeatures.init(JoinCostFeatures.java:119)
at marytts.unitselection.UnitSelectionVoice.<init>(UnitSelectionVoice.java:120)
at marytts.unitselection.UnitSelectionSynthesizer.startup(UnitSelectionSynthesizer.java:94)
at marytts.modules.Synthesis.startupSynthesizers(Synthesis.java:73)
at marytts.modules.Synthesis.startup(Synthesis.java:65)
at marytts.server.Mary.startModules(Mary.java:149)
... 3 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)
:server FAILED
FAILURE: Build failed with an exception.
* What went wrong:
2.2 Integration via volume in docker-compose is not possible
Docker build from 1. that works and remove one of the two voices:
RUN ./marytts install:bits1-hsmm
Again afterwards:
docker-compose stop marytts && docker image build -t marytts:1.4 . && docker-compose up -d
-> Docker container starts and only one voice is visible So far, so reasonable.
Now add the following line in the docker-compose (on my system the file is of course in the path!)
volumes:
- /docker/MaryTTS/voice-bits3-hsmm-5.2.jar:/marytts/lib/voice-bits3-hsmm-5.2.jar
bash:
docker-compose stop marytts && docker image build -t marytts:1.4 . && docker-compose up -d
Mary starts, but only shows bits1-hsmm from the RUN command
I was still trying to help myself a little:
docker exec -it MaryTTS bash
find . -type f -name '*bits1*'
gives me: ./installed/voice-bits1-hsmm-5.2.jar
So I adapted the docker-compose
volumes:
- /docker/MaryTTS/voice-bits3-hsmm-5.2.jar:/installed/voice-bits3-hsmm-5.2.jar
and again:
docker-compose stop marytts && docker image build -t marytts:1.4 . && docker-compose up -d
-> Mary still starts, but still shows only bits1-hsmm from the RUN command
I would prefer to be able to integrate the voices via docker-compose volumes. The reason is the following: My docker-compose contains a lot of containers. Sometimes I want to update all containers at once:
docker-compose down && docker-compose up -d
Since “down” deletes all containers and images including marytts, it gets a little more complicated. I have to rebuild the container before the “up -d”. That works, but thanks to the build it takes much longer than before:
cd /docker/_compose/ha_environment/ && docker-compose stop marytts && docker-compose rm -f marytts && docker-compose down -v --rmi all && cd /docker/_compose/ha_environment/ && docker image build -t marytts:1.0 . && docker-compose up -d ; cd -