Speech processing method and apparatus, and electronic device

By obtaining the text and style information of speech and combining it with the translated text information of the target language, multi-dimensional speech style transfer processing is performed, which solves the problem of poor speech style transfer effect in the existing technology and improves the accuracy of speech style transfer. and effect.

WO2024193137A1PCT designated stage expired Publication Date: 2024-09-26DOUYIN VISION CO LTD +2
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/139635
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-21
Filing Date
2023-12-18
Publication Date
2024-09-26

AI Technical Summary

Technical Problem

When existing voice style transfer technology is used for cross-language conversion, the naturalness and expressiveness of the converted voice are poor, resulting in poor voice style transfer effects.

Method used

By obtaining the text of the speech, the semantic information of the speech, style information and word-level information, and combining the semantic and text information of the translated text in the target language, speech style transfer processing is performed based on multiple dimensions to ensure the naturalness and expressiveness of the target speech. .

Benefits of technology

It improves the accuracy and effect of voice style transfer, ensures that the target voice is similar to the original voice in terms of naturalness and expressiveness, and enhances the effect of style transfer.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023139635_26092024_PF_FP
    Figure CN2023139635_26092024_PF_FP
Patent Text Reader

Abstract

Provided in the present disclosure are a speech processing method and apparatus, and an electronic device. The method comprises: acquiring speech, wherein text corresponding to the speech comprises one or more words; determining first semantic information of the speech, style information of the speech, and word level information associated with the one or more words; acquiring translated text of a target language that corresponds to the speech, wherein the translated text comprises one or more translated words; determining second semantic information of the translated text, and text information associated with the one or more translated words in the translated text; and on the basis of the first semantic information, the style information, the word level information, the second semantic information, the text information and the translated text, determining target speech corresponding to the translated text.
Need to check novelty before this filing date? Find Prior Art

Description

Voice processing method, device and electronic equipment

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on March 21, 2023, with application number 202310283539.1 and invention name “Speech Processing Method, Device and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The embodiments of the present disclosure relate to the field of speech processing technology, and in particular to a speech processing method, apparatus, and electronic device. Background Art

[0003] Speech style transfer technology can transfer the speaking style of the original speech to the new speech. For example, cross-language speech style transfer can convert English speech into Chinese speech, and the Chinese speech can retain the speaking style of the English speech.

[0004] Currently, electronic devices can perform time-shift conversion based on the word order of the original speech and the speech to be processed, thereby achieving speech style transfer processing. For example, for any English word in English speech, the electronic device can determine the word order and duration of the English word in the English speech, and then determine the word order and duration as the word order and duration of the Chinese word corresponding to the English word in the Chinese speech. However, the naturalness and expressiveness of the converted speech obtained based on the above-mentioned speech synthesis method are poor, which leads to poor speech style transfer effect.

[0005] Summary of the Invention

[0006] The present disclosure provides a speech processing method, apparatus, and electronic device for solving the technical problem of poor effect of speech style transfer in the prior art.

[0007] In a first aspect, the present disclosure provides a speech processing method, the method comprising:

[0008] Acquire speech, where text corresponding to the speech includes one or more words;

[0009] determining first semantic information of the speech, stylistic information of the speech, and word-level information associated with the one or more words;

[0010] Obtaining a translation text in a target language corresponding to the speech, the translation text including one or more translated words;

[0011] determining second semantic information of the translated text and text information associated with one or more translated words of the translated text;

[0012] Based on the first semantic information, the style information, the word-level information, the second semantic information, the text information, and the translated text, a target speech corresponding to the translated text is determined.

[0013] In a second aspect, the present disclosure provides a speech processing device, comprising a first acquisition module, a first determination module, a second acquisition module, a second determination module, and a third determination module, wherein:

[0014] The first acquisition module is used to acquire speech, where the text corresponding to the speech includes one or more words;

[0015] The first determining module is configured to determine first semantic information of the speech, style information of the speech, and word-level information associated with the one or more words;

[0016] The second acquisition module is used to obtain a translation text in the target language corresponding to the speech, wherein the translation text includes one or more translated words;

[0017] The second determining module is used to determine second semantic information of the translated text and text information associated with one or more translated words of the translated text;

[0018] The third determination module is configured to determine a target speech corresponding to the translated text based on the first semantic information, the style information, the word-level information, the second semantic information, the text information, and the translated text.

[0019] In a third aspect, an embodiment of the present disclosure provides an electronic device comprising: a processor and a memory;

[0020] The memory stores computer-executable instructions;

[0021] The processor executes the computer-executable instructions stored in the memory, so that the at least one processor executes the speech processing method as described in the first aspect and various possible aspects of the first aspect.

[0022] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer execution instructions are stored. When a processor executes the computer execution instructions, the speech processing method as described in the first aspect and various possible aspects of the first aspect are implemented.

[0023] In a fifth aspect, an embodiment of the present disclosure provides a computer program product, including a computer program, which, when executed by a processor, implements the speech processing method as described in the first aspect and various possible aspects of the first aspect.

[0024] The present disclosure provides a speech processing method, device and electronic device. The electronic device can obtain speech, wherein the text corresponding to the speech includes one or more words, determine the first semantic information of the speech, the style information of the speech, and the word-level information associated with the one or more words, obtain the translation text of the target language corresponding to the speech, wherein the translation text includes one or more translated words, determine the second semantic information of the translation text and the text information associated with the one or more translated words of the translation text, and determine the target speech corresponding to the translation text based on the first semantic information, style information, word-level information, second semantic information, text information and translation text. In the above method, the electronic device can combine the overall semantic information of the speech, the overall style information of the speech and the word-level information in the speech to perform speech style transfer processing, retain the speech style and speech information of the original speech from multiple dimensions, and combine the overall semantic information and word-level text information of the translation text to match the speech style with the translation text, thereby improving the accuracy of speech style transfer and improving the effect of speech style transfer. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, a brief introduction will be given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0026] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure;

[0027] FIG2 is a flow chart of a speech processing method provided by an embodiment of the present disclosure;

[0028] FIG3 is a schematic diagram of a voice conversion page provided by an embodiment of the present disclosure;

[0029] FIG4 is a schematic diagram of a process for acquiring speech according to an embodiment of the present disclosure;

[0030] FIG5 is a schematic diagram of another process for acquiring speech provided by an embodiment of the present disclosure;

[0031] FIG6 is a schematic diagram of a method for determining a target speech according to an embodiment of the present disclosure;

[0032] FIG7 is a schematic diagram of a method for training a speech style transfer model provided by an embodiment of the present disclosure;

[0033] FIG8 is a schematic diagram of a method for predicting sentence-level style information provided by an embodiment of the present disclosure;

[0034] FIG9 is a schematic diagram of a bidirectional training method provided by an embodiment of the present disclosure;

[0035] FIG10 is a schematic diagram of predicting word-level style information provided by an embodiment of the present disclosure;

[0036] FIG11 is a schematic diagram of a processing process of an attention mechanism provided by an embodiment of the present disclosure;

[0037] FIG12 is a schematic diagram of training a speech style transfer model provided by an embodiment of the present disclosure;

[0038] FIG13 is a schematic diagram of the structure of a speech processing device provided by an embodiment of the present disclosure; and

