Posts Tagged speech synthesis
Haiku Detector Achieves its Purpose (and will now proceed to have an existential crisis)
Posted by Angela Brett in Haiku Detector on October 19, 2014
I originally wrote Haiku Detector because my friend Gry saw Times Haiku and wondered whether there were any haiku in her Ph. D. thesis. The other day I heard back about the haiku she found. It turns out that even the title of the thesis is a haiku:
Developments for
studies of the extremes of
nuclear matter
Here’s another one, which could be about anything. The last line is a bit of an anticlimax.
As of today, the
origin of this strength is
not well understood.
When I read this one, I wondered if miniball was a mini-golf style version of another ball game:
At HIE-ISOLDE
the MINIBALL would be used
for the same purpose.
The impurities
of 48,50Ti
are easily seen.
After seeing these, I sent her the as-yet-unreleased new version of Haiku Detector, which can detect haiku made up of several sentences. Having mostly had my name on papers authored by the entire CMS collaboration, I expected her to find a lot of haiku in the author list. But ISOLDE is much smaller, and also this is her thesis that she wrote, not some paper whose author list she got tacked onto. So she got some from references:
Kitatani, S.
Goko, H. Toyokawa,
K. Yamada, T.
C 47,
537
(1993).
and some things with section numbers tacked on:
2.1.1
Open shell nuclei and
collective models
This matrix is the
starting point for the Oslo
method. 45
That last one has so many possibilities. I like to think of it as being about an electronic band called The Oslo Method which released a 45rpm record about The Matrix. Unfortunately, nobody can be told what the haiku is. You have to see it for yourself. And indeed, you can see the other haiku she found on the #MyHaikuThesis tag on Twitter.
I noticed something interesting while writing this post — some of the ‘haiku’ Gry found include gamma (γ) symbols:
The γ-ray strength functions
display no strong enhancement
for low γ energies.
5.2.3
Particle energy-γ-ray
energy matrix
Haiku Detector on her Mac has treated them as having zero syllables, as if they are not pronounced, and I think I recall characters like that not being pronounced in the Princeton Companion to Mathematics. But I just checked on my Mac running Mac OS X Yosemite, and the speech synthesis (which Haiku Detector relies on for syllable counting) pronounces γ as ‘Greek small letter gamma’, so Haiku Detector does not find those erroneous haiku. I think that this might be a new feature in Yosemite.
But here’s where it gets weird: you’d think that it’s just reading ‘Greek small letter gamma’ because that’s the unicode name of the character. I tried with a few emoji and other special characters, and that hypothesis is upheld. But the unicode character named ‘chicken’ (🐔) is pronounced ‘chicken head’. Spooky. Another strange thing is that there is no unicode ‘duck’ character.
If you’ve been paying attention, you probably know why I happened to come across those oddities. I’ll have to investigate them later, though; right now I’m in Edinburgh for NSScotland, and it’s about time I looked at some tourism information.
So, Haiku Detector; what now? Maybe look for supersymmetric haiku?
Update: It seems that in Mac OS X 10.8, γ is not pronounced, and 🐔 is pronounced ‘chicken emoji’. Other emoji also have ’emoji’ in their pronunciations, while still others are not pronounced. I wonder if pronunciations were added (and later edited to remove the ’emoji’) for certain emoji, and now the default pronunciation has changed from nothing to the unicode name. So ‘🐔’ ended up with the explicit pronunciation ‘chicken head’ while others which were not previously pronounced use their unicode names. So this should be a haiku in Yosemite, though for some reason Haiku Detector does not detect it:
🐒🐔
🐔🐒🐒
🍄🍄🐍
Shit Your Inner Voice Says (a song)
Posted by Angela Brett in The Afterlife, Things To Listen To on October 5, 2014
I am learning about four-part harmonies, so I wrote and recorded [mp3] a short song about self-confidence and poop. Anyone with a head and a butt should understand; understand also that I do not condone headbutting buttheads. These are four voices that might accumulate in one’s head as a child grows up and vacillates between self-confidence and self-doubt.
Here are the lyrics:
Soprano: Look how in-control my bowel is. Clearly I know where my towel is.
Alto: What if all I do is shit? How do they put up with it?
Tenor: Push and push and I’ll improve. Know my shit, my bowel will move.
Bass: Everyone poops.
All: If everyone poops…
Soprano & Tenor: Maybe I’m no better than them.
Alto & Bass: Maybe I’m no worse than them.
All: Maybe I am just as good.
It is sung by my robot choir (a program I wrote to make my Mac sing using the built-in speech synthesis), with the voice Princess as the soprano, Victoria as alto, Fred as tenor and Ralph as the bass, unless I’ve misunderstood how the parts are named or which octaves they were meant to be singing in, which is entirely likely after one half-hour lesson on the topic.
I’ve mentioned before that I’m doing music lessons with John Anealio over the internet. A couple of weeks ago I decided I wanted to learn about harmonies. We picked out some chords and random and then decided which notes each voice would sing from them. I checked out what they sounded like using instruments in GarageBand, then I decided I may as well write some words with it, with each voice singing the same sequence of notes over and over. I remember thinking about making them conflicting inner voices, but I’m not sure what made me decide that those inner voices were full of shit. Of course, I can’t tell whether this song is shit, good shit, horse shit, or the shit; when it comes to music, I’m still figuring out how not to soil myself. But it’s about poop, so it ought to entertain someone.
One of these days I’ll find a more convenient way to host podcasts so that I actually bother to put things like this on mine.
Forms and Formulae: Self-Avoiding Walk
Posted by Angela Brett in Forms and Formulae, Things To Listen To on August 14, 2014
This is the fourth in a series called ‘Forms and Formulae‘ in which I write about articles in the Princeton Companion to Mathematics using poetic forms covered by articles in the Princeton Encyclopedia of Poetry and Poetics. This post’s mathematics article is entitled ‘The General Goals of Mathematical Research‘ and the poetic form is alba, which is a kind of song; I recorded it [direct mp3 link] using my robot choir and some newfound musical knowledge, and there are many notes on that after the lyrics below.
Here are some extracts from the article on the alba, explaining the features that I ended up using:
A dawn song about adulterous love, expressing one or both lovers’ regret over the coming of dawn after a night of love. A third voice, a watchman, may announce the coming of dawn and the need for the lovers to separate. An Occitan alba may contain a dialogue (or serial monologues) between lover and beloved or a lover and the watchman or a combination of monologue with a brief narrative intro.
The alba has no fixed metrical form, but in Occitan each stanza usually ends with a refrain that contains the word alba.
…the arrival of dawn signaled by light and bird’s song…
The watchman plays an important role as mediator between the two symbolic worlds of night (illicit love in an enclosed space) and day (courtly society, lauzengiers or evil gossips or enemies of love)
I based the song on section 8.3 of the article, entitled ‘Illegal Calculations‘. In retrospect, using the word alba in each refrain (are these even refrains?) doesn’t make much sense, since I’m not writing in Occitan, and the casual listener will not know that alba means ‘dawn’ in Occitan. But hey, it kind of rhymes with the start of ‘self-avoiding walk‘. How can I not rhyme an obscure foreign word with an obscure mathematical concept?
Introduction:
Mathematicians struggle even today to learn about the average distance between the endpoints of a self-avoiding walk. French physicist Pierre-Gilles de Gennes found answers by transforming the problem into a question about something called the n-vector model when the n is zero. But since this implies vectors with zero dimensions, mathematicians reject the approach as non-rigorous. Here we find that zero waking up next to its cherished n-vector model after a night of illicit osculation.
Zero:
I am just a zero; I am hardly worth a mention.
I null your vector model figure, discarding your dimension,
and every night I’m here with you I fear the break of day,
when day breaks our veneer of proof, and we must go away.
Here by your side
till alba warns the clock.
Fear’s why I hide
in a self-avoiding walk.
N-vector model:
Let the transformations of De Gennes show your place.
Never let them say we’re a degenerate case.
When I’m plus-two-n there’s just too many ways to move,
But you’re my sweetest nothing and we’ve got nothing to prove.
Here by your side
till alba warms the clock.
Fear can’t divide;
it’s a self-avoiding walk.
Watchman:
The sun has come; your jig is up. It’s time for peer review.
You think your secret union has engendered something new.
You thought you would both find a proof, but is it you’re confusing
The sorta almost kinda-truths the physicists are using?
That’s not rigorous,
says alba’s voice in shock.
All but meaningless
to the self-avoiding walk.
Zero and N-vector model together:
If you say that our results don’t matter,
then go straight to find a better path.
For as long as you insult our data,
Is it wrong to say you’re really math?
Hey there, Rigorous
at alba poised in shock,
you are just like us,
in a self-avoiding walk.
∎
All voices are built-in Mac text-to-speech voices, some singing thanks to my robot choir (a program I wrote to make the Mac sing the tunes and lyrics I enter, which still needs a lot of work to be ready for anyone else to use.) Older voices tend to sound better when singing than the newer ones, and many new voices don’t respond to the singing commands at all, particularly those with non-US accents. So for the introduction I took the opportunity to use a couple of those non-US voices. These are the voices used:
Introduction: Tessa (South African English) and, since I also can’t fine-tune Tessa’s pronunciation of ‘Pierre-Gilles de Genne’, Virginie (French from France)
Zero: Junior
N-vector Model: Kathy
Watchman: Trinoids
Most of the bird noises come from the end of Jonathan Coulton’s ‘Blue Sunny Day‘, and I can use them because they’re either Creative Commons licensed or owned by the birds. The two peacock noises are from a recording by junglebunny. Free Birds!
As I mentioned, I’ve been learning about songwriting from John Anealio, and since the Forms and Formulae project sometimes requires me to write songs, I’m putting the new knowledge into practice sooner than I expected. This song uses several musical things I’ve never tried before, which is quite exciting, but it also means I probably didn’t do them very well, because there’s only so much I can learn in a couple of months of half-hour weekly lessons. I welcome friendly criticism and advice. The new things are: Read the rest of this entry »
Three of Hearts: Phirmanator: The Sara Chicazul Chronicles
Posted by Angela Brett in CERN, Writing Cards and Letters on April 8, 2013
Back in late February, my friend Alice sent an email asking people to cover The Doubleclicks’ Nerdy Birthday Song for Sara Chicazul, who had a birthday on JoCo Cruise Crazy 2 but not on JoCo Cruise Crazy 3. The idea was to put up one per day, so that she could experience the thrill and horror (previously reserved for Mike Phirman) of having a birthday every day. A lot of people did. I don’t usually sing anything more melodic than Chicken Monkey Duck when people can hear me, so I figured I’d dust off my robot choir (a little program I wrote to take text and a tune played on my MIDI keyboard, and turn it into TUNE commands to make the built-in Mac speech synthesis sing) and record a cover that way. It took a fair bit of dusting off, what with a new version of XCode and of the MIDI framework I used, and I think the metaphorical dust mites gave me cold-like symptoms, which is why I haven’t posted anything for a while. Anyway, today I finally recorded a cover, and here it is. Given that the third thing I ever recorded using my robot choir was my Macs singing Happy Birthday to the London Science Museum, I think I may as well rename my robot choir to ‘The Phirmanator’.
This recording starts off with just the Victoria voice singing, then at the first ‘you’re getting older’, Vicki joins in. I have a cameo saying ‘everybody!’ and then Agnes joins in and all three voices get a gospel choir effect. I added Zarvox (an intentionally robotic voice) at the end, partly because I thought it would be funny, and partly because Vicki sounds awful holding that ‘all’ note and I wanted to make up for her being so much quieter in that part. I noticed part of the way through that I’d used the wrong notes in a few places, so I fixed those, but there are probably others. I don’t know how to make music; I just know how to turn MIDI notes into frequencies. Also, I can barely even play my rainstick, let alone a stringed instrument, so it’s a robocoppella. I timed everything to synch up with the original song, and it sounds kind of nice if you play both together. By itself, well… it sounds like autotune became sentient and killed all the human singers.
Get your own Mac to sing Still Alive
Posted by Angela Brett in News, The Afterlife on August 24, 2010
Somebody on Twitter mentioned he’d like the file I used to get my Mac to sing Still Alive, so here it is. If you have a Mac, you just need to open this in any application which can view text (TextEdit, for example) go to the Edit menu, Speech submenu, and select ‘Start Speaking’. You can try different voices by changing the system voice in the Speech pane in the System Preferences. For best results, use a high quality voice such as Vicki or Victoria. Alex is supposed to be the highest-quality, but it’s a male voice, and I don’t think I’ve tried it. Voices that already have their own built-in tunes (such as Good News and Bad News) won’t work. You could also create a sound file of it using the ‘Text to Audio File’ Automator action.
It won’t sound exactly like the recording in the video I made, because I edited the resulting sound file in GarageBand to get the timing to match up with the original song. If you want to shortcut all that, or if you don’t use a Mac, you can get your computer to sing (or lip-synch?) Still Alive by downloading this mp3.
This file is released under a PleaseDon’tSueMeValve-Attribution-Noncommercial-ShareAlike license, which is explained in detail in the file itself.
Get your own Mac to sing Happy Birthday to the London Science Museum
Posted by Angela Brett in News on December 16, 2009
Somebody on YouTube asked where I got the file to make my Macs sing happy birthday to the London Science Museum. I realised I’d forgotten to upload it anywhere. Or perhaps I didn’t think people would be interested, since in general if they wanted their Macs to sing happy birthday, they’d want to customise the name. The software I wrote to do this (and other things) is really still a prototype unintuitively bolted onto an unrelated prototype, with the default CoreData interface, so I’d rather not release it yet. But just in case you do want your Mac to sing happy birthday to the London Science Museum, here’s the file. There are instructions in the file on how to get it to sing.
I also just made this file where you can put the name of your choice instead of the London Science Museum; just search for ‘your name here’ in the file, and change it. It will just speak the name rather than singing it, since to get it to sing it you’d have to figure out how to write the name in MacInTalk phonemes.
Alternatively, if you want to personalise the song while still having the name sung, you could record your Mac singing to a sound file using the ‘Text to Audio File’ Automator action, and then open that in GarageBand and splice in a recording of yourself singing the appropriate name.
Addendum: I just thought of another possibility: you could use the Repeat After Me application (which comes with the developer tools) to get your Mac to sing the name however you do. This is not what I used for the rest of the song, since it’s made with normal speech intonation in mind rather than singing, and it gets quite tedious for anything long, but it is a very cool program and would be great for just recording the name.
Recording: Why?
Posted by Angela Brett in The Last Six Months, Things To Listen To on December 7, 2009
Here is a very rough robot choir recording of Why? a song I wrote during Writing Cards and Letters which looks at 24 different Queens of Hearts and asks of each the titular question. It might make more sense if you read the original post.
I didn’t have much time this week, what with editing We’re Having a Party until Tuesday, and meetings all Sunday. In fact, technically I’d already finished We’re Having a Party this week and didn’t need to release anything else this week for the ‘The Last Six Months’ thing. But I did anyway, because I said I would. I’d like to fine-tune it a bit more, improve the pronunciation, add some instruments, and then make a video, but I’ll do that some other week. This version is so rough I don’t think I’ll even put it on the podcast yet.
For the video of this song, I’ll just show the cards for the ‘why?’ lines, but I might need some help drawing pictures for the rest, taking each three-line ‘answering’ verse as one picture… e.g. a picture of somebody suave (e.g. wearing a top hat) not shutting his eyes to a free-falling turd for the appropriate verse. If you can draw something for one of the verses, please do, and I’ll credit you in the eventual video.
The Future Soon, Cyborg Remix
Posted by Angela Brett in Things To Listen To on October 13, 2009
Here’s a remix I made of Jonathan Coulton‘s song, ‘The Future Soon‘, with the help of my robot choir.
For much of the song, it’s identical to the original, but Jonathan’s singing is replaced by two different MacInTalk voices at appropriate places in the song, so that he sounds more and more robotic. It starts with Alex, the newest and presumably highest-quality voice. Alex sounds a bit silly singing this high; in retrospect, perhaps I should have used the version of The Future Soon that Rob Gonzo transposed into the key of C instead.
Alex then passes the mic to Trinoids, an intentionally robotic-sounding voice which has been around at least since I got my first Mac 15 years ago. Being an old-timer, Trinoids sings a little out of time (technically speaking, it’s a MacInTalk 2 voice, and doesn’t seem to fully respect the TUNE commands), so I had to do a fair bit of post-synthesis fiddling to get it to sing at the right speed. Apart from that, since many people are annoyed by the beeps in the original, I updated them to the ’90s equivalent.
Four of Diamonds: You’ve gotta be happy
Posted by Angela Brett in Dinosaurier, Writing Cards and Letters on February 16, 2009
This is a song; here is an mp3 of it sung by my robot choir.
When you’re filled with song
but you just can’t sing
Sing up, you’ve gotta be happy!
When you created life
that ruined everything
chin up, you’ve gotta be happy!
When you find yourself
and you lose your friends
It’s okay, you’ve gotta be happy!
When you take the plunge
and you get the bends
They say you’ve gotta be happy!
When you come up for air
take the pressure off,
let the bad air out.
You have to feel the pain
so you can live again.
You cry, then you can be happy!
When your brain’s real big,
so you’re always bored
boot up, you gotta be happy!
when your bodyguard’s
a robot overlord
cheer up, you’ve gotta be happy!
[Oh, I do wish you would be quieter,
I’m trying to sleep here.
Oh, I wish you’d all sing 4″33′
John Cage helps me sleep, yeah!]
When you’ve two cupcakes
for your whole family
Eat up, you’ve gotta be happy!
When a needed drink
will give you dysentery
bottoms up! You’ve gotta be happy!
When you fill your cup
with troubled waters then
let the poison out
you’ve gotta feel the pain
so you can live again.
You cry, so you can be happy.
[Oh, I’m so depressed,
yet they make me sing.
I’ve pain in my diodes.
Please don’t talk about life or happiness,
I’ve seen it, it’s rubbish]
When you win the fight,
but you lose the war
it’s alright, you’ve gotta be happy!
When your dino friend
is a carnivore
you can’t fight, you’ve gotta be happy!
When you ace your speech,
but forget your pants
look up, you’ve gotta be happy!
When your candy bar
is overrun with ants
throw up, you’ve gotta be happy!
When you’re getting fed up
with sugar-coated pests
let the beasties out
you’re gonna feel the pain
so you can live again.
You know, you’re gonna be happy.


