You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
703 B
24 lines
703 B
|
3 years ago
|
import pyjson5
|
||
|
|
import os
|
||
|
|
|
||
|
|
CUR_DIR = os.getcwd()
|
||
|
|
|
||
|
|
with open("./example-config.json") as input_f:
|
||
|
|
with open("./config.json", "w") as output_f:
|
||
|
|
lines = input_f.readlines()
|
||
|
|
data = ''.join(lines)
|
||
|
|
obj = pyjson5.loads(data)
|
||
|
|
|
||
|
|
audio = obj["audio"]
|
||
|
|
audio["stats_path"] = os.path.join(CUR_DIR, 'scale_stats.npy' )
|
||
|
|
|
||
|
|
#output_path = obj['output_path']
|
||
|
|
obj["output_path"] = os.path.join(CUR_DIR, 'models', 'LJSpeech')
|
||
|
|
|
||
|
|
#phoneme_path = obj['phoneme_cache_path']
|
||
|
|
obj["phoneme_cache_path"] = os.path.join(CUR_DIR, 'models', 'phoneme_cache')
|
||
|
|
|
||
|
|
obj["datasets"][0]["path"] = os.path.join(CUR_DIR)
|
||
|
|
|
||
|
|
output_f.write(pyjson5.dumps(obj))
|