We have developed a wide frequency range tunable continuous-wave terahertz signal generator (CW THz SG) on the principle of difference frequency generation (DFG) via non-collinear phase matching in a gallium phosphide (GaP) crystal. The GaP CW THz SG has a wide frequency range, high accuracy, high stability and easy operation/maintenance. A spectrometer working as a continuous system was realized by combining the GaP CW THz SG as the light source with a superconducting transition edge sensor (TES) bolometer cooled by a pulse tube refrigerator. The frequency resolution and absolute accuracy of the newly developed frequency-stabilized GaP CW THz spectrometer was evaluated by measurements of water vapor absorption under vacuum. High accuracy spectral measurements for pharmaceuticals will be also presented.