I want to add hourly beep sound on 7 segment led clock

remember when you have last beeped and beep again, if the hour changes.

add this function and call it in loop

The function will check if it is time to beep.

Proposal, untested:

void timerBeep()
{
  DateTime now = RTC.now();
  int currentHour = now.hour();
  static int lastBeep = 0;
  if (lastBeep != currentHour) 
  {
    lastBeep = currentHour;
    playBuzzer(2);
  }
}

(does not fix your problem with playBuzzer, but you got already the hint ...)