[0039] FIG14 is a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0040] Exemplary embodiments will be described in detail herein, with examples illustrated in the accompanying drawings. In the following description, when referring to the drawings, identical numerals in different figures represent identical or similar elements, unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0041] To facilitate understanding, the concepts involved in the embodiments of the present disclosure are explained below.

[0042] Electronic device: is a device with wireless transceiver function. The electronic device can be deployed on land, including indoors or outdoors, handheld, wearable or vehicle-mounted. The electronic device can be a mobile phone, a tablet computer, a computer with wireless transceiver function, a virtual reality (VR) electronic device, an augmented reality (AR) electronic device, a wireless terminal in industrial control, an on-board electronic device, a wireless terminal in self-driving, a wireless electronic device in remote medical care, a wireless electronic device in smart grid, a wireless electronic device in transportation safety, a wireless electronic device in smart city, a wireless electronic device in smart home, a wearable electronic device, etc. The electronic device involved in the embodiments of the present disclosure can also be referred to as a terminal, user equipment (UE), an access electronic device, a vehicle-mounted terminal, an industrial control terminal, a UE unit, a UE station, a mobile station, a mobile station, a remote station, a remote electronic device, a mobile device, a UE electronic device, a wireless communication device, a UE agent or a UE device, etc. The electronic device can also be fixed or mobile.

[0043] The application scenario of the present disclosure is described below with reference to FIG1 .

[0044] FIG1 is a schematic diagram of an application scenario provided by an embodiment of the present disclosure. Please refer to FIG1 , which includes an electronic device. Wherein, English speech is input into the electronic device. If the electronic device determines that the target language to be converted is Chinese, the electronic device can generate Chinese speech of the English speech translation based on the word order and duration of each phrase in the English speech. For example, when converting English speech into Chinese speech, for any English phrase in the English speech, when synthesizing Chinese speech, the word order and duration of the Chinese phrase corresponding to the English phrase in the Chinese speech are the same as the word order and duration of the English phrase in the English speech.

[0045] However, the above-mentioned speech style transfer method is only applicable to languages ​​with high grammatical similarity. For example, if Mandarin speech is converted into grammatically similar speech, the new speech obtained based on the above-mentioned speech style transfer method has a higher accuracy (similar grammar). If English speech is converted into Chinese speech, the new speech obtained based on the above-mentioned speech style transfer method has a lower accuracy (largely different grammar). Moreover, the speech after speech style transfer cannot retain the speech style of the original speech. For example, the speech after speech style transfer cannot retain speech style information such as tone, emotion and stress in the original speech. This results in poor effect of speech style transfer.

[0046] To address the above technical issues, embodiments of the present disclosure provide a speech processing method. An electronic device can obtain speech, wherein the text corresponding to the speech includes one or more words, determine first semantic information of the speech, style information of the speech, and word-level information associated with the one or more words, obtain a translation text in a target language corresponding to the speech, wherein the translation text includes one or more translated words, determine second semantic information of the translation text and text information associated with the one or more translated words of the translation text, determine first target speech style information based on the first semantic information, style information, and second semantic information, determine second target speech style information based on word-level information and text information, and determine a target speech based on the first target speech style information, the second target speech style information, and the translation text. In this way, the electronic device can generate a sentence-level style corresponding to the translation text based on the sentence-level speech information and sentence-level speech information of the entire speech, and generate a word-level style corresponding to the translation text based on word-level information of the speech and word-level text information of the translation text. This method preserves the style of the original speech from multiple dimensions and determines the style of the target speech from multiple dimensions, thereby improving the naturalness and expressiveness of the target speech, and enhancing the accuracy and effectiveness of speech style transfer.

[0047] It should be noted that FIG1 is only an example illustrating an application scenario of the embodiment of the present disclosure, and is not intended to limit the application scenario of the embodiment of the present disclosure.

[0048] The following detailed description of the technical solution of the present disclosure and how the technical solution of the present disclosure solves the above-mentioned technical problems is provided with specific embodiments. The following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. The embodiments of the present disclosure will be described below in conjunction with the accompanying drawings.

[0049] FIG2 is a flow chart of a speech processing method provided by an embodiment of the present disclosure. Referring to FIG2 , the method may include:

[0050] S201: Acquire speech, where the text corresponding to the speech includes one or more words.

[0051] The execution subject of the embodiment of the present disclosure may be an electronic device, or a voice processing device provided in the electronic device. The voice processing device may be implemented by software, or by a combination of software and hardware.

[0052] The speech may be the speech to be processed for speech style transfer, and the text corresponding to the speech may include one or more words. For example, the words may be text that expresses meaning in various language systems. For example, if the speech is in Chinese, the text corresponding to the speech may include multiple Chinese characters and multiple phrases composed of Chinese characters. If the speech is in English, the text corresponding to the speech may include multiple English characters and multiple phrases composed of English characters. For example, if the speech is in Chinese, "Today's weather is really good", the text corresponding to the speech may include "today", "of", "weather" and "really good".

[0053] It should be noted that the word in the embodiment of the present disclosure can be a character in the text corresponding to the voice, or a phrase composed of multiple characters, and the embodiment of the present disclosure is not limited to this.

[0054] Optionally, the electronic device may acquire the voice based on the following feasible implementation manner: displaying a voice conversion page, and acquiring the voice in response to a touch operation on a voice acquisition control in the voice conversion page.

[0055] The voice conversion page may include a voice acquisition control that can acquire voice. For example, in response to a touch operation on the voice acquisition control, the electronic device can acquire voice. For example, the voice acquisition control can be a recording control, and when the user clicks the recording control, the electronic device can acquire real-time voice. For example, when the user clicks the voice acquisition control, the electronic device can display a page containing multiple voices, and the user can click any voice to acquire the voice to be processed for style transfer.

[0056] Optionally, in response to a touch operation on the speech conversion application, the electronic device may display a speech conversion page. For example, when a user clicks on the speech conversion application on a display page of the electronic device, the electronic device may display the speech conversion page, which may include a speech acquisition control. When the user clicks on the speech acquisition control, the electronic device may acquire speech.

[0057] Optionally, the speech conversion page may further include a language selection control associated with the target language, wherein the language selection control may determine the target language, which may be the language to be converted. For example, if the electronic device needs to convert the language of the original speech into language 1, language 1 may be the target language; if the electronic device needs to convert the language of the original speech into language 2, language 2 may be the target language.

[0058] Optionally, the electronic device may determine the target language based on a user's touch operation on a language selection control. For example, the electronic device may determine the target language in response to a touch operation on a language selection control. For example, a speech conversion page may include a language selection control for Language 1 and a language selection control for Language 2. If the user touches the language selection control for Language 1, the electronic device determines Language 1 as the target language. If the user touches the language selection control for Language 2, the electronic device determines Language 2 as the target language.

[0059] It should be noted that the language of the speech acquired by the electronic device is different from the target language. For example, if the language of the speech is language 1, the target language can be any language other than language 1; if the language of the speech is language 2, the target language can be any language other than language 2.

[0060] The process of displaying the voice conversion page is described below with reference to FIG. 3 .

[0061] Figure 3 is a schematic diagram of a voice conversion page displayed according to an embodiment of the present disclosure. Referring to Figure 3 , an electronic device is shown. The electronic device displays page 301, which includes a voice conversion application. When a user clicks on the voice conversion application, the electronic device jumps from page 301 to page 302, which includes a language selection control for Language 1, a language selection control for Language 2, a language selection control for Language 3, and a voice acquisition control.

[0062] Optionally, the electronic device acquires voice in response to a touch operation on a voice acquisition control. There are two feasible implementation methods:

[0063] A possible implementation:

[0064] In response to a touch operation on the voice acquisition control, a voice page is displayed. The voice page may include multiple voices. For example, when a user clicks the voice acquisition control in the voice conversion page, the electronic device may jump from the voice conversion page to the voice page.

[0065] In response to a touch operation on a target voice among multiple voices, the electronic device can determine the target voice as the acquired voice. For example, if a voice page includes Voice 1 and Voice 2, if the user clicks Voice 1, the electronic device determines Voice 1 as the target voice and determines the acquired voice as Voice 1. If the user clicks Voice 2, the electronic device determines Voice 2 as the target voice and determines the acquired voice as Voice 2.

[0066] The following describes the process of acquiring voice by the electronic device with reference to FIG4 .

[0067] Figure 4 is a schematic diagram of a process for acquiring voice provided by an embodiment of the present disclosure. Please refer to Figure 4, which includes an electronic device. Among them, the display page of the electronic device is page 401, and page 401 includes a language selection control for language 1, a language selection control for language 2, a language selection control for language 3, a voice acquisition control, and a confirmation control. When the user clicks the voice acquisition control, the display page of the electronic device jumps from page 401 to page 402. Page 402 includes voice A, voice B, voice C, and a confirmation control. When the user clicks voice A, the control corresponding to voice A is highlighted. After the user clicks the confirmation control, the electronic device determines the voice as the voice acquired by the electronic device.

[0068] In this feasible implementation, the electronic device can pre-store multiple voices. In response to the user's operation, the electronic device can determine any segment of voice as the acquired voice, thereby improving the flexibility of voice acquisition.

[0069] Another possible implementation:

[0070] In response to the touch operation on the voice acquisition control, voice recording is performed to obtain the voice. For example, when the user clicks the voice acquisition control in the voice conversion page, the electronic device can start recording, and the electronic device can determine the recorded voice as the voice acquired by the electronic device.

[0071] The following describes the process of acquiring voice by the electronic device with reference to FIG5 .

[0072] FIG5 is a schematic diagram of another process for acquiring voice provided by an embodiment of the present disclosure. Referring to FIG5 , an electronic device is included. The display page of the electronic device includes a language selection control for Language 1, a language selection control for Language 2, a language selection control for Language 3, a voice acquisition control, and a confirmation control. When a user clicks the voice acquisition control, the electronic device begins recording the user's voice. When the user clicks the stop recording control, the electronic device stops recording the user's voice and determines the recorded user's voice as the voice acquired by the electronic device.

[0073] In this feasible implementation, the electronic device can acquire the user's voice in real time and determine the user's voice as the voice acquired by the electronic device, thereby improving the flexibility of voice acquisition.

[0074] S202: Determine first semantic information of the speech, style information of the speech, and word-level information associated with one or more words.

[0075] Among them, the first semantic information may include but is not limited to the meaning expressed by the entire sentence of speech. For example, the first semantic information may indicate the intention of the speaker when speaking the segment of speech. For example, the first semantic information may be sentence-level semantic information in the speech, and the electronic device may determine the semantics and meaning corresponding to the entire sentence of speech based on the first semantic information. For example, if the speech is "I want to drink water", the first semantic information corresponding to the speech may be "I am thirsty", wherein "I am thirsty" may be the meaning expressed by the segment of speech; if the speech is "I want to eat", the first semantic information corresponding to the segment of speech may be "I am hungry", wherein "I am hungry" may be the meaning expressed by the segment of speech.

[0076] Optionally, the electronic device can process the speech according to a pre-trained word vector model to obtain the first semantic information. For example, the pre-trained word vector model can be a bidirectional encoder representation from transformers (BERT), and the text content corresponding to the speech is input to the pre-trained word-level BERT model. The BERT model can output the first semantic information. In this way, the electronic device can determine the text modality information of the speech at the sentence level (i.e., the first semantic information).

[0077] It should be noted that the training process of the BERT model is similar to that of the prior art and will not be further described in detail in the embodiments of the present disclosure.

[0078] Optionally, the style information of the speech may include but is not limited to the style of the entire sentence. For example, the style information of the speech may be the modal information of the speech style at the sentence level. For example, the semantic information of the speech may indicate the tone of the speaker when speaking the speech. For example, if the speech acquired by the electronic device is "Are you free now?", the electronic device determines that the style information of the speech may include the style of a question sentence; if the speech acquired by the electronic device is "I'm thirsty", the electronic device determines that the style information of the speech may include the style of a declarative sentence; if the speech acquired by the electronic device is "It's so beautiful", the electronic device determines that the style information of the speech may include the style of an exclamatory sentence.

[0079] Optionally, the electronic device can obtain speech style information based on a pre-trained global speech style encoder. For example, the input of the global speech style encoder can be a mel-spectrogram of speech. The global speech style encoder includes a 6-layer convolutional neural network (CNN) with a kernel size of 3*3 and a 1-layer recurrent neural network (RNN). When the electronic device inputs the mel-spectrogram of speech into the global speech style encoder, the global speech encoder can operate on the mel-spectrogram through the CNN and RNN. The electronic device can extract the last hidden state of the RNN and encode the hidden state into a weighted sum corresponding to 10 self-learned sentence-level speech styles through the attention mechanism. The electronic device can obtain the speech style information based on the weighted sum.

[0080] The word-level information may include information associated with one or more words in the text corresponding to the speech. Optionally, the word-level information includes but is not limited to at least one of semantic information, stress information, and speech rate information of the one or more words in the speech.

[0081] The semantic information of one or more words in the speech may be word-level semantic information. The word-level speech information may include, but is not limited to, the meaning of the one or more words. For example, if the original speech is "I want to drink water," the word-level semantic information may be: "I want to drink water"; if the original speech is "Today's weather is really good," the word-level semantic information may be: "Today's weather is really good."

[0082] It should be noted that all semantic information corresponding to one or more words in a speech may represent the specific semantics of the speech.

[0083] Optionally, the electronic device may process the speech according to a pre-trained word vector model to obtain semantic information of one or more words. For example, the pre-trained word vector model may be a BERT model. After processing one or more words in the text corresponding to the speech using the BERT model, semantic information of the one or more words in the speech may be obtained.

[0084] The stress information and speech rate information of one or more words in the speech may be word-level style information. For example, the word-level style information may be modal information of the speech style of the speech at the word-level scale. For example, each word in the speech may include stress information and speech rate information, and the electronic device may determine this information as word-level style information. For example, if the original speech is "This place has a history of a hundred years (emphasis on a hundred years)", the electronic device may determine that the word "a hundred years" in the speech is stressed.

