Target speech synthesis model training method and speech synthesis method

CN123016983APending Publication Date: 2026-10-30BEIJING YUANLI WEILAI SCI & TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611212185.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0003]然而,监督微调通常基于文本与对应语音之间的正向监督关系调整模型参数,主要以提高训练语音的生成概率为目标,未充分利用同一样本文本对应的不同重音表现语音之间的差异,影响语音合成模型在指定文本位置生成重音的准确性和稳定性

Benefits of technology

[0010]根据本说明书实施例的第六方面,提供了一种计算机可读存储介质,其存储有计算机程序/指令,该计算机程序/指令被处理器执行时实现上述第一方面或第二方面所提供方法的步骤。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123016983A_ABST
    Figure CN123016983A_ABST
Patent Text Reader

Abstract

Embodiments of the present specification provide a target speech synthesis model training method and a speech synthesis method, wherein the target speech synthesis model training method comprises: obtaining model training data, wherein the model training data comprises sample text and a plurality of candidate speeches corresponding to the sample text; performing stress character detection on the plurality of candidate speeches respectively to obtain candidate stress character information corresponding to each candidate speech; dividing the plurality of candidate speeches according to sample stress character information corresponding to the sample text and the candidate stress character information to obtain positive sample speeches and negative sample speeches; and performing reinforcement learning on an initial speech synthesis model according to the sample text, the positive sample speeches and the negative sample speeches to obtain a trained target speech synthesis model. In this way, the accuracy and stability of the target speech synthesis model in generating stress at a specified character position can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments in this specification relate to the field of artificial intelligence technology, and in particular to a method for training a target speech synthesis model and a speech synthesis method. Background Technology

[0002] With the development of deep learning and large language model technology, text-to-speech synthesis technology has gradually evolved from traditional acoustic models to speech synthesis architectures based on large language models. In related technologies, accent marks are typically set in the input text, and supervised fine-tuning methods are used to enable the speech synthesis model to learn to generate speech with corresponding prosodic emphasis at specified text locations.

[0003] However, supervised fine-tuning usually adjusts model parameters based on the positive supervision relationship between text and corresponding speech, mainly aiming to improve the generation probability of training speech. It does not make full use of the differences between different accents in the same sample text, affecting the accuracy and stability of speech synthesis models in generating accents at specified text positions. Summary of the Invention

[0004] In view of this, embodiments of this specification provide a method for training a target speech synthesis model. One or more embodiments of this specification also relate to a speech synthesis method, a target speech synthesis model training device, a speech synthesis device, a computing device, a computer-readable storage medium, and a computer program product, to address the technical deficiencies existing in the prior art.

[0005] According to a first aspect of the embodiments of this specification, a method for training a target speech synthesis model is provided, comprising: Obtain model training data, which includes sample text and multiple candidate speech corresponding to the sample text. The sample text carries sample accent character information, which is used to indicate the position of the sample accent character in the sample text. Accent character detection is performed on multiple candidate speech samples to obtain candidate accent character information for each candidate speech sample. Based on the sample accent character information and candidate accent character information corresponding to the sample text, multiple candidate speech are divided to obtain positive sample speech and negative sample speech; Based on the sample text, positive sample speech, and negative sample speech, reinforcement learning is performed on the initial speech synthesis model to obtain the trained target speech synthesis model.

[0006] According to a second aspect of the embodiments of this specification, a speech synthesis method is provided, comprising: Obtain the text to be synthesized, wherein the text to be synthesized carries target accent character information, which is used to indicate the position of the target accent character in the text to be synthesized; The target speech synthesis model is invoked to perform speech synthesis based on the text to be synthesized, thereby obtaining the target synthesized speech. The target speech synthesis model is trained based on the method provided in the first aspect above.

[0007] According to a third aspect of the embodiments of this specification, a target speech synthesis model training apparatus is provided, comprising: The acquisition module is configured to acquire model training data, which includes sample text and multiple candidate speech corresponding to the sample text. The sample text carries sample accent character information, which is used to indicate the position of the sample accent character in the sample text. The detection module is configured to detect accent characters in multiple candidate speech samples and obtain the candidate accent character information for each candidate speech sample. The segmentation module is configured to segment multiple candidate speech based on the sample accent character information and candidate accent character information corresponding to the sample text, thereby obtaining positive sample speech and negative sample speech. The training module is configured to perform reinforcement learning on the initial speech synthesis model based on sample text, positive sample speech, and negative sample speech to obtain the trained target speech synthesis model.

[0008] According to a fourth aspect of the embodiments of this specification, a speech synthesis apparatus is provided, comprising: The second acquisition module is configured to acquire the text to be synthesized, wherein the text to be synthesized carries target accent character information, and the target accent character information is used to indicate the position of the target accent character in the text to be synthesized; The synthesis module is configured to call the target speech synthesis model to perform speech synthesis based on the text to be synthesized, thereby obtaining the target synthesized speech. The target speech synthesis model is trained based on the method provided in the first aspect above.

[0009] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method provided in the first or second aspect above.

[0010] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores a computer program / instructions that, when executed by a processor, implement the steps of the method provided in the first or second aspect described above.

[0011] According to a seventh aspect of the embodiments of this specification, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the method provided in the first or second aspect described above.

[0012] This specification provides a method for training a target speech synthesis model, which, through acquiring model training data including sample text and multiple candidate speech samples corresponding to the same sample text, and using sample accent character information to indicate the text position where accent is expected, can obtain candidate speech samples with different accent performances based on unified text content and a unified accent target, providing a consistent data foundation for comparing candidate speech samples. By detecting accent characters in multiple candidate speech samples separately, the character information that actually reflects accent in each candidate speech sample can be obtained, thereby converting the accent performance of candidate speech samples into information that can be used for subsequent processing, reducing reliance on human auditory evaluation. By comparing sample accent character information and candidate accent character information, and classifying multiple candidate speech samples into positive and negative sample speech samples accordingly, the classification results of positive and negative samples can be made to correspond to the expected accent position, improving the relevance and consistency of the preference training data. By using sample text, positive sample speech samples, and negative sample speech samples for reinforcement learning on the initial speech synthesis model, the model's preference for generating speech samples that meet the expected accent requirements can be improved, while the preference for generating speech samples that do not meet the accent performance requirements can be reduced. This enables the automatic construction and utilization of accent training samples, improving the accuracy and stability of the target speech synthesis model in generating accents at specified character positions. Attached Figure Description

[0013] Figure 1 This is a flowchart illustrating a target speech synthesis model training method provided in one embodiment of this specification; Figure 2 This is a flowchart illustrating a speech synthesis method provided in one embodiment of this specification; Figure 3 This is a schematic diagram of the overall process of a target speech synthesis model training method provided in one embodiment of this specification; Figure 4 This is a schematic diagram illustrating the construction process of positive and negative sample speech according to one embodiment of this specification; Figure 5 This is a schematic diagram of the joint loss training process of a target speech synthesis model provided in one embodiment of this specification; Figure 6 This is a schematic diagram of the structure of a target speech synthesis model training device provided in one embodiment of this specification; Figure 7 This is a schematic diagram of the structure of a speech synthesis device provided in one embodiment of this specification; Figure 8 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0014] Many specific details are set forth in the following description to provide a full understanding of this specification. However, this specification can be implemented in many other ways than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this specification. Therefore, this specification is not limited to the specific implementations disclosed below.

[0015] The terminology used in one or more embodiments of this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this specification. The singular forms “a,” “described,” and “the” as used in one or more embodiments of this specification and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in one or more embodiments of this specification refers to and includes any or all possible combinations of one or more associated listed items. The term “at least one” as used in one or more embodiments of this specification means “one or more,” and “a plurality of” means “two or more.” The term “comprising” is an open-ended description and should be understood as “including but not limiting,” and may include other content in addition to what has been described.

[0016] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this specification, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this specification, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0017] Furthermore, it should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in one or more embodiments of this specification are obtained through open-source datasets or public datasets that comply with their license agreements, or are obtained with full authorization from the relevant parties. Moreover, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0018] In one or more embodiments of this specification, a large model refers to a deep learning model with a large number of model parameters, typically containing hundreds of millions, tens of billions, hundreds of billions, trillions, or even tens of trillions of model parameters. A large model can also be called a foundation model. It is pre-trained using large-scale unlabeled corpora to produce a pre-trained model with hundreds of millions of parameters. Such models can adapt to a wide range of downstream tasks and have good generalization ability. Examples include Large Language Models (LLMs) and multi-modal pre-training models.

[0019] In practical applications, large models only require a small number of samples to fine-tune the pre-trained model before they can be applied to different tasks. Large models can be widely used in fields such as Natural Language Processing (NLP) and Computer Vision. Specifically, they can be applied to computer vision tasks such as Visual Question Answering (VQA), Image Captioning (IC), and Image Generation, as well as natural language processing tasks such as text-based sentiment classification, text summarization, and machine translation. The main application scenarios of large models include digital assistants, intelligent robots, search, online education, office software, e-commerce, and intelligent design.

[0020] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0021] Text-to-speech (TTS) is a technology that converts text content into speech signals. Its principle involves analyzing and encoding the input text to determine the corresponding pronunciation content, prosodic information, and speech generation conditions. Then, through acoustic modeling and speech decoding, it generates speech corresponding to the input text.

[0022] Large Language Model-based Text-to-Speech (LLM-TTS) is a speech synthesis technique that utilizes a large language model to model speech sequences. Its principle involves converting text content into a text sequence that the model can process, representing speech as a discrete sequence of speech words, and then having the large language model predict speech words sequentially based on the text sequence using an autoregressive approach. Finally, the predicted speech word sequence is decoded into a continuous speech signal.

[0023] Direct Preference Optimization (DPO) is a model training method that directly adjusts the model's output preference using preference samples. Its principle is to calculate the generation probabilities of the model to be optimized and the reference model for preferred and non-preferred samples respectively, and construct a preference optimization loss based on the difference in positive and negative sample probabilities between the two models, thereby improving the tendency of the model to be optimized to generate preferred samples. This method typically does not require separate training of the reward model, nor does it require performing a proximal policy optimization process.

[0024] Supervised Fine-Tuning (SFT) is a training method that adjusts model parameters using training samples that have a desired input-output correspondence. The principle is to use sample text as model input and the corresponding desired speech or speech word sequence as the supervision target. By reducing the loss between the model's prediction and the supervision target, the model learns the correspondence between text content, stress control information, and speech output.

[0025] A speech token is a discrete data unit obtained by converting a continuous speech signal through speech coding. Multiple speech tokens can be arranged in chronological order to form a speech token sequence, which is used to represent information such as the content, timbre, and prosody of speech.

[0026] Autoregressive generation is a generation method that generates output units one by one according to the data arrangement order. When generating any speech word, the model can determine the probability distribution of the next speech word based on the text conditions and the historical speech words that have already been generated; by repeating the above process until the generation end marker is generated or the preset stopping condition is met, a complete speech word sequence is obtained.

[0027] Negative log-likelihood loss is a loss calculated based on the model's predicted probability of the desired output. The higher the predicted probability assigned to the desired output by the model, the smaller the negative log-likelihood loss typically is. For a sequence of speech words, the conditional probability of each speech word at its corresponding predicted position can be calculated separately, and the negative logarithms of each conditional probability can be summed or averaged to obtain the corresponding negative log-likelihood loss.

[0028] In the current field of accented speech synthesis and speech synthesis model optimization, the mainstream technical solutions can be mainly divided into the following three categories.

[0029] The first category is supervised fine-tuning-based stress-based speech synthesis schemes. These schemes typically set stress markers in the training text and train the speech synthesis model using supervised training samples consisting of the text and corresponding speech. The model learns to adjust prosodic features such as pitch, loudness, and duration at the positions indicated by the stress markers. However, this type of scheme primarily trains the model by increasing the probability of generating correct speech samples. It struggles to apply reverse constraints to the model using speech with unsatisfactory stress effects and also has difficulty distinguishing between different synthesis results where stress is fully, partially, or not present.

