Photo (c) Jan Trutzschler von Falkenstein; CC-BY-NCPhoto (c) Rain RabbitPhoto (c) Samuel CravenPhoto (c) Gregorio Karman; CC-BY-NC


I am a research fellow, conducting research into automatic analysis of bird sounds using machine learning.
 —> Click here for more about my research.



Older things: Evolutionary sound · MCLD software · Sponsored haircut · StepMania · Oddmusic · Knots · Tetrastar fractal generator · Cipher cracking · CV · Emancipation fanzine


Arch1 is a tiny little music venue in East London. It's got a great atmosphere, a great acoustic, and it's run by one man, a lovely fella called Rob. It's just what you want.

And now this:

A sudden flash flood due to the storms, and all of a sudden it's taken out lots of expensive equipment (amplifiers, mixer, drumkit, and the handsome little piano at the back) as well as obviously ruining the place.

The venue is a labour of love, Rob's been working at it 7 days a week, and it needs our support. Please support the crowdfunder to save this venue.

music · Permalink / Comment

So, fine, there's a letter in The Times signed by over 5500 scientists arguing that UK science would suffer in the event of Brexit. They talk about funding, and collaboration, and shared infrastructure. There are cited sources for their evidence. I agree with the letter. I even signed it. But it's so boring and abstract. And all this stuff about financial stuff just disappears into the mist of the general economic to-and-fro.

Then the other day it hit me:

In our research group, in the exact office I work in every day, we have researchers from all sorts of countries, but mostly from the EU. Would they all be here if the UK had divorced itself from the EU? I don't think so. Have you seen the bureaucracy that an American has to go through to work or study in the UK? (I say "American" (meaning USA) to emphasise that the burden is there even for the richer countries.) I don't know how they maintain the energy to go through that!

So if it was much more hassle to study here than in Paris, Barcelona, Berlin, it's clear to me that we'd lose some proportion of those scientific minds coming over to collaborate or to study. I'm not even talking about the people who are directly funded by the EU, and nor am I assuming some massive limitation on free movement. We'd lose out from the multiple little frictions of no longer being part of the big club that makes so easy the sharing of people who have good ideas.

Some people would counter this with suggestions about collaborating with other countries instead: the Commonwealth, China, India. Well guess what? We already do plenty of that too. It's not a zero-sum game.

So yes, our excellent science definitely benefits from the free movement of people in the EU. But if I say it like that, it sounds so abstract again. - The great people I've encountered in my research career, the great ideas they've come up with and developed together, which of them would not be there?

politics · Permalink / Comment

I just read this new paper, "Metrics for Polyphonic Sound Event Detection" by Mesaros et al. Very relevant topic since I'm working on a couple of projects to automatically annotate bird sound recordings.

I was hoping this article would be a complete and canonical reference that I could use as a handy citation to refer to in any discussion of evaluating sound event detection. It isn't that, for a single reason:

Just so you know, the context of that paper is the DCASE2016 challenge. For the purposes of the challenge, they've released a public python toolbox with their evaluation metrics, and that's a great way to go about things. This paper, then, is oriented around the evaluation paradigm used in DCASE2016.

In that paradigm, they evaluate systems which supply a list of inferred event annotations which are entirely on or off. They're not probabilistic, or ranked, or annotated with certainty/uncertainty. Fair enough, this happens a lot, and it's a perfectly justifiable way to set up the contest. However, in many of my scenarios, we work with systems that output a probabilistic or rankable set of output events - you can turn this into a definite annotation simply by thresholding, but actually what we'd like to do is evaluate the fully "nuanced" output.

Why? Why should evaluation care about whether a system labels an event confidently or weakly? Well, it's all about what happens downstream. An example: imagine you have an automatic system for detecting events, and you apply it to a dataset of 1000 hours of audio. No automatic system is perfect, and so you often want to either (a) only focus on the strongly-detected items in later analysis, or (b) ask a human expert to go through the results to cross-check them. In the latter case, the expert does not have time to listen to all 1000 hours; instead you'd like to prioritise their work, for example by focussing on the annotations that are the most ambiguous. This kind of work is very likely in the applications I'm working with.

