Voice generation method and device and related equipment

By receiving text to be converted and conversion information, using a deep learning model to generate speech and perform format conversion, the problem of low efficiency in converting text to speech in the existing technology is solved, and efficient speech generation and personalized output are achieved.

CN118609538APending Publication Date: 2024-09-06SOUNDAI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410683619.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-29
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

The efficiency of converting text into speech in the existing technology is low and requires a lot of manpower investment.

Method used

By receiving the text to be converted and the conversion information sent by the target device, the deep learning model is used to convert the text, generate speech, and perform speech format conversion and feedback according to user needs.

Benefits of technology

It improves the efficiency of text-to-speech conversion, meets users' personalized needs for speech generation, and reduces manpower investment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609538A
    Figure CN118609538A
Patent Text Reader

Abstract

The invention provides a voice generation method and device and related equipment, and the method comprises the steps: receiving a to-be-converted text and conversion information sent by target equipment, and the conversion information comprises at least one of the following items: tone, speed and volume; inputting the to-be-converted text and the conversion information into a target deep learning model for text conversion to obtain a first voice, the first voice being a voice obtained by performing voice conversion on the to-be-converted text by the target deep learning model based on the conversion information; and sending the first voice to the target device. According to the method, the to-be-converted text and the conversion information sent by the target device are received, the to-be-converted text is subjected to voice conversion according to the conversion information and the target deep learning model, the first voice is obtained, the first voice is fed back to the target device, and the efficiency of converting the text into the voice according to user requirements is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of artificial intelligence, and in particular, to a speech generation method, apparatus, and related equipment. Background Art

[0002] With the continuous advancement of science and technology, the application of voice technology is becoming more and more extensive. Whether it is an intelligent assistant, voice navigation or automatic reply system, speech synthesis technology is indispensable. In the existing technical solutions, text-to-speech conversion is generally recorded through manual dialogue or recording to obtain the corresponding voice of the text. This method requires a lot of manpower investment, resulting in low efficiency in converting text to speech. Summary of the invention

[0003] The embodiments of the present application provide a speech generation method, apparatus and related equipment to solve the problem of low efficiency in converting text to speech in the prior art.

[0004] To solve the above problems, this application is implemented as follows:

[0005] In a first aspect, an embodiment of the present application provides a method for generating speech, the method comprising:

[0006] Receiving the text to be converted and conversion information sent by the target device, wherein the conversion information includes at least one of the following: timbre, speech speed and volume;

[0007] Inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech, wherein the first speech is a speech obtained by the target deep learning model performing speech conversion on the text to be converted based on the conversion information;

[0008] The first voice is sent to the target device.

[0009] Optionally, sending the first voice to the target device includes:

[0010] receiving format information sent by the target device, where the format information is used to indicate a format of the first voice;

[0011] Performing format conversion on the first speech according to the format information to obtain a second speech;

[0012] The second voice is sent to the target device.

[0013] Optionally, before inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain the first speech, the method further includes:

[0014] Obtaining a training data set and a deep learning model, wherein the training data set includes a plurality of training samples, the training samples include sample texts and speech corresponding to the sample texts, and the deep learning model is used to convert the input text into the corresponding speech;

[0015] The deep learning model is trained using the training data set to obtain the target deep learning model.

[0016] Optionally, the using the training data set to train the deep learning model to obtain the target deep learning model includes:

[0017] Inputting a sample text in a first sample into the deep learning model for text conversion to obtain a predicted speech, wherein the first sample is any one training sample in the training data set;

[0018] Performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a target loss value;

[0019] The deep learning model is updated according to the target loss value to obtain the target deep learning model.

[0020] Optionally, the performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a target loss value includes:

[0021] Performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a classification loss value, a confidence loss value, and a positioning loss value;

[0022] Obtain a first weight coefficient, a second weight coefficient, and a third weight coefficient, wherein the first weight coefficient corresponds to the classification loss value, the second weight coefficient corresponds to the confidence loss value, and the third weight coefficient corresponds to the positioning loss value;

