Merge voices based on map instead of array to prevent crash