They have the same meaning. The different uses would depend on context.
Student or Learner
I hadn't realized she wasn't English until she spoke.
I didn't realize she wasn't English until she spoke.
Is there a difference between the two sentences in meaning? If there is, what's the difference?
As it so often happens.
Please be aware that I'm neither a native English speaker nor a teacher.