[0030] The second category is model training schemes based on direct preference optimization. These schemes typically set up positive and negative samples and adjust the preference relationship of the model to be trained for different samples based on the probability information of positive and negative samples generated by the model to be trained and the reference model, respectively. Direct preference optimization can align preferences without training a separate reward model. However, this type of scheme is mainly applied to discrete text word generation tasks and lacks methods for determining positive and negative samples based on prosodic features such as speech stress, making it difficult to directly apply to the training of stressed speech synthesis models.

[0031] The third category is speech synthesis model training schemes based on human feedback reinforcement learning. These schemes typically collect user or annotation personnel's preferences for different synthesized speech, use this preference data to train a reward model, and then perform reinforcement learning on the speech synthesis model based on the evaluation results output by the reward model. However, this type of scheme relies heavily on manual preference annotation. For fine-grained speech features such as stress and prosody, annotators also need to possess corresponding auditory judgment abilities, resulting in high costs for constructing preference data and complex processing links for reward model training and reinforcement learning.

[0032] Based on this, this specification provides a method for training a target speech synthesis model. This specification also relates to a speech synthesis method, a target speech synthesis model training device, a speech synthesis device, a computing device, a computer-readable storage medium, and a computer program product, which will be described in detail in the following embodiments.

[0033] The target speech synthesis model training method and speech synthesis method provided in the embodiments of this specification can be applied to scenarios such as intelligent voice assistants, in-vehicle navigation, intelligent customer service, audiobooks, news broadcasting, online education, accessible voice services, virtual humans, digital anchors, game character dubbing, and film and television content production. When it is necessary to highlight keywords, proper nouns, time and location, operation instructions, warning content, or emotional emphasis, the stress position in the text to be synthesized can be specified through target stress character information, and speech with corresponding stress expression can be generated. In addition, the embodiments of this specification can also be applied to scenarios such as multilingual speech synthesis, personalized voice synthesis, and batch speech content production to meet the stress control needs of different speakers, different text types, and different business tasks.

[0034] See Figure 1 , Figure 1 This specification shows a flowchart of a target speech synthesis model training method according to an embodiment, which specifically includes the following steps: Step 102: Obtain model training data, which includes sample text and multiple candidate speech corresponding to the sample text. The sample text carries sample accent character information, which is used to indicate the position of the sample accent character in the sample text.

[0035] It should be noted that model training data refers to the data used to train the initial speech synthesis model. Model training data may include one or more training samples, and each training sample may include sample text and multiple candidate speech words corresponding to that sample text.

[0036] Sample text refers to the text used to generate candidate speech and determine the expected stress positions. Sample text may include one or more characters and carries sample stress character information. The language type, text length, and number of sentences contained in the sample text can be set according to actual training needs; this specification does not impose any limitations on these aspects in the embodiments.

[0037] Candidate speech refers to speech that corresponds to the text content of a sample text. Multiple candidate speech corresponding to the same sample text can have the same text content but differ in prosodic characteristics such as pitch, volume, and duration. Candidate speech can be obtained by a speech synthesis model through multiple samplings based on the sample text, or it can be pre-generated speech that is associated with and stored with the sample text.

[0038] Sample accent characters refer to the characters in sample text that are expected to be stressed in the corresponding speech. A sample accent character can be a single character or multiple characters. Multiple sample accent characters can be arranged consecutively to form words or phrases, or they can be distributed in different positions within the sample text. A single sample text may include one or more instances of text content requiring accent.

[0039] Sample accent character information refers to information used to indicate sample accent characters and their positions within the sample text. This information can be represented through accent marks, character indices, character position ranges, or identifiers associated with text terms. For example, paired accent marks can be placed on either side of a sample accent character to determine its position within the text range defined by the accent marks. It is important to note that sample accent character information is not the same concept as the accent marks used to represent it; accent marks are a specific form of representation of sample accent character information.

[0040] In practical applications, there are various ways to obtain model training data, and the specific method should be selected according to the actual situation. This specification does not limit the specific methods used in this embodiment. In one possible implementation, a pre-constructed set of sample texts can be obtained, where each sample text has pre-set accent marks to represent accented character information. For any given sample text, multiple candidate speech samples pre-synthesized and stored based on that sample text can be obtained, and the sample text and its corresponding candidate speech samples can be combined to form model training data. For example, labels can be set on both sides of the characters requiring accent in the sample text, and multiple candidate speech samples corresponding to the sample text can be read from a candidate speech database. In another possible implementation, the original text and its corresponding accent mark can be obtained separately. Based on the accent mark, the sample accented characters can be determined in the original text, and the sample accented character information can be added to the original text to obtain the sample text. Subsequently, a speech synthesis model can be called to perform multiple speech synthesis operations on the sample text, or multiple speech samples can be obtained from the output of the speech synthesis task to obtain multiple candidate speech samples corresponding to the sample text. Thus, sample texts and candidate speech samples can be constructed simultaneously during the model training data acquisition process.

[0041] For example, the original text could be "The weather is very good today," and the accent mark can indicate that the word "very" is the text content that needs to be stressed. Based on this accent mark, "very" can be identified as the sample accent character, and accent marks can be set on both sides of "very" to obtain the sample text "The weather is very good today." <strong> Very< / strong> "Okay." Subsequently, multiple candidate speech samples can be generated based on the sample text, and the sample text and the corresponding multiple candidate speech samples can be combined into model training data.

[0042] In one optional embodiment of this specification, obtaining model training data as described above may include the following steps: Obtain sample text; The auxiliary speech synthesis model is invoked, and multiple samples are taken based on the accent character information of the sample and the sample text to obtain multiple candidate speech corresponding to the sample text.

[0043] An auxiliary speech synthesis model is a speech synthesis model used to generate candidate speech based on sample text and sample accent character information. An auxiliary speech synthesis model can be a supervised, fine-tuned base speech synthesis model, or it can be another speech synthesis model with accent control capabilities.

[0044] Multiple sampling refers to calling the auxiliary speech synthesis model multiple times to generate speech from the same sample text, in order to obtain multiple candidate speech words with the same text content but potentially different prosodic expressions. Each sampling can be independent of the others, thus utilizing the randomness in the speech generation process to form candidate speech words with different stress expressions.

[0045] In practical applications, there are various ways to obtain sample text, and the specific method should be selected according to the actual situation. This specification does not limit the methods used in this embodiment. In one possible implementation, sample text can be read from a pre-constructed text dataset, where each sample text in the dataset carries pre-defined sample accent character information. Sample text can be selected from the text dataset based on information such as text identifier, text length, language type, or training batch. For example, a text with pre-annotated accent character positions can be read from an accented speech training dataset and used as the sample text for this sampling. In another possible implementation, the original text and its corresponding accent position annotations can be obtained. Sample accent characters are determined from the original text based on the accent position annotations, and the sample accent character information indicating the position of the sample accent character is added to the original text to obtain the sample text. The accent position annotations can be pre-set manually or derived from existing text annotation results. For example, after obtaining the original text "Today the weather is very good" and the accent position annotations indicating the word "very," sample accent characters can be determined based on these accent position annotations, and sample text carrying the corresponding sample accent character information can be generated.

[0046] Furthermore, there are various ways to call the auxiliary speech synthesis model for multiple samplings, and the specific method should be selected according to the actual situation. This specification does not limit the specific method used in the embodiments. In one possible implementation, the number of samplings can be preset, and the auxiliary speech synthesis model can be called to perform a preset number of independent random samplings based on the same sample text and the corresponding sample accent character information to obtain a preset number of candidate speech samples. For example, the number of samplings can be set to five, obtaining five candidate speech samples for one sample text. In another possible implementation, the number of samplings can be dynamically adjusted based on the number of candidate speech samples obtained or the differences in accent performance among the candidate speech samples. For example, if the obtained candidate speech samples are insufficient to meet the requirements for subsequent positive and negative sample speech separation, the auxiliary speech synthesis model can continue to be called for sampling; if the obtained candidate speech samples meet the requirements for subsequent processing, sampling can be stopped. The number of samplings can be set according to the actual amount of data and model training requirements; for example, it can be selected within the range of three to ten times, or other positive integers can be used.

[0047] By applying the solutions of the embodiments in this specification, multiple candidate speech samples with different stress performances can be obtained for the same sample text. This allows the multiple candidate speech samples to have consistent text content and stress targets, providing a data basis for subsequent comparison of the actual stress performance of each candidate speech sample and for distinguishing between positive and negative sample speech samples.

[0048] In one optional embodiment of this specification, the above-mentioned invocation of the auxiliary speech synthesis model, based on sample accent character information and sample text, to obtain multiple candidate speech corresponding to the sample text, may include the following steps: Remove the accented character information from the sample text to obtain the updated sample text, and encode the accented character information into the word sequence of the updated sample text to obtain the model input information; An auxiliary speech synthesis model is invoked, and multiple samples are taken based on the model input information to obtain multiple candidate speech corresponding to the sample text.

[0049] It should be noted that the updated sample text refers to the text obtained after removing the character forms used to represent the accent characters in the sample text. Removing the accent character information can mean removing the accent marks used to indicate the position of the accent characters, while retaining the original text content and the accent characters themselves.

[0050] A lexical sequence refers to a data sequence formed by lexically processing the sample updated text and arranging the text in the order of the sample updated text. One lexical unit in the lexical sequence can correspond to a character, a word, a subword, or other text unit, which can be determined according to the word segmentation method used by the auxiliary speech synthesis model.

[0051] Model input information refers to the information that can be input into the auxiliary speech synthesis model and used to generate candidate speech. Model input information may include the lexical sequence corresponding to the sample update text and the sample accent character information encoded in the lexical sequence.

[0052] In practical applications, there are various ways to remove sample accent characters from sample text to obtain updated sample text, and then encode the sample accent character information into the lexical sequence of the updated sample text to obtain model input information. The specific method chosen depends on the actual situation, and this specification does not limit this approach. In one possible implementation, paired accent tags can be set on both sides of the sample accent characters. When processing the sample text, the sample accent characters and their positions in the sample text can be determined based on the accent tags. The character forms of the accent tags are then removed to obtain the updated sample text. Subsequently, the updated sample text is lexicalized, and the sample accent character information is encoded into the corresponding lexical units based on the position of the sample accent characters to obtain model input information. In another possible implementation, emphasis tags, underline markers, or other markers recognizable by text processing programs can be used to represent the sample accent character information. The position of the accented character in the sample can be determined based on the corresponding marker. After removing the marker, the updated sample text is obtained, and a correspondence is established between the position of the accented character and the corresponding word in the updated sample text. The accented character information is then encoded into the corresponding word to obtain the model input information. The specific form of the accent marker and the encoding form of the accented character information in the word sequence can be determined based on the text encoding method used by the auxiliary speech synthesis model.

[0053] Furthermore, there are various ways to call the auxiliary speech synthesis model and perform multiple samplings based on the model input information to obtain multiple candidate speech corresponding to the sample text. The specific method chosen depends on the actual situation, and this specification does not limit this approach. In one possible implementation, a fixed number of sampling times can be preset. While keeping the model input information unchanged, the auxiliary speech synthesis model is called to perform multiple independent random samplings to obtain a preset number of candidate speech. In another possible implementation, the number of sampling times can be dynamically adjusted based on the number of candidate speech already obtained or whether the candidate speech meets the requirements for subsequent sample construction. When the number of candidate speech is insufficient, sampling can continue based on the model input information; when the candidate speech meets the requirements for subsequent processing, sampling can stop. The number of sampling times can be any positive integer.

[0054] For example, the sample text could be "Today's weather" <strong> Very< / strong> "Okay", among which, <strong>The label is used to characterize the accented character information of the sample and indicates that "very" is the accented character of the sample. It can be based on pairs of... <strong> and< / strong> The labels determine the location of "very" in the sample text, and paired words are removed. <strong> and< / strong> The system first labels the text "The weather is very good today" to obtain sample updated text. Then, it performs lexicalization on the sample updated text, encoding the accented character information indicating the position of "very" into the corresponding lexical unit to obtain the model input information. An auxiliary speech synthesis model can be invoked, and five independent random samples can be performed based on the model's input information to obtain five candidate speech samples.

