-
Notifications
You must be signed in to change notification settings - Fork 85
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9b18c02
commit 64c1553
Showing
6 changed files
with
199 additions
and
375 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,10 @@ | ||
.PHONY: release release-windows test python python-test docker docker-windows | ||
.PHONY: clean | ||
|
||
LIB_DIR := lib/Linux-$(shell uname -m) | ||
DOCKER_PLATFORM ?= linux/amd64,linux/arm64,linux/arm/v7 | ||
VENV ?= .venv | ||
all: | ||
cmake -Bbuild -DCMAKE_INSTALL_PREFIX=install | ||
cmake --build build --config Release | ||
cd build && ctest --config Release | ||
cmake --install install | ||
|
||
release: | ||
mkdir -p build | ||
cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make | ||
cp -a espeak-ng/build/lib/libespeak*.so* build/ | ||
cp -R espeak-ng/build/share/espeak-ng-data build/ | ||
cp -a $(LIB_DIR)/onnxruntime/lib/libonnxruntime*.so* build/ | ||
cp etc/libtashkeel_model.ort build/ | ||
|
||
release-windows: | ||
mkdir -p build | ||
cd build && cmake .. -DCMAKE_BUILD_TYPE=Release && make | ||
cp -a espeak-ng/build_windows/lib/libespeak*.dll build/ | ||
cp -R espeak-ng/build/share/espeak-ng-data build/ | ||
cp -a $(LIB_DIR)/onnxruntime/lib/libonnxruntime*.dll build/ | ||
cp etc/libtashkeel_model.ort build/ | ||
|
||
test: | ||
g++ -Wall -o test -Iespeak-ng/build/include -Lespeak-ng/build/lib -I$(LIB_DIR)/onnxruntime/include -L$(LIB_DIR)/onnxruntime/lib -Isrc -std=c++17 src/test.cpp src/phonemize.cpp src/phoneme_ids.cpp src/tashkeel.cpp src/shared.cpp -lespeak-ng -lonnxruntime | ||
LD_LIBRARY_PATH="espeak-ng/build/lib:$(LIB_DIR)/onnxruntime/lib:${LD_LIBRARY_PATH}" ./test 'espeak-ng/build/share/espeak-ng-data' | ||
|
||
python: | ||
cp -R espeak-ng/build/share/espeak-ng-data piper_phonemize/ | ||
cp etc/libtashkeel_model.ort piper_phonemize/ | ||
LD_LIBRARY_PATH="espeak-ng/build/lib:${LD_LIBRARY_PATH}" "$(VENV)/bin/pip3" install -e . | ||
|
||
python-test: | ||
LD_LIBRARY_PATH="espeak-ng/build/lib:$(LIB_DIR)/onnxruntime/lib:${LD_LIBRARY_PATH}" "$(VENV)/bin/python3" src/python_test.py | ||
|
||
python-wheel: | ||
cp -R espeak-ng/build/share/espeak-ng-data piper_phonemize/ | ||
cp etc/libtashkeel_model.ort piper_phonemize/ | ||
LD_LIBRARY_PATH="espeak-ng/build/lib:${LD_LIBRARY_PATH}" "$(VENV)/bin/python3" setup.py bdist_wheel | ||
|
||
docker: | ||
docker buildx build . --platform "$(DOCKER_PLATFORM)" --output 'type=local,dest=dist' | ||
|
||
docker-windows: | ||
docker buildx build . -f Dockerfile.windows --output 'type=local,dest=dist/windows_amd64' | ||
clean: | ||
rm -rf build install |
Submodule espeak-ng
deleted from
6fd183
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.