If you have not mentioned these memories before then use the first one. If you have already mentioned them then you might use the second, but in that case it might be better to say "these memories". One would need to see the full context.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.
Persian LearnerWhat's the difference?To my ear, "the memories" seems to suggest "all memories". Just "memories" is more restricted. The context (the sound of the ocean) even suggests that whichever memories they are would be restricted to those memories which relate to the sound of the ocean. I would use the first, not the second.