The Model interface must be implemented by every engine. The Model interface provides an abstraction to an engine's voice model, also called a template or a profile.
See Also: ModelBasedEngine
public abstract void dispose()
Releases all transient resources associated with the model. Subsequent use of this object will cause a ModelReleasedException exception to be thrown. This call should be ignored if the model has already been disposed.
Exceptions:
public abstract Parameters getParameters()
Gets the model's parameters object. The engine's model.parameters property can be queried to determine what parameter names are supported. If the engine does not support any model parameters, this function may return null.
Exceptions:
public abstract Model copy()
Creates a temporary model based on another. The model will have to be copied to a named model before it can be persistent.
Exceptions:
public abstract Model copy(String NewName)
Creates a new model based on another.
Exceptions:
See Also: isModelNameValid
public abstract String getName()
Returns the name of the model. This can be null if the model is temporary or is an anonymous cohort.
Exceptions:
See Also: isModelNameValid
public abstract SVAPIException getStatus(Utterance Utterances)
Checks the model's status.
Parameters:
Returns:
If there is a problem with the model, an instance of the SVAPIException class (which identifies the problem) is returned. If the model is fine, null is returned.
Exceptions:
See Also: adapt
public abstract void enroll(String Password)
Erases the data stored in the model and prepares it to be enrolled. The application should call adapt until the model has been sufficiently trained. If the user chooses to cancel the enrollment process, the application should call abortEnrollment. The password is the text the application would like to have the engine use to verify the speaker. This parameter is only used if the engine's engine.enroll property contains "application". If the engine's engine.enroll property contains both "application" and "engine", the application can pick its own password by supplying it, or allow the engine to choose by passing null.
Exceptions:
See Also: abortEnrollment, adapt
public abstract void abortEnrollment()
Aborts the enrollment of a model. This function can be called for either form of enrollment. If another thread is currently in the model's adapt method, calling this method should abort the adaptation.
Exceptions:
See Also: enroll
public abstract Object getPrompt(Class Type[])
Returns a prompt for the application to present to the user. The application passes to the engine an array of Class objects that represent the possible prompt object classes that it can handle. For example, suppose an application could prompt with a gui or with audio, but prefered gui. The application would create an array of two and put the Class object for Strings in the first element and the Class object for Utterances in the second.
Exceptions:
See Also: getPrompt
public abstract boolean adapt()
Requests that the engine adapt the model. The model is adapted using audio from the connected stream.
Returns:
True is returned if the model has sufficient data. An application should call this method repeatedly until it returns true.
Exceptions:
See Also: enroll
public abstract boolean adapt(Utterance Utterance)
Requests that the engine adapt the model. The audio data in the utterance is used to adapt the model with. True is returned if the model has sufficient data. An application should call this method repeatedly until it returns true.
Exceptions:
See Also: enroll
public abstract Model[] rank(Model Models[])
Compares an array of models against the model and returns them ordered according to their distance from the model.
Exceptions:
public abstract Model[] getCohorts(Model Models[])
Returns a set of models that are cohorts for a speaker. The returned array of models is a subset of the models passed in. If Models is null, the engine uses the models from its database to find cohorts. The engine may refuse to accept a null parameter and throw a NotSupportedException.
Exceptions:
See Also: setCohorts
public abstract void setCohorts(Model Models[])
Sets the cohorts for a speaker. If Models is null, the engine should set the cohorts to the models that it thinks would be the best cohorts.
Exceptions:
See Also: getCohorts
public abstract String getChannel()
Returns the model's channel identifier. The channel identifiers that the engine supports can be determined by querying the engine's audio.channels property.
Exceptions:
See Also: setChannel, Utterance.getChannel, Engine.getChannel
public abstract void setChannel(String Channel)
Sets the model's channel identifier. The channel identifiers that the engine supports can be determined by querying the engine's audio.channels property.
Exceptions:
See Also: getChannel, Utterance.setChannel, Engine.setChannel