我在google中使用了这段代码,但是当我想在本地使用它时,它不起作用
OWN_FILE = {'audio': 'file.wav'}
pipeline = torch.hub.load('pyannote/pyannote-audio', 'dia')
diarization = pipeline(OWN_FILE)下面是关于torch.hub.load的警告:
FutureWarning: The 's' parameter is deprecated in favor of 'scale', and will be removed in a future release
warnings.warn(msg, FutureWarning)
UserWarning: Model was trained with 4s chunks and is applied on 2s chunks. This might lead to sub-optimal results.
warnings.warn(msg)有人有主意在当地使用pyannote吗?提前感谢
发布于 2022-11-13 16:53:45
您可以简单地将管道应用到音频文件上,方法是提供filePath。特别代表:
filePath = "file.wav"
dia_pipeline = torch.hub.load("pyannote/pyannote-audio", "dia")
dia = dia_pipeline({"audio": str(filePath)})https://stackoverflow.com/questions/67507142
复制相似问题