The world's first recorded cure for stammering was the "pebble method": go down to the seashore, fill your mouth with pebbles, and force your words to overcome the impediment. This was the self-help cure that, in the 4th century BC, cured the stuttering orator Demosthenes, and launched his career as the greatest public speaker of the ancient Greek world. And it was still being used 2,400 years later, in the 20th century AD – marbles substituted for the original pebbles. Henry Higgins forced them into the mouth of Eliza Doolittle in Shaw's Pygmalion, only to see her swallow one of them. In The King's Speech, marbles are one of those quack remedies that have failed to cure the stammering Bertie.

But the ancient story was about much more than a clever, or quack, remedy. When the Greeks read of Demosthenes speaking through the pebbles, or trying to make himself heard above the waves, or declaiming loudly as he climbed up hill, almost out of breath, they were grasping an important truth of ancient culture: that the art of public speaking could be learned, that the techniques of oratory were teachable. In a culture in which oral persuasion counted for almost everything in politics, it was crucial to believe that public speaking was a skill that could be acquired by almost anyone who was prepared to put in the hard work.

Ancient literature was full of advice to would-be orators. Although they are little read now, even by the most devoted students of Latin and Greek, volumes of this stuff survives, dealing with everything from how to move your hands or when to make a joke, to the rhythms, cadences and structures of effective oratory. And Roman boys (the rich ones at least) spent most of their school days practising the art of speech-making. Some of these school exercises still survive: "Defend Romulus on the charge of having killed Remus", the kids were asked; or "Make a speech advising Agamemnon whether or not to sacrifice his daughter Iphigeneia". The Roman equivalent of the national curriculum was committed to training boys to speak persuasively, even on these flagrantly fictional topics.

The modern world has largely inherited the ancient view that oratory is a matter of technique. True, we do have a romantic notion that some people are "naturals" at public speaking – whether it is something in the air of the Welsh valleys that produces the gift of the gab, or the "natural" sense of timing that great orators share with great comedians. But modern speech-writers always stress the importance of technique, and they advocate many of the same old tricks that the ancients used ("group your examples into threes", they advise – that's the classical "tricolon", which was taken to extremes in Blair's famous "education, education, education" soundbite). And the pundits who have turned their attention to Obama's great speeches have emphasised his technical rhetorical sophistication, some of it handed down, directly or indirectly, from the Roman star orator, Cicero: the judicious repetitions ("yes we can"); the subtly placed "tricola"; the artful references to earlier oratory, in Obama's case especially to the speeches of Martin Luther King.

Yet there is something problematic about the very notion of "great oratory". For a start, it is an almost entirely male category. I doubt that there have been many, if any, "great" female orators, at least as "great oratory" has traditionally been defined. Margaret Thatcher may have delivered some memorable soundbites to the party faithful ("The lady's not for turning"), but she did not give great persuasive speeches. In fact, when a few years ago the Guardian published its own collection of great oratory of the 20th century, it obviously had a problem with the female examples.

