Spaces:
Sleeping
Sleeping
File size: 445 Bytes
c42fe7e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
# inference/ds_generator.py
import json
def build_ds_input(parsed, output_path):
inp = {
"text": parsed["lyrics"],
"note_seq": " ".join(parsed["notes"]),
"note_dur_seq": " ".join(str(d) for d in parsed["durations"]),
"is_slur_seq": " ".join(str(s) for s in parsed["is_slur_seq"]),
"input_type": "word"
}
with open(output_path, "w", encoding="utf-8") as f:
json.dump(inp, f, indent=2)
|