While I have already an accepted answer, I'd like to share another incident I came across and that too from Mahabharata. Here too the foetus gets cursed for speaking out of turn. From Mahabharata's Sambhava Parva Section CIV
There was in olden days a wise Rishi of the name of Utathya. He had a wife of the name Mamata whom he dearly loved. One day Utathya's younger brother Vrihaspati, the priest of the celestials, endued with great energy, approached Mamata. The latter, however, told her husband's younger brother--that foremost of eloquent men--that she had conceived from her connection with his elder brother and that, therefore, he should not then seek for the consummation of his wishes. She continued, 'O illustrious Vrihaspati, the child that I have conceived hath studied in his mother's womb the Vedas with the six Angas
How can then this womb of mine afford room for two children at a time? Therefore, it behoveth thee not to seek for the consummation of thy desire at such a time. Thus addressed by her, Vrihaspati, though possessed of great wisdom, succeeded not in suppressing his desire.How can then this womb of mine afford room for two children at a time? Therefore, it behoveth thee not to seek for the consummation of thy desire at such a time. Thus addressed by her, Vrihaspati, though possessed of great wisdom, succeeded not in suppressing his desire.
And the illustrious Vrihaspati, beholding this, became indignant, and reproached Utathya's child and cursed him, saying, 'Because thou hast spoken to me in the way thou hast at a time of pleasure that is sought after by all creatures perpetual darkness shall overtake thee.' And from this curse of the illustrious Vrishaspati Utathya's child who was equal unto Vrihaspati in energy, was born blind and came to be called Dirghatamas (enveloped in perpetual darkness).