[0023] The classification loss value, the confidence loss value and the positioning loss value are weighted according to the first weight coefficient, the second weight coefficient and the third weight coefficient to obtain the target loss value.

[0024] Optionally, the step of inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech includes:

[0025] Performing text recognition on the text to be converted to obtain text information, wherein the text information is used to indicate grammatical errors and / or typos included in the text to be converted;

[0026] Based on the text information, the text to be converted is updated to obtain a target text;

[0027] The target text and the conversion information are input into a target deep learning model for text conversion to obtain the first speech.

[0028] In a second aspect, the present application also provides a speech generating device, including:

[0029] A receiving module, configured to receive the text to be converted and conversion information sent by the target device, wherein the conversion information includes at least one of the following: timbre, speech speed and volume;

[0030] A conversion module, used for inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech, wherein the first speech is a speech obtained by the target deep learning model performing speech conversion on the text to be converted based on the conversion information;

[0031] A sending module is used to send the first voice to the target device.

[0032] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a transceiver, a memory, a processor, and a program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps of the method described in the first aspect above.

[0033] In a fourth aspect, an embodiment of the present application further provides a readable storage medium for storing a program, which, when executed by a processor, implements the steps in the method described in the first aspect above.

[0034] In a fifth aspect, an embodiment of the present application further provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps in the method described in the first aspect.

[0035] The present application provides a speech generation method, device and related equipment, the method comprising: receiving a text to be converted and conversion information sent by a target device, the conversion information comprising at least one of the following: timbre, speaking speed and volume; inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech, the first speech being the speech obtained by the target deep learning model performing speech conversion on the text to be converted based on the conversion information; and sending the first speech to the target device. The present application receives the text to be converted and the conversion information sent by the target device, thereby performing speech conversion on the text to be converted according to the conversion information and the target deep learning model to obtain the first speech, and feeds the first speech back to the target device, thereby improving the efficiency of converting text to speech according to user needs. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0037] Figure 1 It is a flowchart of the speech generation method provided in the embodiment of the present application;

[0038] Figure 2 is a structural schematic diagram of a speech generating device provided in an embodiment of the present application;

[0039] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0041] The terms "first", "second" etc. in the embodiments of the present application are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. In addition, the terms "include" and "have" and any variation thereof are intended to cover non-exclusive inclusions, for example, the process, method, system, product or equipment comprising a series of steps or units need not be limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or equipment. In addition, "and / or" is used in the present application to represent at least one of connected objects, such as A and / or B and / or C, representing the inclusion of separate A, separate B, separate C, and A and B all exist, B and C all exist, A and C all exist, and 7 situations that A, B and C all exist.

[0042] See also Figure 1 , Figure 1 is a flow chart of the speech generation method provided in the embodiment of the present application. Figure 1 As shown, the speech generation method may include the following steps:

[0043] Step 101: Receive the text to be converted and conversion information sent by the target device, where the conversion information includes at least one of the following: timbre, speaking speed, and volume.

[0044] In this embodiment, the speech generation method provided in this application can be applied to a server, and the target device can be a user terminal. The conversion of the text to be converted is completed by receiving the text to be converted and the conversion information sent by the target device.

[0045] Specifically, the text to be converted is the text that the user needs to generate corresponding voice content, which can be plain text or rich text, etc., wherein plain text refers to text that only includes text and no other content, and rich text refers to text that includes both text and other content such as pictures, tables, etc. The conversion information is the relevant settings for the converted voice provided by the user to the server through the target device, such as selecting the timbre, speaking speed, volume, and other information of the generated voice. Specifically, a large amount of sample content can be obtained in advance, and the server can realize a variety of different voice conversions through a large amount of sample content, thereby meeting the user's semantic conversion needs.

[0046] Step 102: input the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech, where the first speech is the speech obtained by the target deep learning model performing speech conversion on the text to be converted based on the conversion information.

