You have two primary options, I think.
Firstly, consider doing nothing. I think that this would be my preferred solution. If you're concerned about embarrassing them and you aren't trying to get them to quiet down, knowing that they're being overheard may only serve to make them feel inhibited... assuming they don't find it a turn on. In some cases, ignorance truly is bliss.
If you really feel you need to say something, there are a few ways to do it. If you know which apartment/house it is, write them a note and either post it or slip it into their mailbox or under the door. Part of the potential for embarrassment comes from an in-person chat about it. By doing it semi-anonymously you can save them from feeling like they need to apologize for their actions or explain. It also allows you to think ahead and write exactly what you want to say without worrying you're going to muck something up.
Phrase the note in a way that is merely a conveyance of information. You can always say you hear a TV rather than them, specifically.
Hi neighbor! I wanted to let you know that the walls in this building are pretty thin and we've been overhearing things in our place. It's not really bothering us/me but I thought you would like to know.
If you'd rather do it in person, you can always phrase it in a way that's inviting them to let you know if you're being too loud. Perhaps warning them about an upcoming party or construction work.
I think the walls here aren't properly insulated so please let me know if we're being too loud.
If they ask you if you're hearing anything from their side you can just say something like "Occasionally but it's nothing that is bothering me".
The problem here is that either they're turned on by or ambivalent to being overheard or they are going to be embarrassed... if you don't know them very well, it will be difficult to absolutely prevent embarrassment.