乐谱xml文件转为VOCALOID3的输入文件格式vsqx

2021-01-14 10:02:07 浏览数 (1)

乐谱xml文件转为VOCALOID3的输入文件格式vsqx

using

代码语言:javascript复制
python3 xml2vsqx.py  xmlpy_out_dir  vsqx_out_dir

代码语言:javascript复制
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# __author__ = "errrolyan"
# Date: 18-10-16
# Describe = "乐谱xml文件转为VOCALOID3的输入文件格式vsqx”

import os,re,sys
import os.path
import xml.etree.ElementTree as ET
from xml.etree.ElementTree import Element
import xml.dom.minidom

def read_dic():
    dictpath = "./dic/zh_CN.dict"
    dic = {}
    with open(dictpath,"r") as Rdic:
        for i in  Rdic:
            list = i.split("		")
            dic[list[0]]= list[1]
    return dic

def coverFiles(sourceDir,  targetDir):
    for files in os.listdir(targetDir):
        filepath = os.path.join(targetDir,files)
        os.remove(filepath)
    for file in os.listdir(sourceDir):
        sourceFile = os.path.join(sourceD

0 人点赞