Roasting the beans is an essential aspect and serves several purposes. it promotes the taste and aroma and also the color. Dries the cap through and makes it easier to remove. The bean itself also becomes dry, making it easier to grind.
How long they are roasted is very important. Too long is bad for the taste and is very bitter, but too short then the skin is very difficult to remove. Some manufacturers who want to make chocolate with a strong taste but do not wish to increase the cocoa content roast the beans longer to get more flavor intensity.
Each variety needs a different roasting temperature, depending on the texture and taste; the milder the variety, the lower the roasting temperature.
After burning, they are cooled as quickly as possible to prevent them from burning inside.