Sahih Muslim – Hadith No : 6250

Ibn ‘Abbas reported that Allah’s Messenger (may peace be upon him) stayed in Mecca for fifteen years (after his advent as a Prophet) and he heard the voice of Gabriel and saw his radiance for seven years but did not see any visible form, and then received revelation for ten years, and he stayed in Medina for ten years.

Hadith In Arabic Text :

وحدثنا إسحاق بن إبراهيم الحنظلي، أخبرنا روح، حدثنا حماد بن سلمة، عن عمار بن أبي عمار، عن ابن عباس، قال أقام رسول الله صلى الله عليه وسلم بمكة خمس عشرة سنة يسمع الصوت ويرى الضوء سبع سنين ولا يرى شيئا وثمان سنين يوحى إليه وأقام بالمدينة عشرا ‏.‏

Chapter : The Book Pertaining to the Excellent Qualities of the Holy Prophet (may Peace be upon them) and His – كتاب الفضائل