Adding a muffler that adds back pressure to the engine changes the air gas flow and will ruin the generator.
Consider sound baffling material rated for heat. That will make a difference.
I used this material for the dog house.
www.dynamat.com
You could put it on some surfaces of the generator or on the compartment walls. Just do not block airflow.