Plachtaa / seed-vc

State-of-the-Art zero-shot voice conversion & singing voice conversion with in context learning
GNU General Public License v3.0
662 stars 76 forks source link

代码问题 #30

Closed wzr0108 closed 1 month ago

wzr0108 commented 1 month ago

inference.py

source_audio = source_audio[:sr * 30]
source_audio = torch.tensor(source_audio).unsqueeze(0).float().to(device)

ref_audio = ref_audio[:(sr * 30 - source_audio.size(-1))]

sr * 30 - source_audio.size(-1)不是0吗,这里是否有问题

Plachtaa commented 1 month ago

为什么说是0呢

wzr0108 commented 1 month ago

torch==2.2.0+cu118,ref_audio会变成空

wzr0108 commented 1 month ago

注释ref_audio = ref_audio[:(sr * 30 - source_audio.size(-1))]会对结果有影响吗

Plachtaa commented 1 month ago

source超过30秒确实会0,不过inference.py没有考虑这么多情况,需要infer长音频请参考app.py中的方式