paddlespeech.cli.text.infer module

class paddlespeech.cli.text.infer.TextExecutor[source]

Bases: BaseExecutor

Methods

disable_task_loggers()

Disable all loggers in current task.

execute(argv)

Command line entry.

get_input_source(input_)

Get task input source from command line input.

infer()

Model inference and result stored in self.output.

postprocess([isNewTrainer])

Output postprocess and return human-readable results such as texts and audio files.

preprocess(text)

Input preprocess and return paddle.Tensor stored in self.input.

process_task_results(input_, results[, ...])

Handling task results and redirect stdout if needed.

show_rtf(info)

Calculate rft of current task and show results.

__call__

execute(argv: List[str]) bool[source]

Command line entry.

infer()[source]

Model inference and result stored in self.output.

postprocess(isNewTrainer: bool = False) Union[str, PathLike][source]

Output postprocess and return human-readable results such as texts and audio files.

preprocess(text: Union[str, PathLike])[source]

Input preprocess and return paddle.Tensor stored in self.input. Input content can be a text(tts), a file(asr, cls) or a streaming(not supported yet).