rhasspy / piper

A fast, local neural text to speech system
https://rhasspy.github.io/piper-samples/
MIT License
6.46k stars 472 forks source link

KeyError: 'dataset' #205

Open magnusoverli opened 1 year ago

magnusoverli commented 1 year ago

On adding a custom voice, the Piper Addon in Home Assistant throws this error:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/usr/local/lib/python3.11/dist-packages/wyoming_piper/__main__.py", line 193, in <module>
    asyncio.run(main())
  File "/usr/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           ^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.11/dist-packages/wyoming_piper/__main__.py", line 131, in main
    custom_name = custom_config["dataset"]
                  ~~~~~~~~~~~~~^^^^^^^^^^^
KeyError: 'dataset'
[21:30:14] INFO: Service exited with code 1 (by signal 0)

The voice is recorded using Piper Recording Studio, and trained using the Pyhton Piper Train module. Exported to onnx as per the documentation here: https://github.com/rhasspy/piper/blob/master/TRAINING.md

I realize this may be too little data to draw a conclusion, but if anyone has a pointer in the right direction...

synesthesiam commented 1 year ago

I've just updated the preprocessing script to add the necessary pieces. You will need to add/merge these fields manually in to your config for now:

{
  "dataset": "<name of your voice>",
  "audio": {
    "quality": "<x_low/low/medium/high>"
  },
  "language": {
    "code": "<example: en_US>"
  }
}