svjack commited on
Commit
04dacae
·
verified ·
1 Parent(s): 6327a30

Update webui.py

Browse files
Files changed (1) hide show
  1. webui.py +5 -5
webui.py CHANGED
@@ -55,12 +55,12 @@ def download_voices_with_dynamic_counting(output_folder='genshin_voices_sample_5
55
  with io.BytesIO(audio_data['bytes']) as audio_bytes:
56
  data, samplerate = sf.read(audio_bytes)
57
  sf.write(audio_path, data, samplerate)
58
- '''
59
- elif 'path' in audio_data and os.path.exists(audio_data['path']):
60
  # 如果提供path且文件存在,直接复制
61
- data, samplerate = sf.read(audio_data['path'])
62
- sf.write(audio_path, data, samplerate)
63
- '''
64
  else:
65
  print(f"警告: {speaker}的音频数据格式不支持,跳过")
66
  speaker_counts[speaker] -= 1 # 回滚计数
 
55
  with io.BytesIO(audio_data['bytes']) as audio_bytes:
56
  data, samplerate = sf.read(audio_bytes)
57
  sf.write(audio_path, data, samplerate)
58
+
59
+ #elif 'path' in audio_data and os.path.exists(audio_data['path']):
60
  # 如果提供path且文件存在,直接复制
61
+ #data, samplerate = sf.read(audio_data['path'])
62
+ #sf.write(audio_path, data, samplerate)
63
+
64
  else:
65
  print(f"警告: {speaker}的音频数据格式不支持,跳过")
66
  speaker_counts[speaker] -= 1 # 回滚计数