Bulugh al-Maram, Book 16, Hadith 1521 (English)

Anas (RAA) narrated that Allah's Messenger said: “Keeping silent is considered as (an act of`) wisdom, but very few practice it.” Related by Al-Baihaqi in his book Shu'ab al-Iman with a weak chain of narrators. The sound view is that it is traced back to one of the companions who quoted it from Luqman Al-Hakim.

وَعَنْ أَنَسٍ ‏- رضى الله عنه ‏- قَالَ: قَالَ رَسُولُ اَللَّهِ ‏- صلى الله عليه وسلم ‏-{ اَلصَّمْتُ حِكْمَةٌ, وَقَلِيلٌ فَاعِلُهُ } أَخْرَجَهُ اَلْبَيْهَقِيُّ فِي " اَلشُّعَبِ" بِسَنَدٍ ضَعِيفٍ.‏ (1937)‏ ‏2 ‏- ضعيف رواه ابن عدي في" الكامل" (5 / 1816)‏، والبيهقي في" الشعب" (5027)‏، وتحرف في" الأصل" إلى" حلم" والتصحيح من" أ"، وهو الموافق لما عند ابن عدي والبيهقي.‏

sunnah.com

also referenced under: Book 16, Hadith 1478 (In-Book)