[0055] By applying the scheme of the embodiments in this specification, the character form of accent marks in the sample text can be removed, and the accent character information of the sample can be retained in the lexical sequence of the updated sample text. This reduces the likelihood of accent marks being used as ordinary text content in speech synthesis, while enabling the auxiliary speech synthesis model to determine the desired accent position based on the information encoded in the lexical sequence, providing an input basis for generating multiple candidate speech corresponding to the same sample text.

[0056] Step 104: Perform accent character detection on multiple candidate speech samples to obtain the candidate accent character information for each candidate speech sample.

[0057] It should be noted that accent character detection refers to the analysis of accent patterns in candidate speech to identify the text characters that actually express accent in the candidate speech. Candidate accent characters are text characters identified as expressing accent in a candidate speech based on its pitch, volume, duration, and other prosodic characteristics. A candidate accent character can be a single character or multiple consecutive characters forming a word or phrase.

[0058] Candidate accent character information refers to information used to indicate candidate accent characters and their positions in the corresponding text. Candidate accent character information may include at least one of the following: character content, character index, character position range, order of occurrence, and accent detection confidence. For example, when the same word appears multiple times in the text, the candidate accent character information can indicate the actual text position where the accent is expressed by combining the word content and the order of occurrence.

[0059] In practical applications, there are various ways to detect accented characters from multiple candidate speech samples to obtain the corresponding candidate accented character information. The specific method chosen depends on the actual situation, and this specification does not limit this approach. In one possible implementation, each candidate speech sample and its corresponding text can be input into a multimodal model supporting both speech and text processing. The multimodal model analyzes the speech content and prosodic representation of the candidate speech samples to determine the text content that actually expresses accent in the sample speech and outputs the corresponding candidate accented character information. For example, the multimodal model can output the character content, character position, detection confidence, and corresponding acoustic feature description of the candidate accented character. In another possible implementation, a pre-trained speech accent detection model can be invoked to process multiple candidate speech samples separately. The speech accent detection model can extract acoustic features such as pitch, energy, and duration from the candidate speech samples and determine the text characters that actually express accent in the sample speech based on the extracted acoustic features, thereby generating the corresponding candidate accented character information. Speech stress detection models can be speech stress detection classifiers, audio and text alignment models, or other models that can output stress detection results.

[0060] In some embodiments, accent character detection can be performed sequentially according to the order of candidate speech; alternatively, multiple candidate speech samples can be grouped into a detection batch, and the candidate accent character information corresponding to each candidate speech sample can be obtained in parallel. For any candidate speech sample, the obtained candidate accent character information is stored in association with that candidate speech sample, so that the candidate speech sample corresponding to each candidate accent character information sample can be determined in subsequent processing.

[0061] For example, the sample text is "The weather is very good today," which corresponds to five candidate speech words. The five candidate speech words and the text "The weather is very good today" can be input into the accent detection model. For one candidate speech word, if the accent detection model determines that "very" is stressed in that word, then the character content corresponding to "very" and its position in the text can be determined as the candidate accent character information for that candidate speech word. For another candidate speech word, if the accent detection model determines that "weather" is stressed, then candidate accent character information can be generated to indicate the position of the character corresponding to "weather."

[0062] In one optional embodiment of this specification, the above-described process of detecting accented characters in multiple candidate speech samples to obtain candidate accented character information for each candidate speech sample may include the following steps: The accent character detection model is invoked, and accent character detection is performed on multiple candidate speech based on the detection prompt information to obtain the candidate accent character information corresponding to each candidate speech. The detection prompt information is used to guide the accent character detection model to perform accent character detection on each candidate speech based on the acoustic features of the character to be detected and the adjacent characters to be detected. The character to be detected is any character in the candidate speech, and the adjacent characters to be detected are characters in the same candidate speech that are adjacent to the character to be detected. The acoustic features include at least one of pitch, volume, and duration.

[0063] It should be noted that a stress character detection model refers to a model that can analyze the speech content and prosodic expression of candidate speech and determine the characters that actually express stress in the candidate speech. Stress character detection models can be multimodal large language models that support joint speech and text processing, or other models that determine stress characters based on speech acoustic features.

[0064] Detection prompts refer to information used to describe the accented character detection task, detection criteria, judgment rules, and output requirements to the accented character detection model. Detection prompts can include system prompts and user prompts. System prompts can define the task role of the accented character detection model, while user prompts can instruct the model to determine accent based on the acoustic feature differences between the character to be detected and its adjacent characters. Detection prompts can be set in the form of natural language commands, structured commands, or a combination of natural language commands and structured parameters.

[0065] The character to be detected refers to any character in the text corresponding to the candidate speech that is currently being tested for stress. Adjacent characters to be detected refer to characters in the text corresponding to the candidate speech that are located before and / or after the character to be detected. Adjacent characters to be detected can include characters directly adjacent to the character to be detected, or multiple characters within a preset range before and after the character to be detected. By using adjacent characters to be detected as local references, the prosodic variation of the character to be detected relative to the adjacent text content can be used to determine whether the character to be detected is stressed.

[0066] Acoustic features refer to speech features that reflect the prosodic expression of candidate speech. Pitch can be used to characterize the level and variation of the fundamental frequency of speech; volume can be used to characterize the loudness or energy variation of the speech signal; duration can be used to characterize the duration of the speech segment corresponding to a character. Accent character detection models can detect accented characters based on one of the acoustic features—pitch, volume, and duration—or by combining two or three of these features.

[0067] In practical applications, there are various ways to call the accent detection model and perform accent detection on multiple candidate speech based on detection prompts. The specific method is selected according to the actual situation, and this specification does not limit this approach. In one possible implementation, any candidate speech, the corresponding text, and pre-set detection prompts can be input into the accent detection model. The detection prompts guide the accent detection model to sequentially treat each character in the text as the character to be detected and the characters within a preset range before and after the character to be detected as adjacent characters. The model compares the differences between the character to be detected and its adjacent characters in terms of pitch, volume, and duration to determine whether the character to be detected is a candidate accent character. For example, the detection prompts can instruct the accent detection model to use the speech segments corresponding to the three words before and after the character to be detected as local references to analyze whether the pitch changes, loudness peaks, and durations of the speech segments corresponding to the character to be detected deviate from the local references. When at least two of the acoustic features meet the corresponding judgment conditions, the character to be detected can be identified as a candidate accent character. Exemplary judgment criteria may include a pitch change exceeding 30% of the average of adjacent speech, a volume peak exceeding 20% ​​of the local reference, or a pitch length increase exceeding 40%. The above values ​​are merely examples, and specific thresholds can be set according to speech type, speaker characteristics, and the processing capabilities of the accent character detection model.

[0068] In another possible implementation of this specification, detection prompts can be dynamically generated based on the structure of the text corresponding to the candidate speech. For any character to be detected in the text, the detection prompts can identify the adjacent characters to be detected, and instruct the accent character detection model to acquire the acoustic features of the speech segments corresponding to the character to be detected and the adjacent characters to be detected, respectively. When the character to be detected is located at the beginning or end of the text, one or more characters located to one side of the character to be detected can be considered as adjacent characters to be detected; when the character to be detected is located in the middle of the text, one or more characters on either side of it can be considered as adjacent characters to be detected. The accent character detection model can output the detection result of whether the character to be detected is a candidate accent character based on the changes in the acoustic features of the character to be detected relative to different adjacent characters to be detected.

[0069] In some embodiments, the detection prompt information may further include a false positive exclusion rule. For example, the stressed character detection model can be instructed to reduce the cases where natural intonation variations, natural collocated words, sentence-final intonation contours, function word pronunciation variations, or instantaneous volume variations generated by plosives and fricatives are determined as stress expressions. Wherein, in the case that a function word presents contrastive emphasis relative to the adjacent characters to be detected, the function word can also be determined as a candidate stressed character. The detection prompt information may further instruct the stressed character detection model to perform detection according to the actual speech performance of the candidate speech, instead of directly inferring the stressed character based on text semantics.

[0070] Exemplarily, the text corresponding to the candidate speech may be "The weather is very nice today". When detecting the character "very", "very" can be determined as the character to be detected, and the character "is" located before "very" and the character "nice" located after "very" can be determined as the adjacent characters to be detected. The stressed character detection model can compare the pitch, volume and duration of the speech segment corresponding to "very" with the speech segments corresponding to "is" and "nice" according to the detection prompt information. In the case that multiple acoustic features of the speech segment corresponding to "very" change correspondingly relative to the adjacent speech segments, "very" can be determined as a candidate stressed character, and candidate stressed character information indicating "very" and its text position is generated.

[0071] By applying the solution of the embodiments of the present specification, the stressed character detection model can be guided by the detection prompt information to take the acoustic features of the adjacent characters to be detected as a local reference, and compare the pitch, volume or duration of the character to be detected. Accordingly, the stressed character detection process can be made to rely more on the relative prosodic variations in the candidate speech, reduce the deviation caused by determining the stressed character only according to text semantics or a single absolute acoustic value, and improve the accuracy and consistency of the candidate stressed character information.

[0072] Step 106: Divide the plurality of candidate speeches according to the sample stressed character information and the candidate stressed character information corresponding to the sample text, so as to obtain positive sample speeches and negative sample speeches.

[0073] It should be noted that the positive sample speech refers to a candidate speech in which the correspondence between the candidate stressed character and the sample stressed character satisfies a preset positive sample condition, and the negative sample speech refers to a candidate speech in which the correspondence between the candidate stressed character and the sample stressed character satisfies a preset negative sample condition. The positive sample speech and the negative sample speech correspond to the same sample text and have different stress performances. Wherein, the positive sample condition and the negative sample condition can be set according to the position correspondence relationship, character coincidence degree or quantity relationship between the candidate stressed character and the sample stressed character.

[0074] In practical applications, multiple candidate speech samples are divided into positive and negative sample speech samples based on the sample accent character information and candidate accent character information corresponding to the sample text. There are various methods to obtain positive and negative sample speech samples, and the specific method chosen depends on the actual situation. This specification does not limit this approach in any way. In one possible implementation, the positions of the sample accent characters and candidate accent characters in the sample text can be determined separately based on the sample accent character information and candidate accent character information, and the positions of the sample accent characters and candidate accent characters are compared. For candidate speech samples where the positions of the candidate accent characters and sample accent characters satisfy a preset matching condition, they can be classified as positive sample speech samples; for candidate speech samples where the positions of the candidate accent characters and sample accent characters do not satisfy the preset matching condition, they can be classified as negative sample speech samples. In another possible implementation, a sample accent character set can be constructed based on the sample accent character information, and a candidate accent character set can be constructed based on the candidate accent character information corresponding to any candidate speech sample. Subsequently, the overlap between the sample accent character set and the candidate accent character set can be determined, and the sample type of the candidate speech sample can be determined based on the overlap. For example, the candidate speech can be determined to be either a positive or negative sample speech based on the number of overlapping characters in the two sets, the proportion of overlapping characters in the sample accented characters, or the inclusion relationship between the two sets.

[0075] In some embodiments, candidate speech where all sample accent characters are covered by candidate accent characters can be identified as positive sample speech, and candidate speech where sample accent characters are only partially covered or not covered can be identified as negative sample speech.

[0076] In some embodiments, positive sample determination thresholds and negative sample determination thresholds can be set separately, and samples are divided based on the degree of matching between the sample accented character and the candidate accented character. When the matching degree reaches the positive sample determination threshold, the corresponding candidate speech can be classified as positive sample speech; when the matching degree does not reach the negative sample determination threshold, the corresponding candidate speech can be classified as negative sample speech; candidate speech that falls between the two thresholds can be excluded from subsequent model training. The positive sample determination threshold and negative sample determination threshold can be set according to the model training requirements and the data distribution of candidate speech.

[0077] For example, the sample text could be "The weather is very good today," where the sample accent character information indicates that "very" is the sample accent character. For the first candidate speech, if the candidate accent character information indicates that "very" is accented, then the first candidate speech can be classified as a positive sample speech. For the second candidate speech, if the candidate accent character information indicates that only "not" is accented, or if no accent is detected at the position corresponding to "very," then the second candidate speech can be classified as a negative sample speech.

