deepgram / deepgram-js-sdk

Official JavaScript SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
127 stars 45 forks source link

More control over smart formatting features. #228

Closed faster-than-human closed 5 months ago

faster-than-human commented 5 months ago

Proposed changes

As written in the documentation the smart formatting option has a lot of things that it can do (e.g. add punctuation, format dates, etc). I would like to see more query options available so that I could have specific control over what entities I want enabled or not.

Context

My domain is in medical dictation and I am investigating Deepgram to see if it would serve as a viable replacement for my current STT service. So far I am very impressed, but I am struggling with this all or nothing approach to formatting. Doctors are very particular about their notes and dictation and like to have the system to only provide what they dictated.

For a specific case lets say I want the formatting of dates, times, and numbers, but I do not want auto-punctuation, but I do want proper nouns to be capitalized. Right now smart formatting is an all or nothing option. Even if I try to use smart_format=true with punctuation=false it still adds punctuation.

Possible Implementation

Add more query parameters that can be passed in. For example: format_dates=true or format_times=true, but for the folks that still like the 1 option approach leave smart_format=true/false for them as is, just allow other to take the more granular approach.

jpvajda commented 5 months ago

@faster-than-human Thanks for the suggestions here. This type of change would have to happen at the Deepgram API level so I'll close this issue out and share this with the API teams at Deepgram for consideration. Our SDKs will always provide access to our API features so if these were to be introduced into our API they'd eventually be available in our SDKs.

faster-than-human commented 5 months ago

Sounds good. Thank you.