The problem of detecting T-wave alternans (TWA) in ECG signals has received considerable attention in the biomedical community. This paper introduces a Bayesian model for the T waves contained in ECG signals. A block Gibbs sampler was recently studied to estimate the parameters of this Bayesian model (including wave locations, amplitudes and shapes). This paper shows that the samples generated by this Gibbs sampler can be used efficiently for TWA detection via different statistical tests constructed from odd and even T-wave amplitude samples. The proposed algorithm is evaluated on real ECG signals subjected to synthetic TWA and compared with two classical algorithms.