Merge pull request #4 from vocodedev/kian/punctuation-endpointing

add punctuation based endpointing
This commit is contained in:
Ajay Raj 2023-03-04 19:03:04 -08:00 committed by GitHub
commit abb2e38708
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -12,8 +12,24 @@ class TranscriberType(str, Enum):
ASSEMBLY_AI = "transcriber_assembly_ai"
class EndpointingConfig(BaseModel):
time_cutoff_seconds: Optional[float] = None
class EndpointingType(str, Enum):
BASE = "endpointing_base"
TIME_BASED = "endpointing_time_based"
PUNCTUATION_BASED = "endpointing_punctuation_based"
class EndpointingConfig(TypedModel, type=EndpointingType.BASE):
pass
class TimeEndpointingConfig(EndpointingConfig, type=EndpointingType.TIME_BASED):
time_cutoff_seconds: float = 0.4
class PunctuationEndpointingConfig(
EndpointingConfig, type=EndpointingType.PUNCTUATION_BASED
):
time_cutoff_seconds: float = 0.4
class TranscriberConfig(TypedModel, type=TranscriberType.BASE):