0

I'm new to python, I want to setup deepspeech server on my windows system so that it can run in the background as a service and any application can access the data,

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

i have checked this link also

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

but while running this command i got this error :

deepspeech-server --config config.json

'deepspeech-server' is not recognized as an internal or external command, operable program or batch file.

i have already setup deepspeech on my windows system and is working and transcribing data.

enter image description here

But i want to install deepspeech server also to run service in the background. I'm installing it on windows 10 64 bit

Any suggestion please, Thanks

user3653474
  • 3,393
  • 6
  • 49
  • 135

1 Answers1

0

The easiest way of running a python script to run in the background is to use cronjob feature (in macOS and Linux). In windows, we can use

Windows Task Scheduler

You can then give the path of your python script file to run at a specific time by giving the time particulars.

Reference: 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.

SergeDirect
  • 2,019
  • 15
  • 20
  • Thanks for your answer, I have to access deepspeech in php that's why I want to setup deepspeech server is it possible to access it using cron job – user3653474 Oct 26 '21 at 02:46
  • I think it will be easier if I can access it using simple post request `curl -X POST --data-binary @testfile.wav` in php just like in your previous answer – user3653474 Oct 26 '21 at 02:58
  • @user3653474 Well, that's the thing, that if you are doing it on windows, then you have to deal either with task scheduler for your server - whether it is Python or Apache / PHP based., or you can of course try to create .bat file, which can be called by anything really, using "schtasks" or another option is to create installable app, for example using NSIS. [Check this answer for references and more thorough examples](https://stackoverflow.com/questions/9894804/use-php-to-set-cron-jobs-in-windows#answer-9895045) – SergeDirect Oct 26 '21 at 21:04
  • Thanks i will try – user3653474 Nov 02 '21 at 16:57