Weeknote 2020-35

So seems I missed a weeknote again. Mea culpa. Not quite sure why. But I've been pretty busy working on Choirless this past week and working from home sometimes seems weeks run into each other. Today is a bank holiday Monday in the UK, and so we have a 4 day week this week. No doubt that is going to throw me even more for the rest of the week.

Workshops

Last week I ran my first online workshop. On Generative Adversarial Networks. The workshop went very well, even though I was up until about 1am the night before trying to get it all working. The problem was I'd picked a fairly hard task. These are interactive workshops in which people can follow along with me live. When done in person we'd have someone wandering around the room helping people. When doing them online we don't have that same interaction. But we do a fairly good approximation of it with having fellow Developer Advocates from our team on the chat to help people out.

The hard part was that machine learning by its very nature can take a long time to run. To train a neural network to learn how to colour a black and white image, you need to run thousands of images past it to learn from. This can take hours or days depending on the size of the images. I wanted to get this down to being able to run in under 10 minutes. So I had to make the images quite small, and make the neural network a bit less complex, so there was less processing time involved. I was working on it right up until the wire, but got it in. Which was a very rewarding feeling. The workshop went great and I had a lot of good discussion on the chat towards the end.

Streaming

I did my usual Twitch streaming session this week on writing an IBM Cloud Function to process audio. Yes, as you might have guessed, this was related to something I needed to do with Choirless. I've written a blog post before on how to pass raw data to an Openwhisk actions. So this was building on that in a more practical sense. It was also showing how to use a custom docker image with IBM Cloud Functions, again something I've covered before... but this was putting it all together. I'm a bit behind in some of the write-ups of the sessions and see I've got a number of videos and blog posts still in draft status. I'll need to get on top of that this week.

IBM Developer Europe Crowdcast

Based on the work I've been doing streaming on Twitch, I've been tasked with curating/organising/producing a Europe-wide IBM Developer Crowdcast channel. We have license for 40 hours a week of broadcast, and we've got 6 developer advocacy teams across Europe. Crowdcast has been used for a while in the US, but only recently have we been given the go-ahead to use it here in the EU (likely a GDPR thing?).

So it will be my job to try and curate/cajole the various developer advocacy teams IBM have across the EU to broadcast their workshops on this Crowdcast channel. The idea is likely that we will have regular days of the week for different topics, e.g. Mondays might be data science, and Tuesdays might be containerisation.

So I'm pretty excited about this... stay tuned!

Choirless

This week with Choirless I've been working on improving the synchronisation algorithm. When all the audio parts are uploaded, there is an algorithm that runs to try to calculate how far behind a contributed piece is from the reference audio. The delay is generally caused by their web browser and computer and even when we think we are recording in time, it can still be delayed. so this algorithm attempts to “look” at the audio and figure match two pieces up. As an example below are two audio waveforms overlaid on each other:

In one (the red piece) the person doesn't start singing until part way into the song. But we need to somehow get those parts in sync. To do this, I am looking at the top peaks and plotting them in such a way I can try and get an algorithm to shift them back and forth until we find the best fit.

From the data above I can calculate an 'error' value for how close they match, then moving back and forth can try and find the minimum error. On the chart below we can see that the minimum would be if the part were shifted about -50 milliseconds.

Anyway. It wasn't working. And people were appearing out of time. It took quite a lot of trial and error to find just the right amount of data to be looking at, and how to process the peaks to get an accurate value. But I got there in the end.

I wrote a bit of an emotional post the other day about how I suddenly felt with Choirless and watching, in particular, one of the performances (above) grow. And how underneath all the tech, this is enabling humans to tell stories. This was the whole point of Choirless in the first place. But I guess just hit me that it is actually happening.

New Personal Website

I love blogging here on Coil, and on DEV.to, but I also like to have content on a site I control. Partly for personal branding reasons, and partly just in case one of these sites go away. My personal site has been around quite a few years, but it looking pretty dated. I want something that looks a bit fresher, and also gives more of an overview of all my posts. So I started working on something using bootstrap and masonry to arrange a set of 'cards' of each post on the screen.

There are so many very complex CSS/JS frameworks out there, and I was after something pretty simple. I'd seen an interesting looking one called Tailwind. But the installation instructions made my head spin. Maybe I'm just too used to old-skool HTML and CSS, but the thought of having to install so much gubbins just put me right off. So anyway, I'm working on the new site, and have the general layout and design working.

I need to plumb it in to the static site generator I use, Pelican. I also need to resurrect my scripts for sucking blog posts from Coil to display on there, and also create some for sucking content down from DEV.to. Ideally I want single source of content to push out to each blog, but I doubt that will happen, as they just have too many idiosyncrasies.

Home Life

Things are ticking along in life generally. My wife's knee dislocated again this week (ongoing condition) so she has been even more immobile than usual. My 9 y/o daughter goes back to school this Thursday and is extremely anxious about it. She has been wandering around the house muttering about how useless Boris Johnson is. No idea where she got that from.

I've been doing some more cooking, and made a favourite dish of mine from Singapore called Hainanese Chicken Rice. It is quite a simple dish but the make or break is in the prep of the chicken. So I've was exfoliating the chicken with sea salt and then giving it an ice bath after cooking! But it came out amazingly.

I also made a regular dish I make, Korean Fried Chicken. Which I've now got the process pretty practised and can knock up a batch of it in about half an hour. I've always now got a pot of Gochujang, Korean chilli paste, in the fridge ready.

Tonight, I took a punt on making something that caught my eye: Guinness & Honey Glazed Pork Loin. I thought it came out pretty well, but neither of the kids in the house would eat it and my wife ended up throwing up afterwards. So maybe not to all tastes. To be fair my wife has a very delicate stomach and can't take things that sweet. This was coated in a very sweet sauce that I think upset her stomach. Oh well. You can't win them all!