Kaljurand / dictate.js

A small Javascript library for browser-based real-time speech recognition, which uses Recorderjs for audio capture, and a WebSocket connection to the Kaldi GStreamer server for speech recognition.
https://kaljurand.github.io/dictate.js/
BSD 3-Clause "New" or "Revised" License
216 stars 62 forks source link

Tested webpage working in local LAN with https, But not outside LAN area. #23

Open lio14cha opened 5 years ago

lio14cha commented 5 years ago

I have followed this webpage to switch on server's and workers. It is showing result in local are connection with https://url. But when I accesed it from outside it is showing Websocket connection to server is not connected. I have used WSS://url. But it is not connecting from outside with public IP. Is there any configuration needed.

Thanks in advance.

Kaljurand commented 5 years ago

The issue does not seem specific to dictate.js, but has to do with the general problem of accessing services from the outside network. Do you see any error messages in the web browser console or other logs? Have you tried to set up other (simpler) websocket-based services, for testing?

lio14cha commented 5 years ago

Thanks for your response. I have given URL's in demo.js file. server : "wss://10.10.39.54:8088/client/ws/speech" serverStatus : "wss://10.10.39.54:8088/client/ws/status" Here I replaced with public IP after this.When I am accessing outside of LAN (with url ) it is showing errors in console log as:

WebSocket connection to 'wss://URL:8000/client/ws/speech?content-type=audio/x-raw,+layout=(string)interleaved,+rate=(int)16000,+format=(string)S16LE,+channels=(int)1' failed: WebSocket is closed before the connection is established.

WebSocket connection to 'wss://URL:8000/client/ws/status' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT

WebSocket connection to 'wss://URL:8000/client/ws/speech?content-type=audio/x-raw,+layout=(string)interleaved,+rate=(int)16000,+format=(string)S16LE,+channels=(int)1' failed: Error in connection establishment: net::ERR_CONNECTION_TIMED_OUT.

But in LAN area it is working fine in all computers.I am using apache2 for localhost. Thanking you.