Small fixes: No default api_key of None, ParakeetSTTService uses RivaSTTService.InputParams
This commit is contained in:
@@ -91,7 +91,7 @@ class RivaSTTService(STTService):
|
|||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
api_key: str = None,
|
api_key: str,
|
||||||
server: str = "grpc.nvcf.nvidia.com:443",
|
server: str = "grpc.nvcf.nvidia.com:443",
|
||||||
function_id: str = "1598d209-5e27-4d3c-8079-4751568b1081",
|
function_id: str = "1598d209-5e27-4d3c-8079-4751568b1081",
|
||||||
model_name: str = "parakeet-ctc-1.1b-asr",
|
model_name: str = "parakeet-ctc-1.1b-asr",
|
||||||
@@ -102,7 +102,7 @@ class RivaSTTService(STTService):
|
|||||||
super().__init__(sample_rate=sample_rate, **kwargs)
|
super().__init__(sample_rate=sample_rate, **kwargs)
|
||||||
self._api_key = api_key
|
self._api_key = api_key
|
||||||
self._profanity_filter = False
|
self._profanity_filter = False
|
||||||
self._automatic_punctuation = False
|
self._automatic_punctuation = True
|
||||||
self._no_verbatim_transcripts = False
|
self._no_verbatim_transcripts = False
|
||||||
self._language_code = params.language
|
self._language_code = params.language
|
||||||
self._boosted_lm_words = None
|
self._boosted_lm_words = None
|
||||||
@@ -471,18 +471,17 @@ class RivaSegmentedSTTService(SegmentedSTTService):
|
|||||||
|
|
||||||
|
|
||||||
class ParakeetSTTService(RivaSTTService):
|
class ParakeetSTTService(RivaSTTService):
|
||||||
class InputParams(BaseModel):
|
"""Deprecated: Use RivaSTTService instead."""
|
||||||
language: Optional[Language] = Language.EN_US
|
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
*,
|
*,
|
||||||
api_key: str = None,
|
api_key: str,
|
||||||
server: str = "grpc.nvcf.nvidia.com:443",
|
server: str = "grpc.nvcf.nvidia.com:443",
|
||||||
function_id: str = "1598d209-5e27-4d3c-8079-4751568b1081",
|
function_id: str = "1598d209-5e27-4d3c-8079-4751568b1081",
|
||||||
model_name: str = "parakeet-ctc-1.1b-asr",
|
model_name: str = "parakeet-ctc-1.1b-asr",
|
||||||
sample_rate: Optional[int] = None,
|
sample_rate: Optional[int] = None,
|
||||||
params: InputParams = InputParams(),
|
params: RivaSTTService.InputParams, # Use parent class's type
|
||||||
**kwargs,
|
**kwargs,
|
||||||
):
|
):
|
||||||
super().__init__(
|
super().__init__(
|
||||||
|
|||||||
Reference in New Issue
Block a user