-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
56 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -133,6 +133,7 @@ dmypy.json | |
|
||
# Others | ||
/automation.py | ||
/test.py | ||
*.wav | ||
*.mp3 | ||
*.mid | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
from core import * | ||
|
||
|
||
if __name__ == '__main__': | ||
# demo: 导出某文件夹下所有的工程 | ||
path = r'PATH_TO_PROJECTS' | ||
filelist = [] | ||
for name in os.listdir(path): | ||
if os.path.isfile(os.path.join(path, name)) and name.endswith('.svip'): | ||
filelist.append(name) | ||
num = len(filelist) | ||
if num > 0: | ||
start_xstudio(os.path.join(path, filelist[0])) | ||
export_project(format='wav', samplerate=48000) | ||
if num > 1: | ||
open_project(filename=filelist[1], folder=path) | ||
export_project(format='wav', samplerate=48000) | ||
for file in filelist[2:]: | ||
open_project(filename=file) | ||
export_project(format='wav', samplerate=48000) | ||
quit_xstudio() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from core import * | ||
|
||
|
||
if __name__ == '__main__': | ||
# demo: 导出同一个工程文件的不同歌手演唱音频(公测版歌手不全无法使用,目前仅可运行在 2.0.0 beta2 版本上) | ||
singers = ['陈水若', '方念', '果妹', '小傻'] # 需要导出的所有歌手 | ||
path = r'PATH_TO_PROJECT' # 工程文件存放路径 | ||
prefix = '示例' # 各歌手演唱音频的公共前缀。本例中保存为“示例 - 陈水若.mp3”,“示例 - 方念.mp3”等 | ||
start_xstudio(engine=r'E:\YQ数据空间\YQ实验室\实验室:XStudioSinger\内测\XStudioSinger_2.0.0_beta2.exe', project=path) | ||
for s in singers: | ||
switch_singer(track=1, name=s) | ||
export_project(title=f'{prefix} - {s}') | ||
quit_xstudio() |