In addition to Thatcher, the collection ended up including speeches by Emmeline Pankhurst and Virginia Woolf – both of which survive only in written form (and in Woolf's case in the heavily edited version published as "A Room of One's Own"). We have no clear idea how either of these would have come across when they were originally delivered (though Rebecca West refers to Pankhurst "trembling like a reed" and to her "hoarse, sweet voice"). My hunch is that Woolf's speech – given in 1928 in the acoustically dreadful setting of Newnham College's hall (it's hard to make yourself heard today even with a microphone) – would have sounded quirky and tremulous, and probably scarcely audible to any but the very front rows, no matter what a tremendous classic of feminism the written version has rightly become. I suspect that the same would also be true for Elizabeth I's speech to the troops at Tilbury.

I'm not meaning by this that women have in some way "failed" to master the art of public speaking. Not at all. The point is that "great oratory" is a category that has been consistently defined to exclude them – and the more you search for the roots of our own oratorical traditions in the classical past, the more obvious that exclusion becomes. In ancient Greece and Rome the ability to speak in public and to persuade your fellow (male) citizens was almost as much a defining attribute of the male of the species as a penis was. Men spoke, women kept quiet – that's what made them women. "Great oratory" even now has not shaken off its male, "willy-waving" origins. We are not even sure, I suspect, what a great woman's speech would sound like. Thatcher tried to get round the problem by lowering her voice an octave, but she ended up sounding more like a woman pretending to be a man.

Next comes the question of how we are to judge the star oratory of past generations. Would we ourselves be swayed by Demosthenes and Cicero, or by Fox and Burke, if we could actually hear them in full flow? Or would they leave us cold, if not bored and slightly baffled? Here we find conflicting signals. On the one hand, the fact that Obama's speeches are built on principles of oratory established more than 2,000 years ago implies that the rhetorical tricks that worked then still work now. A good speech is a good speech, no matter when or where it is given. But take a look at any of those 19th-century newspaper verbatim reports of speeches where the audience reaction is recorded at key points ("applause", "laughter", "hearty laughter"). More than likely you will be completely puzzled. Why on earth did they applaud that? What was the joke there? And as for those stories of MPs a couple of centuries ago whose speeches kept the house enthralled for six hours non-stop through the night – did they have a higher boredom threshold than we do, was there less alternative entertainment on offer, or were these feats of endurance just another 19th-century urban myth?

Part of the problem is that for all the classic pieces of oratory before the early 20th century we have only a written version. Sometimes, thanks to the valiant stenographers of Hansard, there is a good chance that this reflects, more or less accurately, the words as spoken. But often it doesn't. Virginia Woolf entirely rewrote her Cambridge speech before it was published. 2000 years earlier Cicero also liked to "improve" on what he had said. In fact, some of his best-known "speeches", the models for future generations of orators, were never actually delivered at all, but were published as what he would have said on the occasion if he had got the chance. We really have no clue what listening to one of these masters of ancient oratory would have been like, and no idea how "great" they would have sounded.

But there is a moral question too. How far do we think that "great" oratory should also be, politically and morally, "good" oratory? How far can it be counted "great" if it fails to bring about a worthy end, or if it aims at a positively bad one? Ancient writers debated exactly this question. The comic playwright Aristophanes in the 5th century BC pointed the finger at those clever rhetoricians whose weasel, winning words made what was in fact bad seem good, and vice versa. And, in the end, everyone knew that Demosthenes had cured himself of his stammer only to give a storming series of speeches, so brilliantly advocating a foolish policy that they brought disaster on Athens in its conflict with Philip of Macedon, and led to his own suicide. Even now, we feel squeamish about powerful oratory directed towards unpalatable ends. The Guardian's selection of "great speeches" exposed this very nicely. There was a snippet from De Gaulle, but nothing from Hitler. No Oswald Mosley, no Ian Paisley, and no Enoch Powell. We are all presumably happier to count those as "demagogues" or "rabble rousers". But isn't the difference between a "demagogue" and a "great orator" simply whether we like their politics or not – and nothing much to do with the oratorical power?

Whether we are dealing with orators or demagogues, however, there can be little doubt that great oratory has been gradually dying – in the political sphere at least – since the middle of the 20th century. The reasons are fairly clear. As the Greeks and Romans would readily have admitted, technique only gets you so far. For oratory to be really powerful, it has to be about something that matters, and it has to be the real words of the person making the speech. That was true for Churchill (who apparently tried out his speeches on his cabinet, and adjusted – or not – accordingly) and, in a rather different sphere, it was true for Earl Spencer when he spoke in Westminster Abbey at Diana's funeral.

It is not true for almost every major political speech in the west over the last 40 years or so. These have neither promised any real political difference ("education, education, education" turned out to be as vacuous as it sounded, despite the emphatic tricolon), nor for the most part have they actually been written by those delivering them. Thatcher herself is said not to have recognised the reference to Christopher Fry's play, The Lady's Not for Burning, in the phrase "the lady's not for turning" – cleverly inserted into her speech by the playwright turned speech-writer Ronald Millar, who wrote it. And it is presumably Obama's speech-writer, Jon Favreau, not Obama himself, who knows his Ciceronian rhetoric. Audiences quickly spot (and distrust) any gap between the speaker and his or her script. The use of these professional political scriptwriters has turned the politician from an orator to an actor. The best they can do is give a good performance; but it isn't oratory, any more than the Queen's Christmas message.

The Romans saw exactly this problem almost two millennia ago. The historian and political analyst, Tacitus, writing at the beginning of the 2nd century AD, reflected on why the quality of oratory in his day seemed to have waned. The answer was obvious: oratory only thrived in a free state where there were real issues to be decided and debated; one-man rule (or, in our case, centrist, corporate, pseudo-democracy) had made the power of persuasive speech redundant.

A little later, Tacitus described the coming to power of the emperor Nero, and his first actions on assuming the throne. These included a speech delivered in praise of the achievements of his predecessor, Claudius – elegant enough, as speeches go, but in fact composed by Nero's tutor Seneca. The old men in Rome shook their heads. This was the first ruler, they observed, "to depend on the eloquence of someone else".

As we now know, Nero was only the first such "ruler" of many.