It's nothing to be ashamed of, especially if you can't control it.
I also have this, as a part of my tourettes, try going to a film at a movie theatre, and having to shout out words each time someone on screen says something with the letter K in it.
It isn't usually just when people say things as well, when I'm talking to myself in my head, most of it is repeated out loud, very embarrassing in public places.
I wouldn't be ashamed of something that you have no control over, anyway. Trying to control these things can be really exhausting, I often come home after being out for the day, go to my room, pace around for at least two hours and simply repeat words out loud that I've attempted to "hold in" when I was out.
It is embarrassing, but I always feel as though I'm doing more damage to my mental state by not doing what I need to in order to feel good or calm.