forked from rhasspy/rhasspy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.in
541 lines (426 loc) · 19.5 KB
/
Makefile.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
# Makefile.in
#
# Copyright © 2012, 2013 Brandon Invergo <brandon@invergo.net>
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
# List whatever files you want to include in your source distribution here.
# You can include whole directories but note that *everything* under that
# directory will be included
DISTFILES = PKG-INFO Makefile.in configure setup.py install-sh
DESTDIR =
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
PACKAGE_NAME = @PACKAGE_NAME@
PACKAGE_STRING = @PACKAGE_STRING@
PACKAGE_TARNAME = @PACKAGE_TARNAME@
PACKAGE_DISTNAME = ${PACKAGE_NAME}-${PACKAGE_VERSION}
PACKAGE_URL = @PACKAGE_URL@
PACKAGE_VERSION = @PACKAGE_VERSION@
PATH_SEPARATOR = @PATH_SEPARATOR@
PYTHON = @PYTHON@
VIRTUALENV = @VIRTUALENV@
SHELL = @SHELL@
MKDIR_P = @MKDIR_P@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
exec_prefix = @exec_prefix@
includedir = @includedir@
infodir = @infodir@
prefix = @prefix@
srcdir = @abs_srcdir@
datadir = @datadir@
datarootdir = @datarootdir@
pkgdatadir = $(datadir)/@PACKAGE_NAME@
pkgincludedir = $(includedir)/@PACKAGE_NAME@
# -----------------------------------------------------------------------------
# Dependencies
# -----------------------------------------------------------------------------
IN_PLACE = @IN_PLACE@
BUILD_DIR ?= $(srcdir)/build
DOWNLOAD_DIR ?= $(srcdir)/download
DO_DOWNLOAD ?= curl --silent --show-error --fail --location --create-dirs --output
DOCKER_ARCH = @DOCKER_ARCH@
ifeq ($(DOCKER_ARCH),amd64)
PYTHON_LINUX=manylinux1
else # DOCKER_ARCH == x86_64
PYTHON_LINUX=linux
endif # DOCKER_ARCH == x86_64
ENABLE_OPENGRM = @ENABLE_OPENGRM@
OPENGRM_ARCH = @OPENGRM_ARCH@
OPENGRM_FROM = @OPENGRM_FROM@
OPENGRM_PRE_FILE = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/opengrm-1.3.4_$(DOCKER_ARCH).tar.gz
OPENGRM_SRC_FILE = $(DOWNLOAD_DIR)/source/opengrm-ngram-1.3.4.tar.gz
OPENFST_SRC_FILE = $(DOWNLOAD_DIR)/source/openfst-1.6.9.tar.gz
ENABLE_PHONETISAURUS = @ENABLE_PHONETISAURUS@
PHONETISAURUS_FROM = @PHONETISAURUS_FROM@
PHONETISAURUS_PRE_FILE = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/phonetisaurus-2019_$(DOCKER_ARCH).tar.gz
PHONETISAURUS_SRC_FILE = $(DOWNLOAD_DIR)/source/phonetisaurus-2019.tar.gz
ENABLE_PRECISE = @ENABLE_PRECISE@
PRECISE_ARCH = @PRECISE_ARCH@
PRECISE_FROM = @PRECISE_FROM@
PRECISE_FILE = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/precise-engine_0.3.0_$(DOCKER_ARCH).tar.gz
ENABLE_POCKETSPHINX = @ENABLE_POCKETSPHINX@
POCKETSPHINX_FILE = $(DOWNLOAD_DIR)/shared/pocketsphinx-python.tar.gz
POCKETSPHINX_FROM_SRC ?= yes
ENABLE_KALDI = @ENABLE_KALDI@
KALDI_FROM = @KALDI_FROM@
KALDI_PRE_FILE = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/kaldi-2021_$(DOCKER_ARCH).tar.gz
KALDI_SRC_FILE = $(DOWNLOAD_DIR)/source/kaldi-2021.tar.gz
ENABLE_JULIUS = @ENABLE_JULIUS@
JULIUS_FROM = @JULIUS_FROM@
JULIUS_PRE_FILE = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/julius-4.5_$(DOCKER_ARCH).tar.gz
JULIUS_SRC_FILE = $(DOWNLOAD_DIR)/source/julius-2019.tar.gz
ENABLE_DEEPSPEECH = @ENABLE_DEEPSPEECH@
DEEPSPEECH_ARCH = @DEEPSPEECH_ARCH@
DEEPSPEECH_FROM = @DEEPSPEECH_FROM@
DEEPSPEECH_FILE = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/native_client.$(DOCKER_ARCH).cpu.linux.0.9.3.tar.xz
ENABLE_KENLM = @ENABLE_KENLM@
KENLM_FROM = @KENLM_FROM@
KENLM_PRE_FILE = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/kenlm-20210107_$(DOCKER_ARCH).tar.gz
EIGEN_SRC_FILE = $(DOWNLOAD_DIR)/source/eigen-3.2.8.tar.bz2
KENLM_SRC_FILE = $(DOWNLOAD_DIR)/source/kenlm-20210107.tar.gz
ENABLE_NANOTTS = @ENABLE_NANOTTS@
NANOTTS_FROM = @NANOTTS_FROM@
NANOTTS_PRE_FILE = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/nanotts-20200520_$(DOCKER_ARCH).tar.gz
NANOTTS_SRC_FILE = $(DOWNLOAD_DIR)/source/nanotts-20200520.tar.gz
ENABLE_SNOWBOY = @ENABLE_SNOWBOY@
SNOWBOY_FILE = $(DOWNLOAD_DIR)/shared/snowboy-1.3.0.tar.gz
ENABLE_SNIPS = @ENABLE_SNIPS@
SNIPS_LANG_DIR = $(srcdir)/rhasspy-snips-nlu/etc/languages
ENABLE_LARYNX = @ENABLE_LARYNX@
LARYNX_ARCH = @LARYNX_ARCH@
PHONETISAURUS_WHEEL = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/phonetisaurus-0.3.0-py3-none-$(PYTHON_LINUX)_$(LARYNX_ARCH).whl
ONNXRUNTIME_WHEEL = $(DOWNLOAD_DIR)/${DOCKER_ARCH}/onnxruntime-1.6.0-cp37-cp37m-linux_armv7l.whl
NUM2WORDS_FILE = $(DOWNLOAD_DIR)/shared/num2words_0.5.10-sv.tar.gz
ENABLE_RAVEN = @ENABLE_RAVEN@
# -----------------------------------------------------------------------------
VENV_DIR = $(DESTDIR)$(prefix)
VENV_PYTHON = $(VENV_DIR)/bin/python
VIRTUALENV_FLAGS ?= --clear
PIP_VERSION ?= pip<=20.2.4
ifeq ($(VIRTUALENV),yes)
INSTALL_PYTHON=$(VENV_PYTHON)
else # VIRTUALENV == yes
INSTALL_PYTHON=$(PYTHON)
endif # VIRTUALENV == yes
.PHONY: all install uninstall distclean clean dist check installdirs
all: download-init build-init opengrm phonetisaurus precise pocketsphinx kaldi julius snowboy deepspeech kenlm nanotts
.PHONY: install-init install-dependencies install-rhasspy
install: installdirs \
install-init \
install-dependencies \
install-rhasspy
install-init:
ifeq ($(VIRTUALENV),yes)
"$(PYTHON)" -m venv $(VIRTUALENV_FLAGS) "$(VENV_DIR)" || "$(PYTHON)" -m venv "$(VENV_DIR)"
"$(VENV_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) --upgrade "$(PIP_VERSION)"
"$(VENV_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) wheel || true
"$(VENV_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) setuptools
"$(VENV_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) cython
endif # VIRTUALENV == yes
if [[ -n "$(PIP_PRE_PREINSTALL_PACKAGES)" ]]; then "$(INSTALL_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) $(PIP_PRE_PREINSTALL_PACKAGES); fi
if [[ -n "$(PIP_PREINSTALL_PACKAGES)" ]]; then "$(INSTALL_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) $(PIP_PREINSTALL_PACKAGES); fi
.PHONY: install-opengrm install-phonetisaurus install-precise install-pocketsphinx install-kaldi install-julius install-snowboy install-deepspeech install-kenlm install-nanotts install-larynx
install-dependencies: install-opengrm \
install-phonetisaurus \
install-precise \
install-pocketsphinx \
install-kaldi \
install-julius \
install-snowboy \
install-deepspeech \
install-kenlm \
install-nanotts \
install-larynx \
install-num2words
install-rhasspy: install-larynx
ifeq ($(ENABLE_SNIPS),yes)
"$(INSTALL_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) setuptools_rust
endif # ENABLE_SNIPS
"$(INSTALL_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) "$(srcdir)"
"$(INSTALL_PYTHON)" -m pip uninstall --yes enum34
ifeq ($(ENABLE_SNIPS),yes)
"$(INSTALL_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) "$(SNIPS_LANG_DIR)"/*.tar.gz
for lang in de en es fr it ja ko pt_br pt_pt zh; do \
"$(INSTALL_PYTHON)" -m snips_nlu download "$${lang}"; \
done
endif # ENABLE_SNIPS
ifeq ($(ENABLE_RAVEN),yes)
ifeq ($(IN_PLACE),yes)
cd "$(srcdir)/rhasspy-wake-raven" && \
"$(INSTALL_PYTHON)" setup.py build_ext --inplace
endif # IN_PLACE
endif # ENABLE_RAVEN
chmod +x "${srcdir}/rhasspy.sh"
ifneq ($(IN_PLACE),yes)
install -D "${srcdir}/rhasspy.sh" "$(DESTDIR)$(prefix)/bin/rhasspy"
install -D "--target-directory=$(DESTDIR)$(prefix)/bin" "${srcdir}/bin/rhasspy-voltron" "${srcdir}/bin/voltron-run" || true
install -D "--target-directory=$(DESTDIR)$(prefix)/share/rhasspy/etc" "${srcdir}/etc/shflags"
install -D "--target-directory=$(DESTDIR)$(prefix)/share/rhasspy/etc/wav" "${srcdir}/etc/wav"/*.wav
install -D "--target-directory=$(DESTDIR)$(prefix)/share/rhasspy" VERSION README.md LICENSE
cp -fR "${srcdir}/rhasspy-server-hermes/web" "$(DESTDIR)$(prefix)/share/rhasspy/"
cp -fR "${srcdir}/rhasspy-server-hermes/templates" "$(DESTDIR)$(prefix)/share/rhasspy/"
cp -fR "${srcdir}/rhasspy-server-hermes/web/docs" "$(DESTDIR)$(prefix)/share/rhasspy/" || true
endif # not IN_PLACE
# -----------------------------------------------------------------------------
.PHONY: download-init
download-init:
$(MKDIR_P) "$(DOWNLOAD_DIR)/${DOCKER_ARCH}"
.PHONY: build-init
build-init:
$(MKDIR_P) "$(BUILD_DIR)"
# -----------------------------------------------------------------------------
# num2words: convert numbers to words
# https://github.com/rhasspy/num2words
# Credit: https://github.com/savoirfairelinux/num2words
# -----------------------------------------------------------------------------
.PHONY: install-num2words
install-num2words: $(NUM2WORDS_FILE)
"$(INSTALL_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) "$(NUM2WORDS_FILE)"
$(NUM2WORDS_FILE):
$(DO_DOWNLOAD) "$(NUM2WORDS_FILE)" 'https://github.com/rhasspy/num2words/archive/v0.5.10-sv.tar.gz'
# -----------------------------------------------------------------------------
# Opengrm: languge modeling toolkit
# http://www.opengrm.org/twiki/bin/view/GRM/NGramLibrary
# -----------------------------------------------------------------------------
.PHONY: opengrm
ifeq ($(ENABLE_OPENGRM),yes)
opengrm: $(OPENGRM_PRE_FILE)
install-opengrm: $(OPENGRM_PRE_FILE)
"$(srcdir)/scripts/install/install-opengrm.sh" "$(OPENGRM_PRE_FILE)" "$(DESTDIR)$(prefix)"
ifeq ($(OPENGRM_FROM),prebuilt)
$(OPENGRM_PRE_FILE):
$(DO_DOWNLOAD) "$(OPENGRM_PRE_FILE)" "https://github.com/synesthesiam/prebuilt-apps/releases/download/v1.0/opengrm-1.3.4_$(DOCKER_ARCH).tar.gz"
else # OPENGRM_FROM
$(OPENGRM_PRE_FILE): $(OPENFST_SRC_FILE) $(OPENGRM_SRC_FILE)
"$(srcdir)/scripts/build/build-opengrm.sh" "$(OPENGRM_SRC_FILE)" "$(OPENFST_SRC_FILE)" "$(BUILD_DIR)" "$(OPENGRM_PRE_FILE)"
endif # OPENGRM_FROM
else # ENABLE_OPENGRM
opengrm:
install-opengrm:
endif # ENABLE_OPENGRM
$(OPENFST_SRC_FILE):
$(DO_DOWNLOAD) "$(OPENFST_SRC_FILE)" 'http://www.openfst.org/twiki/pub/FST/FstDownload/openfst-1.6.9.tar.gz'
$(OPENGRM_SRC_FILE):
$(DO_DOWNLOAD) "$(OPENGRM_SRC_FILE)" 'http://www.opengrm.org/twiki/pub/GRM/NGramDownload/opengrm-ngram-1.3.4.tar.gz'
# -----------------------------------------------------------------------------
# Phonetisaurus: grapheme to phoneme
# https://github.com/AdolfVonKleist/Phonetisaurus
# -----------------------------------------------------------------------------
.PHONY: phonetisaurus
ifeq ($(ENABLE_PHONETISAURUS),yes)
phonetisaurus: $(PHONETISAURUS_PRE_FILE)
install-phonetisaurus: $(PHONETISAURUS_PRE_FILE)
"$(srcdir)/scripts/install/install-phonetisaurus.sh" "$(PHONETISAURUS_PRE_FILE)" "$(DESTDIR)$(prefix)"
ifeq ($(PHONETISAURUS_FROM),prebuilt)
$(PHONETISAURUS_PRE_FILE):
$(DO_DOWNLOAD) "$(PHONETISAURUS_PRE_FILE)" "https://github.com/synesthesiam/prebuilt-apps/releases/download/v1.0/phonetisaurus-2019_$(DOCKER_ARCH).tar.gz"
else # PHONETISAURUS_FROM
$(PHONETISAURUS_PRE_FILE): $(OPENFST_SRC_FILE) $(PHONETISAURUS_SRC_FILE)
"$(srcdir)/scripts/build/build-phonetisaurus.sh" "$(PHONETISAURUS_SRC_FILE)" "$(OPENFST_SRC_FILE)" "$(BUILD_DIR)" "$(PHONETISAURUS_PRE_FILE)"
endif # PHONETISAURUS_FROM
else # ENABLE_PHONETISAURUS
phonetisaurus:
install-phonetisaurus:
endif # ENABLE_PHONETISAURUS
$(PHONETISAURUS_SRC_FILE):
$(DO_DOWNLOAD) "$(PHONETISAURUS_SRC_FILE)" 'https://github.com/synesthesiam/prebuilt-apps/raw/master/download/phonetisaurus-2019.tar.gz'
# -----------------------------------------------------------------------------
# Mycroft Precise: wake word detection
# https://github.com/MycroftAI/mycroft-precise
# -----------------------------------------------------------------------------
.PHONY: precise install-precise
ifeq ($(ENABLE_PRECISE),yes)
precise: $(PRECISE_FILE)
install-precise: $(PRECISE_FILE)
"$(srcdir)/scripts/install/install-precise.sh" "$(PRECISE_FILE)" "$(DESTDIR)$(prefix)"
else # ENABLE_PRECISE
precise:
install-precise:
endif # ENABLE_PRECISE
$(PRECISE_FILE):
$(DO_DOWNLOAD) "$(PRECISE_FILE)" "https://github.com/MycroftAI/mycroft-precise/releases/download/v0.3.0/precise-engine_0.3.0_$(PRECISE_ARCH).tar.gz"
# -----------------------------------------------------------------------------
# Snowboy: wake word detection
# https://snowboy.kitt.ai
# -----------------------------------------------------------------------------
.PHONY: snowboy install-snowboy
ifeq ($(ENABLE_SNOWBOY),yes)
snowboy: $(SNOWBOY_FILE)
install-snowboy: $(SNOWBOY_FILE)
"$(INSTALL_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) "$(SNOWBOY_FILE)"
else # ENABLE_SNOWBOY
snowboy:
install-snowboy:
endif # ENABLE_SNOWBOY
$(SNOWBOY_FILE):
$(DO_DOWNLOAD) "$(SNOWBOY_FILE)" 'https://github.com/Kitt-AI/snowboy/archive/v1.3.0.tar.gz'
# -----------------------------------------------------------------------------
# CMU Pocketsphinx: speech to text
# https://github.com/cmusphinx/pocketsphinx
# -----------------------------------------------------------------------------
.PHONY: pocketsphinx install-pocketsphinx
ifeq ($(ENABLE_POCKETSPHINX)x$(POCKETSPHINX_FROM_SRC),yesxyes)
pocketsphinx: $(POCKETSPHINX_FILE)
install-pocketsphinx: $(POCKETSPHINX_FILE)
"$(INSTALL_PYTHON)" -m pip install $(PIP_INSTALL_ARGS) "$(POCKETSPHINX_FILE)"
else # ENABLE_POCKETSPHINX
pocketsphinx:
install-pocketsphinx:
endif # ENABLE_POCKETSPHINX
$(POCKETSPHINX_FILE):
$(DO_DOWNLOAD) "$(POCKETSPHINX_FILE)" 'https://github.com/synesthesiam/pocketsphinx-python/releases/download/v1.0/pocketsphinx-python.tar.gz'
# -----------------------------------------------------------------------------
# Kaldi: speech to text
# https://kaldi-asr.org
# -----------------------------------------------------------------------------
.PHONY: kaldi
ifeq ($(ENABLE_KALDI),yes)
kaldi: $(KALDI_PRE_FILE)
install-kaldi: $(KALDI_PRE_FILE)
"$(srcdir)/scripts/install/install-kaldi.sh" "$(KALDI_PRE_FILE)" "$(DESTDIR)$(prefix)"
ifeq ($(KALDI_FROM),prebuilt)
$(KALDI_PRE_FILE):
$(DO_DOWNLOAD) "$(KALDI_PRE_FILE)" "https://github.com/synesthesiam/prebuilt-apps/releases/download/v1.0/kaldi-2021_$(DOCKER_ARCH).tar.gz"
else # KALDI_FROM
$(KALDI_PRE_FILE): $(KALDI_SRC_FILE)
"$(srcdir)/scripts/build/build-kaldi.sh" "$(KALDI_SRC_FILE)" "$(BUILD_DIR)" "$(KALDI_PRE_FILE)"
endif # KALDI_FROM
else # ENABLE_KALDI
kaldi:
install-kaldi:
endif # ENABLE_KALDI
$(KALDI_SRC_FILE):
$(DO_DOWNLOAD) "$(KALDI_SRC_FILE)" 'https://github.com/synesthesiam/docker-kaldi/raw/master/download/kaldi-2021.tar.gz'
# -----------------------------------------------------------------------------
# Julius: speech to text
# https://github.com/julius-speech/julius
# -----------------------------------------------------------------------------
.PHONY: julius
ifeq ($(ENABLE_JULIUS),yes)
julius: $(JULIUS_PRE_FILE)
install-julius: $(JULIUS_PRE_FILE)
"$(srcdir)/scripts/install/install-julius.sh" "$(JULIUS_PRE_FILE)" "$(DESTDIR)$(prefix)"
ifeq ($(JULIUS_FROM),prebuilt)
$(JULIUS_PRE_FILE):
$(DO_DOWNLOAD) "$(JULIUS_PRE_FILE)" "https://github.com/synesthesiam/prebuilt-apps/releases/download/v1.0/julius-4.5_$(DOCKER_ARCH).tar.gz"
else # JULIUS_FROM
$(JULIUS_PRE_FILE): $(JULIUS_SRC_FILE)
"$(srcdir)/scripts/build/build-julius.sh" "$(JULIUS_SRC_FILE)" "$(BUILD_DIR)" "$(JULIUS_PRE_FILE)"
endif # JULIUS_FROM
else # ENABLE_JULIUS
julius:
install-julius:
endif # ENABLE_JULIUS
$(JULIUS_SRC_FILE):
$(DO_DOWNLOAD) "$(JULIUS_SRC_FILE)" 'https://github.com/synesthesiam/prebuilt-apps/raw/master/download/julius-2019.tar.gz'
# -----------------------------------------------------------------------------
# Mozilla DeepSpeech: speech to text
# https://github.com/mozilla/DeepSpeech
# -----------------------------------------------------------------------------
.PHONY: deepspeech install-deepspeech
ifeq ($(ENABLE_DEEPSPEECH),yes)
deepspeech: $(DEEPSPEECH_FILE)
install-deepspeech: $(DEEPSPEECH_FILE)
"$(srcdir)/scripts/install/install-deepspeech.sh" "$(DEEPSPEECH_FILE)" "$(DESTDIR)$(prefix)"
else # ENABLE_DEEPSPEECH
deepspeech:
install-deepspeech:
endif # ENABLE_DEEPSPEECH
$(DEEPSPEECH_FILE):
$(DO_DOWNLOAD) "$(DEEPSPEECH_FILE)" "https://github.com/mozilla/DeepSpeech/releases/download/v0.9.3/native_client.$(DEEPSPEECH_ARCH).cpu.linux.tar.xz"
# -----------------------------------------------------------------------------
# KenLM: language modeling toolkit
# https://kheafield.com/code/kenlm/
# -----------------------------------------------------------------------------
.PHONY: kenlm install-kenlm
ifeq ($(ENABLE_KENLM),yes)
kenlm: $(KENLM_PRE_FILE)
ifeq ($(KENLM_FROM),prebuilt)
$(KENLM_PRE_FILE):
$(DO_DOWNLOAD) "$(KENLM_PRE_FILE)" "https://github.com/synesthesiam/prebuilt-apps/releases/download/v1.0/kenlm-20210107_$(DOCKER_ARCH).tar.gz"
else # KENLM_FROM
$(KENLM_PRE_FILE): $(EIGEN_SRC_FILE) $(KENLM_SRC_FILE)
"$(srcdir)/scripts/build/build-kenlm.sh" "$(KENLM_SRC_FILE)" "$(EIGEN_SRC_FILE)" "$(BUILD_DIR)" "$(KENLM_PRE_FILE)"
endif # KENLM_FROM
install-kenlm: $(KENLM_PRE_FILE)
"$(srcdir)/scripts/install/install-kenlm.sh" "$(KENLM_PRE_FILE)" "$(DESTDIR)$(prefix)"
else # ENABLE_KENLM
kenlm:
install-kenlm:
endif # ENABLE_KENLM
$(KENLM_SRC_FILE):
$(DO_DOWNLOAD) "$(KENLM_SRC_FILE)" 'https://github.com/synesthesiam/prebuilt-apps/raw/master/download/kenlm-20200308.tar.gz'
$(EIGEN_SRC_FILE):
$(DO_DOWNLOAD) "$(EIGEN_SRC_FILE)" 'https://github.com/synesthesiam/prebuilt-apps/raw/master/download/eigen-3.2.8.tar.bz2'
# -----------------------------------------------------------------------------
# nanoTTS: text to speech
# https://github.com/gmn/nanotts
# -----------------------------------------------------------------------------
.PHONY: nanotts
ifeq ($(ENABLE_NANOTTS),yes)
nanotts: $(NANOTTS_PRE_FILE)
install-nanotts: $(NANOTTS_PRE_FILE)
"$(srcdir)/scripts/install/install-nanotts.sh" "$(NANOTTS_PRE_FILE)" "$(DESTDIR)$(prefix)"
ifeq ($(NANOTTS_FROM),prebuilt)
$(NANOTTS_PRE_FILE):
$(DO_DOWNLOAD) "$(NANOTTS_PRE_FILE)" "https://github.com/synesthesiam/prebuilt-apps/releases/download/v1.0/nanotts-20200520_$(DOCKER_ARCH).tar.gz"
else # NANOTTS_FROM
$(NANOTTS_PRE_FILE): $(NANOTTS_SRC_FILE)
"$(srcdir)/scripts/build/build-nanotts.sh" "$(NANOTTS_SRC_FILE)" "$(BUILD_DIR)" "$(NANOTTS_PRE_FILE)"
endif # NANOTTS_FROM
else # ENABLE_NANOTTS
nanotts:
install-nanotts:
endif # ENABLE_NANOTTS
$(NANOTTS_SRC_FILE):
$(DO_DOWNLOAD) "$(NANOTTS_SRC_FILE)" 'https://github.com/synesthesiam/prebuilt-apps/raw/master/download/nanotts-20200520.tar.gz'
# -----------------------------------------------------------------------------
# Larynx: text to speech
# https://github.com/rhasspy/larynx
# -----------------------------------------------------------------------------
.PHONY: larynx
ifeq ($(ENABLE_LARYNX),yes)
larynx:
ifeq ($(LARYNX_ARCH),armv7)
install-larynx: $(PHONETISAURUS_WHEEL) $(ONNXRUNTIME_WHEEL)
else # LARYNX_ARCH == armv7
install-larynx: $(PHONETISAURUS_WHEEL)
endif # LARYNX_ARCH == armv7
$(PHONETISAURUS_WHEEL):
$(DO_DOWNLOAD) "$(PHONETISAURUS_WHEEL)" "https://github.com/rhasspy/phonetisaurus-pypi/releases/download/v0.3.0/phonetisaurus-0.3.0-py3-none-$(PYTHON_LINUX)_$(LARYNX_ARCH).whl"
$(ONNXRUNTIME_WHEEL):
$(DO_DOWNLOAD) "$(ONNXRUNTIME_WHEEL)" "https://github.com/synesthesiam/prebuilt-apps/releases/download/v1.0/onnxruntime-1.6.0-cp37-cp37m-linux_armv7l.whl"
else # ENABLE_LARYNX
larynx:
install-larynx:
endif # ENABLE_LARYNX
# -----------------------------------------------------------------------------
uninstall:
ifeq ($(VIRTUALENV),yes)
rm -rvf "$(VENV_DIR)"
endif
# Delete downloaded binaries and build artifacts
clean:
"$(PYTHON)" setup.py clean
rm -rvf "$(BUILD_DIR)"
# Clean up the output of configure
distclean:
rm -v "$(srcdir)/config.log"
rm -v "$(srcdir)/config.status"
rm -rvf "$(srcdir)/autom4te.cache"
rm -v "$(srcdir)/Makefile"
# You can either use the setup.py sdist command or you can roll your own here
dist:
"$(PYTHON)" setup.py sdist
# Use the setup.py check command
check:
"$(PYTHON)" setup.py check
# setup.py might complain if a directory doesn't exist so just in case, make the directory
# here
installdirs:
$(MKDIR_P) "$(DESTDIR)$(prefix)"