Characterizing graphs by their spectra is an important topic in spectral graph theory, which has attracted a lot of attention of researchers in recent years. It is generally very hard and challenging to show a given graph to be determined by its spectrum. In Wang~[J. Combin. Theory, Ser. B, 122 (2017):438-451], the author gave a simple arithmetic condition for a family of graphs being determined by their generalized spectra. However, the method applies only to a family of the so called emph{controllable graphs}; it fails when the graphs are non-controllable. In this paper, we introduce a class of non-controllable graphs, called emph{almost controllable graphs}, and prove that, for any pair of almost controllable graphs $G$ and $H$ that are generalized cospectral, there exist exactly two rational orthogonal matrices $Q$ with constant row sums such that $Q^{rm T}A(G)Q=A(H)$, where $A(G)$ and $A(H)$ are the adjacency matrices of $G$ and $H$, respectively. The main ingredient of the proof is a use of the Binet-Cauchy formula. As an application, we obtain a simple criterion for an almost controllable graph $G$ to be determined by its generalized spectrum, which in some sense extends the corresponding result for controllable graphs.