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

Support restricting detectable languages #295

Open jkroll-deepgram opened 1 month ago

jkroll-deepgram commented 1 month ago

Proposed changes

Provide a detailed description of the change or addition you are proposing

The Deepgram API provides the ability to restrict language detection to a subset of all possible languages (doc link). Currently, detect_language is only a boolean in this SDK.

The request format is to allow for passing multiple instances of this parameter with string language codes, e.g. detect_language=en&detect_language=es (to detect either English or Spanish).

Context

Why is this change important to you? How would you use it? How can it benefit other users?

This enables Deepgram users to restrict their languages for language detection, boosting accuracy and improving transcripts.

Possible Implementation

Not obligatory, but suggest an idea for implementing addition or change

Other information

Anything else we should know? (e.g. detailed explanation, related issues, links for us to have context, eg. stack overflow, codepen, etc)

Deepgrammer opening this issue on behalf of a direct customer request.