[0085] Optionally, the electronic device can obtain the stress information and speaking speed information of one or more words in the speech based on a pre-trained local speech style encoder. For example, the structure of the local speech style encoder is the same as that of the global speech style encoder. The electronic device can input the mel spectrogram of the speech into the local speech style encoder, and the local speech style encoder operates on the mel spectrogram through CNN and RNN. Since the local speech style encoder processes the speech in frames, the local speech style encoder can align one or more words with the frames in the speech through a forced alignment tool (such as Montreal Forced aligner, etc.). After forced alignment, the output of each frame of the local speech encoder is aggregated into the corresponding word-level words, and the output of the RNN is processed through the attention mechanism, and the word-level speech information learning is represented as the weighted sum of 10 self-learned speech styles. The electronic device can obtain the first word speech style feature corresponding to the speech based on the weighted sum.

[0086] In this way, after the electronic device obtains the semantic information, stress information, and speech rate information of one or more words in the speech, it can obtain word-level information associated with the one or more words in the speech.

[0087] S203: Obtain a translation text in the target language corresponding to the speech.

[0088] Wherein, the translation text includes one or more translation words. For example, if the language of the speech is language 1 and the target language is language 2, the translation text is a text that translates the text corresponding to the speech into language 2. For example, if the language of the speech is English and the target language is Chinese, the translation text is a text that translates the English corresponding to the English speech into Chinese. For example, the translation text may include one translation word or multiple translation words. The number of translation words in the translation text may be related to the speech and the target language, and the embodiments of the present disclosure are not limited to this.

[0089] It should be noted that the electronic device can obtain the translated text according to any feasible implementation method, and the embodiments of the present disclosure are not limited to this.

[0090] S204: Determine second semantic information of the translated text and text information associated with one or more translated words of the translated text.

[0091] Among them, the second semantic information may include but is not limited to the meaning expressed by the entire translated text. For example, the second semantic information may indicate the intention associated with the translated text. For example, the second semantic information may be sentence-level semantic information of the translated text, and the electronic device may determine the semantics and meaning of the entire translated text based on the second semantic information. For example, if the translated text is "I want to drink water", the second semantic information corresponding to the translated text may be "I am thirsty". It should be noted that since the translated text is the text corresponding to the speech after translation into the target language, the second semantic information of the translated text may have a high degree of similarity with the first semantic information corresponding to the speech.

[0092] It should be noted that the electronic device can obtain the second semantic information of the translated text based on a pre-trained word vector model (such as the BERT model). The method for the electronic device to obtain the second semantic information can refer to the method for the electronic device to obtain the first semantic information, and the embodiments of the present disclosure will not be repeated here.

[0093] The text information associated with one or more translated words in the translated text may be word-level semantic information. For example, if the translated text is “I want to drink water”, the text information associated with the words in the translated text may be: I want to drink water.

[0094] It should be noted that the text information associated with one or more translated words in the translated text can refer to the semantic information associated with one or more words in the speech, and the method for the electronic device to obtain the text information associated with the translated words can refer to the method for the electronic device to obtain the semantic information associated with words in a language. The embodiments of the present disclosure are not limited to this.

[0095] S205 : Determine a target speech corresponding to the translated text based on the first semantic information, the style information, the word-level information, the second semantic information, the text information, and the translated text.

[0096] The target speech may be a speech obtained by performing style transfer on a speech acquired by the electronic device based on the target language, and the language of the target speech may be the target language. For example, if the target language is language 1, the language of the target speech may be language 1; if the target language is language 2, the language of the target speech may be language 2.

[0097] Optionally, the style of the target speech is similar to the style of the speech acquired by the electronic device. For example, the target speech may retain the emotional style, tone style, stress style, and speech speed style of the original speech, or may retain other style information in the original speech, which is not limited in the embodiments of the present disclosure. For example, if the speech includes words with stress, then the corresponding words in the target speech corresponding to the speech are also stressed; if the tone of the speech is the tone of a declarative sentence, then the speech of the words in the target speech corresponding to the speech may also be the tone of a declarative sentence; if the speech speed is faster, then the speech speed of the target speech corresponding to the speech is also faster.

[0098] Specifically, the electronic device can determine the target speech corresponding to the translated text based on the following feasible implementation methods: determining the first target speech style information based on the first semantic information, the style information and the second semantic information; determining the second target speech style information based on the word level information and the text information; and determining the target speech based on the first target speech style information, the second target speech style information and the translated text.

[0099] The first target speech style information may be sentence-level style information. For example, the first target speech style information may include, but is not limited to, the tone information of the target speech to be synthesized. The second target speech style information may be word-level style information. For example, the second target speech style information may include, but is not limited to, the stress information and speech rate information of the target speech to be synthesized. In this way, after the electronic device determines the sentence-level style information and the word-level style information, it can synthesize the target speech based on the style information at multiple scales and the translated text. In this way, the target speech can retain the style of multiple dimensions of the original speech, thereby improving the accuracy and effect of speech style transfer.

[0100] Optionally, the electronic device can process the first semantic information, style information, and second semantic information based on a pre-trained speech style transfer model to obtain the first target speech style information. For example, the electronic device can splice the first sentence semantic information and style information corresponding to the speech to obtain sentence-level multimodal information corresponding to the speech, splice the sentence-level multimodal information corresponding to the speech with the second semantic information corresponding to the translated text to obtain the spliced ​​sentence-level information, and the electronic device processes the spliced ​​sentence-level information through the speech style transfer model to obtain the first target speech style information. In this way, the first target speech style information can retain the sentence-level style information (such as tone) in the original speech, and the sentence-level style information is also adapted to the translated text, thereby improving the accuracy of speech style transfer.

[0101] Optionally, the electronic device can process the word-level information and text information based on a pre-trained speech style transfer model to obtain the second target speech style information. For example, the electronic device can splice the word-level information associated with one or more words in the speech with the text information associated with one or more translated words in the translated text to obtain the spliced ​​word-level information, and the electronic device processes the spliced ​​word-level information through the speech style transfer model to obtain the second target speech style information. In this way, the second target speech style information can retain the word-level style information (such as stress, speaking speed, etc.) in the original speech, and the word-level style information is also adapted to the translated text, thereby improving the accuracy of speech style transfer.

[0102] Optionally, the speech style transfer model is trained based on the sample speech and a sample speech of the target language having a speech style (including but not limited to tone information, speech speed information, rhythm information, etc.) similar to the sample speech.

[0103] The present disclosure provides a speech processing method, wherein an electronic device can obtain speech and determine first semantic information of the speech, style information of the speech, and word-level information associated with one or more words in the speech, obtain a translation text in a target language corresponding to the speech, determine second semantic information of the translation text and text information associated with one or more translated words in the translation text, determine first target speech style information based on the first semantic information, style information, and second semantic information, determine second target speech style information based on word-level information and text information, and determine a target speech based on the first target speech style information, the second target speech style information, and the translation text. In this way, the electronic device can generate a sentence-level style corresponding to the translation text based on the sentence-level speech information of the entire speech, the sentence-level style information, and the sentence-level speech information of the translation text, and generate a word-level style corresponding to the translation text based on the word-level information of the speech and the word-level text information of the translation text, thereby retaining the style of the original speech from multiple sentence and word levels and determining the style of the target speech from multiple dimensions, so that the target speech has better naturalness and expressiveness, improves the accuracy of speech style transfer, and improves the effect of speech style transfer.