The statistics focussed on in the above paper (F-measure, precision, recall, accuracy, error rate) are all based on definite binary annotations, so they don't make use of the nuance. I'm generally an advocate of the "area under the ROC curve" (AUC) statistic, which doesn't tell the whole story but it helps make use of the nuance by averaging over a whole range of possible detection thresholds.

A nice example of a paper which uses AUC for event detection is "Chime-home: A dataset for sound source recognition in a domestic environment" by Foster et al. The above paper does mention this in passing, but doesn't really tease out why anyone would use AUC or how it differs from the DCASE2016 paradigm.

I want to be clear that the Mesaros et al. paper is not "wrong" or anything like that. I just wish it had a section on evaluating ranked/probabilistic outputs, why that might matter, and what metrics come in useful. Similarly, the sed_eval toolbox doesn't have an implementation of AUC for event detection. Presumably fairly straightforward to add it to its "segment-wise" metrics. Maybe one day!

science · Permalink / Comment

On Monday I did a bit of what-you-might-call standup - at the Science Showoff night. Here's a video - including a bonus extra bird-imitation contest at the end!

science · Permalink / Comment

This weekend I was invited to take part in an event called Soundcamp. Let me quote their own description:

Soundcamp is a series of outdoor listening events on International Dawn Chorus Day, linked by Reveil: a 24 hour broadcast that tracks the sounds of daybreak, travelling West from microphone to microphone on sounds transmitted live by audio streamers around the globe.

Soundcamp / Reveil will be at Stave Hill Ecological Park in Rotherhithe from the 30th of April to the 1st of May 2016, and at soundcamps elsewhere in the UK and beyond.

So as an experience, it's two things: a worldwide live-streamed radio event that you can tune into online, and also if you're there in person it's a 24-hour outdoor event with camping, talks and workshops, with a focus on listening and on birdsong.

(Photos here are by @lemon_disco)

There was a great group of people involved. I was very happy to be on the bill with Geoff Sample the excellent bird recordist, and with Sarah Angliss the always-entertaining musician/roboticist/historian. We each spoke about bird sound from our own different angles and I think it was a really good mix of perspectives. There was also Jez Riley French the field recordist, who led a workshop on ultrasonic underwater sound, and Iain Bolton who took us on a bat walk: the immersive sound of multiple bat detectors clicking and squeaking away around the pond at dusk was much more of a sonic experience than I expected, quite memorable.

For myself - well, I talked about our work on automatic bird sound recognition, in particular our app Warblr: how it works, and how it has been used by people. But more than that, it was a great opportunity to think about how we listen to sound. Trying to get computers to make sense of sound is a good way to emphasise what's so strange and amazing about our own powers of listening.

It was also a perfect setting for the little collaboration Sarah Angliss and I put together last year. Sarah has built a robot carillon, a set of automated bells, and we worked together to transcribe birdsong automatically into musical scores for the bells. These bells, singing away in the corner of the park, with the warm spring weather and the real birdsong all around, were right at home.

At dawn on the Sunday we took a dawn chorus walk. It was an interesting thing to do, and the star of the show was undoubtedly when we reached the end of the walk, almost ready to go back, and a grasshopper warbler sang out loud and long and strange - an unfamiliar sound to me, and apparently the first time anyone had heard one around there! Is it an insect, a bird, a piece of machinery...?

The main Soundcamp organisers - Grant Smith, Maria Papadomanolaki, Dawn Scarfe - also brought their own great and really thoughtful approaches to listening too. Grant and his son led a workshop on making a soundscape streaming device, really quite simply with a Raspberry Pi and a couple of microphones (based on Primo EM172 capsules). I've been really impressed by the quality of the sound field they get from a pair of mics stuck in a section of poster tube.

Here's Maria mixing the radio stream, in the temporary on-site studio:

There are more photos here from Dawn Scarfe

sound · Permalink / Comment

I love a lamb tagine, so I'd like to make a vegetarian tagine that competes with it for the fullness of flavour. Here's my best one so far, making it deep and main-coursey by having large chunks of aubergine flavoured with cinnamon to take centre stage, and bitterness from fried lemon slices so that there's contrasting objects in there along with the standard tagine backing.

And yes you're meant to eat the lemon slices, rind and all. You don't have to eat the rind if you don't want, but it's doing the bitter/sour job we've got it for.

