As per Dr Ambedkar, atleast 11 contradicting explanations are available on the origin of vedas which he detailed in his book "Riddles in Hinduism". These are his findings.
(1) as originating from the mystical sacrifice of Purusha - Rig veda purusha suktam
(2) as resting on Skambha - Atharva veda
(3) as cut or scraped off from him, as being his hair and his mouth - Atharva veda
(4) as springing from Indra - Atharva veda
(5) as produced from Time - Atharva veda
(6) as produced from Agni, Vayu and Surya,
(7) as springing from Prajapati, and the Waters - Satapatha brahmana
(8) as being the breath of Brahma - Manu smriti
(9) as being dug by the Gods out of mind-ocean - Manu smriti
(10) as being the hair of Prajapati's beard - Taitteriya brahmana
(11) as being the offspring of Vac - Brihadaranyaka upanishad.
Can anyone here clarify what is the Truth and why these contradictions are there regarding such a simple question?