Is libcanberra deprecated?

libcanberra is a library that was meant to be used to produce a contextual sound; if you perform an action, and that action is supposed to be associated with a sound, libcanberra would allow the application (or the toolkit) to play that sound. It additionally allowed tying information to that sound, like where the position of the pointer was, or where the position of the window on the screen was. Finally, it allowed to specify sounds by name, which would then be resolved to an on-disk location that could be replaced by different “sound themes”.

In practice, nobody used it, and very, very few sound themes were ever made, because creating a soundscape is incredibly complicated and not many sound engineers are willing to work on the free software desktop. Plus, a lot of the contextual information was tied to the X11 windowing system.

There’s a libcanberra-gtk3 as well.

No, sorry; you’ll have to ask the maintainers of your Linux distribution.