Despite what you see in the spy movies, what people call a "silencer" can't really be done in any size smaller than a beer bottle. Printed on normal 3D printers, this is a sound moderator: It won't eliminate the sound of an airgun firing, but will cut out the sharp "crack" that makes birds fly off and wives complain from the study.
It works by allowing the excess gas from the barrel to expand slowly in a series of chambers, shown in the cutaway image. If you use this with a firearm you will probably melt it.
Adjust barrel diameter and calibre settings in SCAD file, print, fasten to airgun barrel with stainless steel hose clamp. Supplied STL is for a 12mm diameter barrel in 5.56mm (.22) calibre.
Apply standard firearm safety practices when aligning the moderator with the centre of the barrel. i.e. don't look down the bloody thing when it is loaded!
If your 3D printer has a lot of headroom, enable the 4th segment in the SCAD file.