Use of reference data for speech recognition