          std::string emission_idx_str;
          if (state_idx < hmm.states.size()-1) { 
            std::ostringstream ss;
            ss << hmm.states[state_idx+1].model;
            emission_idx_str = ss.str();
          } else { // Last state, no emission from this triphone
            emission_idx_str = ",";
          }
          fprintf(fstout, "T %d %d %s , %.6f\n", last_state_idx-1, last_state_idx, emission_idx_str.c_str(), 
                  trans.log_prob /*pow(10, trans.log_prob)*/);