Answer
(Fatwa: 191=191/M)
In hadith, it is prohibited to talk or speak while discharging urine or stool. It is from adaab not to speak while bathing whether it is a common talk or any dua or zikr:
ویستحب ان لایتکلم بکلام مطلقاً، اما کلام الناس فلکراھتہ حال الکشف واما الدعاء فلانہ في مصب المستعمل و محل الاقذار والاوحال۔۔۔الخ (شامي، ط زکریا، 1/557) ولایتکلم فیہ: اي في الخلاء ۔۔۔ ظاھرہ انہ لایختص بحال قضاء الحاجة (شامي، ط زکریا، 1/557)
However, when it is not good to speak in a separate bathroom then preferably it will not be allowed to speak in an attached bathroom, because the toilet and bathroom (while being attached) will be considered as one place.
Allah (Subhana Wa Ta’ala) knows Best
Darul Ifta,
Darul Uloom Deoband