1
0

chore: setup tool and first 2 chapters

This commit is contained in:
xuu
2025-03-15 11:22:24 -06:00
commit c1804744bf
6 changed files with 2242 additions and 0 deletions

25
Makefile Normal file
View File

@@ -0,0 +1,25 @@
PATH:=./piper:$(PATH)
WAV_FILES := $(patsubst %.txt,%.wav,$(wildcard *.txt))
OGG_FILES := $(patsubst %.txt,%.ogg,$(wildcard *.txt))
MODEL=en_GB-alan-medium.onnx
CONFIG=en_GB-alan-medium.onnx.json
complete: $(OGG_FILES)
echo $@ $^
$(WAV_FILES): %.wav: %.txt
cat $^ | piper -m $(MODEL) -c $(CONFIG) -f $@
$(OGG_FILES): %.ogg: %.wav
ffmpeg -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"