ProphecyBoy

Wow today was full. - more on Twitter

Festival, SABLE, and a different kind of Echo Test

Narcissus & Echo
image by David Revoy

Asterisk’s text-to-speech system is called Festival. By itself, Festival sounds like a pretty run-of-the-mill text-to-speech system, but it does have the ability to understand SABLE, which is a markup language for rendering text as speech. (There’s a good tag reference for SABLE here.) The idea is that you feed your marked up text into Festival, which then can alter the pitch, speed, speaker, etcetera for your text as it “reads” it, supposedly making it sound more natural. At the very least, it can help you get pronunciations of proper names and unknown words correct.

While you can use Festival and SABLE with PHP to generate audio for something dynamic (say, an RSS feed), I was more interested in using SABLE to tune a static text. I’m brainstorming an Asterisk project based around the myth of Echo and Narcissus, so to get up to speed with SABLE, I used it to mark up Ovid’s telling of the story from Metamorphoses.

All the code is after the break.


Here’s the SABLE markup:



"Sable.v0_2.dtd"
[]>


Famed far and near for knowing things to come,
From him the enquiring nations sought their doom;
The fair Liriope his answers tried,
And first the unerring prophet justified.
This nymph the god Cephisus had abused,
With all his winding waters circumfused,
And on the Nereid got a lovely boy,
Whom the soft maids ev’n then beheld with joy.

The tender dame, sollicitous to know
Whether her child should reach old age
or no,
Consults the sage Tiresias, who replies,
“If ever he knows himself he surely dies.”
Long lived the dubious mother in suspence,

Narcissus now his sixteenth year began,
Just turned of boy, and on the verge of man;

Many a love-sick maid her flame confessed:
Such was his pride, in vain the friend caressed,
The love-sick maid in vain her flame confessed.

Once, in the woods, as he pursued the chace,
The babbling Echo had descried his face;
She, who in others’ words her silence breaks,
Nor speaks her self but when another speaks.
Echo was then a maid, of speech bereft,
Of wonted speech; for though her voice was left,
Juno a curse did on her tongue impose,
To sport with every sentence in the close.
Full often when the Goddess might have caught
Jove and her rivals in the very fault,
This nymph with subtle stories would delay
Her coming, ’till the lovers sliped away.
The Goddess found out the deceit in time,
And then she cry’d,
“That tongue, for this thy crime,
Which could so many subtle tales produce,
Shall be hereafter but of little use.”

Hence ’tis she prattles in a fainter tone,
With mimick sounds, and accents not her own.

This love-sick virgin, over-joyed to find
The boy alone, still followed him behind:

When glowing warmly at her near approach,
As sulphur blazes at the taper’s touch,
She longed her hidden passion to reveal,
And tell her pains, but had not words to tell:
She can’t begin, but waits for the rebound,
To catch his voice, and to return the sound.

The nymph, when nothing could Narcissus move,
Still dashed with blushes for her slighted love,
Liv’d in the shady covert of the woods,
In solitary caves and dark abodes;
Where pining wandered the rejected fair,
‘Till harrassed out, and worn away with care,

The sounding skeleton, of blood bereft,
Besides her bones and voice had nothing left.
Her bones are petrified, her voice is found
In vaults, where still it doubles every sound.



And here’s the system command to turn it into a wav file:

/usr/bin/text2wave -F 8000 -o /home/ajs292/asterisk_sounds/echo_sable.wav /home/ajs292/echo.sable

You can also put this in the System function in the dialplan, of course.

Colophon

Turning coffee into feats of intellectual derring-do since 2001

Hi there, I'm Adam Simon. I'm the Creative Director and Co-Founder of Socialbomb, a social gaming startup in New York City. I recently graduated from NYU's Interactive Telecommunications Program (ITP), doing research in large scale game design, social networking, urban computing, performative technology, and networked objects. You can find info on my thesis here, and a big list of all my ITP-related posts here

I sometimes work at area/code.

Projects that I've been a part of which you might have heard of include BootyDialer, The Invention of Murder, Rumplestiltskin (An Aretefactual Performance), & Sharkrunners

You can email me at adam @ [the name of this website].

Syndicate