Soak all of the spices with hot water for 30 minutes. Discard the water. On one hand, this helps to remove any medical flavors from the spices and on the other hand, this can speed up the release of the aroma from the spices.
Place soy sauce, sugar, water and spices in a pot, bring to a boil and then slow down the fire and simmer for 30 minutes. Remove from heat and let the spices soak in the soy sauce for 1 hour or overnight.
Stain to get the soy sauce and then place in an oil free air tight container for 1 month.