It is prohibited to recite sacred words in the presence of erva (nakedness), as the Torah states: “Your camp must therefore be holy. Let Him not see any erva among you and turn away from you” (Devarim 23:15). Regarding a man who sees another man or a woman who sees another woman, it is only prohibited to recite sacred words in view of the other’s privates. Therefore, if a woman is sitting on the floor or a chair in a manner that conceals her private part, even if she is naked, another woman may pray or speak sacred words in her presence (MB 75:8).
However, from the perspective of modesty, it is not proper for a woman to sit without clothing (above, 4:2). When necessary, it is permissible, and in such a case there is no prohibition for another woman to recite sacred words in her presence.
Concerning a man who sees a woman, the Sages teach (Berakhot 24b), “A tefaĥ of a woman is considered erva.” What they meant is that it is forbidden to reveal any part of a woman’s body which is normally covered, and that if such a part is exposed, one may not speak sacred words its presence (the specifics of this rule are explained in SA §75 and in Peninei Halakha: Collected Essays IIICollected Essays III 6:3-6).
Although we must educate girls to dress modestly starting from a young age, the prohibition against speaking sacred words in the presence of a tefaĥ that is normally covered begins when the girl begins to mature (ibid. 6:7).
Likewise, regarding the hair on one’s head, the Sages teach: “A woman’s hair is erva” (Berakhot 24a). This refers to a married woman, and if her hair is not covered, a man may not recite sacred words in her presence (the specific of the laws of hair covering are detailed in Peninei Halakha: Collected Essays III 6:14-15).
A man who must pray, recite berakhot, or learn Torah and finds himself in the presence of a woman who is revealing a tefaĥ of areas that are normally covered, le-khatĥila, he should turn away so that he cannot see her. If he cannot turn away, he must look into his siddur, or close his eyes, and only then speak sacred words (SA 75:6; MB 75:1, 29).
Concerning hair covering, some Aĥaronim write that since, unfortunately, many married women do not cover their hair, uncovered hair has become, to some degree, something that not everyone is accustomed to covering, and be-di’avad one may speak sacred words in its presence. This only pertains to hair, regarding which has a more lenient status than other normally covered parts, as single women are not obligated to cover their hair. However, concerning the normally covered parts of the body, which even single women must cover, as we have learned, one may not be lenient; rather, he must close his eyes or look in a siddur (AHS 75:7; Ben Ish Ĥai, Bo 12; Igrot Moshe OĤ 1:44; see Peninei Halakha: Collected Essays III 6:16).
Similarly, a man may not recite sacred words near a woman who is singing (SA 75:3). However, according to some Aĥaronim, be-di’avad, hearing a female singer on the radio does not prohibit reciting matters of sanctity (see ibid. 6:11).