一些为了label-studio写的脚本
- 开发测试使用,忽略即可
- 中间件
- 读取预定义的tsv文件,根据其中预定义的项目名称创建足够的项目,并返回项目id列表
- @Author:lovemefan
- 上传一个音频文件作为任务到指定项目
- 事实上上传的是一个路径,而非真实文件
- 可以携带预标记
- 可以根据本地文件自动获取文件持续时间
- 当前项目主入口文件
- 根据预定义tsv文件创建足够的项目并按照平均分配进行语料切割,上传到对应的项目中
- 详细参数参照文件内注释
-
项目配置文件,仓库内未给出,如要使用本项目,请自行定义
-
文件结构
-
class Config: URL = "string" -> label-studio地址 TOKEN = "string" -> 创建者的token PROJETCS_DESP = "string" -> 新建项目的详细描述(Nullable) LABEL_CONFIG = "string" -> xml格式的项目预定义config,参考label-studio官方文档 LOG_FILE = "string" -> 日志输出文件
- 创建并定义上述
config.py
文件
- 修改
main.py
文件中所示参数 - 在同级目录下创建需要新建的项目名称tsv文件
python main.py
等待执行完毕
- 修改
export.py
中所示参数 - 同级目录下创建包含项目id的tsv文件
python export.py
等待执行完毕