Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

500 Internal Server Error on localhost? #7

Open
ulimmeh opened this issue Jul 31, 2019 · 9 comments
Open

500 Internal Server Error on localhost? #7

ulimmeh opened this issue Jul 31, 2019 · 9 comments

Comments

@ulimmeh
Copy link

ulimmeh commented Jul 31, 2019

Hi,

I'm getting the following error when i run the following command on anaconda prompt (Windows 10):

python server.py --model models/output_graph.pbmm --alphabet models/alphabet.txt --lm models/lm.binary --trie models/trie

deepspeech-websocket-server-error-msg

...and on the localhost, when i navigate to http://127.0.0.1:8080/recognize i get the 500 error:

deepspeech-websocket-localhost

I have installed all requirements, including pyaudio and the latest deepspeech with pip install deepspeech and pip install deepspeech --upgrade I downloaded the pretrained model from https://github.com/mozilla/DeepSpeech/releases, tried with deepspeech-0.5.1-models.tar.gz, deepspeech-0.5.0-models.tar.gz and deepspeech-0.3.0-models.tar.gz. Still no luck.

Is this a bug? or does someone have a solution for this?

Thanks.

@daanzu
Copy link
Owner

daanzu commented Aug 1, 2019

The server and the recognize URL are for websocket connections only, not normal HTTP GET requests. The included client uses that for low-latency streaming; are you using it?

It wouldn't be hard to add support for receiving GET/POST requests containing audio, but it's not there currently.

@ulimmeh
Copy link
Author

ulimmeh commented Aug 1, 2019

Thanks for getting back to me @daanzu

My server code always seems to say listening to 'http://...' not 'ws://...' when i run the server.py file with the pretrained deepspeech model parameters. When i run python client.py, which when i checked the code already has the 'ws://...' address, it says the following in anaconda:

(base) C:\Code\python\deepspeech-websocket-server-master>python client.py Connecting to 'ws://localhost:8080/recognize'... Listening (ctrl-C to exit)...

By the way this hangs and 'ctrl-C' does nothing, i need to restart anaconda. Also, when i put ws://localhost:8080/recognize into my Google Chrome browser, i get the following error msg, despite it saying in anaconda that it is connected to that localhost via ws.

ws_listening

Any idea how i can get either the client.py or server.py on anaconda on Windows 10?

@daanzu
Copy link
Owner

daanzu commented Aug 1, 2019

Hmm, I don't use Anaconda, and I'm no websocket expert (thankfully haven't needed to debug it much). Actually, I just realized that I haven't tested the server running directly in Windows, only in WSL. (This was developed before DeepSpeech ran on Windows.)

@ulimmeh
Copy link
Author

ulimmeh commented Aug 1, 2019

Ok thanks. I would really like to get this working using anaconda on Windows. Anything you can suggest to help me resolve this?

@daanzu
Copy link
Owner

daanzu commented Aug 1, 2019

I just tried it with your configuration except vanilla python and it worked. Maybe an anaconda issue?

@ulimmeh
Copy link
Author

ulimmeh commented Aug 1, 2019

Hmm, can you walk me through your steps? What version of deepspeech do you use? Also, what version of the pre-trained model do you use?

@daanzu
Copy link
Owner

daanzu commented Aug 2, 2019

I used python 3.6.3 from python.org, installed the requirements and the latest deepspeech from pip, and the 0.5.1 pretrained model.

@ulimmeh
Copy link
Author

ulimmeh commented Aug 2, 2019

But did you do this on Windows? Pip on what command prompt? What IDE did you use for python?

@daanzu
Copy link
Owner

daanzu commented Aug 2, 2019

Windows 10; normal non-powershell command prompt; no IDE.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants