# HG changeset patch # User drewp # Date 1577003758 28800 # Node ID 90e1ef015f09226ac74678193b40677a8ec8a32f # Parent 94abe0983594e07f24e6d9fee7a6aa911560484f service that calls for TTS audio then serves it to chromecasts and to playAudio services Ignore-this: 4ede3d6eb6b35096f70fc35ffe5c7a07 darcs-hash:746f3dd879633e39aa96aeb581787664131e83b0 diff -r 94abe0983594 -r 90e1ef015f09 service/announce/Dockerfile --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/service/announce/Dockerfile Sun Dec 22 00:35:58 2019 -0800 @@ -0,0 +1,21 @@ +FROM bang6:5000/base_x86 + +WORKDIR /opt + +RUN apt-get update +RUN apt-get install -y openjdk-11-jre-headless unzip + +RUN wget https://github.com/marytts/marytts/releases/download/v5.2/marytts-5.2.zip && \ + unzip marytts-5.2.zip && \ + rm marytts-5.2.zip + +RUN wget -O ./cast https://github.com/barnybug/go-cast/releases/download/0.1.0/cast-linux-amd64 && chmod 755 ./cast + +COPY requirements.txt ./ +RUN pip3 install --index-url https://projects.bigasterisk.com/ --extra-index-url https://pypi.org/simple -r requirements.txt + +COPY *.py *.html ./ + +EXPOSE 9010 + +CMD [ "python3", "./announce.py" ] diff -r 94abe0983594 -r 90e1ef015f09 service/announce/Dockerfile.speechServer --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/service/announce/Dockerfile.speechServer Sun Dec 22 00:35:58 2019 -0800 @@ -0,0 +1,22 @@ +FROM bang6:5000/base_x86 + +WORKDIR /opt + +RUN apt-get update +RUN apt-get install -y openjdk-11-jre-headless unzip + +RUN wget https://github.com/marytts/marytts/releases/download/v5.2/marytts-5.2.zip && \ + unzip marytts-5.2.zip && \ + rm marytts-5.2.zip + +#RUN apt-get install -y mbrola-us1 mbrola-us2 + +RUN cd /opt/marytts-5.2; \ + wget https://github.com/marytts/voice-dfki-poppy/releases/download/v5.2/voice-dfki-poppy-5.2.zip && unzip voice-dfki-poppy-5.2.zip; \ + wget https://github.com/marytts/voice-dfki-poppy-hsmm/releases/download/v5.2/voice-dfki-poppy-hsmm-5.2.zip && unzip voice-dfki-poppy-hsmm-5.2.zip; \ + wget https://github.com/marytts/voice-cmu-slt/releases/download/v5.2/voice-cmu-slt-5.2.zip && unzip voice-cmu-slt-5.2.zip; + + +EXPOSE 59125 + +CMD [ "/opt/marytts-5.2/bin/marytts-server" ] diff -r 94abe0983594 -r 90e1ef015f09 service/announce/index.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/service/announce/index.html Sun Dec 22 00:35:58 2019 -0800 @@ -0,0 +1,22 @@ + + + + + + + + + + + + + diff -r 94abe0983594 -r 90e1ef015f09 service/announce/requirements.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/service/announce/requirements.txt Sun Dec 22 00:35:58 2019 -0800 @@ -0,0 +1,7 @@ +cyclone +mock==1.0.1 +Twisted +treq==18.6.0 +lru-dict==1.1.6 + +standardservice==0.6.0 diff -r 94abe0983594 -r 90e1ef015f09 service/announce/serv.n3 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/service/announce/serv.n3 Sun Dec 22 00:35:58 2019 -0800 @@ -0,0 +1,30 @@ +@prefix : . +@prefix auth: . +@prefix serv: . + +serv:announce a :Service; + :path "/announce/"; + :openid auth:admin; + :serverHost "bang"; + :internalPort 9010; + :prodDockerFlags ( + "-p" "9010:9010" + "--net=host" + ); + :localDockerFlags ( + "--mount" "type=bind,source=/my/proj/homeauto/service/announce/announce.py,target=/opt/announce.py" + "--mount" "type=bind,source=/my/proj/homeauto/service/announce/index.html,target=/opt/index.html" + ); + :localRunCmdline ("python3" "announce.py" "-v"); + :dockerFile "Dockerfile" +. + + +serv:tts_server a :Service; + :openid auth:admin; + :serverHost "bang"; + :internalPort 59125; + :prodDockerFlags ("-p" "59125:59125"); + :dockerFile "Dockerfile.speechServer" +. + diff -r 94abe0983594 -r 90e1ef015f09 service/announce/tasks.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/service/announce/tasks.py Sun Dec 22 00:35:58 2019 -0800 @@ -0,0 +1,15 @@ +from invoke import task, Collection + +import sys +sys.path.append('/my/proj/release') +from serv_tasks import serv_tasks + +ns = Collection() + +coll = Collection('announce') +ns.add_collection(coll) +serv_tasks(coll, 'serv.n3', 'announce') + +coll = Collection('tts') +ns.add_collection(coll) +serv_tasks(ns, 'serv.n3', 'tts_server')