No one expects you to say more than a few words and bereaved family members are often unable to give you their full attention anyway. So, keep it short and make it sincere.
"I'm so very sorry for your loss" may work very well. If you have time to add to those seven words, you might want to share a personal story about a time you shared with the deceased. But, watch closely for signs that your audience needs to move on to receive condolences from other funeral guests.
When speaking to other funeral guests, speak quietly. This is not a time to discuss business or share stories about your recent vacation. Instead, focus on sharing and listening to stories of times spent with the deceased.