1 Star 0 Fork 0

九日九月/so-vits-svc

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
wav_upload.py 918 Bytes
一键复制 编辑 原始数据 按行查看 历史
magic-akari 提交于 2023-06-26 14:57 . chore: code cleanup by ruff fix
import argparse
import os
import shutil
from google.colab import files
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--type", type=str, required=True, help="type of file to upload")
args = parser.parse_args()
file_type = args.type
basepath = os.getcwd()
uploaded = files.upload() # 上传文件
assert(file_type in ['zip', 'audio'])
if file_type == "zip":
upload_path = "./upload/"
for filename in uploaded.keys():
#将上传的文件移动到指定的位置上
shutil.move(os.path.join(basepath, filename), os.path.join(upload_path, "userzip.zip"))
elif file_type == "audio":
upload_path = "./raw/"
for filename in uploaded.keys():
#将上传的文件移动到指定的位置上
shutil.move(os.path.join(basepath, filename), os.path.join(upload_path, filename))
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/licy6994/so-vits-svc.git
git@gitee.com:licy6994/so-vits-svc.git
licy6994
so-vits-svc
so-vits-svc
4.1-Stable

搜索帮助