def METHOD_NAME(self, model_inputs, **kwargs):
    # we expect some kwargs to be additional tensors which need to be on the right device
    kwargs = self._ensure_tensor_on_device(kwargs, device=self.device)
    if self.model.can_generate():
        output = self.model.generate(**model_inputs, **kwargs)
    else:
        output = self.model(**model_inputs, **kwargs)[0]
    if self.vocoder is not None:
        # in that case, the output is a spectrogram that needs to be converted into a waveform
        output = self.vocoder(output)
    return output