[0078] In one optional embodiment of this specification, before dividing multiple candidate speech based on the sample accent character information and candidate accent character information corresponding to the sample text to obtain positive sample speech and negative sample speech, the following steps may be included: Based on candidate accent character information, target candidate speech is selected from multiple candidate speech, wherein the target candidate speech is candidate speech including at least one candidate accent character and / or candidate speech whose candidate accent character information conforms to a preset information format; The above method, based on the sample accent character information and candidate accent character information corresponding to the sample text, divides multiple candidate speech into positive sample speech and negative sample speech, including: Based on the sample accent character information corresponding to the sample text and the candidate accent character information corresponding to the target candidate speech, the target candidate speech is divided to obtain positive sample speech and negative sample speech.

[0079] It should be noted that the target candidate speech refers to the candidate speech that meets the preset screening conditions among multiple candidate speech and is used for subsequent positive sample speech and negative sample speech segmentation. The preset screening conditions may include detecting at least one candidate accented character in the candidate speech and the candidate accented character information conforming to at least one of the preset information formats.

[0080] It should be noted that the preset information format refers to the pre-defined data organization form of the candidate accented character information. The preset information format can define the fields, field types, field value formats, and correspondences between fields included in the candidate accented character information. For example, the candidate accented character information can adopt a structured data format and include at least one of the following: candidate accented character field, character position field, confidence field, and acoustic feature description field. The accented character detection results can be in JSON format, and the detected word and its order of appearance in the full text can be represented by "word#k". For example, the candidate accented character information in JSON format can include a stressed_words field, a confidence field, and an evidence field. The stressed_words field records the candidate accented characters and can represent the corresponding word and its order of appearance in the sample text using the form "word#k"; the confidence field records the confidence level of the accented character detection results; and the evidence field records the acoustic features used to determine the corresponding candidate accented character.

[0081] In practical applications, there are various ways to filter target candidate speech from multiple candidate speech based on candidate accent character information. The specific method is selected according to the actual situation, and this specification does not limit this approach. In one possible implementation, the candidate accent character information corresponding to each candidate speech can be read, and it can be determined whether the candidate accent character information indicates at least one candidate accent character. If the candidate accent character information indicates at least one candidate accent character, the corresponding candidate speech can be identified as the target candidate speech. For example, if the candidate accent character information includes one or more non-empty candidate accent character fields, the corresponding candidate speech can be retained. In another possible implementation, the format of the candidate accent character information corresponding to each candidate speech can be validated to determine whether the candidate accent character information can be parsed according to a preset information format, and whether the parsed field name, field type, or field content meets the corresponding requirements. If the candidate accent character information passes the format validation, the corresponding candidate speech can be identified as the target candidate speech. For example, when the candidate accent character information is in JSON format, it can be determined whether the information can be parsed, and whether the parsing result includes a pre-set candidate accent character field.

[0082] In some embodiments, at least one candidate accented character and the candidate accented character information conforming to a preset information format can be used as filtering conditions simultaneously, and only candidate speech that meets both filtering conditions can be identified as target candidate speech. In other embodiments, either of the above two filtering conditions can be used, or candidate speech that meets either filtering condition can be identified as target candidate speech. Candidate speech whose accented character detection request times out, fails, returns an error in the detection result, or whose candidate accented character information cannot be parsed according to the preset information format can be excluded from being identified as target candidate speech.

[0083] Furthermore, there are multiple ways to segment the target candidate speech based on the sample accent character information corresponding to the sample text and the candidate accent character information corresponding to the target candidate speech. The specific method chosen depends on the actual situation, and this specification does not limit this approach. In one possible implementation, the position of the sample accent character in the sample text can be determined based on the sample accent character information, and the position of the candidate accent character in the sample text can be determined based on the candidate accent character information corresponding to any target candidate speech. Subsequently, the positions of the sample accent characters and the candidate accent characters are compared, and the target candidate speech is segmented into positive or negative sample speech based on whether they meet a preset position matching condition. In another possible implementation, a sample accent character set can be established based on the sample accent character information, a candidate accent character set can be established based on the candidate accent character information corresponding to the target candidate speech, and the overlap or inclusion relationship between the sample accent character set and the candidate accent character set can be compared. When the relationship between the set of accented characters in the samples and the set of accented characters in the candidates satisfies the positive sample partitioning condition, the corresponding target candidate speech can be classified as positive sample speech; when the relationship between the two satisfies the negative sample partitioning condition, the corresponding target candidate speech can be classified as negative sample speech.

[0084] The scheme implemented in this specification allows for the filtering of multiple candidate speech samples based on the detection results of candidate accented characters and the data format of the candidate accented character information. This reduces the number of candidate speech samples with abnormal detection results or unusable information entering the subsequent sample segmentation process. Consequently, the availability and consistency of the data used to segment positive and negative speech samples can be improved.

[0085] In one optional embodiment of this specification, the process of dividing multiple candidate speech samples based on the sample accent character information and candidate accent character information corresponding to the sample text to obtain positive sample speech and negative sample speech may include the following steps: Based on the sample accent character information and candidate accent character information corresponding to the sample text, the accent character coverage index is calculated. The accent character coverage index is used to reflect the degree of coverage of the sample accent character information by the candidate accent character information. Based on the accent character coverage index, positive and negative sample speech are selected from multiple candidate speech samples.

[0086] It should be noted that the accent character coverage index is an indicator used to characterize the degree to which the characters actually stressed in the candidate speech cover the characters expected to be stressed in the sample text. The accent character coverage index can be expressed in numerical, grade, or categorical form. A higher accent character coverage index indicates a more complete coverage of the sample accent characters by the candidate accent characters; a lower accent character coverage index indicates a less complete coverage by the candidate accent characters.

[0087] In practical applications, there are various ways to calculate the accent character coverage index based on the sample accent character information and candidate accent character information corresponding to the sample text. The specific method chosen depends on the actual situation, and this specification does not impose any limitations on this approach. In one possible implementation, the character position of the sample accent character in the sample text can be determined based on the sample accent character information, constructing a sample accent character position set. Then, based on the candidate accent character information corresponding to any candidate speech, the character position of the candidate accent character in the sample text can be determined, constructing a candidate accent character position set. Subsequently, the intersection of the sample accent character position set and the candidate accent character position set can be determined, and the ratio of the number of character positions in the intersection to the total number of character positions in the sample accent character position set can be used as the accent character coverage index corresponding to that candidate speech. This accent character coverage index can be represented by recall. In another possible implementation of this specification, one or more sample accented regions can be determined based on the words, phrases, or continuous character intervals corresponding to the sample accented characters, and candidate accented regions can be determined based on candidate accented character information. Subsequently, the number of sample accented regions or the number of characters covered by the candidate accented regions can be calculated, and the accented character coverage index can be determined based on the ratio between the covered number and the total number of sample accented regions or the total number of sample accented characters. When the same word appears multiple times in the sample text, the corresponding character interval can be determined by combining the order of word appearance to reduce position matching ambiguity caused by the repeated appearance of the same word.

[0088] Furthermore, there are various methods for selecting positive and negative sample speech from multiple candidate speech based on the accent character coverage index. The specific method is selected according to the actual situation, and the embodiments in this specification do not limit this. In one possible implementation of this specification, candidate speech with an accent character coverage index equal to a preset full coverage value can be determined as positive sample speech, and candidate speech with an accent character coverage index less than the preset full coverage value can be determined as negative sample speech. For example, when the accent character coverage index is represented by recall, candidate speech with a recall rate of 1 can be determined as positive sample speech, and candidate speech with a recall rate greater than 0 and less than 1, as well as candidate speech with a recall rate of 0, can be determined as negative sample speech.

[0089] Specifically, the character positions of the sample stressed characters in the sample text may be determined according to the sample stressed character information, to construct a sample stressed character position set P GT ; the character positions of the candidate stressed characters in the sample text are determined according to the candidate stressed character information, to construct a candidate stressed character position set P pred ; the intersection of the sample stressed character position set and the candidate stressed character position set is calculated to obtain a coincident character position set P overlap . With reference to formula (1), the coincident character position set may be expressed as: (1) Further, a stressed character coverage indicator may be calculated according to the number of character positions in the coincident character position set and the number of character positions in the sample stressed character position set. With reference to formula (2), the stressed character coverage indicator may be expressed as: (2) Herein, Recall represents the stressed character coverage indicator, |P overlap | represents the number of character positions included in the coincident character position set, |P GT | represents the number of character positions included in the sample stressed character position set. When Recall=1, it may indicate that all sample stressed characters are covered by the candidate stressed characters; when 0<Recall<1, it may indicate that part of the sample stressed characters are covered by the candidate stressed characters; when Recall=0, it may indicate that none of the sample stressed characters are covered by the candidate stressed characters.

[0090] For example, the sample text may be "Please <strong> be sure< / strong> arrive <strong> morning< / strong> at the venue", and the sample stressed character information is used for indicating that "must" and "morning" are the sample stressed characters. Assuming that "must" and "morning" respectively correspond to four character positions, the sample stressed character position set P GT includes the four character positions above.

[0091] For the first candidate speech, the candidate stressed character information indicates that both "must" and "morning" are stressed, then the candidate stressed character position set P pred Four character positions in the accented character position set of the sample are covered, the coincident character position set includes four character positions, and the accented character coverage index is 4 / 4=1, so that the first candidate speech can be determined as a positive sample speech. For the second candidate speech, the candidate accented character information only indicates that "must" is accented, then the coincident character position set includes the two character positions corresponding to "mu" and "bi", the accented character coverage index is 2 / 4=0.5, so that the second candidate speech can be determined as a negative sample speech. For the third candidate speech, the candidate accented character information does not indicate that any character in "must" and "morning" is accented, then the coincident character position set is an empty set, and the accented character coverage index is 0 / 4=0, so that the third candidate speech can be determined as a negative sample speech.

[0092] In another possible implementation of this specification, a positive sample coverage threshold and a negative sample coverage threshold may be preset. When the accented character coverage index corresponding to a candidate speech is greater than or equal to the positive sample coverage threshold, the candidate speech may be determined as a positive sample speech; when the accented character coverage index is less than or equal to the negative sample coverage threshold, the candidate speech may be determined as a negative sample speech; for a candidate speech whose accented character coverage index is between the positive sample coverage threshold and the negative sample coverage threshold, it may not be used for subsequent model training. In some embodiments, the precision rate between the candidate accented characters and the sample accented characters may also be combined to filter candidate speeches with extra accented characters, so as to reduce the influence of candidate speeches with over-predicted accented characters on the sample division result.

[0093] By applying the solution of the embodiments of this specification, the accented character coverage index can be used to quantify the coverage relationship between the candidate accented characters and the sample accented characters, and positive sample speeches and negative sample speeches with different accent coverage degrees can be screened according to the quantification result. As a result, the basis for dividing positive and negative samples can be made more unified, and training data with different accent performance differences can be provided for subsequently training the speech synthesis model based on the positive sample speeches and the negative sample speeches.

[0094] Step 108: Perform reinforcement learning on the initial speech synthesis model according to the sample text, the positive sample speech and the negative sample speech, so as to obtain a trained target speech synthesis model.

[0095] It should be noted that the initial speech synthesis model refers to a speech synthesis model to be trained using the accent preference relationship between positive sample speeches and negative sample speeches. The initial speech synthesis model may be a pre-trained speech synthesis model, or a speech synthesis model that has undergone supervised fine-tuning and has the capability of accented speech synthesis. The initial speech synthesis model can generate corresponding speech or speech token sequence according to the input text.

[0096] In some embodiments, the initial speech synthesis model can be a speech synthesis model based on a large language model. The initial speech synthesis model may include a text encoding layer, a speaker feature encoding layer, a conditional fusion layer, a speech lexical prediction layer, and a speech decoding layer.

[0097] The input to the text encoding layer can be a text sequence corresponding to the sample text, and the output can be a text feature sequence corresponding to the sample text. The text sequence can include a text character sequence, a text word sequence, or a text pinyin sequence. If the sample text carries sample accent character information, this information can be encoded into the text sequence. The text encoding layer can be used to extract features from the text content, text order, and the position of sample accent characters in the text sequence, enabling the generated text feature sequence to represent the language content and accent control information of the synthesized speech.

[0098] The speaker feature encoding layer can take a speaker identifier as input and output a speaker embedding vector as output. The speaker identifier can be a speaker identity identifier, a voice timbre identifier, or other identifiers associated with the target speaker. The speaker feature encoding layer can query a pre-established speaker embedding table based on the speaker identifier, or perform feature encoding on the speaker identifier to obtain a speaker embedding vector representing the corresponding speaker's voice timbre features.

[0099] The input to the conditional fusion layer can be a text feature sequence and a speaker embedding vector, and the output can be speech generation conditional features. The conditional fusion layer can fuse the text feature sequence and the speaker embedding vector through methods such as feature concatenation, feature addition, attention processing, or feature mapping. Speech generation conditional features can simultaneously represent the text content, stress positions, and speaker features of the speech to be synthesized, providing conditional information for subsequent speech lexical generation.

[0100] The input to the speech word prediction layer can be speech generation conditional features and previously generated historical speech words, and the output can be the probability distribution of the next speech word. The speech word prediction layer can include a Transformer-based language model and predict multiple speech words sequentially using an autoregressive approach. At any prediction time, the speech word prediction layer can determine the probability distribution of candidate speech words based on the speech generation conditional features and the speech words already generated before that prediction time, and then determine the next speech word from among the candidate speech words. By repeatedly executing the above prediction process, a sequence of speech words arranged in chronological order can be obtained.

[0101] During model training, the speech word prediction layer can also determine the generation probability information of positive and negative speech word sequences based on the speech generation conditional features corresponding to the sample text. The generation probability information is determined based on the conditional probability of each speech word in the speech word sequence and is used to construct the loss for training the initial speech synthesis model.

[0102] The input to the speech decoding layer can be a sequence of speech tokens generated by the speech token prediction layer, and the output can be synthesized speech corresponding to the sample text. The speech decoding layer can decode and reconstruct the waveform of discrete speech token sequences, converting them into continuous speech signals. The generated speech signal can have the text content and stress positions represented by the text feature sequence, and the speaker features represented by the speaker embedding vector.

[0103] For example, the sample text could be "Please make sure to arrive at the venue in the morning," where the accented character information corresponding to "make sure" and "morning" is encoded in the text's pinyin sequence. The text encoding layer can encode this pinyin sequence to obtain a text feature sequence; the speaker feature encoding layer can obtain a speaker embedding vector based on the speaker identifier; the conditional fusion layer can fuse the text feature sequence and the speaker embedding vector to obtain speech generation conditional features; the speech word prediction layer can autoregressively generate a speech word sequence based on the speech generation conditional features; and the speech decoding layer can convert this speech word sequence into the corresponding synthesized speech.

[0104] Reinforcement learning refers to a training method that constructs a training objective based on the preference relationship represented by positive and negative sample speech, and adjusts the model parameters of the initial speech synthesis model according to the training objective. In the embodiments of this specification, positive sample speech has a more consistent accented character representation with the sample accented character information than negative sample speech, so positive sample speech can be set as preferred samples and negative sample speech can be set as unpreferred samples.

[0105] A target speech synthesis model refers to a speech synthesis model obtained after reinforcement learning. Compared to the initial speech synthesis model, the target speech synthesis model has a higher generation preference for the stress expression represented by positive sample speech. The target speech synthesis model can be used to generate corresponding stressed speech based on text carrying target stress character information.

[0106] In practical applications, there are various ways to perform reinforcement learning on the initial speech synthesis model based on sample text, positive sample speech, and negative sample speech. The specific method is selected according to the actual situation, and the embodiments in this specification do not impose any limitations on this. In one possible implementation of this specification, the sample text, the corresponding positive sample speech, and the corresponding negative sample speech can be organized into preference training samples. Specifically, the sample text can be converted into a text word sequence or a pinyin sequence, and the positive sample speech and negative sample speech can be converted into positive sample speech word sequences and negative sample speech word sequences, respectively. Subsequently, the probability information of the initial speech synthesis model generating positive sample speech word sequences and negative sample speech word sequences can be determined respectively. A preference loss can be constructed based on the two types of probability information, and backpropagation and parameter updates can be performed on the initial speech synthesis model based on the preference loss, so that the initial speech synthesis model improves its preference for generating positive sample speech. In another possible implementation of this specification, for the same sample text, a positive sample speech can be paired with one or more negative sample speech to form one or more positive-negative sample pairs, and a preference ranking training objective can be constructed based on each positive-negative sample pair. Multiple positive and negative sample pairs can be input into the initial speech synthesis model according to training batches. The model parameters are iteratively adjusted according to the preference ranking training objective until the preset training termination condition is met, thus obtaining the target speech synthesis model. The preference ranking training objective can be a direct preference optimization objective, or other training objectives that can impose preference constraints between positive and negative sample speech.

[0107] In some embodiments, the preset training termination condition may include at least one of the following: the number of training epochs reaches a preset number of epochs, the training loss is less than a preset loss threshold, the change in loss between adjacent training epochs is less than a preset change threshold, or the model parameters tend to stabilize. During training, the parameters of the initial speech synthesis model can be updated according to a preset learning rate, or the learning rate can be dynamically adjusted according to the training progress.

[0108] By applying the scheme of the embodiments in this specification, model training data including sample text and multiple candidate speech corresponding to the same sample text is obtained. The sample accent character information is used to indicate the text position where accent is expected to be generated. Based on unified text content and a unified accent target, candidate speech with different accent performances can be obtained, providing a consistent data foundation for comparison between candidate speech. By detecting accent characters on multiple candidate speech separately, the character information that actually reflects accent in each candidate speech can be obtained, thereby converting the accent performance of candidate speech into information that can be used for subsequent processing, reducing reliance on human auditory evaluation. By comparing sample accent character information and candidate accent character information, and accordingly classifying multiple candidate speech into positive and negative sample speech, the classification results of positive and negative samples can correspond to the expected accent position, improving the relevance and consistency of the preference training data. By using sample text, positive sample speech, and negative sample speech to perform reinforcement learning on the initial speech synthesis model, the model's preference for generating speech that meets the expected accent requirements can be improved, while the preference for generating speech that does not meet the accent performance requirements can be reduced. This enables the automatic construction and utilization of accent training samples, improving the accuracy and stability of the target speech synthesis model in generating accents at specified character positions.

[0109] In one optional embodiment of this specification, the above-described reinforcement learning of the initial speech synthesis model based on sample text, positive sample speech, and negative sample speech to obtain the trained target speech synthesis model may include the following steps: Based on the sample text and positive sample speech, the parameters of the initial speech synthesis model are adjusted to obtain the intermediate speech synthesis model; Based on the sample text, positive sample speech, and negative sample speech, reinforcement learning is performed on the intermediate speech synthesis model to obtain the trained target speech synthesis model.

[0110] It should be noted that an intermediate speech synthesis model refers to a speech synthesis model obtained by adjusting the parameters of an initial speech synthesis model, but which has not yet completed reinforcement learning based on the preference relationship between positive and negative sample speech. An intermediate speech synthesis model can generate speech based on sample text and can serve as a training model for subsequent reinforcement learning.

[0111] In practical applications, there are various ways to adjust the parameters of the initial speech synthesis model to obtain an intermediate speech synthesis model based on sample text and positive sample speech. The specific method chosen depends on the actual situation, and this specification does not impose any limitations on this approach. In one possible implementation, the sample text can be converted into a text feature sequence or a text pinyin sequence, and the positive sample speech can be converted into a positive sample speech word sequence. Then, the sequence corresponding to the sample text is used as the conditional input, and the positive sample speech word sequence is used as the expected output. The negative log-likelihood loss of the positive sample speech word sequence generated by the initial speech synthesis model is calculated, and the model parameters of the initial speech synthesis model are adjusted based on this negative log-likelihood loss to obtain the intermediate speech synthesis model. In another possible implementation, multiple sets of sample text and corresponding positive sample speech can be grouped into a supervised training batch. The initial speech synthesis model is then called to predict the speech words corresponding to each positive sample speech, and the prediction loss between the predicted speech words and the positive sample speech words is calculated. The initial speech synthesis model is then iteratively trained based on the prediction losses corresponding to multiple training samples. When the number of training rounds reaches the preset number of rounds, the prediction loss meets the preset loss condition, or the loss change between adjacent training rounds meets the preset convergence condition, parameter adjustment can be stopped, and the current speech synthesis model can be determined as the intermediate speech synthesis model.

[0112] Furthermore, there are various ways to perform reinforcement learning on the intermediate speech synthesis model based on the sample text, positive sample speech, and negative sample speech to obtain the trained target speech synthesis model. The specific method chosen depends on the actual situation, and this specification does not limit this approach. In one possible implementation, positive and negative sample speech corresponding to the same sample text can be combined into preference sample pairs, and the intermediate speech synthesis model can be trained using a direct preference optimization method. Specifically, the probability information of the intermediate speech synthesis model generating positive and negative sample speech can be determined separately. A preference loss is constructed based on the probability difference between the two, and the model parameters of the intermediate speech synthesis model are adjusted according to the preference loss, so that the model increases its preference for generating positive sample speech and decreases its preference for generating negative sample speech. In another possible implementation, for the same sample text, one positive sample speech can be paired with multiple negative sample speech to form multiple preference sample pairs, and a preference ranking training objective can be constructed based on these multiple preference sample pairs. The preference ranking training objective can be a direct preference optimization objective or other training objectives that can impose preference constraints based on positive and negative sample pairs. Subsequently, the intermediate speech synthesis model can be updated with multiple rounds of parameters according to the preference-ranked training objectives until the preset reinforcement learning termination condition is met, thus obtaining the target speech synthesis model.

[0113] The approach described in this specification involves first adjusting the parameters of an initial speech synthesis model using positive sample speech, enabling an intermediate speech synthesis model to learn the correspondence between sample text and speech that meets the expected stress requirements. Then, the difference in stress performance between positive and negative sample speech is used to train the intermediate speech synthesis model with specific preferences. This allows for further improvement in the model's preference for generating speech that matches the stress character information of the samples, while maintaining its basic speech synthesis capabilities.

[0114] In one optional embodiment of this specification, the above-described reinforcement learning of the intermediate speech synthesis model based on sample text, positive sample speech, and negative sample speech to obtain the trained target speech synthesis model may include the following steps: Based on the sample text, determine the first positive probability information of positive sample speech under the intermediate speech synthesis model and the first negative probability information of negative sample speech under the intermediate speech synthesis model. Based on the sample text, the second positive probability information of positive sample speech under the reference speech synthesis model and the second negative probability information of negative sample speech under the reference speech synthesis model are determined. The reference speech synthesis model is constructed based on the intermediate speech synthesis model. Based on the first positive probability information, the first negative probability information, the second positive probability information, and the second negative probability information, determine the preference optimization loss; Based on preference optimization loss, the parameters of the intermediate speech synthesis model are adjusted to obtain the trained target speech synthesis model.

[0115] It should be noted that the first positive probability information refers to the probability-related information of the intermediate speech synthesis model generating positive sample speech when the sample text is used as the generation condition, and the first negative probability information refers to the probability-related information of the intermediate speech synthesis model generating negative sample speech when the sample text is used as the generation condition. The first positive probability information and the first negative probability information can include generation probability, log probability, average log probability, or sequence probability score after length normalization, respectively.

[0116] A reference speech synthesis model is a speech synthesis model used to provide a baseline of generation probabilities for both positive and negative speech samples. It can be constructed by replicating the model parameters of an intermediate speech synthesis model. During reinforcement learning of the intermediate model, the model parameters of the reference speech synthesis model can be kept unchanged, allowing it to provide a relatively stable probability comparison benchmark.

