1. A method of training a speech model, comprising: obtaining model parameters for the speech model; processing a known speech input using the speech model with the model parameters to generate a process result; calculating a distance between a true result and the process result, given the model parameters and the known speech input; and modifying the model parameters to reduce the distance between the true result and the process result, to obtain a modified model.