The WebRTC codebase contains a very solid voice activity detection (VAD) algorithm. The project itself is a treasure-trove of solid solutions to common problems in speech, audio and video streaming, encoding etc.
Recently, I was in need of a solid VAD I could use from Python. I wrote one myself in college (and to be fair it was a bit shit).
In a few hours I was able to isolate the source code from the WebRTC project and write a Python wrapper for it in SWIG.
A working VAD for Linux in Python on x86_64 is available in this repo.
C functions typically have the following signature: int funcName(int *input_array, size_t array_size); Numpy ships with a fantastic set of typemaps (defined in numpy.i) for just this sort of thing. Drop numpy.i into your directory and include it in your SWIG setup.
A lot of typemaps aren’t defined in numpy.i - do not hesitate to write a header. For instance, numpy.i doesn’t have a typemap involving a const int * - a small wrapper around your desired function call it perfect and allows you to use existing typemaps.
After a day of trying to get some source code from an academic group to work, I took to facebook to kvetch about academia and polish.
Ranting about the quality and polish of academic software is not fair to academics. I am reminded of this excerpt about Renault’s Fomula 1 car in the LA Times:
At Indy, their garage next to pit road contained Kovalainen’s and Fisichella’s cars and one complete spare, in case either crashes. The garage was about twice the size of a typical residential two-car garage.
But the word “garage” doesn’t do justice to the area. It looked more like a hospital operating room, and, when the cars were parked, they looked as if they were on life-support systems.
And like many doctors, each crewman was a specialist in only one aspect of the car — tires, engines, front end, rear end, traction, hydraulics and so forth.
Before the practice runs and qualifying, above each car was a high-tech metal canopy with lights, electrical outlets and more than a dozen black cables that dropped down and attached to the cars.
What were the cables for? After Fisichella and Kovalainen brought their cars in from the track, some cables instantly transmitted data about the cars to the team’s computers: Fuel consumption, tire wear and the car’s balance, to name a few areas.
Four other cables provided power to the blankets placed around each tire. Teams wanted the tires kept warm, so they would be soft and “grippy” the moment a driver went back racing.
Conversely, teams wanted to prevent the car’s brakes, engine and oil from overheating. That’s why they instantly attached the blowers that look like giant hair dryers to the wheels. They were actually pumping cool air to the brakes.
F1 cars don’t have radiators. So the team attached what look like oversized cup holders — each containing another blower — to each side of the body, then poured in dry ice. That forced cold air into the engine.
When the drivers came in, I saw their crews put a TV monitor in front of them and hand the drivers the remote control. That way Fisichella and Kovalainen picked from two viewing choices: A readout of every driver’s lap times, or the TV feed showing cars going around the track.
I first met Beryl Nelson in high school. Our first discussion covered lisp, math, biology and her insights on education. Beryl was instrumental in my decision to study CS and mathematics in college.
Over the years, Beryl’s immense contributions to CS and CS outreach have had massive impact on hundreds of people directly (and several millions through her work at Google). She led teams in the early years at Google Hyderabad, spoke at several ACM Grace Hopper events and did amazing work steering hundreds of high-schoolers like me towards productive careers in computing.
A recent nature publication demonstrated fungal material in the forebrain and hindbrain regions of an alzheimer patient’s brain.
This story reminds me of that brilliant story of Dr. Barry Marshall. Dr. Marshall won the Nobel prize for medicine in 2005 for establishing the cause of stomach ulcers. Before his discovery, stomach ulcers were attributed to spicy food, stress and a poor lifestyle. The discovery established that ulcers were caused by bacterial infection - thus ensuring that antibiotics were a solid cure for stomach ulcers.
A pretty interesting anecdote - the test subject for the experiment was Dr. Marshall himself. He downed some of the bacteria in question and developed symptoms rapidly - contrary to an expected long-term development of symptoms.
Last week, a rich, powerful, and large technology company announced a stylus to go with their popular product.
I have been looking for a paper replacement for quite a while. I typically read literature that contains a lot of math symbols. Constrained by my intellect, I am forced to write a lot of what I am reading - working through the equations on the page is a mechanism of reconstructing the short-term memory of the author as they worked through a proof.
I have owned at least 3 iPads over the last few years. The original intention was to use them as a device to read papers. They all turned into a bedside TV replacement.
I can’t put my finger on it but an LCD display and an expensive stylus cannot recreate the experience of reading and taking notes on an A4 paper with a $2 bic pen.
One possibility I am willing to concede is that the stylus industry is optimized for graphic artists. And it is possible that our needs don’t overlap - I certainly can’t imagine a paper-heavy workflow for something that involves an digital display.
The American war effort in WW2 was characterized by one of the largest compulsory drafts in history. A staggering 50 million men were registered and nearly 10 million inducted.
There was just one problem. Circa 1940, we didn’t know how to mass-produce penicilin and contraceptives weren’t considered an important public health tool. Syphilis - which earned the moniker The Great Imitator (owing to the wide variety of symptoms that victims exhibited), claimed 6 out of every 100,000 deaths. In fact, a mere 20 years before - in the 20s - Syphilis earned a spot among the top 10 killers in the US.
These conditions meant that every inductee was subjected to a blood test - a brutal exercise in logistics for a rapidly expanding military.
Robert Dorfman, a Harvard economist, produced an elegant process to cut down on the number of blood tests needed and in the process produced a seminal paper in the field of group testing.
In this post, we’ll derive the results from that paper - which as you’ll observe boils down to simple algebra.
Today, group testing is leveraged in several domains. We’ll look at one such application of this technique that solves a neat problem in cryptography.