  The prompt emission of gamma-ray bursts (hereafter GRBs) probably comes from
a highly relativistic wind which converts its kinetic energy into radiation via
the formation of shocks within the wind itself. Such "internal shocks" can
occur if the wind is generated with a highly non uniform distribution of the
Lorentz factor Gamma. Taking into account such a variable distribution of
Gamma, we estimate the expected thermal emission of the relativistic wind when
it becomes transparent. We compare this emission (temporal profile + spectrum)
to the emission produced by the internal shocks. In most cases we predict a
rather bright thermal emission that could easily be detected. This favors
acceleration mechanisms for the wind where the main energy reservoir is under
magnetic rather than thermal form. Such scenarios can produce thermal X-ray
precursors comparable to those observed by GINGA and WATCH/GRANAT.