[0047] In this embodiment, the target deep learning model is used to perform speech conversion on the text to be converted according to the conversion information, so that the target deep learning model can be a text-to-speech (TTS) model, and the goal of the TTS model is to convert text input into natural and fluent speech output. These models are usually based on deep learning technologies, such as WaveNet, Tacotron, DeepVoice, etc. Among them, WaveNet is a deep generation model developed by DeepMind, which uses a deep convolutional neural network to generate raw waveform data directly from text. Tacotron is an end-to-end TTS model that can generate speech directly from text without manually designing features. In addition, DeepVoice is a TTS model based on deep learning that can learn the acoustic and linguistic features of speech to generate natural and fluent speech. These TTS models can generate high-quality, natural and fluent speech output by learning the mapping relationship between text and speech. They are widely used in speech synthesis, voice assistants, audio books and other fields.

[0048] The to-be-converted data is converted through a target deep learning model to obtain a first voice, wherein the first voice matches conversion information input by a target device.

[0049] Step 103: Send the first voice to the target device.

[0050] In this embodiment, after the target deep learning model generates the first voice, the first voice is sent to the target device, and the transmission format can be set in advance by the target device, which is not specifically limited in this embodiment. The voice generated by the above method can be customized according to the relevant conversion information set in advance by the user, so as to generate the voice required by the user, which is more in line with the user's needs.

[0051] The present application provides a speech generation method, device and related equipment, the method comprising: receiving a text to be converted and conversion information sent by a target device, the conversion information comprising at least one of the following: timbre, speaking speed and volume; inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech, the first speech being the speech obtained by the target deep learning model performing speech conversion on the text to be converted based on the conversion information; and sending the first speech to the target device. The present application receives the text to be converted and the conversion information sent by the target device, thereby performing speech conversion on the text to be converted according to the conversion information and the target deep learning model to obtain the first speech, and feeds the first speech back to the target device, thereby improving the efficiency of converting text to speech according to user needs.

[0052] In some feasible implementation manners, optionally, sending the first voice to the target device includes:

[0053] receiving format information sent by the target device, where the format information is used to indicate a format of the first voice;

[0054] Performing format conversion on the first speech according to the format information to obtain a second speech;

[0055] The second voice is sent to the target device.

[0056] In this embodiment, the format information is sent by the target device to the server before the server sends the first voice to the target device, wherein the format information is used to indicate the relevant format of the second voice. Exemplarily, the user can choose to save it in a common audio format, such as MP3, WAV, etc., or directly transmit it to the target device for playback via the network. The user is free to choose and is not specifically limited in this embodiment.

[0057] After receiving the format information, the server converts the format of the first voice according to the format information to obtain the second voice, thereby sending the second voice that meets the customer's needs to the target device, thereby improving the user's satisfaction.

[0058] Optionally, before inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain the first speech, the method further includes:

[0059] Obtaining a training data set and a deep learning model, wherein the training data set includes a plurality of training samples, the training samples include sample texts and speech corresponding to the sample texts, and the deep learning model is used to convert the input text into the corresponding speech;

[0060] The deep learning model is trained using the training data set to obtain the target deep learning model.

[0061] In this embodiment, before using the target deep learning model, the acquired deep learning model needs to be trained to obtain a trained target deep learning model. Specifically, the deep learning model is used to convert the input text into the corresponding speech. Exemplarily, the deep learning model can be a text-to-speech model, and the goal of the text-to-speech model is to convert the text input into a natural and fluent speech output.

[0062] Specifically, the training data set includes a plurality of training samples, and the training samples include sample texts and speech corresponding to the sample texts. Exemplarily, the sample data may be generated through other models or directly acquired from a database.

[0063] The deep learning model is trained by using the acquired training data set until a trained target deep learning model is obtained, so that the text to be converted can be converted by using the target deep learning model.

[0064] Optionally, the using the training data set to train the deep learning model to obtain the target deep learning model includes:

[0065] Inputting a sample text in a first sample into the deep learning model for text conversion to obtain a predicted speech, wherein the first sample is any one training sample in the training data set;

[0066] Performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a target loss value;

[0067] The deep learning model is updated according to the target loss value to obtain the target deep learning model.

[0068] In this embodiment, the first sample is any one of the training samples, and the first sample is input into the deep learning model for text conversion to obtain a predicted speech, thereby calculating the loss by calculating the predicted speech and the speech corresponding to the sample text in the first sample, that is, the standard speech, to obtain a target loss value. The loss calculation can be calculated by a loss function, which is not specifically limited in this embodiment.

