The EEPROM 24C512 is 512Kbits and it can store up to 3 seconds wave file of 22.050KHz, 8 bits, mono.
The PIC reads the ROM bytes in a sequential read mode and stream each byte to the PWM generator at a rate of about 22 KHz. The I2C bus works at 400 KHz for the purpose of managing to process 22 Kbits per second. Changing the bus frequency changes the speed of the sound.
Details
Converting sound file to hex:
Convert sound file to .wav PCM 22.050KHz, 8 bits, mono, Change the file name extension from wav to bin and load the bin file to the EEPROM Programmer or PICKIT.