This note is about functions f : Aω → Bω whose graph is recognized by a B¨uchi finite automaton on the product alphabet A × B. These functions are Baire class 2 in the Baire hierarchy of Borel functions and it is decidable whether such fonction are continuous or not. In 1920 W. Sierpinski showed that a function f : R → R is Baire class 1 if and only if both the overgraph and the undergraph of f are Fσ. We show that such characterization is also true for functions on infinite words if we replace the real ordering by the lexicographical ordering on Bω. From this we deduce that it is decidable whether such fonction are of Baire class 1 or not. We extend this result to reals functions definable by automata in Pisot base. Key words: Borel set, Borel function, automata, sequential machine.