Port Speech sample code to Android 4.x.