The invention relates to the technical field of
speech synthesis, in particular to an SSML visual editing method and security
verification system based on packaging element mapping, and the method comprises the steps: S1, packaging an SSML native
label into a customized DOM packaging element; s2, capturing a cursor position during user interaction, and dynamically inserting the DOM packaging element into the cursor position; s3, verifying the
user input internal capacity through a real-time security
verification mechanism, and constraining the
user input internal capacity as an effective value domain; s4,
synchronizing a user operation result to the attribute of the original
label of the bottom-layer SSML, and generating a standard SSML document; and S5, dynamically stripping all DOM packaging elements and internal SSML labels in the
text stream, and counting the number of characters of the remaining
plain text content. According to the method, the SSML labels are packaged into the visual packaging elements, visual editing, accurate character level control, real-time safety
verification and accurate word counting are achieved, and the efficiency, safety and user experience of SSML editing are remarkably improved.