paddlespeech.cli.vector.infer module
- class paddlespeech.cli.vector.infer.VectorExecutor[source]
Bases:
BaseExecutor
Methods
disable_task_loggers
()Disable all loggers in current task.
execute
(argv)Command line entry for vector model
get_embeddings_score
(enroll_embedding, ...)get the enroll embedding and test embedding score
get_input_source
(input_)Get task input source from command line input.
infer
(model_type)Infer the model to get the embedding
Return the audio embedding info
preprocess
(model_type, input_file)Extract the audio feat
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 for vector model
- Args:
argv (List[str]): command line args list
- Returns:
- bool:
False: some audio occurs error True: all audio process success
- get_embeddings_score(enroll_embedding, test_embedding)[source]
get the enroll embedding and test embedding score
- Args:
enroll_embedding (numpy.array): shape: (emb_size), enroll audio embedding test_embedding (numpy.array): shape: (emb_size), test audio embedding
- Returns:
score: the score between enroll embedding and test embedding
- infer(model_type: str)[source]
Infer the model to get the embedding
- Args:
model_type (str): speaker verification model type