I recalled having read something different from dem bones' account as a teenager. So I checked a mythology text and was startled to discover that Ovid's account is essentially the same as our fearless coder's (except for one detail, which you will read below)1. I suppose the story of Echo I remember must have been taken from one of the adaptations by Bullfinch or someone like that, and now it is distorted by the passage of several years.

Not only that, I have had to make bits up to fill in the holes which have crept into my memory of the story. But never let the facts get in the way of a good story, especially when The Muse of Noding has you in her grasp.

Echo, daughter of the river Eridanus, had the "gift of gab". She could converse at length on any subject, and was able to cajole favors out of her father with great ease.

One day Zeus came down off Olympus to cavort with the wood nymphs nearby. Hera, ever mindful of Zeus' wandering eye, realized she could catch him in his infidelity2 and followed.

Zeus somehow found out that his wife was on the way. He said to Echo3, "Go, and delay my wife while I visit with the wood nymphs."
Remioving a ring from his finger, he told Echo, "Take this ring as a token of the favor I will owe you if you succeed."

Echo sought out Hera and located her before she could locate Zeus.

"O Hera, I am making a cape for my betrothed for our wedding-feast. What symbols should I embroider into it to ensure my his fidelity?" Hera, being the goddess of marriage, could not refuse this request, and explained what symbols would ensure fidelity, and which would ensure success in the hunt, and which would ensure many sons.

Echo, with her quick wit and clever tongue, soon turned the conversation to the subject of the proper arrangement of a wedding-bed, and other subjects, and their conversation continued until the sun was low on the horizon.
At this point, Hera happened to notice a ring on Echo's finger, the same ring that Zeus had given her in payment for her delay. She realized her change to catch Zeus in his infidelity had gone.

"So, you have done his bidding, and used you talent to thwart my just anger2? From now on, then you shall only be able to repeat the last words that have been spoken to you. Do you understand?"

"...understand", said Echo, as the spell immediately took hold.

1One should never show up the gods, as this story ably demonstrates.
2None of these myths about Zeus and Hera ever said what Hera would do to Zeus if she caught him. As it always worked out, her punishment was always visited on Zeus' partners after the fact.
3So you see the difference. Echo had incurred Hera's wrath not for her incessant chatter, but for thwarting Hera in her revenge. Also see notes 1 and 2.