I use one of these to do damn near the same thing
https://www.amazon.com/Proster-Extractor-Switcher-Converter-Include/dp/B073TTS9QG/ref=mp_s_a_1_4?dchild=1&keywords=hdmi+audio+extractor&qid=1600172940&sprefix=hdmi+audio&sr=8-4