[0104] In the embodiment shown in FIG2 , the method for determining the target speech based on the first target speech style information, the second target speech style information and the translation text in the above speech processing method will be described in detail below in conjunction with FIG6 .

[0105] FIG6 is a schematic diagram of a method for determining a target speech according to an embodiment of the present disclosure. Referring to FIG6 , the method process includes:

[0106] S601: Process the translated text based on the text encoder to obtain text features associated with the translated text.

[0107] The text features may be feature vectors associated with the translated text. For example, the electronic device may process the translated text using a pre-trained text encoder to obtain text features corresponding to the translated text.

[0108] It should be noted that the electronic device may also determine the text features of the translated text through other feasible implementation methods, and the embodiments of the present disclosure are not limited to this.

[0109] S602: Determine a word feature corresponding to each translated word in the translated text in the text features.

[0110] Optionally, the text features may include word features corresponding to one or more translated words in the translated text. For example, the text features may include multiple sets of feature vectors, where each set of feature vectors may correspond to a translated word in the translated text. For example, the multiple sets of feature vectors in the text features may be arranged in the order of the translated words in the translated text. Therefore, the electronic device may determine the word features corresponding to the translated words based on the positions of the translated words in the translated text.

[0111] It should be noted that the electronic device may determine the word features corresponding to the translated words based on any other feasible implementation manner (eg, processing the translated words based on a text encoder, etc.), and the embodiments of the present disclosure are not limited to this.

[0112] It should be noted that the words in the embodiments of the present disclosure may include one character or multiple characters, and the embodiments of the present disclosure are not limited to this.

[0113] S603: Determine the target speech based on the word features corresponding to each translated word, the first target speech style information, and the second target speech style information.

[0114] Specifically, the electronic device can determine the target speech based on the following feasible implementation method: obtaining the number of phonemes of the translated word corresponding to each word feature, determining the word style information corresponding to each word feature in the second target speech style information, and determining the target speech based on the first target speech style information, multiple word style information, multiple word features and the number of phonemes of each translated word.

[0115] The translated word may include one or more phonemes (eg, initial consonants, finals, vowels, consonants, etc.). The electronic device may determine the number of phonemes of the translated word based on any feasible implementation method, which is not limited in the embodiments of the present disclosure.

[0116] Optionally, the second target voice style information may include word style information corresponding to each translated word. For example, the second target voice style information may include multiple sets of feature vectors, where the sum of each set of feature vectors is 1. The multiple sets of feature vectors may correspond one-to-one to multiple translated words in the translated text. In this way, the electronic device can accurately determine the word style information corresponding to any translated word in the second target voice style information.

[0117] Optionally, the electronic device determines the target voice based on the first target voice style information, multiple word style information, multiple word features and the number of phonemes of each translated word. Specifically, for any word feature, based on the number of phonemes, the first target voice style information, the word style information and the word feature are spliced ​​to obtain a spliced ​​feature, and the target voice is determined based on the multiple spliced ​​features.

[0118] Optionally, when splicing the first target voice style information, word style information and word features, the electronic device may perform splicing based on the number of phonemes of the translated word corresponding to the word feature. For example, when splicing the first target voice style information, since the first target voice style information is sentence-level style information, the sentence-level style information may be a set of feature vectors, and the sentence-level style information may be spliced ​​with each word feature, and the number of the first target voice style information spliced ​​in the word feature is the same as the number of phonemes of the translated word corresponding to the word feature. For example, if the number of phonemes corresponding to the translated word is 3, the electronic device may copy the first target voice style information 3 times and splice the 3 copies of the first target voice style information with the word feature corresponding to the translated word.

[0119] For example, when concatenating word style information, since word style information is word-level style information, each translated word has corresponding word style information. The number of word style information concatenated into the word feature is equal to the number of phonemes in the translated word corresponding to the word feature. For example, if the number of phonemes corresponding to the translated word is 5, the electronic device may copy the word style information corresponding to the translated word 5 times and concatenate the 5 copies of word style information with the word feature corresponding to the translated word.

[0120] For example, if the translation text includes 2 words, the first word has 2 phonemes and the second word has 3 phonemes, the electronic device can copy the word style information corresponding to the first word 2 copies, and splice the 2 copies of the word voice style information with the word feature of the first word. The electronic device can copy the word style information corresponding to the second word 3 copies, and splice the 3 copies of the word style information with the word feature of the second word. The electronic device can copy the first target voice style information 5 copies, and splice the 2 copies of the first target voice style information with the word feature of the first word, and splice the 5 copies of the first target voice style information with the word feature of the second word. In this way, the splicing features of the first word and the splicing features of the second word can be obtained. The electronic device can process multiple splicing features through a speech synthesis decoder to obtain the target speech. In this way, the target speech can include the sentence-level speech style and word-level speech style of the original speech, thereby improving the effect of the target speech.

[0121] Optionally, the electronic device determines the target speech based on multiple splicing features, which can be specifically: obtaining the target timbre, processing the target timbre based on a timbre encoder to obtain timbre features associated with the target timbre, and determining the target speech based on the timbre features and multiple splicing features.

[0122] Among them, the target timbre can be the timbre to be converted. For example, the target timbre can be any timbre, or it can be a timbre specified by the user, and the embodiments of the present disclosure are not limited to this. Optionally, the timbre encoder can process the spectrum diagram of the target timbre to obtain timbre features associated with the target timbre. For example, when synthesizing the target speech, the electronic device can also splice multiple splicing features with the timbre features, and then process the spliced ​​features based on the speech synthesis decoder, and then obtain the target speech including the target timbre, thereby improving the effect of speech synthesis.

[0123] The disclosed embodiments provide a method for determining a target speech. An electronic device can process a translated text based on a text encoder to obtain text features associated with the translated text, determine a word feature corresponding to each translated word in the translated text from the text features, obtain the number of phonemes in the translated word corresponding to each word feature, determine the word style information corresponding to each word feature from the second target speech style information, and determine the target speech based on the first target speech style information, multiple word style information, multiple word features, and the number of phonemes in each translated word. In this way, the target speech can retain the style of the original speech at both the sentence level and the word level, making the target speech more natural and expressive. In addition, the timbre of the target speech can also be replaced with the target timbre, thereby improving the accuracy and effect of speech style transfer and the effect of speech synthesis.

[0124] On the basis of any of the above embodiments, the embodiments of the present disclosure further include a method for training a speech style transfer model. The following describes the method for training a speech style transfer model in detail with reference to FIG7 .

[0125] FIG7 is a schematic diagram of a method for training a speech style transfer model according to an embodiment of the present disclosure. Referring to FIG7 , the method process includes:

[0126] S701: Obtain a first training speech and a second training speech in a target language corresponding to the first training speech.

[0127] The second training speech has a similar speech style to the first training speech. For example, the second training speech may have similar tone, rhythm, speaking speed, and stress as the first training speech. It should be noted that the speech style of the present embodiment may also be other style information, and the present embodiment is not limited thereto.

