tempo-riz / deepgram_speech_to_text

A Deepgram client for Dart and Flutter, supporting all Speech-to-Text and Text-to-Speech features on every platform.
https://pub.dev/packages/deepgram_speech_to_text
MIT License
5 stars 9 forks source link

Web Support #2

Closed AndryHTC closed 7 months ago

tempo-riz commented 7 months ago

Okay so I learned a bit more about websockets, it doesn't seems possible to use headers in a client-side websocket connection (in a browser) that's why the official demo project from js sdk for live streaming uses an express server as intermediate : https://github.com/deepgram-devs/js-live-example or nodejs (backend-side) others references :

If i'm wrong please explain :)

So that said the solutions I have :

What's your use case @AndryHTC ?

AndryHTC commented 7 months ago

@tempo-riz do not worry. I've implemented realtime in Web successfully, but I still think this package is useful and I would prefer to use this instead.

To implement the authentication with WebSockets, Deepgram team added an alternative https://github.com/orgs/deepgram/discussions/175

tempo-riz commented 7 months ago

oh so it seems possible, nice ! Will try that thanks for the link

update : so websockets now work on web aswell using the trick you mentioned. But the package is still not avalable for web for this reason :

image

So package universal_io which's purpose is to support WEB, doesn't actually supports ... WEB That's interesting

tempo-riz commented 7 months ago

Okay from version 1.0.4 package supports WEB :)