1
0
piper/Makefile

25 wiersze
802 B
Makefile

PATH:=./piper:$(PATH)
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
complete: $(MP3_FILES)
echo $@ $^
$(WAV_FILES): %.wav: %.txt
cat $^ | piper -m $(MODEL) -c $(CONFIG) -f $@
$(MP3_FILES): %.mp3: %.wav
ffmpeg -y -i $^ $@
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"