Hello, I am trying to connect to deepgram using a webgl unity build but it is refusing to connect. It works fine in editor and a windows build. But webgl is refusing for some reason. I've seen there's a github post about the same issue and I've posted but there is no solution.
The error is: "can’t establish a connection to the server at wss://api.deepgram.com/v1/listen?encoding=linear16&sample_rate=48000"
The following code is used:
` public async void StartListening()
{
var headers = new Dictionary<string, string>
{
{ "Authorization", "Token KEY" }
};
websocket = new WebSocket("wss://api.deepgram.com/v1/listen?model=base&encoding=linear16&sample_rate=" + AudioSettings.outputSampleRate.ToString(), headers);
websocket.OnOpen += () =>
{
Debug.Log("Connected to Deepgram!");
};
websocket.OnError += (e) =>
{
Debug.Log("Error: " + e);
};
websocket.OnClose += (e) =>
{
Debug.Log("Connection closed! " + e.ToString());
};
}`