36 lines
1.0 KiB
Makefile
36 lines
1.0 KiB
Makefile
|
|
PATH:=./piper:$(PATH)
|
|
|
|
TXT_FILES := $(patsubst %.raw,%.txt,$(wildcard *.raw))
|
|
WAV_FILES := $(patsubst %.txt,%.wav,$(wildcard *.txt))
|
|
MP3_FILES := $(patsubst %.txt,%.mp3,$(wildcard *.txt))
|
|
|
|
MODEL=en_GB-alan-medium.onnx
|
|
CONFIG=en_GB-alan-medium.onnx.json
|
|
|
|
# MODEL=en_GB-aru-medium.onnx
|
|
# CONFIG=en_GB-aru-medium.onnx.json
|
|
|
|
# MODEL=en_GB-cori-high.onnx
|
|
# CONFIG=en_GB-cori-high.onnx.json
|
|
|
|
|
|
complete: $(TXT_FILES) $(MP3_FILES)
|
|
echo $@ $^
|
|
|
|
$(WAV_FILES): %.wav: %.txt
|
|
cat $^ | piper -m $(MODEL) -c $(CONFIG) -f $@
|
|
|
|
|
|
$(MP3_FILES): %.mp3: %.wav
|
|
ffmpeg -y -i $^ $@
|
|
|
|
$(TXT_FILES): %.txt: %.raw
|
|
./cleanfile $^ $@
|
|
|
|
|
|
install:
|
|
wget -O piper.tar "https://github.com/rhasspy/piper/releases/download/v1.2.0/piper_amd64.tar.gz"
|
|
tar xf piper.tar
|
|
wget -O en_GB-alan-medium.onnx "https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_GB/alan/medium/en_GB-alan-medium.onnx?download=true"
|
|
wget -O en_GB-alan-medium.onnx.json "https://huggingface.co/rhasspy/piper-voices/resolve/v1.0.0/en/en_GB/alan/medium/en_GB-alan-medium.onnx.json?download=true.json"
|