This was going to be my suggestion, as well! There are various solutions adjacent to this, as well.
In fact, it was already more-or-less suggested above by MonsterZero, who mentioned an Intel NUC. Asus makes the Tinker Board. You could also buy another older machine and turn it into a home media server. If the desire is to use it just for headphones, though, you'll probably do best to run the simplest system possible. That would be a single board with added storage. The main challenges here will be configuration of the OS and choice/configuration of related software.