lint files
This commit is contained in:
parent
37b5ffd674
commit
61607ad0a4
1 changed files with 8 additions and 2 deletions
|
|
@ -4,12 +4,14 @@ from .audio_encoding import AudioEncoding
|
||||||
from .model import TypedModel
|
from .model import TypedModel
|
||||||
from ..input_device.base_input_device import BaseInputDevice
|
from ..input_device.base_input_device import BaseInputDevice
|
||||||
|
|
||||||
|
|
||||||
class TranscriberType(str, Enum):
|
class TranscriberType(str, Enum):
|
||||||
BASE = "base"
|
BASE = "base"
|
||||||
DEEPGRAM = "deepgram"
|
DEEPGRAM = "deepgram"
|
||||||
GOOGLE = "google"
|
GOOGLE = "google"
|
||||||
ASSEMBLY_AI = "assembly_ai"
|
ASSEMBLY_AI = "assembly_ai"
|
||||||
|
|
||||||
|
|
||||||
class TranscriberConfig(TypedModel, type=TranscriberType.BASE):
|
class TranscriberConfig(TypedModel, type=TranscriberType.BASE):
|
||||||
sampling_rate: int
|
sampling_rate: int
|
||||||
audio_encoding: AudioEncoding
|
audio_encoding: AudioEncoding
|
||||||
|
|
@ -20,16 +22,20 @@ class TranscriberConfig(TypedModel, type=TranscriberType.BASE):
|
||||||
return cls(
|
return cls(
|
||||||
sampling_rate=input_device.sampling_rate,
|
sampling_rate=input_device.sampling_rate,
|
||||||
audio_encoding=input_device.audio_encoding,
|
audio_encoding=input_device.audio_encoding,
|
||||||
chunk_size=input_device.chunk_size)
|
chunk_size=input_device.chunk_size,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class DeepgramTranscriberConfig(TranscriberConfig, type=TranscriberType.DEEPGRAM):
|
class DeepgramTranscriberConfig(TranscriberConfig, type=TranscriberType.DEEPGRAM):
|
||||||
model: Optional[str] = None
|
model: Optional[str] = None
|
||||||
should_warmup_model: bool = False
|
should_warmup_model: bool = False
|
||||||
version: Optional[str] = None
|
version: Optional[str] = None
|
||||||
|
|
||||||
|
|
||||||
class GoogleTranscriberConfig(TranscriberConfig, type=TranscriberType.GOOGLE):
|
class GoogleTranscriberConfig(TranscriberConfig, type=TranscriberType.GOOGLE):
|
||||||
model: Optional[str] = None
|
model: Optional[str] = None
|
||||||
should_warmup_model: bool = False
|
should_warmup_model: bool = False
|
||||||
|
|
||||||
|
|
||||||
class AssemblyAITranscriberConfig(TranscriberConfig, type=TranscriberType.ASSEMBLY_AI):
|
class AssemblyAITranscriberConfig(TranscriberConfig, type=TranscriberType.ASSEMBLY_AI):
|
||||||
should_warmup_model: bool = False
|
should_warmup_model: bool = False
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue