Confidence measures for speech recognition and utterance verification