Information processing method, device and computer readable storage medium
By using the weighted sum of global style features of preset audio and text encoding vectors in speech synthesis technology, and combining local style vectors to construct speech spectrum information, the problem in the existing technology that the speech style does not meet expectations and is natural is solved. Achieved a more natural and expected speech synthesis effect.
Patent Information
- Application Number
- CN202110932791.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-08-13
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-08-13
AI Technical Summary
In practical applications, existing speech synthesis technology is difficult to obtain audio information that corresponds to text, resulting in the synthesized speech style not meeting expectations and lacking natural fidelity.
By obtaining the global style features of the preset audio and the encoding vector of the text to be converted, a weighted summation is performed to construct a text representation vector sequence, and the target speech spectrum information is constructed based on the local style vector to achieve the implantation and control of speech style.
Ensure that the synthesized speech information conforms to the expected style effect of the text and is more natural and realistic, avoiding speech synthesis failure due to the inability to obtain the corresponding audio.
Smart Images

Figure CN114328806B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of artificial intelligence, and specifically to an information processing method, device, and computer-readable storage medium. Background Art
[0002] With the development of speech technology, the functions of applications have been improved. For example, audio synthesis (Text to Speech, TTS) can convert text information built into a computer or input externally into speech. When performing speech synthesis, the relevant technology obtains audio information that matches the text, and constructs the style components of the speech from the audio information in an unsupervised manner through a speech model to implant the style into the text and obtain the speech information corresponding to the text.
[0003] In the process of research and practice on the prior art, the inventors of the present application found that for the existing speech synthesis technology, since the audio information corresponding to some texts cannot be obtained in actual applications, that is, it is impossible to find the speech style corresponding to the text one by one, and it is difficult to obtain a specific speech style through artificial settings, the synthesized speech style does not conform to the expected style effect corresponding to the text, and the synthesized speech information lacks natural simulation. Summary of the invention
[0004] The embodiments of the present application provide an information processing method, device, and computer-readable storage medium, which can make the synthesized voice information conform to the expected style effect corresponding to the text and make the synthesized voice information more natural and realistic.
[0005] The present application provides an information processing method, including:
[0006] Get the preset audio and text to be converted;
[0007] Encoding the text to be converted to obtain a text encoding vector corresponding to the text to be converted;
[0008] Extracting the global style features of the preset audio to obtain a global style vector corresponding to the preset audio;
[0009] Performing weighted sum processing on the global style vector and the text encoding vector to obtain a text representation vector sequence, wherein the text representation vector sequence includes a plurality of text representation sub-vectors;
[0010] Based on each text representation sub-vector and its corresponding local style vector, target speech spectrum information is constructed, and target speech information corresponding to the target speech spectrum information is output.
[0011] Accordingly, an embodiment of the present application provides an information processing device, including:
[0012] An acquisition unit, used to acquire preset audio and text to be converted;
[0013] An encoding unit, used for encoding the text to be converted to obtain a text encoding vector corresponding to the text to be converted;
[0014] An extraction unit, used to extract the global style features of the preset audio and obtain a global style vector corresponding to the preset audio;
[0015] A processing unit, configured to perform weighted sum processing on the global style vector and the text encoding vector to obtain a text representation vector sequence, wherein the text representation vector sequence includes a plurality of text representation sub-vectors;
[0016] The construction unit is used to construct target speech spectrum information based on each text representation sub-vector and its corresponding local style vector, and output the target speech information corresponding to the target speech spectrum information.
[0017] In some embodiments, the building block is further used for:
[0018] Obtaining a local style vector corresponding to each text representation sub-vector, wherein the local style vector corresponding to the text representation sub-vector is obtained by extracting the sub-basic frequency of the speech at the previous moment;
[0019] Decode each text representation sub-vector and the corresponding local style vector to obtain the corresponding speech sub-frequency at each moment;
[0020] The speech sub-basic frequencies corresponding to each moment are fused to obtain the target speech spectrum information.
[0021] In some embodiments, the building block is further used for:
[0022] Determine the first text representation sub-vector in the text representation vector sequence as a reference sub-vector;
[0023] Decoding the reference sub-vector to obtain a reference speech sub-base frequency corresponding to the reference sub-vector;
[0024] According to the reference sub-vector and the reference speech sub-frequency, a local style vector corresponding to the text representation sub-vector in the text representation vector sequence except the reference sub-vector is obtained.
[0025] In some embodiments, the building block is further used for:
[0026] Extracting style features from the reference speech sub-frequency to obtain a reference local style vector corresponding to the reference speech sub-frequency;
[0027] Based on the reference local style vector and the reference sub-vector, a local style vector corresponding to the text representation sub-vector in the text representation vector sequence except the reference sub-vector is obtained.
[0028] In some embodiments, the extraction unit is further used to:
[0029] Performing encoding processing on each preset sub-audio to obtain a global style sub-vector corresponding to each preset sub-audio;
[0030] Averaging the multiple global style sub-vectors to obtain a global style vector.
[0031] In some embodiments, the processing unit is further configured to:
[0032] The global style vector and the text encoding vector are fused to obtain a fused text representation vector;
[0033] The fused text representation vectors are weighted-summed according to preset attention weights to obtain a text representation vector sequence.
[0034] In some embodiments, the encoding unit is further configured to:
[0035] Determining target text information according to the text to be converted;
[0036] The target text information is encoded to obtain a text encoding vector corresponding to the text to be converted.
[0037] In some embodiments, the encoding unit is further configured to:
[0038] Acquire text information contained in the text to be converted;
[0039] The text information is processed according to grammatical rules to obtain target text information.
[0040] In addition, an embodiment of the present application also provides a computer device, including a processor and a memory, wherein the memory stores an application program, and the processor is used to run the application program in the memory to implement the steps in the information processing method provided in the embodiment of the present application.
[0041] In addition, an embodiment of the present application also provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in any information processing method provided in the embodiment of the present application.
[0042] In addition, the embodiment of the present application further provides a computer program, the computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the steps in any one of the information processing methods provided in the embodiment of the present application.
[0043] The embodiment of the present application can obtain preset audio and text to be converted; encode the text to be converted to obtain the text encoding vector corresponding to the text to be converted; extract the global style features of the preset audio to obtain the global style vector corresponding to the preset audio; perform weighted summation on the global style vector and the text encoding vector to obtain a text representation vector sequence, the text representation vector sequence includes multiple text representation sub-vectors; based on each text representation sub-vector and its corresponding local style vector, construct the target speech spectrum information, and output the target speech information corresponding to the target speech spectrum information. It can be obtained that the embodiment of the present application can avoid the phenomenon of failure of speech spectrum information synthesis in practical applications due to the inability to obtain audio corresponding to the text to be converted one by one by selecting the audio that meets the expected speech style type as the extraction specimen of the global speech style feature of the text to be converted; further, by implanting the local style feature into the text representation sub-vector implanted with the global style vector, the style implantation control of the synthesized speech spectrum information can be realized, so that the speech corresponding to the synthesized speech spectrum information meets the expected style effect of the text and is more natural and realistic. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0045] Figure 1 is a schematic diagram of a scenario of an information processing system provided by an embodiment of the present application;
[0046] Figure 2 It is a schematic diagram of the steps of the information processing method provided in the embodiment of the present application;
[0047] Figure 3 It is a timing flow chart of the information processing method provided in the embodiment of the present application;
[0048] Figure 4 It is a scenario schematic diagram of the information processing method provided in the embodiment of the present application;
[0049] Figure 5is a schematic diagram of the structure of the target model provided in the embodiment of the present application;
[0050] Figure 6 is a schematic diagram of the structure of an information processing device provided in an embodiment of the present application;
[0051] Figure 7 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0052] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0053] The embodiments of the present application provide an information processing method, device and computer-readable storage medium. Specifically, the embodiments of the present application will be described from the perspective of an information processing device, which can be integrated in a computer device, which can be a server or a terminal. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application is not limited here.
[0054] It should be noted that in the information processing method or device disclosed in the present application, multiple servers can be composed of a blockchain, and the server is a node on the blockchain.
[0055] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technology in computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is to study the design principles and implementation methods of various intelligent machines so that machines have the functions of perception, reasoning and decision-making.
[0056] The solution provided in the embodiments of the present application involves technologies such as artificial intelligence information processing, which is specifically described by the following embodiments:
[0057] For example, see Figure 1 , is a schematic diagram of a scenario of an information processing system provided in an embodiment of the present application. The scenario includes a terminal 10 and a server 20, and the terminal 10 and the server 20 are connected via wireless communication to achieve data interaction.
[0058] After the user selects the text to be converted that needs to be synthesized through speech at the terminal 10, the user sends the text to be converted to the server 20 through the terminal 10; the server 20 performs speech synthesis on the text to be converted, obtains the target speech spectrum information corresponding to the text to be converted, and then returns the target speech spectrum information to the terminal 10. The terminal 10 is also used to convert the target speech spectrum information into the target speech through the speech signal analysis and synthesis system after receiving the target speech spectrum information, such as converting the target speech spectrum information into the target speech through a voice encoder, so as to play the target speech through the terminal 10, freeing the user's eyes and enhancing the user experience.
[0059] The server 20 can obtain preset audio and text to be converted; encode the text to be converted to obtain a text encoding vector corresponding to the text to be converted; extract the global style features of the preset audio to obtain a global style vector corresponding to the preset audio; perform weighted summation on the global style vector and the text encoding vector to obtain a text representation vector sequence, the text representation vector sequence includes multiple text representation sub-vectors; construct target speech spectrum information based on each text representation sub-vector and its corresponding local style vector, and output the target speech information corresponding to the target speech spectrum information.
[0060] Among them, information processing may include obtaining the text to be converted and the preset audio, implanting the global style vector and the local style vector into the text encoding vector, and constructing the target speech spectrum information.
[0061] It should be noted that the order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0062] See also Figure 2 , Figure 2 A schematic diagram of the steps of an information processing method provided in an embodiment of the present application is as follows:
[0063] 101. Obtain preset audio and text to be converted.
[0064] The text to be converted may be a text that needs to be synthesized into voice information, and the text to be converted includes text information, and the text information indicates the specific information content corresponding to the synthesized voice information. For example, if a user needs to synthesize a text message on a terminal into voice information with a voice dialogue, the text to be converted can be sent to a voice synthesis processing end, such as a server, through the terminal or a target application on the terminal.
[0065] The preset audio may be an audio containing a related type of narration style, such as an audio with a narration style of joy, an audio with a narration style of sadness, etc. In the embodiment of the present application, style features may be extracted from the preset audio to control the style of the target speech spectrum information corresponding to the text to be converted.
[0066] In order to determine the text content and voice style of the spectral information corresponding to the synthesized speech information required by the user, the embodiment of the present application obtains the text to be converted and the preset audio that conforms to the expected voice style type, so as to subsequently synthesize the target speech spectral information of the corresponding voice style based on the text to be converted and the preset audio.
[0067] 102. Encode the text to be converted to obtain a text encoding vector corresponding to the text to be converted.
[0068] The text to be converted contains text information. The embodiment of the present application can encode the relevant text information in the text to be converted to obtain a text encoding vector corresponding to the text information.
[0069] In order to obtain the text encoding vector corresponding to the text to be converted, the embodiment of the present application obtains the text to be converted and needs to encode the text to be converted to obtain the text encoding vector for the subsequent process of synthesizing the target speech spectrum information.
[0070] In some implementations, the step of “encoding the text to be converted to obtain a text encoding vector corresponding to the text to be converted” may include:
[0071] (1) Determine the target text information based on the text to be converted.
[0072] The target text information may be the text information contained in the text to be converted, or may be the text information obtained by processing the text information in the text to be converted. The target text information may be understood as the specific text content contained in the text to be converted, indicating the specific content corresponding to the synthesized speech information.
[0073] In order to determine the text content of the synthesized speech information (speech spectrum information) required by the user, after obtaining the text to be converted, the embodiment of the present application determines the corresponding target text information according to the text to be converted, so as to facilitate the subsequent synthesis of the corresponding target speech spectrum information according to the target text information.
[0074] In some implementations, the step of “determining corresponding target text information according to the text to be converted” may include:
[0075] (1.1) Obtaining text information contained in the text to be converted;
[0076] (1.2) Process the text information according to grammatical rules to obtain the target text information.
[0077] Specifically, in order to obtain the target text information of the desired synthesized speech information, first, it is necessary to extract the text information of the text to be converted, wherein the text information can be obtained by performing optical character recognition processing on the text to be converted to obtain the text information. It should be noted that when optical character recognition (OCR) recognizes the corresponding characters, it determines their shapes by detecting dark and light patterns, and then translates the shapes into computer text through character recognition methods.
[0078] The grammatical rules may be rules for normalizing the sentence structure, word information, stop words, etc. of the text, and are used to perform normalization constraints on the text information to obtain processed text information that complies with the grammatical rules.
[0079] For example, in order to enable the speech corresponding to the subsequently synthesized target speech spectrum information to convey accurate narration information, the embodiment of the present application processes the text information in the text to be converted according to preset grammatical rules. The processing method may be word segmentation, removal of stop words, adjustment of sentence structure, etc., to obtain the processed target text information.
[0080] In addition, in some embodiments, the method for obtaining the target text information can also be: segmenting the text information in the text to be converted to obtain multiple word information; performing part-of-speech tagging on each word information; extracting text features of each word information, which text features can reflect the semantics and generalization of the corresponding word information, such as reflecting the repetition of semantics between word information in the text information; inputting the text features into a pre-built text semantic recognition model to obtain text semantic recognition results; processing the text information according to the text semantic recognition results, such as adjusting the position of the word information, deleting redundant word information, etc., to obtain the target text information.
[0081] Through the above method, the text information in the text to be converted is regularized, and the target text information for text encoding is determined from the text information in the text to be converted. The target text information can accurately reflect the specific information content of the text to be converted, so that the text encoding vector corresponding to the target text information can improve the semantic accuracy of the corresponding target speech after subsequently participating in the synthesis of target speech spectrum information, which is convenient for users to understand and effectively avoids the phenomenon of erroneous text information being converted into ambiguous speech.
[0082] (2) Encode the target text information to obtain the text encoding vector corresponding to the text to be converted.
[0083] In order to obtain the text encoding vector corresponding to the text to be converted, the target text information corresponding to the text to be converted needs to be encoded to obtain the text encoding vector. Specifically, the target text information is encoded by the encoding module (Encoder) in the trained target model; wherein the encoding process can be to perform word segmentation on the target text information to obtain multiple word features, perform deduplication on the multiple word features to obtain multiple deduplication word features, and then generate the text encoding vector of the text to be converted based on the multiple deduplication word features.
[0084] 103. Extract the global style features of the preset audio to obtain a global style vector corresponding to the preset audio.
[0085] The preset audio may be an audio containing a preset narration style type, such as an audio with a narration style of joy, an audio with a narration style of sadness, etc. In the embodiment of the present application, style features may be extracted from the preset audio to control the style of the target speech spectrum information corresponding to the text to be converted.
[0086] The global style vector may be a feature vector representing a global style, and is used to implant global style features into a text encoding vector to control the global style type of subsequent synthesized target speech spectrum information.
[0087] It should be noted that the preset audio may also include multiple preset sub-audios of the same narration style type. In the embodiment of the present application, in order to make the subsequently synthesized target speech spectrum information have a stable style type, a batch of audios of the same style may be used to extract global style features, such as using 10 joy-like sub-audios of the narration style to extract style features for subsequent style implantation. In this way, the stability and balance of the subsequently generated target speech spectrum information in the corresponding narration style type are ensured, and the accuracy of the target speech spectrum information corresponding to the synthesized target narration style type is improved.
[0088] In some implementations, the preset audio includes a plurality of preset sub-audios, and the step of “extracting the global style feature of the preset audio to obtain the global style vector corresponding to the preset audio” may include:
[0089] (1) Encode each preset sub-audio to obtain a global style sub-vector corresponding to each preset sub-audio.
[0090] In order to obtain the global style sub-vector corresponding to each preset sub-audio, each preset sub-audio needs to be encoded to obtain the global style sub-vector corresponding to each preset sub-audio. Specifically, the preset sub-audio is encoded by the style encoder module (Style Encoder) in the trained target model to obtain the global style sub-vector corresponding to each preset sub-audio.
[0091] In some embodiments, the encoding process for each preset sub-audio includes: converting the preset sub-audio into a corresponding digital audio signal; performing pre-emphasis processing on the digital audio signal to obtain a pre-emphasized digital audio signal; performing frame processing on the pre-emphasized digital audio signal to obtain multiple frames of audio sub-signals; performing discrete Fourier transform operation on each frame of audio sub-signal to obtain audio spectrum information, and the audio spectrum information contains the audio signal value corresponding to each frame of audio sub-signal; filtering the audio spectrum information to obtain filtered audio spectrum information; performing cepstrum analysis on the filtered audio spectrum information to obtain a global style sub-vector corresponding to each preset sub-audio.
[0092] It should be noted that each preset sub-audio can be presented in the form of an analog signal. When encoding each preset sub-audio, the preset sub-audio is converted into a corresponding digital audio signal, which is actually converting the analog signal of the preset sub-audio into a digital signal. It can include two steps: sampling and quantization, that is, converting the continuous waveform of the sound into discrete data points with a certain sampling rate and sampling bit number.
[0093] (2) Multiple global style sub-vectors are averaged to obtain a global style vector.
[0094] In order to obtain the final global style vector, after obtaining the global style sub-vector corresponding to each preset sub-audio, the embodiment of the present application adds up all the global style sub-vectors to obtain a total global style vector; then, the total global style vector is averaged according to the number of preset sub-audios or the number of global style sub-vectors to obtain a global style vector used to implant style into the text encoding vector.
[0095] In some implementations, a style extraction module (Style layer) in a trained target model averages multiple global style sub-vectors to obtain a global style vector.
[0096] Through the above method, a global style vector for subsequent style implantation is extracted from multiple preset sub-audios, thereby ensuring the stability and balance of the target speech spectrum information generated subsequently in the corresponding narration style type, and improving the accuracy of the target speech spectrum information corresponding to the synthesized target narration style type.
[0097] 104. Perform weighted sum processing on the global style vector and the text encoding vector to obtain a text representation vector sequence.
[0098] The text representation vector sequence includes multiple text representation sub-vectors, which represents a sequence of multiple text representation sub-vectors obtained after weighted summation. It should be noted that the order of each text representation sub-vector in the text representation vector sequence can correspond to the order of each feature vector value in the aforementioned text encoding vector.
[0099] It should be noted that since the text representation vector sequence contains multiple text representation sub-vectors, each text representation sub-vector is obtained by weighted summation between the attention weight and the text encoding vector. The text encoding vector contains the eigenvalues or eigenvector values converted from each word information or character in the text to be converted. The eigenvalues or eigenvector values in the text encoding vector are weighted summed through the attention mechanism. Since the attention mechanism has different attention weights when generating each text representation sub-vector, multiple different text representation sub-vectors can be obtained.
[0100] In some implementations, the step of “performing weighted sum processing on the global style vector and the text encoding vector to obtain a text representation vector sequence” includes:
[0101] (1) The global style vector and the text encoding vector are fused to obtain a fused text representation vector.
[0102] The text representation vector may be a feature vector including global style features, which may represent the vector state of the text encoding vector after the global style features are implanted.
[0103] In order to realize the implantation of global style features, after obtaining the global style vector, the embodiment of the present application adds the global style vector to the text encoding vector, so as to combine the global style vector into the text encoding vector to obtain the text representation vector.
[0104] (2) The fused text representation vectors are weighted and summed according to the preset attention weights to obtain a text representation vector sequence.
[0105] Among them, the preset attention weight can be a weight value for weighted product of eigenvalues in the corresponding vector, which is used to perform weighted product processing on the vector that needs weighted processing.
[0106] In order to obtain a text representation sub-vector containing a global style vector, after obtaining the global style vector, the embodiment of the present application needs to perform weighted summation processing on the global style vector and the text encoding vector to obtain a text representation vector sequence containing multiple text representation sub-vectors. Specifically, the global style vector and the text encoding vector are fused by the fusion module in the trained target model to obtain a fused text representation vector; the global style vector and the text encoding vector are weighted summed by the attention feature module (Attention, attention mechanism) in the target model to obtain a text representation vector sequence containing multiple text representation sub-vectors. In this way, each text representation sub-vector in the text representation vector sequence is decoded and the corresponding speech spectrum information is obtained.
[0107] Through the above method, after obtaining the global style vector, the global style vector is added to the text encoding vector, so that the global style vector is combined with the text encoding vector, and the global style feature implantation of the text encoding information can be realized, so as to control the global style of the subsequently synthesized target speech spectrum information through the global style vector, ensure the stability of the subsequently generated target speech spectrum information in the corresponding narration style type, and improve the accuracy of the target speech spectrum information corresponding to the synthesized target narration style type.
[0108] 105. Based on each text representation sub-vector and its corresponding local style vector, construct the target speech spectrum information, and output the target speech information corresponding to the target speech spectrum information.
[0109] The local style vector may be a feature vector representing the local style, which may be used to fuse a certain text representation sub-vector in the text representation vector sequence to control the style of the corresponding frame speech sub-base frequency in the speech spectrum information.
[0110] In order to obtain the speech spectrum corresponding to the text to be converted, after obtaining a text representation vector sequence containing multiple text representation sub-vectors, the embodiment of the present application constructs the target speech spectrum information based on each text representation sub-vector and its corresponding local style vector. Specifically, each text representation sub-vector and its corresponding local style vector are fused through the fusion module of the trained target model to obtain the fused text representation sub-vector; and the fused text representation sub-vector is decoded through the decoding module (Decoder) in the trained target model to obtain the speech sub-basic frequency corresponding to each text representation sub-vector; and then, multiple speech sub-basic frequencies are fused to obtain the target speech spectrum information.
[0111] In some implementations, the step of “constructing target speech spectrum information based on each text representation sub-vector and its corresponding local style vector” may include:
[0112] (1) Obtaining a local style vector corresponding to each text representation sub-vector, wherein the local style vector corresponding to the text representation sub-vector is extracted from the speech sub-frequency at the previous moment.
[0113] The local style vector may also be a feature vector for controlling the narration style of the corresponding text representation sub-vector, and the local style vector is extracted from the voice sub-frequency at the previous moment. It should be noted that the voice sub-frequency at the previous moment is obtained by decoding the corresponding text representation sub-vector and the corresponding local style vector in the text representation vector sequence.
[0114] In order to obtain the local style vector corresponding to each text representation sub-vector, specifically, the style feature extraction layer (Style layer) in the trained target model can be used to extract the style feature of the speech sub-base frequency at the previous moment to obtain the local style vector corresponding to the current text representation sub-vector.
[0115] In some implementations, the step of “obtaining a local style vector corresponding to each text representation sub-vector” may include:
[0116] (1.1) The text representation sub-vector located at the first position in the text representation vector sequence is determined as the reference sub-vector;
[0117] (1.2) decoding the reference sub-vector to obtain the reference speech sub-basic frequency corresponding to the reference sub-vector;
[0118] (1.3) According to the reference sub-vector and the reference speech sub-frequency, obtain the local style vector corresponding to the text representation sub-vector in the text representation vector sequence except the reference sub-vector.
[0119] In order to make the adjacent speech sub-fundamentals in the time sequence of the text representation sub-vector with global style features coherent when generating the corresponding speech sub-fundamentals, so that the style of the target speech information corresponding to the subsequent target speech spectrum information is coherent, balanced and natural, the embodiment of the present application implants local style features to intervene between the speech sub-fundamentals through the local style vector, so as to accurately control the speech sub-information of adjacent frames in the subsequent target speech information through the local style, so that the target speech information is more natural and realistic.
[0120] In order to obtain the local style vector corresponding to each text representation sub-vector, the embodiment of the present application determines the text representation sub-vector located at the first position in the text representation vector sequence as the reference sub-vector; decodes the reference sub-vector to obtain the reference speech sub-basic frequency corresponding to the reference sub-vector; obtains the local style vector corresponding to the text representation sub-vector in the text representation vector sequence except the reference sub-vector according to the reference sub-vector and the reference speech sub-basic frequency. It should be noted that when generating the corresponding speech sub-basic frequency according to the first text representation sub-vector in the text representation vector sequence, due to the unsynthesized speech sub-basic frequency at the previous moment, the local style vector corresponding to the first text representation sub-vector is actually 0. At this time, the first text representation sub-vector in the text representation vector sequence can be directly decoded to obtain the speech sub-basic frequency corresponding to the first text representation sub-vector; then, extract the local style vector corresponding to the next text representation sub-vector in the text representation vector sequence according to the speech sub-basic frequency corresponding to the first text representation sub-vector; similarly, the local style vectors corresponding to other text representation sub-vectors are extracted from the speech sub-basic frequency of the corresponding previous text representation sub-vector.
[0121] In some implementations, the step of “obtaining, according to the reference subvector and the reference speech sub-frequency, a local style vector corresponding to the text representation subvector in the text representation vector sequence except the reference subvector” may include:
[0122] (1.3.1) extracting style features from the reference speech sub-frequency to obtain a reference local style vector corresponding to the reference speech sub-frequency;
[0123] (1.3.2) Based on the reference local style vector and the reference sub-vector, obtain the local style vector corresponding to the text representation sub-vector in the text representation vector sequence except the reference sub-vector.
[0124] Specifically, after obtaining the reference speech sub-frequency corresponding to the first text representation sub-vector in the text representation vector sequence, style features are extracted from the reference speech sub-frequency to obtain a reference local style vector; then, the next text representation sub-vector of the reference sub-vector in the text representation vector sequence is determined, and the reference local style vector is determined as the local style vector corresponding to the next text representation sub-vector of the reference sub-vector; then, based on the next text representation sub-vector of the reference sub-vector and the corresponding local style vector, the speech sub-frequency corresponding to the next text representation sub-vector of the reference sub-vector is generated, and the next local style vector is extracted from the speech sub-frequency corresponding to the next text representation sub-vector. In the above manner, the last text representation sub-vector and the corresponding local style vector in the text representation vector sequence are obtained.
[0125] It should be noted that when generating the corresponding speech sub-frequency according to the first text representation sub-vector in the text representation vector sequence, due to the unsynthesized speech sub-frequency at the previous moment, the local style vector corresponding to the first text representation sub-vector is actually 0. At this time, the first text representation sub-vector in the text representation vector sequence can be directly decoded to obtain the speech sub-frequency corresponding to the first text representation sub-vector; then, the local style vector corresponding to the next text representation sub-vector in the text representation vector sequence is extracted according to the speech sub-frequency corresponding to the first text representation sub-vector; similarly, the local style vectors corresponding to other text representation sub-vectors are extracted from the speech sub-frequency of the corresponding previous text representation sub-vector.
[0126] In an embodiment of the present application, the local style vector corresponding to the text representation sub-vector other than the reference sub-vector (the first text representation sub-vector) in the text representation vector sequence can be obtained through the style feature extraction layer (Style layer) in the target model.
[0127] (2) Decode each text representation sub-vector and the corresponding local style vector to obtain the corresponding speech sub-frequency at each moment.
[0128] It can be understood that the speech information may contain multiple frames of speech sub-information, or the speech information may be decomposed into multiple frames of speech sub-information; and the target speech spectrum information corresponding to the text to be converted may include speech sub-basic frequencies at multiple moments, and the speech sub-basic frequencies at each moment may correspond to the relevant frame speech sub-information in the speech information.
[0129] It should be noted that, since the speech sub-frequency corresponding to each moment is obtained by decoding the corresponding text representation sub-vector and the local style vector, and the local style vector corresponding to each text representation sub-vector is extracted from the speech sub-frequency at the previous moment, when generating the speech sub-frequency, the embodiment of the present application may synthesize the corresponding speech sub-frequency in sequence, so as to facilitate the subsequent fusion of multiple speech sub-frequency into the target speech spectrum information.
[0130] For example, the text representation vector sequence includes a plurality of text representation sub-vectors arranged in sequence, such as a first text representation sub-vector, a second text representation sub-vector, a third text representation sub-vector, ..., an nth text representation sub-vector, and the like. Specifically, the first text representation sub-vector and the corresponding local style vector in the text representation vector sequence are decoded by the decoding module (Decoder) in the target model to obtain the first time-domain speech sub-frequency. It should be noted that, due to the unsynthesized speech sub-frequency at the previous moment, the local style vector corresponding to the first text representation sub-vector is actually 0, or the corresponding local style vector is not extracted. At this time, the decoding module (Decoder) in the target model actually decodes the first text representation sub-vector in the text representation vector sequence; further, the style feature extraction layer (Style layer) in the target model performs local style feature extraction on the first time-domain speech sub-frequency to obtain the local style vector corresponding to the second text representation sub-vector, and the decoding module (Decoder) in the target model decodes the second text representation sub-vector and the corresponding local style vector to obtain the speech sub-frequency at the second moment; further, the style feature extraction layer (Style layer) in the target model performs local style feature extraction on the first time-domain speech sub-frequency to obtain the local style vector corresponding to the second text representation sub-vector. layer) extracts local style features from the speech sub-frequency at the second moment to obtain a local style vector corresponding to the third text representation sub-vector. Then, the third text representation sub-vector and the corresponding local style vector are decoded by a decoding module (Decoder) in the target model to obtain the speech sub-frequency at the third moment, until the speech sub-frequency corresponding to all the text representation sub-vectors is generated.
[0131] It should be noted that, in the embodiment of the present application, the first text representation sub-vector in the text representation vector sequence can be decoded by the decoding module (Decoder) in the target model to obtain the speech sub-frequency corresponding to the first text representation sub-vector; and the other text representation sub-vectors and the corresponding local style vectors in the text representation vector sequence except the reference sub-vector (the first text representation sub-vector) can be decoded by the decoding module (Decoder) in the target model to obtain the speech sub-frequency corresponding to the other text representation sub-vectors.
[0132] In the above manner, under the premise that the global style features have been implanted, the corresponding entire speech spectrum can contain the corresponding speech style features. In order to make the styles of the speech sub-basic frequencies containing the corresponding speech style features consistent or fitting, local style features need to be implanted. Specifically, after obtaining the local style vector corresponding to each text representation sub-vector, each text representation sub-vector is fused with the corresponding local style vector for the synthesis of the speech sub-basic frequencies at the current moment, so that the style features between the various speech sub-basic frequencies are consistent or extremely similar.
[0133] (3) The speech sub-basic frequencies corresponding to each moment are fused to obtain the target speech spectrum information.
[0134] In order to obtain the target speech spectrum information corresponding to the text to be converted, the embodiment of the present application obtains the target speech spectrum information corresponding to the text to be converted by fusing the speech sub-basic frequencies at all times after obtaining the speech sub-basic frequencies corresponding to each moment. It should be noted that when fusing the speech sub-basic frequencies at all times, they can be spliced in sequence according to the generation order of each speech sub-basic frequency or the time label of each moment, so as to achieve the fusion of the speech sub-basic frequencies corresponding to each moment and obtain the target speech spectrum information, so as to facilitate the subsequent conversion into the corresponding target speech information according to the target speech spectrum information.
[0135] In addition, steps 102-105 corresponding to an information processing method provided in an embodiment of the present application can be implemented through a model to obtain target speech spectrum information corresponding to the text to be converted. Specifically, after determining the target text information according to the text to be converted, the target text information and multiple preset audios are input into the trained target model to obtain the target speech spectrum information corresponding to the text to be converted, wherein the target model is obtained by joint training of sample text, sample audio and sample speech spectrum information, so that the target model performs global style vector implantation and local style vector implantation on the text encoding vector corresponding to the target text information.
[0136] Among them, the training process of the target model can be: obtaining sample text information, sample audio and sample speech spectrum information; generating the sample speech sub-fundamental frequency corresponding to each moment according to the sample text information and the sample speech spectrum information; inputting the sample target text information and the sample audio into the preset model to obtain the predicted speech sub-fundamental frequency corresponding to each moment; obtaining the fundamental frequency difference value between the predicted speech sub-fundamental frequency corresponding to each moment and the sample speech sub-fundamental frequency at the corresponding moment, and adjusting the network parameters of the preset model according to the fundamental frequency difference value at each moment, and performing iterative training until the fundamental frequency difference value between the predicted speech sub-fundamental frequency corresponding to each moment and the sample speech sub-fundamental frequency at the corresponding moment converges to obtain the trained target model.
[0137] In an embodiment of the present application, in order to convert the text to be converted into the corresponding target voice information, it is necessary to first obtain the target voice spectrum information corresponding to the text to be converted. Specifically, first, obtain a preset audio, such as obtaining a preset audio of a specific voice style type (narration style type), to extract style features from the preset audio, and obtain a global style vector that conforms to the expected voice style type. By fusing the global style with the text encoding information corresponding to the text to be converted, a text representation vector containing global style features is obtained, and the global style implantation of the target voice spectrum information is completed to preliminarily determine the global style type of the target voice spectrum information. In this way, the global style of the target voice spectrum information can be controlled without obtaining the audio corresponding to the text to be converted one by one.
[0138] In addition, the text representation vector is processed through the attention mechanism to obtain multiple text representation sub-vectors; then, before generating the speech sub-frequency corresponding to each text representation sub-vector, the style feature of the speech sub-frequency at the previous moment can be extracted to obtain a local style vector for fusion with each text representation sub-vector; then, each text representation sub-vector and the corresponding local style vector are fused to obtain a text representation sub-vector containing local style features. In this way, local style features are implanted in each text representation sub-vector under the premise of implanting global style features to determine the local style control of the speech sub-frequency.
[0139] The embodiment of the present application can extract a local style vector from the voice sub-basic frequency of the previous moment for use in the synthesis of the voice sub-basic frequency of the current moment, so as to intervene between the voice sub-basic frequencies through the local style vector, so that the style features between the generated voice sub-basic frequencies are consistent or extremely similar. In this way, on the premise that the global style features have been implanted, the local style features are also implanted, so that when the global style of the target voice spectrum information is determined, the style of the voice sub-basic frequency is continued to be controlled through the local style vector, so that the voice style of the voice sub-information of adjacent frames in the subsequent target voice information is accurately controlled, so that the style of the subsequent target voice information is coherent, balanced and more natural and realistic.
[0140] As can be seen from the above, the embodiment of the present application can obtain preset audio and text to be converted; encode the text to be converted to obtain the text encoding vector corresponding to the text to be converted; extract the global style features of the preset audio to obtain the global style vector corresponding to the preset audio; perform weighted summation on the global style vector and the text encoding vector to obtain a text representation vector sequence, and the text representation vector sequence includes multiple text representation sub-vectors; based on each text representation sub-vector and its corresponding local style vector, construct the target speech spectrum information, and output the target speech information corresponding to the target speech spectrum information. It can be obtained that the embodiment of the present application can avoid the phenomenon of failure of speech spectrum information synthesis in practical applications due to the inability to obtain audio corresponding to the text to be converted one by one by selecting the audio that meets the expected speech style type as the extraction specimen of the global speech style feature of the text to be converted; further, by implanting the local style feature of the text representation sub-vector implanted with the global style vector, the style implantation control of the synthesized speech spectrum information can be realized, so that the speech corresponding to the synthesized speech spectrum information meets the expected style effect of the text and is more natural and realistic.
[0141] According to the method described in the above embodiment, the following is further described in detail with examples.
[0142] The embodiments of the present application take information processing as an example to further describe the information processing method provided in the embodiments of the present application.
[0143] See also Figure 3 , Figure 3 is a timing flow chart of the information processing method provided in the embodiment of the present application, Figure 4 is a schematic diagram of a scenario of an information processing method provided in an embodiment of the present application, Figure 5 is a schematic diagram of the structure of the target model provided in the embodiment of the present application; for ease of understanding, please refer to Figure 3 , Figure 4 and Figure 5 , the embodiments of the present application are described.
[0144] In the embodiments of the present application, the information processing device will be described from the perspective of the information processing device, which can be integrated into a computer device such as a terminal or a server. When the processor on the terminal or server executes the program corresponding to the information processing method, the specific process of the information processing method is as follows:
[0145] 201. The terminal sends text to be converted.
[0146] The text to be converted may be a text that needs to be synthesized into voice information, and the text to be converted includes text information, and the text information indicates the specific information content corresponding to the synthesized voice information. For example, if a user needs to synthesize a text message on a terminal into voice information with a voice dialogue, the text to be converted can be sent to a voice synthesis processing end, such as a server, through the terminal or a target application on the terminal.
[0147] 202. The server receives the text to be converted and obtains the preset audio.
[0148] The preset audio may be an audio containing a related type of narration style, such as an audio with a narration style of joy, an audio with a narration style of sadness, etc. In the embodiment of the present application, style features may be extracted from the preset audio to control the style of the target speech spectrum information corresponding to the text to be converted.
[0149] In order to determine the text content and voice style of the spectral information corresponding to the synthesized speech information required by the user, after receiving the text to be converted, the server obtains a preset audio that meets the expected voice style type, so as to subsequently synthesize the target speech spectral information of the corresponding voice style based on the text to be converted and the preset audio.
[0150] It should be noted that, since it is generally difficult to obtain audio that corresponds one-to-one to the text information of the text to be converted in actual applications, the embodiment of the present application can select a batch of audios of the same style (such as a batch of narration audios in a training set) according to the text to be converted for style implantation and extraction, and use the centroid of the batch of style audios as the style implantation of subsequent speech spectrum information (such as narration implantation) to facilitate the preliminary determination of the global style type of the target speech spectrum information. In this way, the global style of the target speech spectrum information can be controlled without obtaining audio that corresponds one-to-one to the text to be converted.
[0151] 203. The server encodes the text to be converted through the target model to obtain a text encoding vector corresponding to the text to be converted.
[0152] The text to be converted contains text information. The embodiment of the present application can encode the relevant text information in the text to be converted to obtain a text encoding vector corresponding to the text information.
[0153] Specifically, in order to obtain the text encoding vector corresponding to the text to be converted, the embodiment of the present application obtains the text information contained in the text to be converted, processes the text information according to the grammatical rules to obtain the target text information; encodes the target text information to obtain the text encoding vector corresponding to the text to be converted.
[0154] Exemplarily, first, optical character recognition is performed on the text to be converted to obtain text information, so as to extract text information from the text to be converted; it should be noted that when optical character recognition (OCR) recognizes the corresponding character, it determines its shape by detecting the dark and light patterns, and then translates the shape into computer text through the character recognition method. Then, the text information in the text to be converted is processed according to the preset grammatical rules, and the processing method can be word segmentation, stop word removal, sentence structure adjustment, etc., to obtain the processed target text information. Finally, the target text information is encoded by the encoding module (Encoder) in the trained target model; wherein, the encoding process can be word segmentation of the target text information to obtain multiple word features, deduplication of the multiple word features to obtain multiple deduplication word features, and then, the text encoding vector of the text to be converted is generated according to the multiple deduplication word features.
[0155] 204. The server extracts global style features of the preset audio through the target model to obtain a global style vector corresponding to the preset audio.
[0156] The preset audio may be an audio containing a preset narration style type, such as an audio with a narration style of joy, an audio with a narration style of sadness, etc. In the embodiment of the present application, style features may be extracted from the preset audio to control the style of the target speech spectrum information corresponding to the text to be converted.
[0157] The global style vector may be a feature vector representing a global style, and is used to implant global style features into a text encoding vector to control the global style type of subsequent synthesized target speech spectrum information.
[0158] In an embodiment of the present application, in order to make the subsequently synthesized target speech spectrum information have a stable style type, a batch of audios of the same style can be used to extract global style features. Specifically, the preset sub-audio is encoded by the style encoding module (Style Encoder) in the trained target model to obtain the global style sub-vector corresponding to each preset sub-audio. Among them, the encoding process of each preset sub-audio includes: converting the analog signal corresponding to the preset sub-audio into a corresponding digital signal; pre-emphasis processing is performed on the digital signal to obtain a pre-emphasized digital signal; framing the pre-emphasized digital signal to obtain multiple frames of audio digital sub-signals; performing discrete Fourier transform operation on each frame of audio digital sub-signal to obtain audio spectrum information, which contains the audio signal value corresponding to each frame of audio sub-signal; filtering the audio spectrum information to obtain the filtered audio spectrum information; performing cepstrum analysis on the filtered audio spectrum information to obtain the global style sub-vector corresponding to each preset sub-audio. Furthermore, all global style sub-vectors are added together to obtain a total global style vector; then, the total global style vector is averaged according to the number of preset sub-audios or the number of global style sub-vectors to obtain a global style vector for style implantation into the text encoding vector.
[0159] For example, the preset audio may also include multiple preset sub-audios of the same narration style type. For example, 10 sub-audios of the narration style of the joy class are used to extract style features, and the extracted 10 global style sub-vectors are averaged to obtain a global style vector for subsequent style implantation. In this way, the stability and balance of the target speech spectrum information generated subsequently in the corresponding narration style type are ensured, and the accuracy of the target speech spectrum information corresponding to the synthesized target narration style type is improved.
[0160] 205. The server performs weighted summation processing on the global style vector and the text encoding vector through the target model to obtain a text representation vector sequence.
[0161] Among them, the text representation vector sequence contains multiple text representation sub-vectors, each of which is obtained by weighted summation between the attention weight and the text encoding vector. The text encoding vector contains the eigenvalues or eigenvector values converted from each word information or character in the text to be converted. The eigenvalues or eigenvector values in the text encoding vector are weighted summed through the attention mechanism. Since the attention mechanism has different attention weights when generating each text representation sub-vector, multiple different text representation sub-vectors can be obtained.
[0162] Specifically, after obtaining the global style vector, the embodiment of the present application needs to perform weighted summation processing on the global style vector and the text encoding vector to obtain a text representation vector sequence containing multiple text representation sub-vectors. Specifically, the global style vector and the text encoding vector are fused through the fusion module in the trained target model to obtain a fused text representation vector; the global style vector and the text encoding vector are weighted summation processed through the attention feature module (Attention, attention mechanism) in the target model to obtain a text representation vector sequence containing multiple text representation sub-vectors. In this way, each text representation sub-vector in the text representation vector sequence can be decoded and the corresponding speech spectrum information can be obtained.
[0163] Through the above method, after obtaining the global style vector, the global style vector is added to the text encoding vector, so that the global style vector is combined with the text encoding vector, and the global style feature implantation of the text encoding information can be realized, so as to control the global style of the subsequently synthesized target speech spectrum information through the global style vector, ensure the stability of the subsequently generated target speech spectrum information in the corresponding narration style type, and improve the accuracy of the target speech spectrum information corresponding to the synthesized target narration style type.
[0164] 206. The server obtains the local style vector corresponding to each text representation sub-vector through the target model.
[0165] The local style vector may be a feature vector representing the local style, which may be used to fuse a certain text representation sub-vector in the text representation vector sequence to implant the narration style into the corresponding text representation sub-vector, thereby controlling the style of the corresponding frame speech sub-frequency in the speech spectrum information. It should be noted that the local style vector is extracted from the speech sub-frequency at the previous moment, and the speech sub-frequency at the previous moment may be obtained by decoding the corresponding text representation sub-vector in the text representation vector sequence and the corresponding local style vector.
[0166] In order to obtain the local style vector corresponding to each text representation sub-vector, the embodiment of the present application determines the text representation sub-vector located at the first position in the text representation vector sequence as the reference sub-vector; decodes the reference sub-vector to obtain the reference speech sub-basic frequency corresponding to the reference sub-vector; obtains the local style vector corresponding to the text representation sub-vector in the text representation vector sequence except the reference sub-vector according to the reference sub-vector and the reference speech sub-basic frequency. It should be noted that when generating the corresponding speech sub-basic frequency according to the first text representation sub-vector in the text representation vector sequence, due to the unsynthesized speech sub-basic frequency at the previous moment, the local style vector corresponding to the first text representation sub-vector is actually 0. At this time, the first text representation sub-vector in the text representation vector sequence can be directly decoded to obtain the speech sub-basic frequency corresponding to the first text representation sub-vector; then, extract the local style vector corresponding to the next text representation sub-vector in the text representation vector sequence according to the speech sub-basic frequency corresponding to the first text representation sub-vector; similarly, the local style vectors corresponding to other text representation sub-vectors are extracted from the speech sub-basic frequency of the corresponding previous text representation sub-vector.
[0167] It should be noted that, in the above local style feature extraction process, the local style vector corresponding to the text representation sub-vector other than the reference sub-vector (the first text representation sub-vector) in the text representation vector sequence can be obtained through the style feature extraction layer (Style layer) in the target model.
[0168] 207. The server decodes each text representation sub-vector and the corresponding local style vector through the target model to obtain the corresponding speech sub-frequency at each moment.
[0169] Since speech information may contain multiple frames of speech sub-information, or speech information may be decomposed into multiple frames of speech sub-information; and the target speech spectrum information corresponding to the text to be converted may contain speech sub-basic frequencies at multiple moments, the speech sub-basic frequencies at each moment may correspond to the relevant frame speech sub-information in the speech information.
[0170] It should be noted that, since the speech sub-frequency corresponding to each moment is obtained by decoding the corresponding text representation sub-vector and the local style vector, and the local style vector corresponding to each text representation sub-vector is extracted from the speech sub-frequency at the previous moment, when generating the speech sub-frequency, the embodiment of the present application may synthesize the corresponding speech sub-frequency in sequence, so as to facilitate the subsequent fusion of multiple speech sub-frequency into the target speech spectrum information.
[0171] For example, the text representation vector sequence includes a plurality of text representation sub-vectors arranged in sequence, such as a first text representation sub-vector, a second text representation sub-vector, a third text representation sub-vector, ..., an nth text representation sub-vector, and the like. Specifically, the first text representation sub-vector and the corresponding local style vector in the text representation vector sequence are decoded by the decoding module (Decoder) in the target model to obtain the first time-domain speech sub-frequency. It should be noted that, due to the unsynthesized speech sub-frequency at the previous moment, the local style vector corresponding to the first text representation sub-vector is actually 0, or the corresponding local style vector is not extracted. At this time, the decoding module (Decoder) in the target model actually decodes the first text representation sub-vector in the text representation vector sequence; further, the style feature extraction layer (Style layer) in the target model performs local style feature extraction on the first time-domain speech sub-frequency to obtain the local style vector corresponding to the second text representation sub-vector, and the decoding module (Decoder) in the target model decodes the second text representation sub-vector and the corresponding local style vector to obtain the speech sub-frequency at the second moment; further, the style feature extraction layer (Style layer) in the target model performs local style feature extraction on the first time-domain speech sub-frequency to obtain the local style vector corresponding to the second text representation sub-vector. layer) extracts local style features from the speech sub-frequency at the second moment to obtain a local style vector corresponding to the third text representation sub-vector. Then, the third text representation sub-vector and the corresponding local style vector are decoded by a decoding module (Decoder) in the target model to obtain the speech sub-frequency at the third moment, until the speech sub-frequency corresponding to all the text representation sub-vectors is generated.
[0172] Through the above method, under the premise that the global style features have been implanted, the corresponding entire speech spectrum can contain the corresponding speech style features. In order to make the styles of the speech sub-basic frequencies containing the corresponding speech style features consistent or fitting, local style features need to be implanted.
[0173] 208. The server fuses the speech sub-basic frequencies corresponding to each moment to obtain target speech spectrum information.
[0174] After obtaining the speech sub-basic frequency corresponding to each moment, the embodiment of the present application obtains the target speech spectrum information corresponding to the text to be converted by fusing the speech sub-basic frequencies at all moments. It should be noted that when fusing the speech sub-basic frequencies at all moments, they can be spliced in sequence according to the generation order of each speech sub-basic frequency or the time label of each moment, so as to achieve the fusion of the speech sub-basic frequency corresponding to each moment and obtain the target speech spectrum information, so as to facilitate the subsequent conversion into the corresponding target speech information according to the target speech spectrum information.
[0175] It should be noted that, in the embodiment of the present application, steps 203-208 can be implemented by a trained target model to obtain the target speech spectrum information corresponding to the text to be converted. Specifically, after determining the target text information according to the text to be converted, the target text information and multiple preset audios are input into the trained target model to obtain the target speech spectrum information corresponding to the text to be converted, wherein the target model is obtained by joint training of sample text, sample audio and sample speech spectrum information, so that the target model performs global style vector implantation and local style vector implantation on the text encoding vector corresponding to the target text information.
[0176] like Figure 5 As shown, the target model may include a text encoding module 501 (Encoder), a first style encoding module 502 (Style encoder), a first style extraction layer 503 (Style layer), a first fusion module 504, an attention module 505 (Attention), a second style extraction layer 506 (Style layer), a second fusion module 507, and a decoding module 508 (Decoder). Specifically, the text encoding module 501 is used to encode the text to be converted to obtain the text encoding vector corresponding to the text to be converted; the first style encoding module 502 is used to encode each preset sub-audio to obtain the global style sub-vector corresponding to each preset sub-audio; the first style extraction layer 503 is used to average multiple global style sub-vectors to obtain the global style vector; the first fusion module 504 is used to fuse the global style vector and the text encoding vector to obtain the fused text representation vector; the attention module 505 is used to perform weighted summation on the fused text representation vector according to the preset attention weight to obtain the text representation vector sequence; the second style extraction layer 506 is used to extract the style feature of the speech sub-basic frequency at the previous moment to obtain the local style vector corresponding to each text representation sub-vector; the second fusion module 507 is used to fuse each text representation sub-vector and the corresponding local style vector to obtain the fused text representation sub-vector; the decoding module 508 is used to decode the fused text representation sub-vector to obtain the speech sub-basic frequency corresponding to each moment. Further, the speech sub-basic frequency corresponding to each moment is fused to obtain the target speech spectrum information.
[0177] 209. The server returns the target voice spectrum information to the terminal.
[0178] After converting the text to be converted into target speech spectrum information, the server returns the target speech spectrum information to the terminal, so that the terminal processes according to the target speech spectrum information.
[0179] 210. The terminal receives target speech spectrum information, converts the target speech spectrum information into target speech information, and outputs the target speech information.
[0180] After receiving the target voice spectrum information sent by the server, the terminal converts the target voice spectrum information into target voice information through a voice encoder module (Voice Encoder) built into the terminal or the target application on the terminal, so as to play it through a speaker.
[0181] It should be noted that the embodiment of the present application can also provide an information processing method, which is applied to a terminal, and a preset audio and a text to be converted are obtained through the terminal; the text to be converted is encoded to obtain a text encoding vector corresponding to the text to be converted; the global style features of the preset audio are extracted to obtain a global style vector corresponding to the preset audio; the global style vector and the text encoding vector are weighted summed to obtain a text representation vector sequence, and the text representation vector sequence contains multiple text representation sub-vectors; based on each text representation sub-vector and its corresponding local style vector, the target speech spectrum information is constructed, and the target speech information corresponding to the target speech spectrum information is output. The text to be converted can be converted into the target speech spectrum information without interacting with the server, and the implantation of the global style features and the local style features can be completed. Further, the target speech spectrum information is converted into the target speech information through the terminal, and the target speech information is output. Through the above method, the style implantation control of the synthesized speech spectrum information is realized, so that the speech corresponding to the synthesized speech spectrum information conforms to the expected style effect of the text and is more natural and realistic.
[0182] From the above, it can be seen that the embodiment of the present application can obtain preset audio and text to be converted; encode the text to be converted to obtain the text encoding vector corresponding to the text to be converted; extract the global style features of the preset audio to obtain the global style vector corresponding to the preset audio; perform weighted summation on the global style vector and the text encoding vector to obtain a text representation vector sequence, and the text representation vector sequence includes multiple text representation sub-vectors; based on each text representation sub-vector and its corresponding local style vector, construct the target speech spectrum information, and output the target speech information corresponding to the target speech spectrum information. It can be obtained that the embodiment of the present application can avoid the phenomenon of failure of speech spectrum information synthesis in practical applications due to the inability to obtain audio corresponding to the text to be converted one by one by selecting the audio that meets the expected speech style type as the extraction specimen of the global speech style feature of the text to be converted; further, by implanting the local style feature of the text representation sub-vector implanted with the global style vector, the style implantation control of the synthesized speech spectrum information can be realized, so that the speech corresponding to the synthesized speech spectrum information meets the expected style effect of the text and is more natural and realistic.
[0183] In order to better implement the above method, an embodiment of the present application also provides an information processing device, which can be integrated into a network device, such as a server or a terminal. The terminal may include a tablet computer, a laptop computer and / or a personal computer.
[0184] For example, Figure 6 As shown, the information processing device may include an acquisition unit 601, an encoding unit 602, an extraction unit 603, a processing unit 604 and a construction unit 605.
[0185] An acquisition unit 601 is used to acquire a preset audio and a text to be converted;
[0186] The encoding unit 602 is used to encode the text to be converted to obtain a text encoding vector corresponding to the text to be converted;
[0187] An extraction unit 603 is used to extract the global style features of the preset audio and obtain a global style vector corresponding to the preset audio;
[0188] A processing unit 604 is used to perform weighted sum processing on the global style vector and the text encoding vector to obtain a text representation vector sequence, where the text representation vector sequence includes multiple text representation sub-vectors;
[0189] The construction unit 605 is used to construct the target speech spectrum information based on each text representation sub-vector and its corresponding local style vector, and output the target speech information corresponding to the target speech spectrum information.
[0190] In some embodiments, the construction unit 605 is further configured to:
[0191] Obtaining a local style vector corresponding to each text representation sub-vector, wherein the local style vector corresponding to the text representation sub-vector is obtained by extracting the sub-basic frequency of the speech at the previous moment;
[0192] Decode each text representation sub-vector and the corresponding local style vector to obtain the corresponding speech sub-frequency at each moment;
[0193] The speech sub-basic frequencies corresponding to each moment are fused to obtain the target speech spectrum information.
[0194] In some embodiments, the construction unit 605 is further configured to:
[0195] The first text representation sub-vector in the text representation vector sequence is determined as a reference sub-vector;
[0196] Decoding the reference sub-vector to obtain a reference speech sub-base frequency corresponding to the reference sub-vector;
[0197] According to the reference sub-vector and the reference speech sub-frequency, a local style vector corresponding to the text representation sub-vector in the text representation vector sequence except the reference sub-vector is obtained.
[0198] In some embodiments, the construction unit 605 is further configured to:
[0199] Extracting style features of the reference speech sub-basic frequency to obtain a reference local style vector corresponding to the reference speech sub-basic frequency;
[0200] Based on the reference local style vector and the reference sub-vector, a local style vector corresponding to the text representation sub-vector in the text representation vector sequence except the reference sub-vector is obtained.
[0201] In some embodiments, the extraction unit 603 is further used to: encode each preset sub-audio to obtain a global style sub-vector corresponding to each preset sub-audio; and average multiple global style sub-vectors to obtain a global style vector.
[0202] In some embodiments, the extraction unit 603 can also be used to: convert a preset sub-audio into a corresponding digital audio signal; perform pre-emphasis processing on the digital audio signal to obtain a pre-emphasized digital audio signal; perform frame processing on the pre-emphasized digital audio signal to obtain multiple frames of audio sub-signals; perform discrete Fourier transform operation on each frame of audio sub-signal to obtain audio spectrum information, and the audio spectrum information contains the audio signal value corresponding to each frame of audio sub-signal; perform filtering processing on the audio spectrum information to obtain filtered audio spectrum information; perform cepstrum analysis on the filtered audio spectrum information to obtain a global style sub-vector corresponding to each preset sub-audio.
[0203] In some embodiments, the processing unit 604 is further used to: fuse the global style vector and the text encoding vector to obtain a fused text representation vector; and perform weighted summation on the fused text representation vector according to preset attention weights to obtain a text representation vector sequence.
[0204] In some embodiments, the encoding unit 602 is further used to: determine target text information according to the text to be converted; and encode the target text information to obtain a text encoding vector corresponding to the text to be converted.
[0205] In some embodiments, the encoding unit 602 is further used to: obtain text information contained in the text to be converted; and process the text information according to grammatical rules to obtain target text information.
[0206] In some embodiments, the encoding unit 602 is also used to: segment the text information in the text to be converted to obtain multiple word information; perform part-of-speech tagging on each word information; extract text features of each word information, which can reflect the semantics and generalization of the corresponding word information, such as reflecting the repetition of semantics between each word information in the text information; input the text features into a pre-built text semantic recognition model to obtain a text semantic recognition result; process the text information according to the text semantic recognition result, such as adjusting the position of the word information, deleting redundant word information, etc., to obtain the target text information.
[0207] From the above, it can be seen that the embodiment of the present application can obtain the preset audio and the text to be converted through the acquisition unit 601; encode the text to be converted through the encoding unit 602 to obtain the text encoding vector corresponding to the text to be converted; extract the global style features of the preset audio through the extraction unit 603 to obtain the global style vector corresponding to the preset audio; perform weighted summation processing on the global style vector and the text encoding vector through the processing unit 604 to obtain a text representation vector sequence, and the text representation vector sequence includes multiple text representation sub-vectors; construct the target speech spectrum information based on each text representation sub-vector and its corresponding local style vector through the construction unit 605, and output the target speech information corresponding to the target speech spectrum information. It can be concluded that the embodiment of the present application can avoid the phenomenon of failure in synthesizing speech spectrum information due to the inability to obtain audio corresponding one-to-one to the text to be converted in actual applications by selecting audio that meets the expected speech style type for style features as the extraction sample of the global speech style features of the text to be converted; further, by implanting local style features into the text representation sub-vector implanted with the global style vector, style implantation control of the synthesized speech spectrum information can be achieved, so that the speech corresponding to the synthesized speech spectrum information meets the expected style effect of the text and is more natural and realistic.
[0208] The present application also provides a computer device, such as Figure 7 As shown, it shows a schematic diagram of the structure of the computer device involved in the embodiment of the present application, specifically:
[0209] The computer device may include one or more processing core processors 701, one or more computer readable storage media memories 702, a power supply 703, an input unit 704 and other components. Those skilled in the art will appreciate that Figure 7 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0210] The processor 701 is the control center of the computer device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and / or modules stored in the memory 702 and calling data stored in the memory 702, it executes various functions of the computer device and processes data, thereby performing overall detection of the computer device. Optionally, the processor 701 may include one or more processing cores; preferably, the processor 701 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 701.
[0211] The memory 702 can be used to store software programs and modules. The processor 701 executes various functional applications and data processing by running the software programs and modules stored in the memory 702. The memory 702 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 702 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 702 may also include a memory controller to provide the processor 701 with access to the memory 702.
[0212] The computer device also includes a power supply 703 for supplying power to various components. Preferably, the power supply 703 can be logically connected to the processor 701 through a power management system, so as to manage charging, discharging, power consumption and other functions through the power management system. The power supply 703 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
[0213] The computer device may further include an input unit 704, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0214] Although not shown, the computer device may also include a display unit, etc., which will not be described in detail here. Specifically, in the embodiment of the present application, the processor 701 in the computer device will load the executable file corresponding to the process of one or more application programs into the memory 702 according to the following instructions, and the processor 701 will run the application program stored in the memory 702, thereby realizing various functions, as follows:
[0215] Acquire preset audio and text to be converted; encode the text to be converted to obtain a text encoding vector corresponding to the text to be converted; extract the global style features of the preset audio to obtain a global style vector corresponding to the preset audio; perform weighted summation on the global style vector and the text encoding vector to obtain a text representation vector sequence, the text representation vector sequence includes multiple text representation sub-vectors; construct target speech spectrum information based on each text representation sub-vector and its corresponding local style vector, and output the target speech information corresponding to the target speech spectrum information.
[0216] The specific implementation of the above operations can be found in the previous embodiments and will not be described in detail here.
[0217] From the above, it can be seen that the embodiment of the present application can obtain preset audio and text to be converted; encode the text to be converted to obtain the text encoding vector corresponding to the text to be converted; extract the global style features of the preset audio to obtain the global style vector corresponding to the preset audio; perform weighted summation on the global style vector and the text encoding vector to obtain a text representation vector sequence, and the text representation vector sequence includes multiple text representation sub-vectors; based on each text representation sub-vector and its corresponding local style vector, construct the target speech spectrum information, and output the target speech information corresponding to the target speech spectrum information. It can be obtained that the embodiment of the present application can avoid the phenomenon of failure of speech spectrum information synthesis in practical applications due to the inability to obtain audio corresponding to the text to be converted one by one by selecting the audio that meets the expected speech style type as the extraction specimen of the global speech style feature of the text to be converted; further, by implanting the local style feature of the text representation sub-vector implanted with the global style vector, the style implantation control of the synthesized speech spectrum information can be realized, so that the speech corresponding to the synthesized speech spectrum information meets the expected style effect of the text and is more natural and realistic.
[0218] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0219] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the information processing methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0220] Acquire preset audio and text to be converted; encode the text to be converted to obtain a text encoding vector corresponding to the text to be converted; extract the global style features of the preset audio to obtain a global style vector corresponding to the preset audio; perform weighted summation on the global style vector and the text encoding vector to obtain a text representation vector sequence, the text representation vector sequence includes multiple text representation sub-vectors; construct target speech spectrum information based on each text representation sub-vector and its corresponding local style vector, and output the target speech information corresponding to the target speech spectrum information.
[0221] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0222] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0223] Since the instructions stored in the computer-readable storage medium can execute the steps in any information processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any information processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0224] The above is a detailed introduction to an information processing method, device and computer-readable storage medium provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. An information processing method, characterized in that: include: Get the preset audio and text to be converted; Encoding the text to be converted to obtain a text encoding vector corresponding to the text to be converted; Extracting the global style features of the preset audio to obtain a global style vector corresponding to the preset audio; Performing weighted summation processing on the global style vector and the text encoding vector to obtain a text representation vector sequence, wherein the text representation vector sequence includes multiple text representation sub-vectors; Constructing target speech spectrum information based on each text representation subvector and its corresponding local style vector, and outputting target speech information corresponding to the target speech spectrum information; The method of constructing target speech spectrum information based on each text representation subvector and its corresponding local style vector includes: obtaining a local style vector corresponding to each text representation subvector, wherein the local style vector corresponding to the text representation subvector is extracted from the speech sub-frequency at the previous moment; decoding each text representation subvector and the corresponding local style vector to obtain the speech sub-frequency corresponding to each moment; and fusing the speech sub-frequency corresponding to each moment to obtain the target speech spectrum information. The method of obtaining the local style vector corresponding to each text representation sub-vector includes: determining the text representation sub-vector located at the first position in the text representation vector sequence as a reference sub-vector; decoding the reference sub-vector to obtain a reference speech sub-frequency corresponding to the reference sub-vector; and obtaining the local style vector corresponding to the text representation sub-vectors in the text representation vector sequence except the reference sub-vector based on the reference sub-vector and the reference speech sub-frequency.
2. The method according to claim 1, characterized in that The obtaining, based on the reference sub-vector and the reference speech sub-frequency, a local style vector corresponding to a text representation sub-vector in the text representation vector sequence excluding the reference sub-vector, includes: Performing style feature extraction on the reference speech sub-fundamental frequency to obtain a reference local style vector corresponding to the reference speech sub-fundamental frequency; Based on the reference local style vector and the reference sub-vector, a local style vector corresponding to the text representation sub-vector in the text representation vector sequence excluding the reference sub-vector is obtained.
3. The method according to claim 1, characterized in that The preset audio includes a plurality of preset sub-audios, and extracting the global style feature of the preset audio to obtain the global style vector corresponding to the preset audio includes: Encoding each preset sub-audio to obtain a global style sub-vector corresponding to each preset sub-audio; Averaging the multiple global style sub-vectors to obtain a global style vector.
4. The method according to claim 1, wherein The weighted summing of the global style vector and the text encoding vector to obtain a text representation vector sequence includes: Fusing the global style vector and the text encoding vector to obtain a fused text representation vector; The fused text representation vectors are weighted and summed according to preset attention weights to obtain a text representation vector sequence.
5. The method according to claim 1, wherein The encoding process of the text to be converted to obtain a text encoding vector corresponding to the text to be converted includes: Determining target text information based on the text to be converted; The target text information is encoded to obtain a text encoding vector corresponding to the text to be converted.
6. The method according to claim 5, characterized in that The step of determining target text information based on the text to be converted includes: Obtaining text information contained in the text to be converted; The text information is processed according to grammatical rules to obtain target text information.
7. An information processing device, characterized in that include: An acquisition unit, used to acquire preset audio and text to be converted; An encoding unit, configured to perform encoding processing on the text to be converted to obtain a text encoding vector corresponding to the text to be converted; an extraction unit, configured to extract a global style feature of the preset audio and obtain a global style vector corresponding to the preset audio; a processing unit, configured to perform weighted summation processing on the global style vector and the text encoding vector to obtain a text representation vector sequence, wherein the text representation vector sequence includes a plurality of text representation sub-vectors; A construction unit, configured to construct target speech spectrum information based on each text representation sub-vector and its corresponding local style vector, and output target speech information corresponding to the target speech spectrum information; The construction unit is specifically configured to obtain a local style vector corresponding to each text representation subvector, wherein the local style vector corresponding to the text representation subvector is extracted from the speech sub-frequency at the previous moment; decode each text representation subvector and the corresponding local style vector to obtain the speech sub-frequency corresponding to each moment; and fuse the speech sub-frequency corresponding to each moment to obtain the target speech spectrum information; The method of obtaining the local style vector corresponding to each text representation sub-vector includes: determining the text representation sub-vector located at the first position in the text representation vector sequence as a reference sub-vector; decoding the reference sub-vector to obtain a reference speech sub-frequency corresponding to the reference sub-vector; and obtaining the local style vector corresponding to the text representation sub-vectors in the text representation vector sequence except the reference sub-vector based on the reference sub-vector and the reference speech sub-frequency.
8. A computer-readable storage medium, characterized in that The computer-readable storage medium is computer-readable and stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor to execute the steps of the information processing method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Speech synthesis method and device, readable medium and electronic equipment
CN112489620A
Singing voice edit assistant method and singing voice edit assistant device
US20190103084A1
Generating Expressive Speech Audio From Text Data
US20210151029A1
