  We formulate a universal method for solving an arbitrary quantum system
which, in the Bargmann representation, is described by a system of linear
equations with one independent variable, such as one- and multi-photon Rabi
models, or $N$ level systems interacting with a single mode of the
electromagnetic field and their various generalizations. We explain three types
of conditions that determine the spectrum and show their usage for two
deformations of the Rabi model. We prove that the spectra of both models are
just zeros of transcendental functions, which in one case are given explicitly
in terms of confluent Heun functions.