[0069] The deep learning model is updated by the calculated target loss value, thereby updating the relevant parameters in the deep learning model and improving the performance of the deep learning model. Thus, the deep learning model is trained multiple times through multiple training samples, and finally a trained target deep learning model is obtained.

[0070] Optionally, the performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a target loss value includes:

[0071] Performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a classification loss value, a confidence loss value, and a positioning loss value;

[0072] Obtain a first weight coefficient, a second weight coefficient, and a third weight coefficient, wherein the first weight coefficient corresponds to the classification loss value, the second weight coefficient corresponds to the confidence loss value, and the third weight coefficient corresponds to the positioning loss value;

[0073] The classification loss value, the confidence loss value and the positioning loss value are weighted according to the first weight coefficient, the second weight coefficient and the third weight coefficient to obtain the target loss value.

[0074] In this embodiment, the training uses the pytorch toolbox and is trained on the labeled layout analysis data set. Loss calculation is performed on the multiple predicted values ​​and the multiple second label information to obtain classification loss values, confidence loss values, and positioning loss values. The Loss function contains three parts, namely, classification loss, confidence loss, and positioning loss, where λ is a weight coefficient, which is 1.5, 2.5, and 0.5 respectively:

[0075] Loss = λ1L cls +λ2L obj +λ3L loc

[0076] Among them, Loss is the target loss value, λ1 is the first weight coefficient, λ2 is the first weight coefficient, and λ3 is the second weight coefficient. The stochastic gradient optimization algorithm is used for training, and all trainable parameters are initialized using the He initialization method. The initial learning rate is 0.01, the momentum is 0.9, and the training is completed after 300 rounds.

[0077] Optionally, the step of inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech includes:

[0078] Performing text recognition on the text to be converted to obtain text information, wherein the text information is used to indicate grammatical errors and / or typos included in the text to be converted;

[0079] Based on the text information, the text to be converted is updated to obtain a target text;

[0080] The target text and the conversion information are input into a target deep learning model for text conversion to obtain the first speech.

[0081] In this embodiment, before using the target deep learning model to convert the text to be converted, text recognition can also be performed on the text to be converted to determine whether the text to be converted includes grammatical errors and / or typos. Through this judgment, the text to be converted can be updated before the conversion, thereby ensuring the correctness of the subsequent converted speech and avoiding errors in the subsequent converted speech.

[0082] Specifically, the text to be converted is updated through the text information to obtain the target text, wherein the updating process can also be automatically updated through other deep learning models, or updated through preset rules, which is not specifically limited in this embodiment. Finally, the updated target text is input into the target deep learning model for text conversion to obtain the first speech.

[0083] The present application receives the text to be converted and the conversion information sent by the target device, performs speech conversion on the text to be converted according to the conversion information and the target deep learning model, obtains the first speech, and feeds the first speech back to the target device, thereby improving the efficiency of converting text to speech according to user needs.

[0084] See also Figure 2 , Figure 2 is a structural diagram of a speech generating device provided in an embodiment of the present application. Figure 2 As shown, the speech generating device 200 comprises:

[0085] The receiving module 210 is used to receive the text to be converted and the conversion information sent by the target device, wherein the conversion information includes at least one of the following: timbre, speech speed and volume;

[0086] A conversion module 220, configured to input the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech, wherein the first speech is a speech obtained by the target deep learning model performing speech conversion on the text to be converted based on the conversion information;

[0087] The sending module 230 is used to send the first voice to the target device.

[0088] Optionally, the sending module 230 includes:

[0089] A receiving submodule, used for receiving format information sent by the target device, wherein the format information is used for indicating the format of the first voice;

[0090] A first conversion submodule, configured to perform format conversion on the first speech according to the format information to obtain a second speech;

[0091] The sending submodule is used to send the second voice to the target device.

[0092] Optionally, also include:

[0093] An acquisition module is used to acquire a training data set and a deep learning model, wherein the training data set includes a plurality of training samples, the training samples include sample texts and speech corresponding to the sample texts, and the deep learning model is used to convert the input text into the corresponding speech;

[0094] A training module is used to train the deep learning model using the training data set to obtain the target deep learning model.

[0095] Optional training modules include:

[0096] A second conversion submodule is used to input the sample text in the first sample into the deep learning model for text conversion to obtain predicted speech, wherein the first sample is any training sample in the training data set;

[0097] A calculation submodule, used for performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a target loss value;

[0098] An updating module is used to update the deep learning model according to the target loss value to obtain the target deep learning model.

[0099] Optionally, the computing submodule includes:

[0100] A first calculation unit, configured to perform loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a classification loss value, a confidence loss value, and a positioning loss value;

[0101] an acquisition unit, configured to acquire a first weight coefficient, a second weight coefficient, and a third weight coefficient, wherein the first weight coefficient corresponds to the classification loss value, the second weight coefficient corresponds to the confidence loss value, and the third weight coefficient corresponds to the positioning loss value;

[0102] The second calculation unit is used to perform weight calculation on the classification loss value, the confidence loss value and the positioning loss value according to the first weight coefficient, the second weight coefficient and the third weight coefficient respectively to obtain the target loss value.

[0103] Optionally, the conversion module 220 includes:

[0104] A recognition submodule, configured to perform text recognition on the text to be converted to obtain text information, wherein the text information is used to indicate grammatical errors and / or typos included in the text to be converted;

[0105] An updating submodule, used for updating the text to be converted based on the text information to obtain a target text;

[0106] The third conversion submodule is used to input the target text and the conversion information into the target deep learning model for text conversion to obtain the first speech.

[0107] The present application receives the text to be converted and the conversion information sent by the target device, performs speech conversion on the text to be converted according to the conversion information and the target deep learning model, obtains the first speech, and feeds the first speech back to the target device, thereby improving the efficiency of converting text to speech according to user needs.

[0108] The present application also provides an electronic device. Figure 3 , the electronic device may include a processor 301, a memory 302, and a program 3021 stored in the memory 302 and executable on the processor 301.

[0109] When the program 3021 is executed by the processor 301, it can achieve Figure 1 Any step in the corresponding method embodiment:

[0110] Receiving the text to be converted and conversion information sent by the target device, wherein the conversion information includes at least one of the following: timbre, speech speed and volume;

[0111] Inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech, wherein the first speech is a speech obtained by the target deep learning model performing speech conversion on the text to be converted based on the conversion information;

[0112] The first voice is sent to the target device.

[0113] Optionally, sending the first voice to the target device includes:

[0114] receiving format information sent by the target device, where the format information is used to indicate a format of the first voice;

[0115] Performing format conversion on the first speech according to the format information to obtain a second speech;

[0116] The second voice is sent to the target device.

[0117] Optionally, before inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain the first speech, the method further includes:

[0118] Obtaining a training data set and a deep learning model, wherein the training data set includes a plurality of training samples, the training samples include sample texts and speech corresponding to the sample texts, and the deep learning model is used to convert the input text into the corresponding speech;

[0119] The deep learning model is trained using the training data set to obtain the target deep learning model.

[0120] Optionally, the using the training data set to train the deep learning model to obtain the target deep learning model includes:

[0121] Inputting a sample text in a first sample into the deep learning model for text conversion to obtain a predicted speech, wherein the first sample is any one training sample in the training data set;

[0122] Performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a target loss value;

[0123] The deep learning model is updated according to the target loss value to obtain the target deep learning model.

[0124] Optionally, the performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a target loss value includes:

[0125] Performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a classification loss value, a confidence loss value, and a positioning loss value;

[0126] Obtain a first weight coefficient, a second weight coefficient, and a third weight coefficient, wherein the first weight coefficient corresponds to the classification loss value, the second weight coefficient corresponds to the confidence loss value, and the third weight coefficient corresponds to the positioning loss value;

[0127] The classification loss value, the confidence loss value and the positioning loss value are weighted according to the first weight coefficient, the second weight coefficient and the third weight coefficient to obtain the target loss value.

