This is a true story, or at least an historical one.
The history of automata is a long and confused one, because not only were those early mechanical marvels regarded as no better than toys and diversions for the idle rich (and thus not worthy of much commemoration), but also because so many of the early examples have been distorted and made mythic by time.
For example, the Bishop Vergilius created a bronze fly, “no more than life size,” that patrolled the city following his investiture and kept it free from other vermin. How the fly moved, and how it pursued its rarefied task is unclear, in much the same manner as the fabulous, fabled bronze man of Crete, who ran three time around that island per day and, “when confronted by invaders, took himself into the heart of the fire and there remained until all white-hot, that by the fearsomeness of his embrace the enemy fleet might be driven off.”
It is not uncommon for those automata who ape organic processes so closely to also be tainted with the suspicion of human reason, some tricksy hand to work the strings, some hidden speaker to mouth the words. Myth raises the monsters, skepticism lays them low, and Socrates shrugs, takes the easy way of believing in them regardless.