[0128] Optionally, the first training speech may be any speech segment. For example, the first training speech may be a Chinese speech segment, or the first training speech may be an English speech segment, which is not limited in the present embodiment.

[0129] Optionally, the language of the second training voice is the target language. For example, the language of the second training voice is different from the language of the first training voice. If the first training voice is Chinese, the second training voice can be English.

[0130] For example, if the first training speech is “This place must be, like… a hundred years (emphasis on a hundred years) old”, the second training speech may be “This place must be, like… a hundred years (emphasis on a hundred years) old”.

[0131] Optionally, the first and second training voices may be pre-acquired voices. For example, before training the voice style transfer model, the user may store the first and second training voices in the electronic device. The electronic device may also acquire the first and second training voices based on other feasible implementation methods, which are not limited in the present embodiment.

[0132] S702: Obtain a training translation text of the second training speech.

[0133] Optionally, the language of the training translation text is the target language. For example, the electronic device may process the second training speech using text recognition technology to obtain the training translation text corresponding to the second training speech. The electronic device may also obtain the training translation text of the second training speech based on other feasible implementation methods, which are not limited in the present embodiment.

[0134] S703: Training a speech style transfer model based on the first training speech, the training translation text, and the second training speech.

[0135] The electronic device can train the speech style transfer model according to the following feasible implementation method: determine the sentence-level semantic information, sentence-level style information and word-level information associated with one or more words of the first training speech, determine the sentence-level semantic information, sentence-level style information and word-level information associated with one or more words of the second training speech, and train the speech processing model based on the sentence-level semantic information, sentence-level style information, word-level information of the first training speech, the sentence-level semantic information, sentence-level style information, word-level information of the second training speech, as well as the training translation text and the second training speech.

[0136] It should be noted that, to determine the sentence-level semantic information, sentence-level style information of the first training speech, and the sentence-level semantic information, sentence-level style information, and word-level information of the second training speech, reference can be made to the scheme in the above-mentioned embodiment, and the concepts of the above-mentioned information can also refer to the concepts in the above-mentioned embodiment, which will not be elaborated on in the present disclosed embodiment.

[0137] Optionally, the speech processing model is trained based on the sentence-level semantic information, sentence-level style information, word-level information of the first training speech, the sentence-level semantic information, sentence-level style information, word-level information of the second training speech, as well as the training translation text and the second training speech. Specifically, based on the sentence-level semantic information, sentence-level style information of the first training speech and the sentence-level semantic information of the second training speech, the predicted sentence-level style information is determined; based on the word-level information of the first training speech and the word-level information of the second training speech, the predicted word-level style information is determined; based on the predicted sentence-level style information, the predicted word-level style information and the training translation text, a predicted speech is obtained; and based on the loss between the predicted speech and the second training speech, the speech processing model is trained.

[0138] The predicted sentence-level style information may be sentence-level style information of the second training speech predicted by the speech processing model.

[0139] The following describes the process of predicting sentence-level style information with reference to FIG8 .

[0140] FIG8 is a schematic diagram of a method for predicting sentence-level style information provided by an embodiment of the present disclosure. Referring to FIG8 , it includes: sentence-level semantic information of a first training speech, sentence-level style information of the first training speech, and sentence-level semantic information of a second training speech. After splicing the sentence-level semantic information of the first training speech, the sentence-level style information of the first training speech, and the sentence-level semantic information of the second training speech, the spliced ​​multimodal information is obtained, and the multimodal information is input into the linear layer of the speech style transfer model. The linear layer of the speech style transfer model can generate predicted sentence-level style information, and the predicted sentence-level style information is the sentence-level style information of the second training speech predicted by the speech style transfer model.

[0141] Since the trained speech processing model can convert Chinese into English and also convert English into Chinese, the speech processing model can be trained bidirectionally during the training process.

[0142] Next, the bidirectional training of predicting sentence-level style information is described with reference to FIG9 .

[0143] FIG9 is a schematic diagram of a bidirectional training provided by an embodiment of the present disclosure. Please refer to FIG9 , which includes: sentence-level semantic information of the first training speech, sentence-level style information of the first training speech, and sentence-level semantic information of the second training speech, and sentence-level style information of the second training speech. After the sentence-level semantic information, sentence-level style information of the first training speech, and sentence-level semantic information of the second training speech are concatenated, the concatenated features are input into the linear layer of the speech processing model. The linear layer of the speech processing model can generate predicted sentence-level style information A, which is the sentence-level style information of the second training speech predicted by the speech processing model.

[0144] As shown in Figure 9, after concatenating the sentence-level semantic information of the first training speech with the sentence-level semantic information and sentence-level style information of the second training speech, the concatenated features are input into the linear layer of the speech processing model. The linear layer of the speech processing model generates predicted sentence-level style information B, which is the sentence-level style information of the first training speech predicted by the speech processing model. This allows for bidirectional training during the training process. After the speech style transfer model converges, it can perform bidirectional speech synthesis processing, improving the efficiency and accuracy of speech style transfer.

[0145] The predicted word-level speech style information may be word-level speech style information of the second training speech predicted by the speech processing model.

[0146] The process of determining style information at the predicted word level will be described below with reference to FIG. 10 .

[0147] FIG10 is a schematic diagram of a method for predicting word-level style information provided by an embodiment of the present disclosure. Please refer to FIG10 , which includes word-level semantic information of the first training speech, word-level style information of the first training speech, word-level style information of the second training speech, and word-level semantic information of the second training speech. It should be noted that the word-level information associated with one or more words of the first training speech may include word-level semantic information (including but not limited to semantic information associated with one or more words) and word-level style information (including but not limited to speech speed information and stress information associated with one or more words) of the first training speech, and the word-level information associated with one or more words of the second training speech may include word-level semantic information and word-level style information of the second training speech.

[0148] The word-level semantic information and word-level style information of the first training speech are input into a local encoder to obtain the local multimodal information A of the first training speech, and the word-level semantic information and word-level style information of the second training speech are input into the local encoder to obtain the local multimodal information B of the second training speech.

[0149] Referring to Figure 10, the attention mechanism processes local multimodal information A, local multimodal information B, the word-level semantic information of the first training speech, and the word-level semantic information of the second training speech to obtain the style information (word-level style information) of the first training speech and the fusion features of the text content of the second training speech, as well as the fusion features of the style information (word-level style information) of the second training speech and the text content of the first training speech. Based on the style information of the first training speech, the fusion features of the text content of the second training speech, and the word-level semantic information of the first training speech, the predicted word-level style information A corresponding to the first training speech is obtained. Based on the style information of the second training speech, the fusion features of the text content of the first training speech, and the word-level semantic information of the second training speech, the predicted word-level style information B corresponding to the second training speech is obtained.

[0150] In this way, the electronic device can obtain the style information of the predicted word level of the first training speech and the style information of the predicted word level of the second training speech, and then perform bidirectional training on the speech style transfer model to improve the training efficiency of the speech style transfer model.

[0151] Next, based on the embodiment shown in FIG10 , the attention mechanism in the embodiment shown in FIG10 will be described in conjunction with FIG11 .