[0117] The second positive probability information refers to the probability-related information of the reference speech synthesis model generating positive sample speech when the sample text is used as the generation condition. The second negative probability information refers to the probability-related information of the reference speech synthesis model generating negative sample speech when the sample text is used as the generation condition. The first positive probability information, the first negative probability information, the second positive probability information, and the second negative probability information can use the same probability representation form for subsequent calculations.

[0118] In practical applications, there are multiple ways to determine the first positive probability information and the first negative probability information based on sample text. The specific method chosen depends on the actual situation, and this specification does not impose any limitations on these methods. In one possible implementation, the sample text can be converted into model input information, and the positive and negative sample speech can be converted into positive and negative sample speech word sequences, respectively. Subsequently, the model input information and the positive sample speech word sequences can be input into an intermediate speech synthesis model to obtain the conditional probabilities of the intermediate speech synthesis model generating corresponding positive sample speech words at each prediction position. The first positive probability information is then determined based on these conditional probabilities. Correspondingly, the first negative probability information can be determined based on the conditional probabilities of the intermediate speech synthesis model generating corresponding negative sample speech words at each prediction position. In another possible implementation, to reduce the impact of the different number of speech words between positive and negative sample speech on the probability information, the logarithmic probabilities of the positive and negative sample speech word sequences can be length-normalized.

[0119] Furthermore, there are multiple ways to determine the second positive probability information and the second negative probability information based on the sample text. The specific method chosen depends on the actual situation, and this specification does not limit this approach. In one possible implementation, the model parameters of the intermediate speech synthesis model can be copied to obtain a reference speech synthesis model, and the model parameters of the reference speech synthesis model can be frozen. The model input information and the sequence of positive sample speech lexical units can be input into the reference speech synthesis model to determine the second positive probability information; the model input information and the sequence of negative sample speech lexical units can be input into the reference speech synthesis model to determine the second negative probability information. In another possible implementation, after the intermediate speech synthesis model completes parameter adjustment, the corresponding model parameter checkpoints can be saved, and an independent reference speech synthesis model can be loaded based on these checkpoints. During training, only the model parameters of the intermediate speech synthesis model are updated, not the model parameters of the reference speech synthesis model. This allows the reference speech synthesis model to continuously provide a fixed baseline of positive and negative sample probabilities.

[0120] Furthermore, there are multiple ways to determine the preference optimization loss based on the first positive probability information, the first negative probability information, the second positive probability information, and the second negative probability information. The specific method chosen depends on the actual situation, and this specification does not limit this approach. In one possible implementation, a first relative probability information of the intermediate speech synthesis model generating positive sample speech relative to the reference speech synthesis model and a second relative probability information of the intermediate speech synthesis model generating negative sample speech relative to the reference speech synthesis model can be calculated. Subsequently, the preference optimization loss can be determined based on the difference between the first and second relative probability information. By reducing the preference optimization loss, the relative probability of the intermediate speech synthesis model generating positive sample speech relative to the reference speech synthesis model can be increased, and the relative probability of generating negative sample speech can be decreased. In another possible implementation, the difference between positive and negative sample preferences corresponding to the intermediate speech synthesis model can be determined first based on the first positive and first negative probability information, and the baseline of positive and negative sample preferences corresponding to the reference speech synthesis model can be determined based on the second positive and second negative probability information. Subsequently, a binary classification loss, ranking loss, or other preference learning loss can be constructed based on the difference between the positive and negative sample preference difference and the positive and negative sample preference baseline. As long as the constructed preference optimization loss can enable the intermediate speech synthesis model to increase its preference for positive sample speech and decrease its preference for negative sample speech, it is acceptable.

[0121] For example, in addition to direct preference optimization loss, preference optimization loss can also be IPO loss, KTO loss, or other preference learning loss that does not rely on an independent reward model.

[0122] Furthermore, there are various ways to adjust the parameters of the intermediate speech synthesis model based on the preference optimization loss, and the specific method should be selected according to the actual situation. This specification does not limit the specific method used in the embodiments. In one possible implementation, the preference optimization loss can be backpropagated to calculate its gradient relative to each trainable parameter in the intermediate speech synthesis model. The model parameters of the intermediate speech synthesis model are then updated based on the calculated gradient and a preset learning rate. During the parameter update process, the model parameters of the reference speech synthesis model can remain unchanged. In another possible implementation, multiple sets of sample text, positive sample speech, and negative sample speech can be grouped into training batches. The preference optimization loss corresponding to each pair of preference samples in the training batch is calculated, and the parameters of the intermediate speech synthesis model are adjusted based on the average or weighted value of multiple preference optimization losses. After multiple rounds of iterative training, until the number of training rounds reaches a preset number or the preference optimization loss meets a preset convergence condition, the current intermediate speech synthesis model can be determined as the target speech synthesis model. For example, the training process can use a fixed learning rate for multiple iterations.

[0123] The scheme implemented in this specification can utilize a reference speech synthesis model to provide a stable probability baseline. A preference optimization loss is constructed by comparing the relative probabilities of positive and negative sample speech generated by the intermediate speech synthesis model and the reference speech synthesis model, respectively. Therefore, the intermediate speech synthesis model can be adjusted from two aspects: increasing the preference for generating positive sample speech and decreasing the preference for generating negative sample speech, making the target speech synthesis model more inclined to generate speech that conforms to the accented character information of the samples.

[0124] In one optional embodiment of this specification, before adjusting the parameters of the intermediate speech synthesis model based on preference optimization loss to obtain the trained target speech synthesis model, the following steps may also be included: The synthesis prediction loss is obtained, which is calculated based on the predicted synthesized speech and the positive sample speech. The predicted synthesized speech is obtained by the initial speech synthesis model from the sample text. Based on preference optimization loss, the parameters of the intermediate speech synthesis model are adjusted to obtain the trained target speech synthesis model, including: Based on preference optimization loss and synthesis prediction loss, the parameters of the intermediate speech synthesis model are adjusted to obtain the trained target speech synthesis model.

[0125] It should be noted that predicted synthesized speech refers to the speech prediction result obtained by the initial speech synthesis model using sample text as the generation condition. Predicted synthesized speech can be the speech word prediction probability distribution output by the initial speech synthesis model, the predicted speech word sequence, or the speech signal decoded from the predicted speech word sequence. During model training, predicted synthesized speech can typically be expressed in the form of a speech word prediction probability distribution, so that the synthesis prediction loss can be calculated using the speech word sequence corresponding to the positive sample speech.

[0126] Synthesis prediction loss refers to the loss used to characterize the difference between predicted synthesized speech and positive sample speech. Synthesis prediction loss can be the negative log-likelihood loss corresponding to the word sequence of the positive sample speech, the cross-entropy loss, or the loss obtained by length normalization based on the negative log-likelihood loss. By introducing synthesis prediction loss, the basic speech synthesis capabilities of the model can be utilized while performing preference optimization.

[0127] In practical applications, there are various ways to obtain the synthesis prediction loss, and the specific method should be selected according to the actual situation. This specification does not limit the specific method used in this embodiment. In one possible implementation, the sample text can be converted into model input information, and the positive sample speech can be converted into a sequence of positive sample speech words. Then, the initial speech synthesis model is called, and the probability of each speech word in the sequence of positive sample speech words is predicted sequentially based on the model input information. The negative log-likelihood loss is calculated based on the predicted probability of each speech word, and this negative log-likelihood loss is determined as the synthesis prediction loss.

[0128] Let x be the model input information determined based on the sample text. See formula (3). The positive sample speech word sequence is: (3) Referring to formula (4), the synthetic prediction loss can be expressed as: (4) in, Indicates the synthetic prediction loss. This represents the initial speech synthesis model. This indicates the number of speech units included in a positive sample speech unit sequence. This represents the t-th speech word in the positive sample speech word sequence.

[0129] In another possible implementation of this specification, the negative log-likelihood loss corresponding to the positive sample speech lexical sequence can be length-normalized to reduce the impact of different numbers of speech lexical units in different positive sample speech on the synthesis prediction loss. For a training batch including multiple sample texts and positive sample speech, the synthesis prediction loss corresponding to each training sample can be calculated separately, and the average or weighted average of the multiple synthesis prediction losses can be determined as the synthesis prediction loss corresponding to that training batch.

[0130] In some embodiments, the synthesis prediction loss can be calculated and recorded during the parameter tuning of the initial speech synthesis model based on sample text and positive sample speech. After obtaining the intermediate speech synthesis model, the recorded synthesis prediction loss can be read and used as the regularization loss in subsequent parameter tuning processes. Alternatively, the synthesis prediction loss can be recalculated using the initial speech synthesis model before performing preference optimization on the intermediate speech synthesis model.

[0131] In practical applications, there are various ways to adjust the parameters of the intermediate speech synthesis model based on preference optimization loss and synthesis prediction loss. The specific method should be selected according to the actual situation, and the embodiments in this specification do not limit this. In one possible implementation of this specification, the preference optimization loss can be added to the weighted synthesis prediction loss to obtain the target training loss. Referring to formula (5), the target training loss can be expressed as: (5) in, Indicates the training loss of the target. Indicates preference optimization loss, Let λ represent the synthesis prediction loss, and let λ represent the loss weight corresponding to the synthesis prediction loss. The loss weight λ can be preset according to the model training requirements or dynamically adjusted during training. When λ is greater than zero, the synthesis prediction loss is used to constrain the basic speech synthesis capability of the model; when λ is equal to zero, the target training loss may only include the preference optimization loss.

[0132] Subsequently, backpropagation can be performed on the target training loss to calculate the gradient of the target training loss relative to each trainable parameter in the intermediate speech synthesis model, and the model parameters of the intermediate speech synthesis model can be updated according to the corresponding gradients. During parameter adjustment, the model parameters of the reference speech synthesis model can be kept unchanged, and only the model parameters of the intermediate speech synthesis model can be updated. In another possible implementation of this specification, the first gradient corresponding to the preference optimization loss and the second gradient corresponding to the synthesis prediction loss can be calculated separately, and the first and second gradients can be fused according to the loss weights to obtain the target gradient; then, the parameters of the intermediate speech synthesis model can be adjusted according to the target gradient. After multiple rounds of iterative training, until the number of training rounds reaches a preset number, the target training loss meets a preset loss condition, or the model parameters meet a preset convergence condition, the current intermediate speech synthesis model is determined as the target speech synthesis model.

[0133] The scheme implemented in this specification allows the preference optimization loss to guide the intermediate speech synthesis model to increase its preference for generating positive speech samples and decrease its preference for generating negative speech samples. Simultaneously, the synthesis prediction loss constrains the model's prediction process for positive speech samples. This reduces the likelihood of the model deviating from its original speech synthesis capabilities during preference optimization, maintaining the model's basic speech synthesis capabilities while optimizing accent expression preferences.

[0134] See Figure 2 , Figure 2 This specification shows a flowchart of a speech synthesis method according to an embodiment, which specifically includes the following steps: Step 202: Obtain the text to be synthesized, wherein the text to be synthesized carries the target accent character information, which is used to indicate the position of the target accent character in the text to be synthesized.

[0135] It should be noted that the text to be synthesized refers to the text that needs to be converted into speech. The target accent character refers to the character in the text to be synthesized that is expected to be stressed in the target synthesized speech. It can be a single character or multiple characters that make up a word or phrase. The target accent character information can be represented by accent tags, character position indices, character position ranges, or accent control information encoded in the word sequence.

[0136] In practical applications, there are multiple ways to obtain the text to be synthesized, and the specific method should be selected according to the actual situation. This specification does not impose any limitations on this method. In one possible implementation, the text to be synthesized can be received from user input or from a speech synthesis task. Emphasis tags can be set on both sides of the target accent character in the text to be synthesized. In another possible implementation, the original text to be synthesized and the corresponding target accent position annotations can be obtained. The target accent character is determined based on the target accent position annotations, and the target accent character information is added to the original text to be synthesized to obtain the text to be synthesized. The target accent character information can be represented using XML-style tags, underscore tags, or other markup formats that can be recognized by text processing programs.

