piper: ValueError: n must be at least one
Hello there,
Following the instructions in Training.md those commands had been used as described in the file in the cloned piper local folder:
cd piper/src/python
python3 -m venv .venv
source .venv/bin/activate
pip3 install --upgrade pip
pip3 install --upgrade wheel setuptools
pip3 install -e .
I got the following error executing the preprocess command:
python3 -m piper_train.preprocess --language bg --input-dir /Projects/TTS/test/ --output-dir /Projects/TTS/test/output/ --dataset-format ljspeech --single-speaker --sample-rate 22050
INFO:preprocess:Single speaker dataset
INFO:preprocess:Wrote dataset config
INFO:preprocess:Processing 11 utterance(s) with 20 worker(s)
Traceback (most recent call last):
File "/usr/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Projects/Python/piper/src/python/piper_train/preprocess.py", line 502, in <module>
main()
File "/Projects/Python/piper/src/python/piper_train/preprocess.py", line 225, in main
for utt_batch in batched(
File "/Projects/Python/piper/src/python/piper_train/preprocess.py", line 491, in batched
raise ValueError("n must be at least one")
the metadata.csv is (the text is Cyrillic - Bulgarian):
wav/000.wav|male1|Одата Левски от цикъл Епопея на забравените на Иван Вазов.
wav/001.wav|male1|Този запис е направен за либриво.
wav/002.wav|male1|Всички записи за либривокс са обществено достояние.
wav/003.wav|male1|За повече информация или за участие като доброволец,
wav/004.wav|male1|моля посетете либривокс точка орг.
wav/005.wav|male1|ЛЕВСКИ
wav/006.wav|male1|Манастирът тесен за мойта душа е.
wav/007.wav|male1|Кога човек дойде тук да се покае, трябва да забрави греховния мир,
wav/008.wav|male1|да бяга съблазни и да търси мир.
wav/009.wav|male1|Мойта съвест инак днеска ми говори.
wav/010.wav|male1|Това расо черно, що нося отгоре, не ме помирява с тия небеса
metadata.csv is in /Projects/TTS/test/:
ls /Projects/TTS/test/
metadata.csv output wav
I’ll appreciate any comments/help.
Thank you Ivo
About this issue
- Original URL
- State: open
- Created 3 years ago
- Comments: 20
I have fixed problem on csv and added 1 parameter CSV should have format 2 column delimeter : 1|bin dokuz yüz otuz bir yılının ; altı aralık cuma sabahı|bin dokuz yüz otuz bir yılının ; altı aralık cuma sabahı
Why 2 same text on one column. The first parameter 1 means it points to wavs/1.wav file 2nd parameter points to text how to pronounce word. 3rd is exact word text.
Also if you so much cpu cores.You need to add parameter –max-workers 8 so batch_size wont be 0. There is bug on batch_size
Good catch. My dataset has smaller but long samples, so I set num workers to 1 and it worked just fine. I think it wouldn’t divide correctly with any higher