如何规避运行时必须输入Y/N
想问一下这个模型的输入音频是否有要求,通过py脚本实现方式下,为什么每次运行都需要输入Y/N,最简单声纹官方demo也是如此。
模型需要的数据是16k的,不是的话就又这个提示。
可以debug进去,把“Y/N”的地方注释掉。已测
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
如果是asr,输入音频必须是16k的采样率,输入y转换后才能继续,n则是退出。可以增加一个force_yes参数避免提示。
from paddlespeech.cli.asr.infer import ASRExecutor
asr = ASRExecutor()
result = asr(audio_file="zh.wav",force_yes=True)
print(result)
如果是asr,输入音频必须是16k的采样率,输入y转换后才能继续,n则是退出。可以增加一个
force_yes参数避免提示。from paddlespeech.cli.asr.infer import ASRExecutor asr = ASRExecutor() result = asr(audio_file="zh.wav",force_yes=True) print(result)
运行声纹的也是,这要怎么解决呢
from paddlespeech.cli.vector import VectorExecutor
import paddle
vector_executor = VectorExecutor()
audio_emb = vector_executor(
model='ecapatdnn_voxceleb12',
sample_rate=16000,
config=None, # Set `config` and `ckpt_path` to None to use pretrained model.
ckpt_path=None,
audio_file=r'***45389.wav',
device=paddle.get_device())
print('Audio embedding Result: \n{}'.format(audio_emb))
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.