[0137] Step 204: Call the target speech synthesis model to perform speech synthesis based on the text to be synthesized, and obtain the target synthesized speech. The target speech synthesis model is trained based on the method provided in the first aspect above.

[0138] It should be noted that target synthesized speech refers to the speech generated by the target speech synthesis model based on the text to be synthesized. The speech content of the target synthesized speech corresponds to the text to be synthesized, and the corresponding stress is presented at the positions indicated by the target stress character information.

[0139] In practical applications, there are various ways to call the target speech synthesis model for speech synthesis, and the specific method should be selected according to the actual situation. This specification does not impose any limitations on these methods in the embodiments. In one possible implementation, the text to be synthesized can be preprocessed to remove visible markers corresponding to the target accent characters, and the target accent character information can be encoded into the word sequence of the text to obtain model input information. Subsequently, the model input information is input into the target speech synthesis model, which generates a speech word sequence based on the text content and the position of the target accent characters, and decodes the speech word sequence to obtain the target synthesized speech. In another possible implementation, the text processing module included in the target speech synthesis model can identify the target accent character information in the text to be synthesized, convert the target accent character information into accent control features corresponding to the target accent characters, and predict the speech word sequence based on the text features and accent control features of the text to be synthesized. Subsequently, the speech word sequence can be converted into a continuous speech signal to obtain the target synthesized speech.

[0140] It should be noted that the technical solution in step 204 is based on the same concept as the technical solution of the target speech synthesis model training method described above. For details not described in detail in step 204, please refer to the description of the technical solution of the target speech synthesis model training method described above.

[0141] By applying the scheme of the embodiments of this specification, the target speech synthesis model can be instructed on the text position where the desired stress expression is to be made by the target stress character information carried in the text to be synthesized, and the target speech synthesis model trained with preferences can be called to generate the corresponding speech, so that the stress position in the target synthesized speech matches the target stress character information.

[0142] See Figure 3 , Figure 3 This diagram illustrates the overall flowchart of a target speech synthesis model training method according to an embodiment of this specification. Sample text carrying sample accent character information is input into the positive and negative sample speech construction module. The positive and negative sample speech construction module calls an auxiliary speech synthesis model to perform multiple samplings based on the sample text, obtaining multiple candidate speech corresponding to the sample text. The positive and negative sample speech construction module performs accent character detection on the multiple candidate speech respectively, obtaining candidate accent character information corresponding to each candidate speech, and calculates an accent character coverage index based on the sample accent character information and the candidate accent character information. Subsequently, the positive and negative sample speech construction module filters positive and negative sample speech based on the accent character coverage index. For example, candidate speech whose sample accent characters are completely covered by candidate accent characters can be determined as positive sample speech, and candidate speech whose sample accent characters are partially covered or not covered can be determined as negative sample speech. Candidate speech whose accent character detection request times out, fails, cannot be parsed, or whose candidate accent character information does not conform to the preset information format can be excluded from constructing positive and negative sample speech.

[0143] The sample text, positive sample speech, and negative sample speech obtained by the positive and negative sample speech construction module are input into the target speech synthesis model training module. The target speech synthesis model training module includes an intermediate speech synthesis model and a reference speech synthesis model. The intermediate speech synthesis model can serve as the policy model for preference optimization. The reference speech synthesis model can be constructed based on the intermediate speech synthesis model. The target speech synthesis model training module calculates the probability information of positive and negative sample speech under the intermediate speech synthesis model, and the probability information of positive and negative sample speech under the reference speech synthesis model, respectively, and calculates the preference optimization loss based on the above probability information. The preference optimization loss can be a direct preference optimization loss, used to increase the generation probability of positive sample speech and decrease the generation probability of negative sample speech in the intermediate speech synthesis model. The target speech synthesis model training module also obtains the synthesis prediction loss. The synthesis prediction loss can be calculated based on the predicted synthesized speech and the positive sample speech, and can be represented by the negative log-likelihood loss of the positive sample speech word sequence. Subsequently, the preference optimization loss can be added to the synthesis prediction loss weighted by the loss weight λ to obtain the target training loss used for model training, which is the product of the preference optimization loss plus λ and the synthesis prediction loss. The target speech synthesis model training module performs backpropagation and parameter adjustment on the intermediate speech synthesis model based on the target training loss, while keeping the model parameters of the reference speech synthesis model unchanged. After multiple rounds of iterative training and meeting the preset training termination conditions, the parameter-adjusted intermediate speech synthesis model can be determined as the trained target speech synthesis model. For example, model training can use a 5×10... -7 A fixed learning rate was used, and five rounds of training were performed using two graphics processors.

[0144] See Figure 4 , Figure 4 This diagram illustrates a construction process for positive and negative sample speech provided in one embodiment of this specification. Figure 4 As shown, firstly, sample text carrying sample accent character information is obtained. Visible character forms representing the sample accent character information are removed from the sample text, and the accent character information is encoded into the corresponding word sequence of the sample text. Then, an auxiliary speech synthesis model is invoked for multiple samplings to obtain multiple candidate speech samples corresponding to the sample text. For multiple candidate speech samples, an accent character detection model is invoked, and accent character detection is performed separately under the guidance of detection prompts. For candidate speech samples where accent character detection is successful and the obtained candidate accent character information conforms to the preset information format, the corresponding candidate accent character information is retained; for candidate speech samples where the accent character detection request times out, fails, or the candidate accent character information does not conform to the preset information format, they are not considered as target candidate speech samples.

[0145] Furthermore, based on the accented character information of the samples, the character positions of the accented characters in the sample text are determined, and a set P of sample accented character positions is constructed. GT Based on the candidate accent character information corresponding to the target candidate speech, determine the character position of the candidate accent character in the sample text, and construct the candidate accent character position set P. pred When candidate accent character information is represented in the form of "word#k", k can be used to indicate the order of occurrence of the corresponding word in the sample text, thereby mapping the candidate accent character to the corresponding character position and reducing positional ambiguity caused by the multiple occurrences of the same word.

[0146] Subsequently, based on the set of accented character positions P of the samples GT and the set of candidate accented character positions P pred The accent character coverage index is calculated according to the formula. When Recall=1.0, it means that the candidate accent character completely covers the sample accent character, and the corresponding candidate speech can be identified as positive sample speech. When Recall<1.0, it means that the candidate accent character only partially covers the sample accent character or does not cover the sample accent character, and the corresponding candidate speech can be identified as negative sample speech.

[0147] Finally, the positive and negative sample speech corresponding to the same sample text are paired to obtain a positive-negative sample speech pairing dataset. This positive-negative sample speech pairing dataset can be used for subsequent preference optimization training of the speech synthesis model.

[0148] See Figure 5 , Figure 5 This document illustrates a schematic diagram of the joint loss training process for a target speech synthesis model provided in one embodiment of this specification.

[0149] See Figure 5 Obtain the positive and negative sample speech pairing dataset. Each training data pair in the positive and negative sample speech pairing dataset includes sample text x and positive sample speech y. w and negative sample speech y l Among them, positive sample speech and negative sample speech correspond to the same sample text, and the stress performance of positive sample speech is better than that of negative sample speech.

[0150] Sample text x and positive sample speech y w and negative sample speech y l Forward propagation is performed on both the intermediate speech synthesis model and the reference speech synthesis model. Through forward propagation of the intermediate speech synthesis model, the first positive probability information corresponding to positive sample speech and the first negative probability information corresponding to negative sample speech are determined. Through forward propagation of the reference speech synthesis model, the second positive probability information corresponding to positive sample speech and the second negative probability information corresponding to negative sample speech are determined. During training, the model parameters of the reference speech synthesis model remain unchanged.

[0151] Based on the first positive probability information, the first negative probability information, the second positive probability information, and the second negative probability information, the preference optimization loss is determined. The preference optimization loss is used to characterize the difference in preference between the intermediate speech synthesis model and the reference speech synthesis model for positive and negative sample speech.

[0152] Furthermore, the preference optimization loss is added to the synthesis prediction loss weighted by the loss weight λ to obtain the total loss. The synthesis prediction loss can be calculated based on the predicted synthesized speech and positive sample speech, and is used to constrain the basic speech synthesis capability of the model during the preference optimization process.

[0153] Finally, backpropagation is performed based on the total loss to adjust the model parameters of the intermediate speech synthesis model, while keeping the model parameters of the reference speech synthesis model unchanged. After iterative training and meeting the preset training termination conditions, the intermediate speech synthesis model with adjusted parameters is determined as the target speech synthesis model that has been successfully trained.

[0154] Corresponding to the above method embodiments, this specification also provides embodiments of a target speech synthesis model training device. Figure 6 A schematic diagram of a target speech synthesis model training device according to one embodiment of this specification is shown. Figure 6 As shown, the device includes: The acquisition module 602 is configured to acquire model training data, wherein the model training data includes sample text and multiple candidate speech corresponding to the sample text, wherein the sample text carries sample accent character information, and the sample accent character information is used to indicate the position of the sample accent character in the sample text; The detection module 604 is configured to perform accent character detection on multiple candidate speech samples to obtain candidate accent character information for each candidate speech sample. The segmentation module 606 is configured to segment multiple candidate speech based on the sample accent character information and candidate accent character information corresponding to the sample text, thereby obtaining positive sample speech and negative sample speech. Training module 608 is configured to perform reinforcement learning on the initial speech synthesis model based on sample text, positive sample speech, and negative sample speech to obtain the trained target speech synthesis model.

[0155] Optionally, the segmentation module 606 is further configured to calculate an accent character coverage index based on the sample accent character information and candidate accent character information corresponding to the sample text, wherein the accent character coverage index is used to reflect the degree of coverage of the sample accent character information by the candidate accent character information; and to select positive sample speech and negative sample speech from multiple candidate speech based on the accent character coverage index.

[0156] Optionally, the detection module 604 is further configured to invoke the accent character detection model, and based on the detection prompt information, perform accent character detection on multiple candidate speech samples to obtain candidate accent character information corresponding to each candidate speech sample. The detection prompt information is used to guide the accent character detection model to perform accent character detection on each candidate speech sample based on the acoustic features of the character to be detected and its adjacent characters. The character to be detected is any character in the candidate speech sample, and the adjacent characters to be detected are characters in the same candidate speech sample that are adjacent to the character to be detected. The acoustic features include at least one of pitch, volume, and duration.

[0157] Optionally, the training module 608 is further configured to adjust the parameters of the initial speech synthesis model based on the sample text and positive sample speech to obtain an intermediate speech synthesis model; and to perform reinforcement learning on the intermediate speech synthesis model based on the sample text, positive sample speech and negative sample speech to obtain the trained target speech synthesis model.

[0158] Optionally, the training module 608 is further configured to: determine, based on the sample text, the first positive probability information of positive sample speech under the intermediate speech synthesis model and the first negative probability information of negative sample speech under the intermediate speech synthesis model; determine, based on the sample text, the second positive probability information of positive sample speech under the reference speech synthesis model and the second negative probability information of negative sample speech under the reference speech synthesis model, wherein the reference speech synthesis model is constructed based on the intermediate speech synthesis model; determine the preference optimization loss according to the first positive probability information, the first negative probability information, the second positive probability information, and the second negative probability information; and adjust the parameters of the intermediate speech synthesis model based on the preference optimization loss to obtain the trained target speech synthesis model.

[0159] Optionally, the training module 608 is further configured to obtain the synthesis prediction loss, wherein the synthesis prediction loss is calculated based on the predicted synthesized speech and the positive sample speech, and the predicted synthesized speech is obtained by the initial speech synthesis model from the sample text; the training module 608 is further configured to adjust the parameters of the intermediate speech synthesis model based on the preference optimization loss and the synthesis prediction loss, so as to obtain the trained target speech synthesis model.

[0160] Optionally, the device further includes filtering target candidate speech from multiple candidate speech based on candidate accent character information, wherein the target candidate speech is candidate speech including at least one candidate accent character and / or candidate speech whose candidate accent character information conforms to a preset information format; the segmentation module 606 is further configured to segment the target candidate speech based on the sample accent character information corresponding to the sample text and the candidate accent character information corresponding to the target candidate speech to obtain positive sample speech and negative sample speech.

