As you can see, there's disagreement about this among native speakers and even among dictionaries—
Houghton Mifflin American Heritage Dictionary:
The act or an instance of walking or performing another activity associated with wakefulness while asleep or in a sleeplike state.
Random House College Dictionary:
The act or state of walking while asleep; somnambulism.
Regardless of technicalities, "sleepwalking" strongly suggests that the person actually got up and walked, and "sleep talking" doesn't necessarily imply any behavior other than talking.
Either term would be acceptable if you don't mind leaving information out. If you want to fully describe what happened, you'll need to use more words.
sleep-talking
orsleep talking
(a two-word phrase with a space or hyphen seems to be usual). The formal or medical name for the behaviour issomniloquy
.