One may not speak in the bathroom while actively relieving oneself, not even one word. However, if there is an important need, and one did not yet actively begin relieving oneself, one may speak. Nowadays one can be lenient in our bathrooms; however there is still a מדת חסידות not to speak. If one is using the bathroom for a purpose other than relieving oneself, such as washing their face or brushing their teeth, it is permitted to speak. The same is true in a mikvah or a shower room, this is not a place for people to sit around and talk.