The best way to get audio working with DVI-D is via
simple DVI to HDMI cable. These are more convenient because you don’t need to deal with converters that require external power and even more cables. DVI to HDMI cables should be able to carryover sound, although it depends on the capabilities of your device.
There’s one issue you need to be aware of though, computers with old graphics cards might not support this feature. Most modern GPUs should work though (at least, ones made in the last decade). For example, Geforce and Radeon’s modern cards support audio over DVI.