Previous topic

speect.syllabification – Syllabification Class

Next topic

speect.uttproc_cb – Utterance Processor Callback

speect.featproc_cb – Feature Processor Callback

Speect Plug-in for SFeatProcessorCB class

This module adds a method to the speect.SFeatProcessor, which enables one to define a callback function in Python. This callback function will then be used whenever the feature processor’s method is called.

static SFeatProcessor.callback()


Create a new feature processor that has a Python function as a callback. When this newly created feature processor’s run method is called, the Python function will be called with the arguments as supplied to the feature processor. The Python callback must take one argument, an item (speect.SItem), and return a single object, which will be considered the extracted feature. The input item argument must be considered as constant (in the C sense) and not modified in any way.

Parameters:callback_function (A callable function) – A Python function that will be used as a callback function when this feature processor’s run method is called.
Returns:Extracted feature.