运行此 python 脚本以导入语音到文本模型时遇到运行时错误

问题描述

import nemo
import ffmpeg
import nemo.collections.asr as nemo_asr
model = nemo_asr.models.EncDecCTCModel.from_pretrained(model_name="QuartzNet15x5Base-En")
files=["D:\archive\medical speech transcription and intent\Medical Speech,Transcription,and Intent\recordings\test\1249120_1853182_11719913.wav"]
transcription=model.transcribe(paths2audio_files=files)

我收到警告和运行时错误

警告:警告(“找不到 ffmpeg 或 avconv - 认为 ffmpeg,但可能不起作用”,RuntimeWarning)

运行时错误: 已尝试在开始之前启动一个新进程 当前进程已完成其引导阶段。

    This probably means that you are not using fork to start your
    child processes and you have forgotten to use the proper idiom
    in the main module:

        if __name__ == '__main__':
            freeze_support()
            ...

    The "freeze_support()" line can be omitted if the program
    is not going to be frozen to produce an executable.

任何有关如何进行的帮助将不胜感激!

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)