Predictors

class speeq.predictors.CTCPredictor(speech_processor: IProcessor, tokenizer_path: Union[str, Path], model_config: ModelConfig, device: str, *args, **kwargs)[source]

Bases: _ASRBasePredictor

Implements CTC based model predictor

Args:

speech_processor (IProcessor): The speech/file pre-processing processor.

tokenizer_path (Union[str, Path]): The trained tokenizer path.

model_config (ModelConfig): The model configuration.

device (str): The device to map the operations to.

predict(file_path: Union[Path, str]) str[source]
class speeq.predictors.Seq2SeqPredictor(speech_processor: IProcessor, tokenizer_path: Union[str, Path], model_config: ModelConfig, device: str, max_len: int, *args, **kwargs)[source]

Bases: _ASRBasePredictor

Implements Seq2Seq-Based models predictor

Args:

speech_processor (IProcessor): The speech/file pre-processing processor.

tokenizer_path (Union[str, Path]): The trained tokenizer path.

model_config (ModelConfig): The model configuration.

device (str): The device to map the operations to.

max_len (int): The maximum decoding length.

predict(file_path: Union[Path, str]) str[source]
class speeq.predictors.TransducerPredictor(speech_processor: IProcessor, tokenizer_path: Union[str, Path], model_config: ModelConfig, device: str)[source]

Bases: _ASRBasePredictor

Implements transducer-Based models predictor

Args:

speech_processor (IProcessor): The speech/file pre-processing processor.

tokenizer_path (Union[str, Path]): The trained tokenizer path.

model_config (ModelConfig): The model configuration.

device (str): The device to map the operations to.

predict(file_path: Union[Path, str]) str[source]