[0128] Optionally, the step of inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech includes:

[0129] Performing text recognition on the text to be converted to obtain text information, wherein the text information is used to indicate grammatical errors and / or typos included in the text to be converted;

[0130] Based on the text information, the text to be converted is updated to obtain a target text;

[0131] The target text and the conversion information are input into a target deep learning model for text conversion to obtain the first speech.

[0132] The present application receives the text to be converted and the conversion information sent by the target device, performs speech conversion on the text to be converted according to the conversion information and the target deep learning model, obtains the first speech, and feeds the first speech back to the target device, thereby improving the efficiency of converting text to speech according to user needs.

[0133] The embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, each process of the above-mentioned speech generation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it is not repeated here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0134] The embodiment of the present application further provides a computer program product, which is stored in a storage medium. The computer program product is executed by at least one processor to implement the various processes of the above-mentioned speech generation method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0135] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0136] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0137] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A speech generation method, characterized in that: The method comprises: Receiving the text to be converted and conversion information sent by the target device, wherein the conversion information includes at least one of the following: timbre, speech speed and volume; Inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech, wherein the first speech is a speech obtained by the target deep learning model performing speech conversion on the text to be converted based on the conversion information; The first voice is sent to the target device.

2. The method according to claim 1, characterized in that The sending the first voice to the target device includes: receiving format information sent by the target device, where the format information is used to indicate a format of the first voice; Performing format conversion on the first speech according to the format information to obtain a second speech; The second voice is sent to the target device.

3. The method according to claim 1, characterized in that: Before inputting the text to be converted and the conversion information into the target deep learning model for text conversion to obtain the first speech, the method further includes: Obtaining a training data set and a deep learning model, wherein the training data set includes a plurality of training samples, the training samples include sample texts and speech corresponding to the sample texts, and the deep learning model is used to convert the input text into the corresponding speech; The deep learning model is trained using the training data set to obtain the target deep learning model.

4. The method according to claim 3, characterized in that The step of training the deep learning model using the training data set to obtain the target deep learning model includes: Inputting a sample text in a first sample into the deep learning model for text conversion to obtain a predicted speech, wherein the first sample is any one training sample in the training data set; Performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a target loss value; The deep learning model is updated according to the target loss value to obtain the target deep learning model.

5. The method according to claim 4, characterized in that The performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a target loss value includes: Performing loss calculation on the predicted speech and the speech corresponding to the sample text in the first sample to obtain a classification loss value, a confidence loss value, and a positioning loss value; Obtain a first weight coefficient, a second weight coefficient, and a third weight coefficient, wherein the first weight coefficient corresponds to the classification loss value, the second weight coefficient corresponds to the confidence loss value, and the third weight coefficient corresponds to the positioning loss value; The classification loss value, the confidence loss value and the positioning loss value are weighted according to the first weight coefficient, the second weight coefficient and the third weight coefficient to obtain the target loss value.

6. The method according to claim 1, characterized in that The step of inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech includes: Performing text recognition on the text to be converted to obtain text information, wherein the text information is used to indicate grammatical errors and / or typos included in the text to be converted; Based on the text information, the text to be converted is updated to obtain a target text; The target text and the conversion information are input into a target deep learning model for text conversion to obtain the first speech.

7. A speech generating device, characterized in that: The device comprises: A receiving module, configured to receive the text to be converted and conversion information sent by the target device, wherein the conversion information includes at least one of the following: timbre, speech speed and volume; A conversion module, used for inputting the text to be converted and the conversion information into a target deep learning model for text conversion to obtain a first speech, wherein the first speech is a speech obtained by the target deep learning model performing speech conversion on the text to be converted based on the conversion information; A sending module is used to send the first voice to the target device.

8. An electronic device, comprising: A memory, a processor, and a program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the speech generation method as described in any one of claims 1 to 6.

9. A readable storage medium for storing a program, characterized in that: When the program is executed by a processor, the steps in the speech generation method according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product is stored in a storage medium, and the computer program product is executed by at least one processor to implement the steps in the speech generation method according to any one of claims 1 to 6.