Skip to content

Commit

Permalink
expose Deepgram's no_delay for smart formatting (livekit#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmuirhead authored Jun 21, 2024
1 parent 65b7791 commit a9e37d0
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class STTOptions:
punctuate: bool
model: DeepgramModels
smart_format: bool
no_delay: bool
endpointing: int | None


Expand All @@ -54,6 +55,7 @@ def __init__(
interim_results: bool = True,
punctuate: bool = True,
smart_format: bool = True,
no_delay: bool = False,
model: DeepgramModels = "nova-2-general",
api_key: str | None = None,
min_silence_duration: int = 0,
Expand All @@ -72,6 +74,7 @@ def __init__(
punctuate=punctuate,
model=model,
smart_format=smart_format,
no_delay=no_delay,
endpointing=min_silence_duration,
)
self._session = http_session
Expand Down Expand Up @@ -212,6 +215,7 @@ async def _run(self, max_retry: int) -> None:
"model": self._opts.model,
"punctuate": self._opts.punctuate,
"smart_format": self._opts.smart_format,
"no_delay": self._opts.no_delay,
"interim_results": self._opts.interim_results,
"encoding": "linear16",
"sample_rate": self._sample_rate,
Expand Down

0 comments on commit a9e37d0

Please sign in to comment.