PaddleSpeech icon indicating copy to clipboard operation
PaddleSpeech copied to clipboard

如何规避运行时必须输入Y/N

Open AntyRia opened this issue 2 years ago • 7 comments

想问一下这个模型的输入音频是否有要求,通过py脚本实现方式下,为什么每次运行都需要输入Y/N,最简单声纹官方demo也是如此。

AntyRia avatar May 30 '23 09:05 AntyRia

模型需要的数据是16k的,不是的话就又这个提示。

zh794390558 avatar May 31 '23 03:05 zh794390558

可以debug进去,把“Y/N”的地方注释掉。已测

CobeeBryant avatar Jun 01 '23 16:06 CobeeBryant

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.

stale[bot] avatar Sep 17 '23 21:09 stale[bot]

如果是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)

Artrajz avatar Sep 19 '23 05:09 Artrajz

如果是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))


lonngxiang avatar Nov 07 '23 07:11 lonngxiang

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.

stale[bot] avatar Apr 26 '25 23:04 stale[bot]

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.

stale[bot] avatar Jun 27 '25 02:06 stale[bot]