Okay... what is the hdmi equipped device you are plugging it into?? If it’s a monitor, press the menu button, then go to settings, then general, then sound, and turn up the volume...if you are talking about Apple’s USB-C Digital AV multiport adapter, that does indeed support video and audio output..moshi made one that does as well. I don’t know the maker or model of your USB-C multi media adapter. Apparently lots of companies make them, apart from Apple and Moshi, of course. See if you can find a maker name and model on that USB-C multimedia adapter and go to the maker’s website. Also, see if there are any firmware updates for that thing. -again- go to the maker’s website... and try doing an smc reset on your iMac Pro 2017. It probably has the T2 security chip in it... and here’s what Apple has to say about HDMi audio (link)
https://support.apple.com/en-ca/HT204388
you could also try this (link)
https://appuals.com/fix-hdmi-sound-not-working-mac/
i am replying to you on my iPhone. That’s all i have to work with for the last 7 months.. and there’s no way i could type much more...i have done what i can here
john b