In this paper hard x-ray spectra are obtained and compared in hydrogen and deuterium discharges in the TJ-I tokamak and magnetic turbulence characteristics are deduced from these. Significant differences are found in the spectra and, hence, in the magnetic turbulence characteristics of the two types of plasma. In deuterium discharges these changes are interpreted to be due to a reduction of magnetic turbulence amplitude and an enlargement of radial correlation length of the turbulence. The runaway diffusion coefficients for both types of plasma are obtained.