public static String[] getPhonemeASR2(int i, String refWords,
			String refPhones, String testWav, String lesson, String choices) {
		String[] line = new String[i];
		int timeout = 0;
		int trial = 0;
		// if (!Globals.installer){
		// testWav = "../../" + testWav.replaceAll("\"", "");
		// }
		String j_phcmd = "janus -f janus/sayword/sayword.tcl " + testWav + " "
				+ choices + " \"" + refPhones + "\"";

		SpeechScorer.janusCommand = j_phcmd;
		LOGGER.debug("Creating speech recognition process to decode given speech file "
				+ "using the following command:");
		LOGGER.debug(j_phcmd);
		try {
			do {
				if (trial > 0) {
					LOGGER.error("Failed to decode speech in trial #" + trial
							+ ".\n" + "Trying to decode again.");
					timeout = timeout + 10;
				}
				Runtime r = Runtime.getRuntime();
				Process p = r.exec(j_phcmd);

				BufferedReader b = new BufferedReader(new InputStreamReader(
						p.getInputStream()));
				i = 0;
				while ((line[i] = b.readLine()) != null) {
					if (line[i].equals("*")) {
						p.destroy();
					}
					i++;
				}
				trial++;
			} while (line[0] == null && trial < 3);
		} catch (Exception e) {
			LOGGER.error(
					"Failed to create process for speech recognition engine.",
					e);
		}
		if (line[0] == null) {
			LOGGER.error("Failed to recognize sample wav file.");
			LOGGER.debug("OUTPUT: null");
		} else {
			for (i = 0; i < line.length; i++) {
				if (line[i] != null)
					LOGGER.debug("OUTPUT: " + i + " - " + line[i]);
			}
		}
		return line;
	}