【问题标题】:Cannot install deepspeech server无法安装 deepspeech 服务器
【发布时间】:2021-12-11 00:33:42
【问题描述】:

我是 python 新手,我想在我的 Windows 系统上设置 deepspeech 服务器,以便它可以作为服务在后台运行,并且任何应用程序都可以访问数据,

https://pypi.org/project/deepspeech-server/

我也检查了这个链接

How to implement Mozilla DeepSpeech into PHP web app to convert Speech-to-text?

但是在运行这个命令时我得到了这个错误:

deepspeech-server --config config.json

'deepspeech-server' 未被识别为内部或外部 命令、可运行的程序或批处理文件。

我已经在我的 Windows 系统上设置了 deepspeech,并且正在工作和转录数据。

但我还想安装 deepspeech 服务器以在后台运行服务。我在 Windows 10 64 位上安装它

请有任何建议, 谢谢

【问题讨论】:

    标签: python-3.x mozilla-deepspeech


    【解决方案1】:

    在后台运行 python 脚本的最简单方法是使用 cronjob 功能(在 macOS 和 Linux 中)。在windows中,我们可以使用

    Windows 任务计划程序

    然后,您可以通过提供时间详细信息来提供要在特定时间运行的 python 脚本文件的路径。

    参考: https://medium.com/analytics-vidhya/easiest-way-to-run-a-python-script-in-the-background-4aada206cf29#:~:text=The%20easiest%20way%20of%20running,can%20use%20Windows%20Task%20Scheduler.&text=You%20can%20then%20give%20the,by%20giving%20the%20time%20particulars.

    【讨论】:

    • 感谢您的回答,我必须在 php 中访问 deepspeech 这就是为什么我要设置 deepspeech 服务器是否可以使用 cron 作业访问它
    • 我认为如果我可以使用简单的 post request curl -X POST --data-binary @testfile.wav 在 php 中访问它会更容易,就像在您之前的答案中一样
    • @user3653474 好吧,就是这样,如果您在 Windows 上执行此操作,那么您必须为您的服务器处理任务调度程序 - 无论是基于 Python 还是基于 Apache / PHP。,或者你当然可以尝试创建 .bat 文件,它可以被任何东西调用,使用“schtasks”或另一个选项是创建可安装的应用程序,例如使用 NSIS。 Check this answer for references and more thorough examples
    • 谢谢我会尝试
    猜你喜欢
    • 2022-11-27
    • 2020-06-29
    • 1970-01-01
    • 2023-03-26
    • 2017-09-15
    • 2016-02-23
    • 2019-08-27
    • 2020-02-11
    • 1970-01-01
    相关资源
    最近更新 更多