The optical, electronic and structural properties of n-type and p-type doped amorphous (a-Si:H) and microcrystalline (μc-Si:H) silicon films prepared by hot-wire chemical vapor deposition are studied. Intrinsic a-Si:H films deposited at filament temperatures Tfil∼1900 °C and 2500 °C using equal silane and hydrogen flow rates, and intrinsic μc-Si:H films deposited either by increasing the hydrogen dilution (FH2/FSiH4⩾10) or decreasing the filament temperature (Tfil∼1500 °C), were doped using phosphine (PH3, n-type doping) or trimethylboron (B(CH3)3, p-type doping). The dependence of the properties of the doped films on Tfil, dopant-to-silane gas flow ratio, and hydrogen dilution is studied. Both p-type and n-type μc-Si:H films were prepared and showed dark conductivities σd∼1 Ω−1 cm−1 and activation energies of σd, Ea,σd∼0.05 eV. N-type a-Si:H films were prepared and showed σd∼10−2 Ω−1 cm−1, Ea,σd∼0.25 eV, whereas p-type doping was less efficient, showing σd∼2×10−6 Ω−1 cm−1, Ea,σd∼0.45 eV. High growth rates (rd⩾15 Å/s) were obtained for all the a-Si:H doped samples. Tungsten (W) contamination of the amorphous samples was kept below the detection limit of the secondary ion mass spectroscopy analysis (∼5×1017 atoms/cm3) for all Tfil. The μc-Si:H samples showed W incorporation close to the detection limit (5–7×1017 atoms/cm3) for Tfil⩾1900 °C. The deep defect density dependence on the dopant-to-silane flow rate ratio was found to be consistent with the defect equilibrium doping model.