public Result recognizeFromResult(Result r)
	{
		//get phonemes
		ArrayList<PhonemeContainer> phonemesSpeech = pc.getPhonemes(r);
		
		//get best result
		String[] phonemes = phonemesSpeech.get(0).getPhonemes();

		//ad to phone frontend
		pfe.addPhonemes(phonemes);

		//start postprocessing
        r = null;
        edu.cmu.sphinx.result.Result result;
        while ((result = recognizer.recognize())!= null) {
        		if(r == null)
        			r= new Result();
        		

        		String refPhoneme = "";
        		for(String s: phonemes)
        			refPhoneme = refPhoneme + s + " ";

        		//get phoneme sequence of hypotheses
        		String[] s2 = result.getBestPronunciationResult().split(" ");
        		Pattern p = Pattern.compile(".*\\[(.*)\\]");
        		
        		String hypPhoneme = "";
        		//get phonemes for hypotheses phoneme sequence
        		for(String s: s2)
        		{
        			Matcher m = p.matcher(s);
        			if(m.find()){
        				String[] s3 = m.group(1).split(",");
        				for(String s4: s3)
        					hypPhoneme = hypPhoneme + s4 + " ";
        			}
        		}

        		//set the phoneme sequences in the result
        		r.setRefPhoneme(refPhoneme);
        		r.setHypPhoneme(hypPhoneme);
        	    
  
        		//get best result
                String resultText = result.getBestFinalResultNoFiller();
                if(resultText.equals(""))
                	return null;
                r.addResult(resultText);

                //add rest to 10-best list
                int i = 0;
                for(Token t: result.getResultTokens())
                {

                	
                	if(i>=9)
                		break;
                	r.addResult(t.getWordPathNoFiller());
                	i++;
                }
                

        }
       return r;

	}