[0152] Figure 11 is a schematic diagram of the processing of an attention mechanism provided by an embodiment of the present disclosure. Referring to Figure 11 , it includes word-level multimodal information V1 of the first training speech (local multimodal information A in Figure 10 ), word-level semantic information K1 of the first training speech, word-level semantic information K2 of the second training speech, and word-level multimodal information V2 of the second training speech (local multimodal information B in Figure 10 ).

[0153] As shown in Figure 11, the compatibility function is used to model the relationship between K1 and K2, resulting in a shared attention matrix for K1 and K2. A Softmax operation is performed on the shared attention matrix to obtain the attention weight matrix A. The shared attention matrix is ​​then transposed and then subjected to a Softmax operation to obtain the attention weight matrix B.

[0154] Referring to Figure 11, the attention weight matrix A and the word-level multimodal information V1 of the first training speech are processed to obtain a fusion feature of the style information (word-level style information) of the first training speech and the text content of the second training speech. The attention weight matrix B and the word-level multimodal information V2 of the second training speech are processed to obtain a fusion feature of the style information (word-level style information) of the second training speech and the text content of the first training speech.

[0155] It should be noted that the embodiment shown in FIG11 can be implemented by the following formula: A=f(K1, K2)

[0156] Where A is the shared attention matrix, f is the compatibility function, K1 is the word-level semantic information of the first training speech, and K2 is the word-level semantic information of the second training speech. 12 , W 21 =softmax(A,A T )

[0157] Among them, W 12 is the attention weight matrix A, W in Figure 11 21 is the attention weight matrix B in the embodiment shown in FIG11 , A is the shared attention matrix, and A T is the transposed shared attention matrix.

[0158] Among them, O1 is the fusion feature of the word-level style information of the first training voice and the text content of the second training voice; O2 is the fusion feature of the word-level style information of the second training voice and the text content of the first training voice; V1 is the word-level multimodal information of the first training voice; V2 is the word-level multimodal information of the second training voice.

[0159] Optionally, the electronic device may obtain the predicted speech based on the predicted sentence-level style information, the predicted word-level style information, and the training translation text. It should be noted that the method for obtaining the predicted speech based on the predicted sentence-level style information, the predicted word-level style information, and the training translation text can refer to the method for obtaining the target speech, and will not be further described in detail in this embodiment of the present disclosure.

[0160] The speech style transfer model is trained based on the loss between the predicted speech and the second training speech. For example, the electronic device can construct a loss function based on the predicted speech and the second training speech, and then use the loss function to update the model parameters in the speech style transfer model.

[0161] The disclosed embodiments provide a method for training a speech processing model. An electronic device can obtain a first training speech, a second training speech in a target language corresponding to the first training speech, and a training translation text of the second training speech. The electronic device then trains a speech style transfer model based on the first training speech, the training translation text, and the second training speech. In this way, the speech style transfer model can retain both sentence-level and word-level style information of the original speech during training, improving the effectiveness of speech style transfer. Furthermore, through bidirectional training, the training efficiency of the speech style transfer model can be improved.

[0162] On the basis of any of the above embodiments, the training process of the speech style transfer model of the embodiment of the present disclosure is described below in conjunction with FIG12 .

[0163] FIG12 is a training diagram of a speech style transfer model provided by an embodiment of the present disclosure. Referring to FIG12 , it includes speech 1, text "This place is at least a hundred years old," speech 2, "This place must be like a hundred years (emphasis) old," speech 1, "This place is at least a hundred years old (emphasis) old," speech 2, text "This place must be like a hundred years old," and a speech style transfer model. The speech style transfer model includes a sentence-level module and a word-level model. The sentence-level module is used to process sentence-level information of speech, and the word-level module is used to process word-level information of speech.

[0164] Referring to FIG12 , sentence-level semantic information A, sentence-level style information A, word-level semantic information A, and word-level style information A corresponding to speech 2 are obtained, and sentence-level semantic information B, sentence-level style information B, word-level semantic information B, and word-level style information B corresponding to speech 1 are obtained. The sentence-level semantic information A, sentence-level style information A, sentence-level semantic information B, and word-level style information B are input into the sentence-level module in the speech processing model. The sentence-level module can output the predicted sentence-level style information for speech 1 and the predicted sentence-level style information for speech 2.

[0165] Referring to Figure 12 , word-level semantic information A, word-level style information A, word-level semantic information B, and word-level style information B are input into the word-level module in the speech style transfer model. The word-level module can output the predicted word-level style information for speech 1 and the predicted word-level style information for speech 2. Based on the predicted word-level style information of speech 1, the predicted sentence-level style information of speech 1, and the text of speech 1, synthesized speech 1, "This place has at least a hundred years (stress) history," is obtained. Based on the predicted word-level style information of speech 2, the predicted sentence-level style information of speech 2, and the text of speech 2, synthesized speech 2, "This place must be like a hundred years (stress) old," is obtained. The speech style transfer model is then bidirectionally trained using the loss between synthesized speech 1 and speech 1, and the loss between synthesized speech 2 and speech 2.

[0166] In this way, the speech style transfer model can retain the sentence-level style information and word-level style information of the original speech during training, thereby improving the effect of speech style transfer. Moreover, through bidirectional training (for example, the speech style transfer model can synthesize English speech into Chinese speech, and can also synthesize Chinese speech into English speech), the training time of the speech style transfer model can be reduced and the training efficiency of the speech style transfer model can be improved.

[0167] FIG13 is a schematic diagram of the structure of a speech processing device provided by an embodiment of the present disclosure. Referring to FIG13 , the speech processing device 130 includes a first acquisition module 131, a first determination module 132, a second acquisition module 133, a second determination module 134, and a third determination module 135, wherein:

[0168] The first acquisition module 131 is used to acquire speech, where the text corresponding to the speech includes one or more words;

[0169] The first determining module 132 is configured to determine first semantic information of the speech, style information of the speech, and word-level information associated with the one or more words;

[0170] The second acquisition module 133 is used to obtain a translation text in the target language corresponding to the speech, wherein the translation text includes one or more translated words;

[0171] The second determining module 134 is configured to determine second semantic information of the translated text and text information associated with one or more translated words of the translated text;

[0172] The third determination module 135 is configured to determine a target speech corresponding to the translated text based on the first semantic information, the style information, the word-level information, the second semantic information, the text information, and the translated text.

[0173] According to one or more embodiments of the present disclosure, the third determining module 135 is specifically configured to:

[0174] determining first target speech style information based on the first semantic information, the style information, and the second semantic information;

[0175] determining second target speech style information based on the word-level information and the text information;

[0176] The target voice is determined based on the first target voice style information, the second target voice style information, and the translated text.

[0177] According to one or more embodiments of the present disclosure, the word-level information includes but is not limited to at least one of semantic information, stress information, and speech rate information of one or more words in the speech.

[0178] According to one or more embodiments of the present disclosure, the third determining module 135 is specifically configured to:

[0179] Processing the translation text based on a text encoder to obtain text features associated with the translation text;

[0180] Determining, from the text features, a word feature corresponding to each translated word in the translated text;

[0181] The target speech is determined based on the word features corresponding to each translated word, the first target speech style information, and the second target speech style information.

[0182] According to one or more embodiments of the present disclosure, the third determining module 135 is specifically configured to:

