#Websock Parameter for smart-format

1 messages · Page 1 of 1 (latest)

fast elbow
#

I'm trying to add dictate functionality to a notes application written in C#, MVC and HTML views & javascript (no python, no node).
Got it working using MediaRecorder and WebSocket but the resultant text is a long unformatted stream.

Are there javascript WebSocket parameters I can use to implement smart-format?
What are the available WebSocket parameters?

shell trellisBOT
#

Hi @fast elbow. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Yes, you can use the smart_format parameter with the WebSocket API to implement smart formatting in your application. This parameter can be included in the WebSocket URL when establishing a connection.

Here is an example of how to use it in JavaScript:

const socket = new WebSocket('wss://api.deepgram.com/v1/listen?smart_format=true&model=nova-2-ea', ['token', 'xxxxxxx']);

In the above example, smart_format=true is used to enable smart formatting. The model parameter is also used to specify the model to be used for transcription.

Please note that the smart_format parameter does punctuation and paragraphs for you, so you shouldn't need to use both the smart_format and paragraph and punctuation options in this request source (https://github.com/orgs/deepgram/discussions/635).

For more information on smart formatting and additional formatters, you can refer to the Deepgram documentation (https://developers.deepgram.com/docs/smart-format#additional-formatters).

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: