Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support for additional deepgram config #1020

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

VinothRajasekar
Copy link

Summary of Changes

1. Addition of additional_config Parameter

  • The STTOptions dataclass now includes an additional_config field, which is a dictionary for storing extra configuration parameters for deepgram.
  • This allows users to pass parameters like paragraph and diarize when initializing the STT class.

2. Integration of additional_config in STT Initialization

  • The STT class constructor now accepts an additional_config argument, which is then passed to the STTOptions dataclass.
  • This dictionary dynamically updates configuration options during the _sanitize_options method call.

3. Dynamic Configuration Handling

  • The _sanitize_options method has been updated to incorporate additional configuration options specified in additional_config.
  • This ensures that any extra parameters are included in requests to the Deepgram API.

Example Usage

Users can now initialize the STT class with additional configuration parameters as follows:

from livekit.plugins import deepgram

stt_instance = deepgram.STT(
    additional_config={
        "paragraph": True,
        "diarize": True
    }
)

Copy link

changeset-bot bot commented Oct 31, 2024

🦋 Changeset detected

Latest commit: 2288c3f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
livekit-plugins-deepgram Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

support for additional deepgram configs
@CLAassistant
Copy link

CLAassistant commented Oct 31, 2024

CLA assistant check
All committers have signed the CLA.

@VinothRajasekar VinothRajasekar marked this pull request as draft October 31, 2024 23:04
@VinothRajasekar VinothRajasekar marked this pull request as ready for review October 31, 2024 23:19
@theomonnom
Copy link
Member

Hey, I think it would be better to explicitly support those fields inside the constructor?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants