sclass Audio_TwoWordAnalyzer1 { static int baseSize = 1024; S word1, word2; Rect rect; // in baseSize*baseSize float threshold; S analyze(BWImage img) { Rect r = rescaleRect(rect, baseSize, baseSize, img.getWidth(), img.getHeight()); double b = clipBWImage(img, r).averageBrightness(); //print(r + " => " + b); ret b >= threshold ? word1 : word2; } }