We present a new device based on the association of a quantum-well infrared photodetector and an asymmetric quantum-well infrared modulator in a three-terminal monolithic structure. This device is shown to allow the spectral analysis of an infrared signal. A large tunability and a constant responsivity make this device an ideal candidate for a solid-state infrared spectrometer.