The workflow of PENTAtrainer2 is illustrated in the following diagram. Three steps are needed: Annotation, Learning and Synthesis. The first step (1) is to annotate the corpus with the Annotation tool. Before the annotation, the number of communicative/linguistic functions to be included need to be determined, as well as their internal categories. This annotation step is the most time consuming part of the process. Users need to mark the boundaries in each functional layer and name the category in interval. In the second step (2), parameters are automatically optimized by the Learning tool. This step requires user input only on a few optimization parameters. The speed of optimization depends on the size of the corpus, the number of functional combinations, and the optimization parameters mentioned above. In the last step (3), i.e., after the completion of optimization, users can use the Synthesis tool to synthesize F0 contours based on the optimized parameters and visually compare them to the originals.