The activation of neurons in response to sensory inputs is highly variable and probabilistic methods are essential in decoding the information in neural populations that may be encoded in response to sensory inputs. The Poisson process is the most commonly used process to model the variability of neural spike firing. However, Poisson processes constrain spike count variance to be equal to its mean: This is clearly not the case in many cortical areas where responses are more variable. This over-dispersion could be related to hidden variables that may be extrinsic (in the sensory signal) or intrinsic (for instance from lateral interactions within a cortical area, feedback). We propose a model transforming the raw input into spiking neural activity, in which we introduce an explicit model of extrinsic noise. This results in a compound stochastic mechanism that gives a better fit to synthetic and biological data as observed in extracellular recordings of area V1 of macaques monkeys. This novel decoding method allows to titrate the different sources of noise and to evaluate their effects on neural dynamics.