A better solution to this problem sounds more complex that it actually is.
1. Create a custom sound profile
Copy an existing profile:
cp -rv /usr/share/sounds/freedesktop ~/.local/share/sounds/my-custom-profile
Open the index.theme file and change the name to my-custom-profile. Replace the sounds you want to change with your own, but be careful, a long sound for audio-volume-change for example will play on volume change until it is completed. For the clocks app you want to look for these files:
- complete.oga
- alarm-clock-elapsed.oga
I have seen ogg and oga files being used, I tried FLAC but that did not work (in the flac container). You may need to convert your sounds to Vorbis.
2. Change your current sound profile
Open dconf-editor, go to /org/gnome/desktop/sound and change theme-name value to your custom profile e.g. my-custom-profile.
I'm not exactly sure how the sound profile is matched, either by folder name or by the name field in the theme file, it seems to be the folder name. I suggest to have an identical name in both places.
Resources