This repository was archived by the owner on Nov 16, 2023. It is now read-only.
This repository was archived by the owner on Nov 16, 2023. It is now read-only.
Web Socket connection get closed #87
Open
Description
Hi,
I want to make hands-free service for the mobile user so that user can speak and that should convert into text. I am implementing using Golang. I am refering https://docs.microsoft.com/en-us/azure/cognitive-services/speech/api-reference-rest/websocketprotocol
I am creation Gorilla WebSocket connection & getting the response as:
101 Switching Protocols 101 HTTP/1.1 1 1 map[X-Xss-Protection:[1; mode=block] X-Content-Type-Options:[nosniff] Referrer-Policy:[strict-origin-when-cross-origin] X-Msedge-Ref:[Ref A: 15D9AB468CB24BEB99668649AF797A71 Ref B: BOM02EDGE0322 Ref C: 2018-06-26T06:58:40Z] Connection:[Upgrade] Sec-Websocket-Accept:[xA4dpm5gNAwD17GxUXDq/+cXVjg=] X-Frame-Options:[DENY] Content-Security-Policy:[object-src 'none'; form-action 'self'; frame-ancestors 'none'] Date:[Tue, 26 Jun 2018 06:58:39 GMT] Upgrade:[websocket] Strict-Transport-Security:[max-age=31536000]] {0xc0421f3ec0} 0 [] false false map[]
After that I am sending the text message
path: speech.config
x-requestid: 7D3CD165552546CF850A480FEBD62007
x-timestamp: 2018-06-06T06:58:41.990Z
content-type: application/json
{"Context":{"system":{"version":"1.0.1"},"os":{"platform":"x86_64","name":"windows","version":"10.0.17134.112"},"device":{"manufacturer":"SpeechSample","model":"SpeechSample","version":"1.0.1"}}}
After sending above message I am getting below error message
read tcp 100.64.145.14:59102->13.107.21.200:443: use of closed network connection
Please help me MS STT implemetion in Golang
Thanks
Dinesh Gupta
Activity
DineshGuptaa commentedon Jun 27, 2018
Hi All,
I tried to make websocket connection from a single file
I used code from here
https://github.com/gorilla/websocket/blob/master/examples/echo/client.go
and after making a connection I sent the config but I receive the error. code is as below
and
And received below response from service:
Please help me on the same or suggest me any implementation on Golang. I am stuck here unable to proceed.
Regards,
Dinesh Gupta
DineshGuptaa commentedon Jun 28, 2018
Hi All,
Now I am able correct format so that can be accepted by speech.config
Now I am have different issue. As I am sending the text message, same way I tried to send binary data
I am getting below repsonse from service:
Please help me to send send the binary data to speech websocket
Regards,
Dinesh Gupta