Client for the websocket server #134
-
Hello, I'm trying to use the websocket server for diarization. Here is the js code for my client:
Do you have the code for the client you used ? I would like to make sure that I got that right before looking anywhere else. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments
-
I also made a client and am having trouble getting any response from the server, how did you integrate your client to the server code for the websocket server? |
Beta Was this translation helpful? Give feedback.
-
Hi @funboarder13920 and @jason-daiuto, sorry for the late answer, I've been super busy writing my PhD thesis. I'll make sure to post it here when I get back, but I think it would be useful to have a |
Beta Was this translation helpful? Give feedback.
-
I'm starting to suspect there might be a bug related to |
Beta Was this translation helpful? Give feedback.
-
Update: I haven't been able to find the code I used at the time. I'll write it again from scratch and add it as a tool (e.g. In the meantime, I'm happy to help with any specific difficulties you may be facing on the client side. |
Beta Was this translation helpful? Give feedback.
-
I attached code for a very simple client in my initial message which at least send the data to the server. However the results I get are not very convincing. |
Beta Was this translation helpful? Give feedback.
-
It may be a problem with the audio encoding on the client side. Maybe the discussion of issue #68 (before the existence of I suggest you try with a simple Python client first without any UI and with the same library for encoding/decoding ( Your client should encode the message in the following way: message = base64.b64encode(chunk.astype(np.float32).tobytes()).decode("utf-8") |
Beta Was this translation helpful? Give feedback.
-
@jason-daiuto I managed to reproduce the issue you mentioned. The implementation of the websocket server as an audio source is a bit tricky, particularly when sending things back. |
Beta Was this translation helpful? Give feedback.
-
@funboarder13920 @jason-daiuto I just re-wrote the websocket audio source and added Could you install from the branch I'll open a PR with these features shortly. |
Beta Was this translation helpful? Give feedback.
-
These features are now in the develop branch and will be part of the v0.7 release |
Beta Was this translation helpful? Give feedback.
-
Version 0.7 has been released with |
Beta Was this translation helpful? Give feedback.
Version 0.7 has been released with
diart.serve
anddiart.client