Code to load available Piper voices

This commit is contained in:
Kovid Goyal
2024-09-02 11:59:00 +05:30
parent 4b565c124b
commit ec768af6db
3 changed files with 52 additions and 30 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ class PiperVoices(ReVendor):
if not lang_map:
raise SystemExit(f'Failed to read any piper voices from: {url}')
with open(self.output_file_path, 'w') as f:
json.dump(lang_map, f, indent=2, sort_keys=False)
json.dump({'version': 1, 'lang_map': lang_map}, f, indent=2, sort_keys=False)
def clean(self):
with suppress(FileNotFoundError):