[0183] Obtaining the number of phonemes of the translated word corresponding to each word feature;

[0184] Determining the word style information corresponding to each word feature in the second target speech style information;

[0185] The target speech is determined based on the first target speech style information, a plurality of word style information, a plurality of word features, and the number of phonemes of each of the translated words.

[0186] According to one or more embodiments of the present disclosure, the third determining module 135 is specifically configured to:

[0187] For any word feature, based on the number of phonemes, concatenate the first target speech style information, the word style information, and the word feature to obtain a concatenated feature;

[0188] The target speech is determined based on a plurality of concatenation features.

[0189] According to one or more embodiments of the present disclosure, the third determining module 135 is specifically configured to:

[0190] Get the target timbre;

[0191] Processing the target timbre based on a timbre encoder to obtain a timbre feature associated with the target timbre;

[0192] The target speech is determined based on the timbre feature and the multiple concatenation features.

[0193] The speech processing device provided in the embodiment of the present disclosure can be used to execute the technical solution of the above-mentioned method embodiment. Its implementation principle and technical effects are similar and will not be described in detail in this embodiment.

[0194] FIG14 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present disclosure. Please refer to FIG14 , which shows a schematic diagram of the structure of an electronic device 1400 suitable for implementing an embodiment of the present disclosure. The electronic device 1400 may be a terminal device or a server. The terminal device may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, personal digital assistants (PDAs), tablet computers (Portable Android Devices, PADs), portable multimedia players (PMPs), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., as well as fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in FIG14 is merely an example and should not impose any limitations on the functions and scope of use of the embodiments of the present disclosure.

[0195] As shown in FIG14 , the electronic device 1400 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 1401, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1402 or a program loaded from a storage device 1408 into a random access memory (RAM) 1403. Various programs and data required for the operation of the electronic device 1400 are also stored in the RAM 1403. The processing device 1401, the ROM 1402, and the RAM 1403 are connected to each other via a bus 1404. An input / output (I / O) interface 1405 is also connected to the bus 1404.

[0196] Typically, the following devices may be connected to the I / O interface 1405: an input device 1406 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 1407 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1408 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1409. The communication device 1409 may allow the electronic device 1400 to communicate with other devices wirelessly or by wire to exchange data. Although FIG. 14 shows an electronic device 1400 having various devices, it should be understood that it is not required to implement or have all of the devices shown. More or fewer devices may be implemented or have alternatively.

[0197] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network via the communication device 1409, or installed from the storage device 1408, or installed from the ROM 1402. When the computer program is executed by the processing device 1401, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0198] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0199] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0200] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method shown in the above embodiment.

[0201] Optionally, an embodiment of the present disclosure provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method shown in the above embodiment is implemented.

[0202] Optionally, an embodiment of the present disclosure provides a computer program product, including a computer program, which implements the method shown in the above embodiment when executed by a processor.

[0203] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).

[0204] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0205] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0206] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0207] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0208] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0209] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0210] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0211] For example, in response to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested to be performed will require obtaining and using the user's personal information. Thereby, the user can independently choose whether to provide personal information to software or hardware such as an electronic device, application, server or storage medium that performs the operation of the technical solution of the present disclosure based on the prompt message. As an optional but non-limiting implementation method, in response to receiving an active request from the user, the method of sending a prompt message to the user can be, for example, a pop-up window, and the prompt information can be presented in the form of text in the pop-up window. In addition, the pop-up window can also carry a selection control for the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0212] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0213] It is understood that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of relevant laws and regulations. Data may include information, parameters and messages, such as flow switching indication information.

[0214] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0215] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0216] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.

Claims

1. A speech processing method, characterized in that: include: Acquire speech, wherein text corresponding to the speech includes one or more words; determining first semantic information of the speech, style information of the speech, and word-level information associated with the one or more words; Obtaining a translation text in a target language corresponding to the speech, wherein the translation text includes one or more translation words; determining second semantic information of the translated text and text information associated with one or more translated terms of the translated text; Based on the first semantic information, the style information, the word level information, the second semantic information, the text information and the translated text, a target speech corresponding to the translated text is determined.

2. The method according to claim 1, characterized in that The determining, based on the first semantic information, the style information, the word level information, the second semantic information, the text information and the translated text, a target speech corresponding to the translated text comprises: Determining first target speech style information based on the first semantic information, the style information and the second semantic information; Determining second target speech style information based on the word-level information and the text information; The target voice is determined based on the first target voice style information, the second target voice style information, and the translated text.

3. The method according to claim 1 or 2, characterized in that: The word-level information includes but is not limited to at least one of semantic information, stress information, and speech rate information of one or more words in the speech.

4. The method according to claim 2, characterized in that: The determining the target speech based on the first target speech style information, the second target speech style information and the translated text includes: Processing the translation text based on a text encoder to obtain text features associated with the translation text; Determining, from the text features, a word feature corresponding to each translated word of the translated text; The target speech is determined based on the word features corresponding to each translated word, the first target speech style information, and the second target speech style information.

5. The method according to claim 4, characterized in that The determining the target speech based on the word feature corresponding to each translated word, the first target speech style information, and the second target speech style information includes: Obtaining the number of phonemes of the translated word corresponding to each word feature; In the second target speech style information, determining the word style information corresponding to each word feature; The target voice is determined based on the first target voice style information, a plurality of word style information, a plurality of word features, and the number of phonemes of each of the translated words.

6. The method according to claim 5, characterized in that The determining the target speech based on the first target speech style information, the plurality of word style information, the plurality of word features and the number of phonemes of each of the translated words comprises: For any word feature, based on the number of phonemes, concatenate the first target voice style information, the word style information and the word feature to obtain a concatenated feature; The target speech is determined based on a plurality of concatenated features.

7. The method according to claim 6, characterized in that The step of determining the target speech based on the plurality of concatenation features comprises: Get the target timbre; Processing the target timbre based on a timbre encoder to obtain a timbre feature associated with the target timbre; The target speech is determined based on the timbre feature and the plurality of concatenation features.

8. A speech processing device, characterized in that: It includes a first acquisition module, a first determination module, a second acquisition module, a second determination module and a third determination module, wherein: The first acquisition module is used to acquire speech, wherein the text corresponding to the speech includes one or more words; The first determination module is used to determine first semantic information of the speech, style information of the speech, and word level information associated with the one or more words; The second acquisition module is used to acquire a translation text in a target language corresponding to the speech, wherein the translation text includes one or more translation words; The second determination module is used to determine second semantic information of the translation text and text information associated with one or more translation words of the translation text; The third determination module is used to determine the target speech corresponding to the translated text based on the first semantic information, the style information, the word level information, the second semantic information, the text information and the translated text.

9. An electronic device, characterized in that: include: Processor and memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor executes the speech processing method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions. When the processor executes the computer-executable instructions, the speech processing method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Speech translation method and device

    CN108231062A

  • Speech translation method and device and storage medium

    CN113591495A

  • Voice processing method and device, equipment and storage medium

    CN114495956A

  • Speech synthesis method, speech synthesis system, speech synthesis device and storage medium

    CN115620699A

  • Translation method and device, readable medium and electronic equipment

    CN115688808A