We have observed photoluminescence at 1.54 µm from a-Si:H films doped with erbium of various degrees of purity. It is shown that the additional introduction of oxygen activates the Er ions. The effect of silicides and defects in amorphous silicon a-Si:H films and in crystalline silicon c-Si is investigated.