mirror of
https://github.com/RVC-Boss/GPT-SoVITS.git
synced 2025-04-05 12:38:35 +08:00
添加音频预采样开关
This commit is contained in:
parent
64cc2fd9d1
commit
9fe20c14d6
@ -21,6 +21,8 @@ time_log_print_dir = Ref_Audio_Selector/log/performance
|
||||
list_to_convert_reference_audio_dir = refer_audio_all
|
||||
# 音频相似度目录
|
||||
audio_similarity_dir = similarity
|
||||
# 是否开启基准音频预采样 true false
|
||||
enable_pre_sample = true
|
||||
|
||||
[Inference]
|
||||
# 默认测试文本位置
|
||||
|
@ -23,6 +23,8 @@ time_log_print_dir = config.get_log('time_log_print_dir')
|
||||
list_to_convert_reference_audio_dir = config.get_audio_sample('list_to_convert_reference_audio_dir')
|
||||
# 音频相似度目录
|
||||
audio_similarity_dir = config.get_audio_sample('audio_similarity_dir')
|
||||
# 是否开启基准音频预采样 true false
|
||||
enable_pre_sample = config.get_audio_sample('enable_pre_sample')
|
||||
|
||||
# [Inference]
|
||||
# 默认测试文本位置
|
||||
|
@ -28,7 +28,10 @@ def compare_audio_and_generate_report(reference_audio_path, comparison_dir_path,
|
||||
# 改用torchaudio.transforms.Resample进行重采样,如果在非windows环境下,没有更改依赖包的采样方法的话,
|
||||
# 使用这段代码进行预采样会出现因为采样方法不同,而导致的模型相似度计算不准确的问题
|
||||
# 当然如果在windows下,使用了其他的采样方法,也会出现不准确的问题
|
||||
reference_audio_16k = ensure_16k_wav(reference_audio_path)
|
||||
if params.enable_pre_sample == 'true':
|
||||
reference_audio_16k = ensure_16k_wav(reference_audio_path)
|
||||
else:
|
||||
reference_audio_16k = reference_audio_path
|
||||
else:
|
||||
reference_audio_16k = reference_audio_path
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user