@@ -56,94 +56,94 @@ RUN cd plugin-tts-mimic3 && \
56
56
57
57
# -----------------------------------------------------------------------------
58
58
59
- FROM debian:bullseye as test
60
- ARG TARGETARCH
61
- ARG TARGETVARIANT
59
+ # FROM debian:bullseye as test
60
+ # ARG TARGETARCH
61
+ # ARG TARGETVARIANT
62
62
63
- ENV LANG C.UTF-8
64
- ENV DEBIAN_FRONTEND=noninteractive
63
+ # ENV LANG C.UTF-8
64
+ # ENV DEBIAN_FRONTEND=noninteractive
65
65
66
- RUN echo "Dir::Cache var/cache/apt/${TARGETARCH}${TARGETVARIANT};" > /etc/apt/apt.conf.d/01cache
66
+ # RUN echo "Dir::Cache var/cache/apt/${TARGETARCH}${TARGETVARIANT};" > /etc/apt/apt.conf.d/01cache
67
67
68
- COPY debian/control.in.* ./debian/
68
+ # COPY debian/control.in.* ./debian/
69
69
70
- # Use dependencies from Debian package control file
71
- RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
72
- mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
73
- apt-get update && \
74
- grep 'Depends:' "debian/control.in.${TARGETARCH}${TARGETVARIANT}" | cut -d' ' -f2- | sed -e 's/,/\n/g' | \
75
- xargs apt-get install --yes --no-install-recommends \
76
- python3 python3-venv python3-pip \
77
- build-essential python3-dev \
78
- git inotify-tools sox procps
70
+ # # Use dependencies from Debian package control file
71
+ # RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
72
+ # mkdir -p /var/cache/apt/${TARGETARCH}${TARGETVARIANT}/archives/partial && \
73
+ # apt-get update && \
74
+ # grep 'Depends:' "debian/control.in.${TARGETARCH}${TARGETVARIANT}" | cut -d' ' -f2- | sed -e 's/,/\n/g' | \
75
+ # xargs apt-get install --yes --no-install-recommends \
76
+ # python3 python3-venv python3-pip \
77
+ # build-essential python3-dev \
78
+ # git inotify-tools sox procps
79
79
80
- WORKDIR /test
80
+ # WORKDIR /test
81
81
82
- # Install Mycroft
83
- RUN git clone --single-branch --branch dev https://github.com/MycroftAI/mycroft-core.git
82
+ # # Install Mycroft
83
+ # RUN git clone --single-branch --branch dev https://github.com/MycroftAI/mycroft-core.git
84
84
85
- RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
86
- --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
87
- cd mycroft-core && \
88
- CI=true bash dev_setup.sh --allow-root -sm
85
+ # RUN --mount=type=cache,id=apt-run,target=/var/cache/apt \
86
+ # --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
87
+ # cd mycroft-core && \
88
+ # CI=true bash dev_setup.sh --allow-root -sm
89
89
90
- COPY wheels/ ./wheels/
90
+ # COPY wheels/ ./wheels/
91
91
92
- COPY --from=build /build/mimic3/dist/*.tar.gz ./dist/
93
-
94
- # Install TTS plugin
95
- RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
96
- mycroft-core/bin/mycroft-pip install --upgrade pip && \
97
- mycroft-core/bin/mycroft-pip install \
98
- -f wheels/ \
99
- -f https://synesthesiam.github.io/prebuilt-apps/ \
100
- -f dist/ \
101
- mycroft-plugin-tts-mimic3
102
-
103
- # Download default voice
104
- COPY voices/ /root/.local/share/mycroft/mimic3/voices/
105
- RUN mycroft-core/.venv/bin/mimic3-download --debug 'en_UK/apope_low'
106
-
107
- # Enable plugin
108
- RUN mkdir -p /root/.config/mycroft && \
109
- echo '{ "tts": { "module": "mimic3_tts_plug" , "mimic3_tts_plug": { "length_scale": 1.0, "noise_scale": 0.0, "noise_w": 0.0, "use_deterministic_compute": true } } }' \
110
- > /root/.config/mycroft/mycroft.conf
111
-
112
- # Run test
113
- COPY tests/* tests/
114
-
115
- ENV USER root
116
- ENV MIMIC_DIR /tmp/mycroft/cache/tts/Mimic3TTSPlugin
117
-
118
- # Start relevant services:
119
- # 1. Start message bus, wait for ready message in log (10 min timeout)
120
- # 2. Start audio service, wait for ready message in log (10 min timeout)
121
- # 3. Run mycroft-speak with sample text
122
- # 4. Watch cache directory for a file creation (10 min timeout)
123
- # 5. Copy first WAV file to known location
124
- RUN export timeout_sec='600' && \
125
- mycroft-core/bin/mycroft-start bus && \
126
- timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/bus.log | grep -iq 'message bus service started' && \
127
- echo 'Message bus started' && \
128
- mycroft-core/bin/mycroft-start audio && \
129
- timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/audio.log | grep -iq 'audio service is ready' && \
130
- echo 'Audio service started' && \
131
- xargs -a tests/apope_sample.txt mycroft-core/bin/mycroft-speak && \
132
- echo 'Speak request sent' && \
133
- mkdir -p "${MIMIC_DIR}" && \
134
- for i in $(seq 1 "${timeout_sec}"); do \
135
- wav_path="$(find "${MIMIC_DIR}" -name '*.wav' | head -n1)"; \
136
- if [ -n "${wav_path}" ]; then \
137
- mv "${wav_path}" tests/actual_sample.wav; \
138
- break; \
139
- fi; \
140
- sleep 1; \
141
- echo "${i}/${timeout_sec}: Looking for WAV file in ${MIMIC_DIR}"; \
142
- done
143
-
144
- # Check sample
145
- RUN export expected_sample="tests/apope_sample_${TARGETARCH}${TARGETVARIANT}.wav" && \
146
- tests/samples_match.py tests/actual_sample.wav "${expected_sample}"
92
+ # COPY --from=build /build/mimic3/dist/*.tar.gz ./dist/
93
+
94
+ # # Install TTS plugin
95
+ # RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
96
+ # mycroft-core/bin/mycroft-pip install --upgrade pip && \
97
+ # mycroft-core/bin/mycroft-pip install \
98
+ # -f wheels/ \
99
+ # -f https://synesthesiam.github.io/prebuilt-apps/ \
100
+ # -f dist/ \
101
+ # mycroft-plugin-tts-mimic3
102
+
103
+ # # Download default voice
104
+ # COPY voices/ /root/.local/share/mycroft/mimic3/voices/
105
+ # RUN mycroft-core/.venv/bin/mimic3-download --debug 'en_UK/apope_low'
106
+
107
+ # # Enable plugin
108
+ # RUN mkdir -p /root/.config/mycroft && \
109
+ # echo '{ "tts": { "module": "mimic3_tts_plug" , "mimic3_tts_plug": { "length_scale": 1.0, "noise_scale": 0.0, "noise_w": 0.0, "use_deterministic_compute": true } } }' \
110
+ # > /root/.config/mycroft/mycroft.conf
111
+
112
+ # # Run test
113
+ # COPY tests/* tests/
114
+
115
+ # ENV USER root
116
+ # ENV MIMIC_DIR /tmp/mycroft/cache/tts/Mimic3TTSPlugin
117
+
118
+ # # Start relevant services:
119
+ # # 1. Start message bus, wait for ready message in log (10 min timeout)
120
+ # # 2. Start audio service, wait for ready message in log (10 min timeout)
121
+ # # 3. Run mycroft-speak with sample text
122
+ # # 4. Watch cache directory for a file creation (10 min timeout)
123
+ # # 5. Copy first WAV file to known location
124
+ # RUN export timeout_sec='600' && \
125
+ # mycroft-core/bin/mycroft-start bus && \
126
+ # timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/bus.log | grep -iq 'message bus service started' && \
127
+ # echo 'Message bus started' && \
128
+ # mycroft-core/bin/mycroft-start audio && \
129
+ # timeout "${timeout_sec}" tail -n+0 -f /var/log/mycroft/audio.log | grep -iq 'audio service is ready' && \
130
+ # echo 'Audio service started' && \
131
+ # xargs -a tests/apope_sample.txt mycroft-core/bin/mycroft-speak && \
132
+ # echo 'Speak request sent' && \
133
+ # mkdir -p "${MIMIC_DIR}" && \
134
+ # for i in $(seq 1 "${timeout_sec}"); do \
135
+ # wav_path="$(find "${MIMIC_DIR}" -name '*.wav' | head -n1)"; \
136
+ # if [ -n "${wav_path}" ]; then \
137
+ # mv "${wav_path}" tests/actual_sample.wav; \
138
+ # break; \
139
+ # fi; \
140
+ # sleep 1; \
141
+ # echo "${i}/${timeout_sec}: Looking for WAV file in ${MIMIC_DIR}"; \
142
+ # done
143
+
144
+ # # Check sample
145
+ # RUN export expected_sample="tests/apope_sample_${TARGETARCH}${TARGETVARIANT}.wav" && \
146
+ # tests/samples_match.py tests/actual_sample.wav "${expected_sample}"
147
147
148
148
# RUN --mount=type=cache,id=pip-requirements,target=/root/.cache/pip \
149
149
# mkdir -p pip && \
@@ -156,8 +156,8 @@ ARG TARGETARCH
156
156
ARG TARGETVARIANT
157
157
158
158
# Ensure test runs
159
- COPY --from=test /test/tests/actual_sample.wav "/apope_sample_${TARGETARCH}${TARGETVARIANT}.wav"
160
- COPY --from=test /var/log/mycroft/audio.log ./
159
+ # COPY --from=test /test/tests/actual_sample.wav "/apope_sample_${TARGETARCH}${TARGETVARIANT}.wav"
160
+ # COPY --from=test /var/log/mycroft/audio.log ./
161
161
162
162
COPY --from=build /build/mimic3/plugin-tts-mimic3/dist/*.tar.gz ./
163
163
0 commit comments