Serves 2, takes maybe an hour (including the stewing time).

In a deep pan that has a lid, heat up a big glug of olive oil, and fry the diced onion at a medium heat for 3-5 minutes to soften. Then add the chopped tomatoes. Stir and let it cook for a minute or two, then add the dates/prunes, 1 cup of veg stock, the honey, and a handful of almonds. Put the lid on, bring to the boil, then turn the heat right down to a simmer.

Chop the aubergine into big pieces, maybe 1 inch cubed. Don't go smaller than that. Put the aubergine in a bowl and sprinkle over a good dose of cinnamon, maybe 2 tbsp. Toss this around to coat the aubergines fairly evenly.

Get a big frying pan and put it on a hot heat. (No oil.) Add the aubergine pieces. Let them dry-fry for maybe 6 minutes, tossing them occasionally to turn over. A couple of minutes before they're done, slice the lemon into 0.5 cm slices, remove the seeds, and cut the slices in half (i.e. into semicircles), then add the lemon slices to the dry-fry pan. This gets them a little bit browned too. If you're increasing the quantities, you'll need to do the dry-frying in batches.

Put the aubergine and lemon into the stew pot. Stir around. Now put the lid back on and let this bubble gently for maybe 20 minutes minimum, 40 minutes maximum.

About ten minutes before the end of the cooking time, add a handful of chickpeas.

Then, just before serving: taste to check the sweetness, and decide whether to add a bit more honey. Add 1 tbsp olive oil, and stir. Then finally sprinkle some more sliced almonds over.

recipes · Permalink / Comment

OK now here we've got lots of lovely good news. Not only have my colleague Andrew McPherson and his team created an ultra-low-latency linux audio board called Bela. Not only can it do audio I/O latencies measured in microseconds (as opposed to the usual milliseconds). Not only did it just finish its kickstarter launch and received eleven times more funding than they asked for.

The extra good news is that we've got SuperCollider running on Bela. So you can run your favourite crazy audio synthesis/processing ideas on a tiny little low-latency box, almost as easily as running it on a laptop.

Can everyone use it? Well not just yet - the code to use Bela's audio driver isn't yet merged into the main SuperCollider codebase, and you need to compile my forked version of SC. So this blog is just to preview it. But we've got the code, as well as instructions for compiling, in this fork over here, and two of the Bela crew (Andrew and Giulio) have helped get it to the point where now I can run it in low-latency mode with no audio glitching.

Where do we go from here? It'd be nice if other people can test it out. (All those Kickstarter backers who are receiving their boards sometime soon...) There are a couple of performance improvements that can hopefully be done. Then eventually I hope we can propose it gets merged in to the SC codebase, perhaps for SC 3.8 or suchlike.

IT · Permalink / Comment

After a tip-off from a friend, I've had a couple of different attempts at doing a nice simple meal with courgette fritters. This one is working well so far. I keep the courgettes in pieces (rather than grating them) which maintains the nice structure with the squishy middle bit, and the egg coating helps to make them into little parcels.

Takes 10 minutes, serves 2 as a light meal.

First get the courgette ready. If you rinsed it, pat it dry with kitchen paper. Cut it into 1cm-thick slices and put them on kitchen paper to dry a bit more.

Put a large frying pan on a medium-hot heat, and put a good slug of vegetable oil in it, a couple of millimetres deep.

Mix the flour and parmesan in a bowl. In a second bowl, lightly beat the egg. These are going to be for coating the courgette.

Take the courgette slices and toss them in the flour/parmesan. Try to get a nice even coating.

Now we fry. With one hand, take the courgette pieces one at a time, dip them in the beaten egg, turn them to coat, and then put into the hot pan. By the time you've got them all into the pan it may well be time to turn the first ones over - they need 2 or 3 minutes each side. Do the turning-over one slice at a time (e.g. using tongs), in roughly the same order that you put them in.

When the courgettes are nicely golden-brown on both sides, lift them out onto kitchen paper. In a bowl or directly on the plate, mix them with the salad leaves. Sprinkle more parmesan over them, then squeeze lemon juice over them.

Serve with crusty bread or hot buttered toast.

recipes · Permalink / Comment

Other recent posts: