In connection to the Fuglede conjecture, we study groups of local translations associated to spectral sets, i.e., measurable sets in R or Z that have an orthogonal basis of exponential functions. We investigate the connections between the groups of local translations on Z and on R and present some examples for low cardinality. We present some relations between the group of local translations and tilings.