{"id":13861665,"url":"https://github.com/oxygen-dioxide/dvfile","last_synced_at":"2025-04-11T18:38:17.635Z","repository":{"id":109861460,"uuid":"304341390","full_name":"oxygen-dioxide/dvfile","owner":"oxygen-dioxide","description":"A python library for reading and writing deepvocal dv file","archived":false,"fork":false,"pushed_at":"2021-01-14T10:28:45.000Z","size":1423,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-11-22T21:45:57.783Z","etag":null,"topics":["deepvocal","dv","midi","mido","music","music21","python","singing-synthesis"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/dvfile/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oxygen-dioxide.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-10-15T13:50:53.000Z","updated_at":"2024-03-19T20:21:03.000Z","dependencies_parsed_at":"2023-06-12T07:30:27.917Z","dependency_job_id":null,"html_url":"https://github.com/oxygen-dioxide/dvfile","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxygen-dioxide%2Fdvfile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxygen-dioxide%2Fdvfile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxygen-dioxide%2Fdvfile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oxygen-dioxide%2Fdvfile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oxygen-dioxide","download_url":"https://codeload.github.com/oxygen-dioxide/dvfile/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248459743,"owners_count":21107358,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deepvocal","dv","midi","mido","music","music21","python","singing-synthesis"],"created_at":"2024-08-05T06:01:27.517Z","updated_at":"2025-04-11T18:38:17.613Z","avatar_url":"https://github.com/oxygen-dioxide.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# dvfile-python\r\n\r\n## 介绍\r\n\r\n操作[deepvocal](https://www.deep-vocal.com/) dv文件的python库。\r\n\r\n本python库依赖[numpy](https://numpy.org/)\r\n\r\n由于dv文件为二进制文件，且没有官方文档或解析器，本项目无法保证与deepvocal完美兼容，如遇到文件解析错误欢迎在issue中提出。\r\n\r\n## 安装\r\n\r\n\u003e pip install dvfile\r\n\r\n## 功能\r\n\r\n### dv文件\r\n\r\n- 解析与保存dv文件\r\n    \r\n    目前可以解析的内容：\r\n\r\n    - 曲速标记：位置、曲速\r\n    - 节拍标记：位置、每小节拍数、音符分数\r\n    - 音轨属性：音轨名、音轨音量、独奏、静音、双声道平衡\r\n    - 区段属性：区段名、区段音源名、起点、长度\r\n    - 音符属性：起点、长度、音高、歌词汉字、歌词拼音、滑音(弯曲深度、弯曲长度、头部滑音长度、尾部滑音长度)、颤音(颤音长度、颤音幅度、颤音速度、渲染出的颤音曲线)\r\n    - 伴奏音轨：音轨名、音轨音量、独奏、静音、文件名、起点\r\n    - 区段参数：音量、音调、气声、声线\r\n\r\n    目前不能解析的内容（保存时将还原默认值）：\r\n\r\n    - 音符属性：音素\r\n\r\n- 导入、导出ust、nn文件（需要[utaufile](https://gitee.com/oxygendioxide/utaufile)）\r\n- 导入、导出mid文件（需要[mido](https://mido.readthedocs.io/en/latest/index.html)）\r\n- 导入、导出music21对象（需要[music21](http://web.mit.edu/music21/doc/index.html)、[utaufile](https://gitee.com/oxygendioxide/utaufile)）\r\n- 导出五线谱（需要[music21](http://web.mit.edu/music21/doc/index.html)、[utaufile](https://gitee.com/oxygendioxide/utaufile)和[musescore](http://musescore.org)(独立软件)）\r\n- 批量获取歌词\r\n- 量化（将音符对齐到节拍线）\r\n- 移调（音符与pit批量上下移动）\r\n- 自动修复工程（删除区段两端的无效音符和无效参数，音符按开始时间排序，修复音符重叠）\r\n\r\n## 示例\r\n\r\n```py\r\nimport dvfile as df\r\n\r\n#打开dv文件\r\nd=df.opendv(\"myproject.dv\")\r\n\r\n#导出mid文件(需要mido)\r\nd.to_midi_file().save(\"myproject.mid\")\r\n\r\n#每个音轨单独导出ust文件\r\nfor (i,t) in enumerate(d.track):\r\n    t.to_ust_file().save('myproject{}.ust'.format(i))\r\n\r\n#每个音轨单独导出nn文件(需要utaufile)\r\nfor (i,t) in enumerate(d.track):\r\n    t.to_nn_file().save('myproject{}.nn'.format(i))\r\n\r\n#导出五线谱(需要music21和musescore)\r\nd.to_music21_score().show()\r\n\r\n#获取第0音轨第0区段的歌词（拼音与汉字）列表\r\ntr=d.track[0]\r\nseg=tr.segment[0]\r\npinyin=seg.getlyric()\r\nhanzi=seg.getlyric(use_hanzi=True)\r\n\r\n#将第0音轨的所有区段合并\r\ntr.segment=[sum(tr.segment)]\r\n\r\n#工程整体降低3key\r\nd.transpose(-3)\r\n\r\n#保存dv文件\r\nd.save(\"myproject2.dv\")\r\n\r\n#打开dvtb文件\r\ndt=df.opendvtb(\"myvoicebank.dvtb\")\r\n```\r\n\r\n## 参与贡献\r\n\r\n1.  Fork 本仓库\r\n2.  新建 Feat_xxx 分支\r\n3.  提交代码\r\n4.  新建 Pull Request\r\n\r\n## 相关链接\r\n\r\n[deepvocal官网](https://www.deep-vocal.com/)\r\n\r\n[sharpkey（deepvocal前身）视频教程](https://www.bilibili.com/video/BV1Us411r7u5)\r\n\r\n[deepvocal toolbox 文档](https://share.weiyun.com/5snXMol)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxygen-dioxide%2Fdvfile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foxygen-dioxide%2Fdvfile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foxygen-dioxide%2Fdvfile/lists"}