ABSTRACT: We will consider the approximation by a spectral method of the solution of the Cauchy problem for a scalar strictly nonlinear hyperbolic equation in one dimension posed in the whole real line. We will analyze a spectral viscosity method in which the orthogonal basis considered is the one of Hermite functions. We will show results of convergence of the approximate solution to the unique entropy solution of the problem which are obtained by using compensated compactness arguments. Some numerical examples will also be presented.