A graph G is locally irregular if adjacent vertices of G have distinct degrees. An edge colouring of G is locally irregular if each of its colours induces a locally irregular subgraph of G. The irregular chromatic index of G refers to the least number of colours used by a locally irregular edge colouring of G (if any). We propose a linear-time algorithm for determining the irregular chromatic index of any tree.