[0161] Optionally, the acquisition module 602 is further configured to acquire sample text; call the auxiliary speech synthesis model, and perform multiple samplings based on the sample accent character information and sample text to obtain multiple candidate speech corresponding to the sample text.

[0162] Optionally, the acquisition module 602 is further configured to remove the sample accent character information from the sample text, obtain the sample updated text, and encode the sample accent character information into the word sequence of the sample updated text to obtain the model input information; call the auxiliary speech synthesis model, perform multiple samplings based on the model input information, and obtain multiple candidate speech corresponding to the sample text.

[0163] Using the apparatus provided in the embodiments of this specification, the detection module 604 detects accent characters in multiple candidate speech samples corresponding to the same sample text, converting the actual accent performance in each candidate speech sample into candidate accent character information. The segmentation module 606 compares the sample accent character information and the candidate accent character information to obtain positive and negative sample speech samples with different accent performances. Then, the training module 608 uses the accent preference differences between the positive and negative sample speech samples to perform reinforcement learning on the initial speech synthesis model. This reduces the reliance on manual auditory perception to construct positive and negative samples, and makes the trained target speech synthesis model more inclined to generate accents at the positions indicated by the sample accent character information, improving the accuracy and consistency of accent expression at specified positions.

[0164] The above is an illustrative scheme of a target speech synthesis model training device according to this embodiment. It should be noted that the technical solution of this target speech synthesis model training device and the technical solution of the target speech synthesis model training method described above belong to the same concept. For details not described in detail in the technical solution of the target speech synthesis model training device, please refer to the description of the technical solution of the target speech synthesis model training method described above.

[0165] Corresponding to the above method embodiments, this specification also provides embodiments of speech synthesis devices. Figure 7 A schematic diagram of a speech synthesis device according to one embodiment of this specification is shown. Figure 7 As shown, the device includes: The second acquisition module 702 is configured to acquire the text to be synthesized, wherein the text to be synthesized carries target accent character information, and the target accent character information is used to indicate the position of the target accent character in the text to be synthesized; The synthesis module 704 is configured to call the target speech synthesis model to perform speech synthesis based on the text to be synthesized, thereby obtaining the target synthesized speech. The target speech synthesis model is trained based on the method provided in the first aspect above.

[0166] Using the apparatus provided in the embodiments of this specification, the second acquisition module 702 acquires the text to be synthesized carrying target accent character information, and the synthesis module 704 calls the target speech synthesis model trained with positive and negative sample preferences to perform speech synthesis. This allows the target speech synthesis model to determine the expected accent positions in the text to be synthesized based on the target accent character information and generate accent expressions at the corresponding positions. Therefore, the matching degree between the actual accent positions in the target synthesized speech and the target accent positions indicated by the text to be synthesized can be improved, thereby enhancing the accuracy and consistency of accent expressions at specified positions.

[0167] The above is an illustrative scheme of a speech synthesis device according to this embodiment. It should be noted that the technical solution of this speech synthesis device and the technical solution of the above-described speech synthesis method belong to the same concept. For details not described in detail in the technical solution of the speech synthesis device, please refer to the description of the technical solution of the above-described speech synthesis method.

[0168] Figure 8 This specification illustrates a structural block diagram of a computing device according to one embodiment. The components of the computing device 800 include, but are not limited to, a memory 810 and a processor 820. The processor 820 is connected to the memory 810 via a bus 830, and a database 850 is used to store data.

[0169] The computing device 800 also includes an access device 840, which enables the computing device 800 to communicate via one or more networks 860. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 840 may include one or more of any type of wired or wireless network interface (e.g., Network Interface Card (NIC)), such as an IEEE 802.11 Wireless Local Area Networks (WLAN) interface, a Wi-MAX (World Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0170] In one embodiment of this specification, the above-described components of the computing device 800 and Figure 8 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 8 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this specification. Those skilled in the art can add or replace other components as needed.

[0171] The computing device 800 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 800 can also be a mobile or stationary server.

[0172] The processor 820 is used to execute computer programs / instructions, which, when executed by the processor, implement the steps of the above-mentioned target speech synthesis model training method and speech synthesis method.

[0173] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the technical solutions of the target speech synthesis model training method and the speech synthesis method described above. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solutions of the target speech synthesis model training method and the speech synthesis method described above.

[0174] An embodiment of this specification also provides a computer-readable storage medium storing a computer program / instructions that, when executed by a processor, implement the steps of the above-described target speech synthesis model training method and speech synthesis method.

[0175] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solutions of the target speech synthesis model training method and the speech synthesis method described above. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solutions of the target speech synthesis model training method and the speech synthesis method described above.

[0176] An embodiment of this specification also provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described target speech synthesis model training method and speech synthesis method.

[0177] The above is an illustrative scheme of a computer program product according to this embodiment. It should be noted that the technical solution of this computer program product belongs to the same concept as the technical solutions of the target speech synthesis model training method and the speech synthesis method described above. For details not described in detail in the technical solution of the computer program product, please refer to the description of the technical solutions of the target speech synthesis model training method and the speech synthesis method described above.

[0178] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0179] Computer instructions include computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. Computer-readable media can include: any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in computer-readable media can be appropriately added or removed according to the requirements of patent practice. For example, in some regions, according to patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0180] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments in this specification are not limited to the described order of actions, because according to the embodiments in this specification, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily essential to the embodiments in this specification.

[0181] In the above embodiments, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0182] The preferred embodiments disclosed above are merely illustrative of this specification. Optional embodiments do not exhaustively describe all details, nor do they limit the invention to the specific implementations described. Clearly, many modifications and variations can be made based on the embodiments described herein. These embodiments are selected and specifically described in this specification to better explain the principles and practical applications of the embodiments, thereby enabling those skilled in the art to better understand and utilize this specification. This specification is limited only by the claims and their full scope and equivalents.< / strong>

Claims

1. A method for training a target speech synthesis model, characterized in that, include: Obtain model training data, wherein the model training data includes sample text and multiple candidate speech corresponding to the sample text, wherein the sample text carries sample accent character information, and the sample accent character information is used to indicate the position of the sample accent character in the sample text; Accent character detection is performed on the multiple candidate speech samples to obtain candidate accent character information corresponding to each candidate speech sample. Based on the sample accent character information and the candidate accent character information corresponding to the sample text, the multiple candidate speech are divided to obtain positive sample speech and negative sample speech. Based on the sample text, the positive sample speech, and the negative sample speech, reinforcement learning is performed on the initial speech synthesis model to obtain the trained target speech synthesis model.

2. The method according to claim 1, characterized in that, The step of dividing the multiple candidate speech samples according to the sample accent character information corresponding to the sample text and the candidate accent character information to obtain positive sample speech and negative sample speech includes: Based on the sample accent character information and the candidate accent character information corresponding to the sample text, an accent character coverage index is calculated, wherein the accent character coverage index is used to reflect the degree of coverage of the sample accent character information by the candidate accent character information; Based on the accent character coverage index, the positive sample speech and the negative sample speech are selected from the plurality of candidate speech.

3. The method according to claim 1, characterized in that, The step of detecting accented characters in the plurality of candidate speech samples to obtain candidate accented character information for each candidate speech sample includes: An accent character detection model is invoked, and accent character detection is performed on the multiple candidate speech samples based on detection prompts to obtain the candidate accent character information corresponding to each candidate speech sample. The detection prompts guide the accent character detection model to perform accent character detection on each candidate speech sample based on the acoustic features of the character to be detected and its adjacent characters. The character to be detected is any character in the candidate speech sample, and the adjacent characters to be detected are characters in the same candidate speech sample that are adjacent to the character to be detected. The acoustic features include at least one of pitch, volume, and duration.

4. The method according to claim 1, characterized in that, The step of performing reinforcement learning on the initial speech synthesis model based on the sample text, the positive sample speech, and the negative sample speech to obtain the trained target speech synthesis model includes: Based on the sample text and the positive sample speech, the parameters of the initial speech synthesis model are adjusted to obtain an intermediate speech synthesis model; The intermediate speech synthesis model is subjected to reinforcement learning based on the sample text, the positive sample speech, and the negative sample speech to obtain the trained target speech synthesis model.

5. The method according to claim 4, characterized in that, The step of performing reinforcement learning on the intermediate speech synthesis model based on the sample text, the positive sample speech, and the negative sample speech to obtain the trained target speech synthesis model includes: Based on the sample text, determine the first positive probability information of the positive sample speech under the intermediate speech synthesis model and the first negative probability information of the negative sample speech under the intermediate speech synthesis model; Based on the sample text, the second positive probability information of the positive sample speech under the reference speech synthesis model and the second negative probability information of the negative sample speech under the reference speech synthesis model are determined, wherein the reference speech synthesis model is constructed based on the intermediate speech synthesis model; Based on the first positive probability information, the first negative probability information, the second positive probability information, and the second negative probability information, determine the preference optimization loss; Based on the preference optimization loss, the parameters of the intermediate speech synthesis model are adjusted to obtain the trained target speech synthesis model.

6. The method according to claim 5, characterized in that, Before adjusting the parameters of the intermediate speech synthesis model based on the preference optimization loss to obtain the trained target speech synthesis model, the method further includes: Obtain the synthesis prediction loss, wherein the synthesis prediction loss is calculated based on the predicted synthesized speech and the positive sample speech, and the predicted synthesized speech is obtained by the initial speech synthesis model from the sample text; The step of adjusting the parameters of the intermediate speech synthesis model based on the preference optimization loss to obtain the trained target speech synthesis model includes: Based on the preference optimization loss and the synthesis prediction loss, the parameters of the intermediate speech synthesis model are adjusted to obtain the trained target speech synthesis model.

7. The method according to any one of claims 1 to 6, characterized in that, Before dividing the multiple candidate speech samples according to the sample accent character information and the candidate accent character information corresponding to the sample text to obtain positive sample speech and negative sample speech, the method further includes: Based on the candidate accent character information, a target candidate speech is selected from the plurality of candidate speech, wherein the target candidate speech is the candidate speech that includes at least one of the candidate accent characters and / or the candidate speech whose candidate accent character information conforms to a preset information format; The step of dividing the multiple candidate speech samples according to the sample accent character information corresponding to the sample text and the candidate accent character information to obtain positive sample speech and negative sample speech includes: Based on the sample accent character information corresponding to the sample text and the candidate accent character information corresponding to the target candidate speech, the target candidate speech is divided to obtain the positive sample speech and the negative sample speech.

8. The method according to any one of claims 1 to 6, characterized in that, The acquisition of model training data includes: Obtain the sample text; An auxiliary speech synthesis model is invoked, and multiple samples are taken based on the sample accent character information and the sample text to obtain the multiple candidate speech corresponding to the sample text.

9. The method according to claim 8, characterized in that, The auxiliary speech synthesis model is invoked, and multiple samples are performed based on the sample accent character information and the sample text to obtain the multiple candidate speech corresponding to the sample text, including: Remove the sample accent character information from the sample text to obtain the sample updated text, and encode the sample accent character information into the word sequence of the sample updated text to obtain the model input information; The auxiliary speech synthesis model is invoked, and multiple samples are performed based on the model input information to obtain the multiple candidate speech corresponding to the sample text.

10. A speech synthesis method, characterized in that, include: Obtain the text to be synthesized, wherein the text to be synthesized carries target accent character information, and the target accent character information is used to indicate the position of the target accent character in the text to be synthesized; The target speech synthesis model is invoked to perform speech synthesis based on the text to be synthesized, thereby obtaining the target synthesized speech, wherein the target speech synthesis model is trained based on the method described in any one of claims 1 to 9.

11. A computing device, characterized in that, include: Memory and processor; The memory is used to store computer programs / instructions, and the processor is used to execute the computer programs / instructions, which, when executed by the processor, implement the steps of the method according to any one of claims 1 to 10.

12. A computer-readable storage medium, characterized in that, It stores a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.

13. A computer program product, characterized in that, Includes a computer program / instructions that, when executed by a processor, implement the steps of the method according to any one of claims 1 to 10.