Skip to content

Commit 53d46e8

Browse files
authored
Update audio_slicer_pre.py
配合webui端修改 使用dataset_path作为切片目录传递参数
1 parent 3849c96 commit 53d46e8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

audio_slicer_pre.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"--max_sec", "-M", type=int, default=5000, help="Maximum seconds of a slice"
1414
)
1515
parser.add_argument(
16-
"--model_name",
16+
"--dataset_path",
1717
type=str,
1818
default="inputs",
1919
help="Directory of input wav files",
@@ -38,7 +38,7 @@
3838
os.makedirs(folder_path)
3939

4040
# 遍历指定目录下的所有.wav文件
41-
audio_directory = f'{args.model_name}'
41+
audio_directory = f'{args.dataset_path}'
4242
for filename in os.listdir(audio_directory):
4343
file_path = os.path.join(audio_directory, filename)
4444
if os.path.isfile(file_path) and filename.endswith('.wav'):

0 commit comments

Comments
 (0)