Prompt emission spectra from the photosphere of a GRB