Touch up your sound with SoundTouch [w/code]

Screen Shot 2014-10-13 at 11.55.42 AM
So I needed to speed up / slow down an audio stream I had (speech generated with Flite TTS) and naively I thought it would suffice to simply sample it at the right intervals and interpolate.
I quickly discovered that just re-sampling won't do because changing frequency also changes pitch proportionally. And then I discovered the world of Time Scaling in audio and it's many algorithms and approaches to change the tempo without changing pitch.
To my surprise there were a number of ready made free libraries that do it, but the first one I tried - RubberBand - did not work out, it had too many dependencies I simply couldn't be bothered compiling it for the Mac. But SoundTouch, well it had a Homebrew formula so it won by default.
I wrote a little simple wrapper around it, that interfaces nicely with Qt.
Let's see what's going on there
Continue reading "Touch up your sound with SoundTouch [w/code]"


Push a file to your Smartphone

This is a quick tip. If you need to push a notification to your smartphone, or even send a file, I recently stumbled upon "Pushbullet".
I was looking for a solution to send a file (with automatic download) to my phone, via bash script on my raspberry pi. I've been using pushover for a while, but as far as I know, it doesn't support files

I have read the Pushbullet API, and came to realise that sending a file have 3 steps

1. Getting credentials to send the file
2. Upload the file to a remote server
3. Send a notification of "file" type with the download url

Of course, you can do 1 and 2 youself if you have access to a place which stores the file (I also managed to send a dropbox download link)

You need to sign up for Pushbullet via web, to get the api key, and also install the app on your smartphone (obviously)

So here is the bash script (It's not elegant - but it works)
Continue reading "Push a file to your Smartphone"


How I fell for QGLViewer for my Qt/OpenGL projects [w/ code]

While looking for a very simple way to start up an OpenGL visualizer for quick 3D hacks, I discovered an excellent library called libQGLViewer, and I want to quickly show how easy it is to setup a 3D environment with it. This library provides an easy to access and feature-rich QtWidget you can embed in your UIs or use stand-alone (this may sound like a marketing thing, but they are not paying me anything 🙂

This is based on the library's own examples at:, and some of the examples that come with the library source itself.

Let's see how it's done
Continue reading "How I fell for QGLViewer for my Qt/OpenGL projects [w/ code]"


A simple object classifier with Bag-of-Words using OpenCV 2.3 [w/ code]

Just wanted to share of some code I've been writing.
So I wanted to create a food classifier, for a cool project down in the Media Lab called FoodCam. It's basically a camera that people put free food under, and they can send an email alert to the entire building to come eat (by pushing a huge button marked "Dinner Bell"). Really a cool thing.

OK let's get down to business.
Continue reading "A simple object classifier with Bag-of-Words using OpenCV 2.3 [w/ code]"


Download all your loved tracks in two simple steps

I'm a fan of online radio, and I have a habit of marking every good song that I hear as a "loved track". Over the years I got quite a list, and so I decided to turn it into my jogging playlist. But for that, I need all the songs downloaded to my computer so I can put them on my mobile. While does link to Amazon for downloading all the loved songs for pay, I'm going to walk the fine moral line here and suggest how you can download every song from existing free YouTube videos.
If it really bothers you, think of it as if I created a YouTube playlist and now I'm using my data plan to stream the songs off YT itself..
Moral issues resolved, we can move on to the scripting.

Update (4/27/12): has moved:, and also added a very neat --extract-audio option so you can get the songs in audio right away (it basically does a conversion in a second step).
Continue reading "Download all your loved tracks in two simple steps"


10 lines-of-code OCR HTTP service with Python, Tesseract and Tornado


I believe that every builder-hacker should have their own little Swiss-army-knife server that just does everything they need, but as a webservice. You can basically do anything as a service nowadays: image/audio/video manipulation, mock-cloud data storage, offload heavy computation, and so on.
Tornado, the lightweight Python webserver is perfect for this, and since so many of the projects these days have Python binding (see python-tesseract), it should be a breeze to integrate them with minimal work.
Let's see how it's done

Continue reading "10 lines-of-code OCR HTTP service with Python, Tesseract and Tornado"


An Android solution for listening to online radio while multitasking

Android + + Dolphin Browser HD + XiiaLive = WIN

It's been a while since I've posted anything in the blog… Sorry for that… very busy times. I had a lot of ideas of what my "comeback post" should be about, but I knew I had to share one of my relatively recent discoveries that made my smartphone online-radio listening experience a whole lot better

If you don't know, this might be the time to get to know it. It's a free service that has a LOT of worldwide radio stations available as an online stream for usage with most of the smartphones.

In order to start using it you need to register for free via your desktop computer, and add the stations you like. Later on, you can surf to the mobile version of the service by mobile web and listen to the stations you selected.

So far so good… I like it. But how about multitasking?

Continue reading "An Android solution for listening to online radio while multitasking"


The proper way to run a remote process

This is the story of my journey to find a way to run a process (or a program on a remote pc)
This wasn't an easy thing at all...

Overall, I thought, this should be an easy thing to do.
I found this C# code on a Microsoft forums

object[] theProcessToRun = { "notepad.exe" };
ConnectionOptions theConnection = new ConnectionOptions();
theConnection.Username = "username";
theConnection.Password = "password";
ManagementScope theScope = new ManagementScope("<\\\\" + IP + "\\root\\cimv2", theConnection);
ManagementClass theClass = new ManagementClass(theScope, new ManagementPath("Win32_Process"), new ObjectGetOptions());
theClass.InvokeMethod("Create", theProcessToRun);

I tried this code, not after forgetting to disable the firewall on the remote computer - a big downside but I guess if I had gone with it I'd hunt a way to stable port to unblock in the firewall.


Then I found the big downside (which can be an upside to some of you):
The remote process this way will never have a GUI window opened (In this example, a process of notepad will be opened in the background).
This can be a big advantage to system admins which want to run scripts.


Ok, back to the quest.

Continue reading "The proper way to run a remote process"


Enhance your GPS device

Many GPS devices are coming with built-in (or bundled) navigation software and does not allow you to install newer version or use the device in any other way that the original menu allows.

This, of course doesn't mean that the device is not CAPABLE of running most of the applications. After all - it is running on Windows CE platform.

Googling a bit lead me to a project called MioPocket. This is a software that patches your mobile windows and installs lots of (freeware) utilities (media player for example) that can really upgrade your usage of the device.

One of the best features (and of course the main reason why those people wrote this utility) is that it enables you to run any navigation software.


Continue reading "Enhance your GPS device"


Dropbox - access important files from anywhere

Lots of people own several computers. Not to mention different operating systems.

Don't you wish you had a folder with some files that will be accessible from every single one of your PCs ?

A friend of mine recommended Dropbox (

This is a software, compatible with Windows, Linux and Mac, which creates a folder on your PC(/mac), that is linked to your account, and with every computer that runs the program (with the specific account) - This folder will be in complete sync.

If you need it from a shared pc - you also have a web interface to download your files.

Also,  a public folder is created which you can just send a direct link for your file to a friend

You get 2GB of online storage for this matter - completely for free from Dropbox, and you can also revert to earlier versions of your files.

Dropbox claims to be encrypted - but I can't guarantee it, so I wouldn't recommend using it for sensitive data (passwords, etc.)

I started using it. Definately recommend it!