The dielectric function of Si nanoparticles embedded in silica has been determined from spectroscopic ellipsometry and photothermal deflexion spectroscopy from 0.7 to 6 eV. The influence of crystalline fraction and diameter of the nanoparticles on their optical properties has been investigated. Above 4 nm of diameter, the nanoparticles presented a dielectric function similar to that of fine grained polycrystalline Si (poly-Si) at photon energy higher than 2 eV, with the well marked structures associated with the E1 and E2 critical points. In contrast, below 2 eV their absorption coefficient was smaller than for poly-Si. Below 2.5 nm of diameter, the dielectric function of the nanoparticles drastically changed. The magnitude of the imaginary part of the dielectric function of the nanoparticles near the position of the E1 critical point constantly decreased, whereas it increased at the position of the E2 critical point. These observations can be interpreted as the result of the transfer of the oscillator strength of the low energy states to the high energy states as the diameter of the nanoparticles decreases. The states associated with the fundamental indirect gap are slowly blueshifted when the diameter of the nanoparticles decreased, as evidenced by photoluminescence measurements.