static S witAI_recognizeMP3(File mp3File) ctex { if (mp3File.length() == 0) fail("No file: " + mp3File); print("Calling wit.ai with " + toK(mp3File.length()) + " K mp3..."); S token = witAIToken(); URL url = new URL("https://api.wit.ai/speech?v=20160526"); URLConnection con = url.openConnection(); con.setRequestProperty("Authorization", "Bearer " + token); con.setRequestProperty("Content-Type", "audio/mpeg3"); con.setDoOutput(true); OutputStream out = con.getOutputStream(); file2stream(mp3File, out); out.flush(); S json = loadPage(con, url); out.close(); ret getString(jsonDecodeMap(json), "_text"); }