Speech synthesis method and device based on generative adversarial network, equipment and medium

Through the speech synthesis method based on the generative adversarial network, the problems of low generated speech quality and low synthesis efficiency in the prior art are solved, and more efficient and more accurate speech synthesis is achieved.

CN119541453APending Publication Date: 2025-02-28PING AN TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411663178.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-20
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing speech synthesis technology has problems with low voice quality and low synthesis efficiency.

Method used

A speech synthesis method based on a generative adversarial network is adopted, and a feature analysis is performed by obtaining text input, and a generator and discriminator in the generative adversarial network is used for loss evaluation and optimization to generate a target speech signal.

Benefits of technology

It improves the accuracy and efficiency of speech synthesis, reduces the computing and storage resource requirements, and has a higher voice quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119541453A_ABST
    Figure CN119541453A_ABST
Patent Text Reader

Abstract

The invention relates to a speech synthesis technology, and discloses a speech synthesis method based on a generative adversarial network, which comprises the following steps: carrying out feature analysis on text input to obtain audio features; inputting the random text into a generator in a pre-constructed generative adversarial network to obtain an initial voice signal; using a discriminator in the generative adversarial network to carry out loss evaluation on the audio features and the initial voice features; if the loss evaluation does not meet a preset condition, optimizing the generator and the discriminator according to a loss evaluation result to obtain a target generative adversarial network; calculating the random text by using a generator in the target generative adversarial network to obtain a target voice signal; and performing voice reading on the target voice signal to obtain a playable voice. The invention further provides a speech synthesis device based on the generative adversarial network, electronic equipment and a storage medium. The method can improve the quality of generated voice and the synthesis efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of speech synthesis technology, and in particular to a speech synthesis method, device, equipment and medium based on a generative adversarial network. Background Art

[0002] As the demand for customer service in the financial industry increases, financial institutions are increasingly relying on artificial intelligence technology to provide high-quality customer service. Speech synthesis technology plays an important role in customer service, for example, intelligent express Q&A customer service, voice assistants for banks and other enterprises, etc.

[0003] The existing research on speech synthesis technology at home and abroad mainly includes: First, based on the Griffin-Lim algorithm, the STFT sequence is effectively decoded back to the time signal, and the WORLD vocoder is paired with a dedicated signal processing algorithm to map the intermediate feature representation back to the original audio. However, the main problem of this method is that the mapping from the intermediate feature to the audio usually introduces obvious artifacts, resulting in low accuracy and efficiency of speech generation; second, based on the neural network model, audio samples are generated in sequence, and then the speech is synthesized through the model network structure. However, due to the complexity of the model network structure, the resource consumption in the synthesis process is too high and the training time is too long. In addition, due to the fixed model structure, the speech generation is slow and inefficient. In summary, there are problems of low quality of generated speech and low synthesis efficiency in the existing technology. Summary of the invention

[0004] The present invention provides a speech synthesis method, device, electronic device and computer-readable storage medium based on a generative adversarial network, the main purpose of which is to solve the problems of low generated speech quality and low synthesis efficiency.

[0005] To achieve the above object, the present invention provides a speech synthesis method based on a generative adversarial network, comprising:

[0006] Obtaining text input, performing feature analysis on the text input, and obtaining audio features;

[0007] Obtaining random text, and inputting the random text into a generator in a pre-built generative adversarial network to obtain an initial speech signal;

[0008] Using the discriminator in the generative adversarial network to perform loss assessment on the audio features and the initial speech features;

[0009] If the loss evaluation does not meet the preset conditions, the generator and the discriminator are optimized according to the result of the loss evaluation to obtain a target generative adversarial network;

[0010] Utilizing the generator in the target generative adversarial network to calculate the random text, to obtain a target speech signal;

[0011] The target voice signal is voice read to obtain a playable voice.

[0012] Optionally, performing feature analysis on the text input to obtain audio features includes:

[0013] Performing attribute analysis on the text input to obtain multi-source attributes;

[0014] generating a basic unit of speech according to the multi-source attributes;

[0015] Perform feature mapping on the basic speech unit to obtain audio features.

[0016] Optionally, performing attribute analysis on the text input to obtain multi-source attributes includes:

[0017] Predicting the duration of the text input to obtain a predicted duration;

[0018] Performing phoneme extraction on the text input to obtain text phonemes;

[0019] Perform keyword screening on the text input to obtain text keywords;

[0020] The predicted duration, the text phonemes and the text keywords are used as multi-source attributes.

[0021] Optionally, inputting the random text into a generator in a pre-constructed generative adversarial network to obtain an initial speech signal includes:

[0022] Converting the random text into random text features;

[0023] Using the generator to upsample and residual connect the random text features to obtain convolution features;

[0024] The convolution feature is normalized to obtain an initial speech signal.

[0025] Optionally, inputting the random text into a generator in a pre-constructed generative adversarial network to obtain an initial speech signal includes:

[0026] Converting the random text into random text features;

[0027] mapping the random text features to vocoder parameters using the generator;

[0028] Reconstructing the vocoder parameters to obtain reconstructed parameters;

[0029] A speech waveform is constructed according to the reconstruction parameters, and a speech signal is generated according to the speech waveform.

[0030] Optionally, the using a discriminator in the generative adversarial network to perform loss assessment on the audio features and the initial speech features includes:

[0031] Using the discriminator to calculate the audio feature and the initial speech feature respectively, to obtain a first parameter feature and a second parameter feature;

[0032] A loss value is calculated according to the discriminator, the first parameter feature, and the second parameter feature.

[0033] Optionally, the performing voice reading on the target voice signal to obtain a playable voice includes:

[0034] Extracting characteristic parameters of the target speech signal;

[0035] Encoding and encrypting the characteristic parameters to obtain encoded parameters;

[0036] Transmitting the encoding parameters using a preset vocoder channel;

[0037] The speech waveform is restored according to the characteristic parameters received through the channel.

[0038] In order to solve the above problems, the present invention also provides a speech synthesis device based on a generative adversarial network, the device comprising:

[0039] A text input analysis module, used to obtain text input, perform feature analysis on the text input, and obtain audio features;

[0040] The first processing module of the generator is used to obtain random text and input the random text into the generator in the pre-built generative adversarial network to obtain an initial speech signal;

[0041] A discriminator processing module, used for performing loss assessment on the audio features and the initial speech features using the discriminator in the generative adversarial network;

[0042] An adversarial network optimization module, used for optimizing the generator and the discriminator according to the result of the loss evaluation to obtain a target generative adversarial network when the loss evaluation does not meet the preset conditions;

[0043] A generator second processing module, used to calculate the random text using the generator in the target generative adversarial network to obtain a target speech signal;

[0044] The playable speech generation module is used to perform speech reading on the target speech signal to obtain a playable speech.

[0045] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0046] at least one processor; and,

[0047] a memory communicatively connected to the at least one processor; wherein,

[0048] The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the above-mentioned speech synthesis method based on generative adversarial network.

[0049] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one computer program is stored. The at least one computer program is executed by a processor in an electronic device to implement the above-mentioned speech synthesis method based on generative adversarial network.

[0050] The embodiment of the present invention realizes speech synthesis by performing feature analysis on text input and random text, and calculating speech signals according to a generative adversarial network. The structure of the generative adversarial network reduces the demand for computing and storage resources; the accuracy of speech synthesis is improved by calculating speech signals through the generator in the generative adversarial network; the accuracy and efficiency of the speech generated by the generator are improved based on the evaluation of the discriminator and the loss optimization. Therefore, the speech synthesis method, device, electronic device and computer-readable storage medium based on the generative adversarial network proposed in the present invention can solve the problems of low quality of generated speech and low synthesis efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 A flowchart of a speech synthesis method based on a generative adversarial network provided by an embodiment of the present invention;

[0052] Figure 2 A schematic diagram of a process for performing feature analysis on the text input provided by an embodiment of the present invention;

[0053] Figure 3 A schematic diagram of a process of inputting the random text into a generator in a pre-constructed generative adversarial network provided by an embodiment of the present invention;

[0054] Figure 4 A functional module diagram of a speech synthesis device based on a generative adversarial network provided by an embodiment of the present invention;

[0055] Figure 5 A schematic diagram of the structure of an electronic device for implementing the speech synthesis method based on a generative adversarial network provided in one embodiment of the present invention.

[0056] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0057] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0058] The embodiment of the present application provides a speech synthesis method based on a generative adversarial network. The execution subject of the speech synthesis method based on the generative adversarial network includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the speech synthesis method based on the generative adversarial network can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc. The server can be an independent server, or it can be a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content distribution networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms.

[0059] Reference Figure 1 FIG. 1 is a flow chart of a speech synthesis method based on a generative adversarial network provided by an embodiment of the present invention. In this embodiment, the speech synthesis method based on a generative adversarial network includes:

[0060] S1. Obtain text input, perform feature analysis on the text input, and obtain audio features.

[0061] In an embodiment of the present invention, the text input is text content that needs to be converted into playable voice, for example, questions that voice customer service assistants of financial, banking and other enterprises need to answer when communicating with customers, or questions that need to be asked, such as "The business you want to consult includes the following types...", "Based on your financial situation, it is recommended that you improve your property distribution in this way...", "Your current account balance is...".

[0062] See also Figure 2 As shown, in the embodiment of the present invention, the feature analysis of the text input to obtain the audio feature includes:

[0063] S21, performing attribute analysis on the text input to obtain multi-source attributes;

[0064] S22, generating a basic speech unit according to the multi-source attributes;

[0065] S23. Perform feature mapping on the speech basic unit to obtain audio features.

[0066] Further, in the embodiments of the present invention, the attribute analysis of the text input to obtain multi-source attributes includes:

[0067] Perform duration prediction on the text input to obtain a predicted duration;

[0068] Perform phoneme extraction on the text input to obtain text phonemes;

[0069] Perform keyword screening on the text input to obtain text keywords;

[0070] Take the predicted duration, the text phonemes, and the text keywords as multi-source attributes.

[0071] In the embodiments of the present invention, the input text can be divided according to the predicted duration, text phonemes, and text keywords, and then a suitable speech processing paragraph, that is, a speech basic unit, can be formed.

[0072] In the embodiments of the present invention, before generating the speech basic unit, it is necessary to perform structural processing on the text information of the text input. The language of the text can be judged, such as Chinese, English, etc., and then according to the grammar rules of the corresponding language, the whole text can be segmented into single sentences or words; then the segmented sentences or words are standardized. For example, when there are Arabic numerals or letters in a sentence, they need to be converted into words. In the actual application scenario of a voice customer service, when asking "Are you the owner of the phone number ending with 0885?", where "0885" is an Arabic numeral and needs to be converted into the Chinese characters "ling ba ba wu"; in text synthesis, the text basically corresponds to phonetic notations such as pinyin and phonetic symbols, so part-of-speech and syntactic analysis can be realized through phoneme conversion; in addition, prosody prediction can also be performed on the text, such as where to pause, stress, and lighten the reading, etc., to achieve the ups and downs and cadence of the voice.

[0073] In the embodiments of the present invention, the speech basic unit can be represented as a syllable phoneme segment, and a preset lightweight recognizer can map the syllable phoneme segment to audio features; specifically, the recognizer can be constructed through a trained syllable phoneme corpus, and through the trained recognizer, the mapping of the speech basic unit can be realized to obtain audio features.

[0074] In an optional embodiment of the present invention, the audio features may include: fundamental frequency, glottal cycle, and the audio features can be represented as acoustic features, such as mel-spectrograms, or the spectrogram of sound, such as Mel spectrogram.

[0075] S2. Obtain random text, and input the random text into a generator in a pre-built generative adversarial network to obtain an initial speech signal;

[0076] In an embodiment of the present invention, the Generative Adversarial Network (GAN) is a powerful generative model that takes random noise (i.e., random text) as input and generates output (i.e., target speech signal). In the continuous optimization process of the generative adversarial network, the speech of the random text generated by the generator will be closer and closer to the audio features corresponding to the text input. The generative adversarial network consists of a generator and a discriminator, wherein the generator is an acoustic model in a parameter synthesis system, and the goal is to generate feature parameters that approximate natural speech; and the role of the discriminator is to evaluate the similarity between the acoustic features output by the generator and the real acoustic features, and pass them to the generator in the form of gradients, thereby adjusting the generation network to make the output acoustic features closer to natural speech; the network structure of the generative adversarial network can effectively alleviate the problem of over-smoothing of acoustic feature parameters caused by parameter synthesis, thereby making the synthesized speech more real and natural.

[0077] See also Figure 3 As shown, in the embodiment of the present invention, the step of inputting the random text into a generator in a pre-constructed generative adversarial network to obtain an initial speech signal includes:

[0078] S31, converting the random text into random text features;

[0079] S32, using the generator to upsample and residual connect the random text features to obtain convolution features;

[0080] S33, normalizing the convolution feature to obtain an initial speech signal.

[0081] In the embodiment of the present invention, converting the random text into random text features is similar to the step of performing feature analysis on the text input to obtain audio features in S1, and will not be described in detail here.

[0082] In an embodiment of the present invention, random text features are upsampled and residually connected, which can be calculated by a convolution module composed of multiple upsampling and residual blocks; wherein, the upsampling can make the upsampling dimension reach the dimension in the audio time domain, and the above-mentioned residual block can be a residual block of a specific void convolution, so that the output activation of each subsequent layer far in time has obvious overlapping input; the receptive field of the void convolution layer increases exponentially with the increase in the number of layers, which can effectively increase the inductive field of each output time step, and there is a large overlap in the inductive fields of time steps far apart, thereby leading to better long-range correlation; the residual block can be composed of 3 void convolution blocks, each of which is composed of two convolution layers.

[0083] In an embodiment of the present invention, weight normalization can be used to normalize the convolutional features, which avoids limiting the space of the discriminator or normalizing the activation. The weight matrix is ​​simply reconfigured by decoupling the scale of the weight vector from the direction, which has better training dynamics.

[0084] In an optional embodiment of the present invention, the step of inputting the random text into a generator in a pre-constructed generative adversarial network to obtain an initial speech signal includes:

[0085] Converting the random text into random text features;

[0086] mapping the random text features to vocoder parameters using the generator;

[0087] Reconstructing the vocoder parameters to obtain reconstructed parameters;

[0088] A speech waveform is constructed according to the reconstruction parameters, and a speech signal is generated according to the speech waveform.

[0089] S3, using the discriminator in the generative adversarial network to perform loss assessment on the audio features and the initial speech features;

[0090] In the embodiment of the present invention, the discriminator adopts the WAVE U-NET structure, which can enable features to be quickly and fully extracted in the entire network to obtain richer information; the discriminator has a complete UNET framework, and has an encoder and a decoder. Based on the RESBLOCK (residual structure) in the discriminator, it can have a faster training speed to greatly improve the speed of speech synthesis.

[0091] In the embodiment of the present invention, the step of using the discriminator in the generative adversarial network to perform loss assessment on the audio features and the initial speech features includes:

[0092] Using the discriminator to calculate the audio feature and the initial speech feature respectively, to obtain a first parameter feature and a second parameter feature;

[0093] A loss value is calculated according to the discriminator, the first parameter feature, and the second parameter feature.

[0094] In an embodiment of the present invention, the discriminator includes multiple grouped convolutions, and the convolution kernel of the grouped convolution can adopt a larger kernel (such as 41×41) while maintaining a small number of parameters, which can ensure the capture of high-frequency structures in the audio. It has fewer parameters, runs faster, and can also be applied to audio sequences of variable lengths. Similar to the above-mentioned generator, weight normalization can be used in all layers of the discriminator.

[0095] In an embodiment of the present invention, Hinge loss can be used as the loss of the generative adversarial network. The discriminant loss of the discriminator and the generation loss of the generator can be obtained through loss calculation. The discriminant loss and the generation loss are used to optimize the discriminator and the generator, and to determine whether the optimization of the discriminator and the generator is stopped.

[0096] S4. If the loss evaluation does not meet the preset conditions, the generator and the discriminator are optimized according to the result of the loss evaluation to obtain a target generative adversarial network;

[0097] In the embodiment of the present invention, the preset condition may be a loss threshold, wherein the loss thresholds for the discriminant loss of the discriminator and the generation loss of the generator may be different.

[0098] In an embodiment of the present invention, the AdaGrad algorithm, the Adam algorithm, etc. can be used to optimize the generator and the discriminator; the AdaGrad algorithm significantly updates the sparse parameters and slightly updates the frequent parameters by adjusting the appropriate learning rate; the Adam algorithm dynamically adjusts the learning rate of each parameter using the first-order moment estimation and the second-order moment estimation of the gradient to achieve the optimization of the network parameters; after the bias correction of the Adam algorithm, the learning rate of each iteration has a certain range, so that the network parameters are relatively stable.

[0099] In an embodiment of the present invention, the number of times the generator and the discriminator are optimized is determined by the discriminator's loss assessment of the audio features and the language signal generated by the optimized generator. After the loss assessment meets the preset conditions, the step of optimizing the generator and the discriminator is stopped.

[0100] S5, using the generator in the target generative adversarial network to calculate the random text to obtain a target speech signal;

[0101] In an embodiment of the present invention, the step of using the generator in the target generative adversarial network to calculate the random text to obtain the target speech signal is similar to the step of inputting the random text into the generator in the pre-constructed generative adversarial network in S2 to obtain the initial speech signal, which will not be elaborated here.

[0102] S6. Perform voice reading on the target voice signal to obtain a playable voice.

[0103] In the embodiment of the present invention, the step of performing voice reading on the target voice signal to obtain a playable voice includes:

[0104] Extracting characteristic parameters of the target speech signal;

[0105] Encoding and encrypting the characteristic parameters to obtain encoded parameters;

[0106] Transmitting the encoding parameters using a preset vocoder channel;

[0107] The speech waveform is restored according to the characteristic parameters received through the channel.

[0108] In the embodiment of the present invention, by compressing and encoding the voice signal through a vocoder, redundancy in the voice information can be removed, and the transmission bit rate or storage space can be reduced.

[0109] In the embodiment of the present invention, the analysis of the speech signal can be carried out in the frequency domain, and the spectrum analysis of the speech signal can be performed to distinguish between unvoiced and voiced sounds, and measure the fundamental frequency of the voiced sounds. Then, the unvoiced-voiced judgment, the fundamental frequency of the voiced sounds and the spectrum envelope are selected as feature parameters for transmission; the analysis can also be carried out in the time domain, and its periodicity can be used to extract some parameters for linear prediction, or correlation analysis can be performed on the speech signal.

[0110] The embodiment of the present invention performs feature analysis on text input and random text, and calculates speech signals according to a generative adversarial network, thereby realizing speech synthesis. The generative adversarial network structure reduces the demand for computing and storage resources; the generator in the generative adversarial network calculates speech signals, thereby improving the accuracy of speech synthesis; based on the evaluation of the discriminator and the loss optimization, the accuracy and efficiency of the speech generated by the generator are improved. Therefore, the speech synthesis method based on the generative adversarial network proposed in the present invention can solve the problems of low quality of generated speech and low synthesis efficiency.

[0111] like Figure 4 , is a functional module diagram of a speech synthesis device based on a generative adversarial network provided by one embodiment of the present invention.

[0112] The speech synthesis device 100 based on the generative adversarial network of the present invention can be installed in an electronic device. According to the functions implemented, the speech synthesis device 100 based on the generative adversarial network can include a text input analysis module 101, a generator first processing module 102, a discriminator processing module 103, an adversarial network optimization module 104, a generator second processing module 105 and a playable speech generation module 106. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0113] In this embodiment, the functions of each module / unit are as follows:

[0114] The text input analysis module 101 is used to obtain text input, perform feature analysis on the text input, and obtain audio features;

[0115] The generator first processing module 102 is used to obtain random text and input the random text into the generator in the pre-built generative adversarial network to obtain an initial speech signal;

[0116] The discriminator processing module 103 is used to use the discriminator in the generative adversarial network to perform loss assessment on the audio features and the initial speech features;

[0117] The adversarial network optimization module 104 is used to optimize the generator and the discriminator according to the loss evaluation result to obtain a target generative adversarial network when the loss evaluation does not meet the preset conditions;

[0118] The generator second processing module 105 is used to calculate the random text using the generator in the target generative adversarial network to obtain a target speech signal;

[0119] The playable speech generating module 106 is used to perform speech reading on the target speech signal to obtain a playable speech.

[0120] In detail, the modules described in the speech synthesis device 100 based on the generative adversarial network described in the embodiment of the present invention adopt the same technical means as the speech synthesis method based on the generative adversarial network described in the accompanying drawings when used, and can produce the same technical effects, which will not be repeated here.

[0121] like Figure 5 , is a schematic diagram of the structure of an electronic device for implementing a speech synthesis method based on a generative adversarial network provided by an embodiment of the present invention.

[0122] The electronic device 1 may include a processor 10, a memory 11, a communication bus 12, and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a speech synthesis program based on a generative adversarial network.

[0123] In some embodiments, the processor 10 may be composed of an integrated circuit, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips. The processor 10 is the control core (ControlUnit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (for example, executing a speech synthesis program based on a generative adversarial network, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device and process data.

[0124] The memory 11 includes at least one type of readable storage medium, and the readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a magnetic memory, a disk, an optical disk, etc. In some embodiments, the memory 11 may be an internal storage unit of an electronic device, such as a mobile hard disk of the electronic device. In other embodiments, the memory 11 may also be an external storage device of an electronic device, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device. Further, the memory 11 may also include both an internal storage unit of the electronic device and an external storage device. The memory 11 can not only be used to store application software and various types of data installed in the electronic device, such as the code of a speech synthesis program based on a generative adversarial network, but also be used to temporarily store data that has been output or is to be output.

[0125] The communication bus 12 may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0126] The communication interface 13 is used for communication between the above-mentioned electronic device and other devices, including a network interface and a user interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device and other electronic devices. The user interface may be a display (Display), an input unit (such as a keyboard (Keyboard)), and optionally, the user interface may also be a standard wired interface, a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode, organic light-emitting diode) touch device, etc. Among them, the display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device and to display a visual user interface.

[0127] Figure 5 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5 The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0128] For example, although not shown, the electronic device may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components. The electronic device may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0129] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0130] The speech synthesis program based on the generative adversarial network stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0131] Obtaining text input, performing feature analysis on the text input, and obtaining audio features;

[0132] Obtaining random text, and inputting the random text into a generator in a pre-built generative adversarial network to obtain an initial speech signal;

[0133] Using the discriminator in the generative adversarial network to perform loss assessment on the audio features and the initial speech features;

[0134] If the loss evaluation does not meet the preset conditions, the generator and the discriminator are optimized according to the result of the loss evaluation to obtain a target generative adversarial network;

[0135] Utilizing the generator in the target generative adversarial network to calculate the random text, to obtain a target speech signal;

[0136] The target voice signal is voice read to obtain a playable voice.

[0137] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to the description of the relevant steps in the corresponding embodiment of the accompanying drawings, which will not be repeated here.

[0138] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0139] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0140] Obtaining text input, performing feature analysis on the text input, and obtaining audio features;

[0141] Obtaining random text, and inputting the random text into a generator in a pre-built generative adversarial network to obtain an initial speech signal;

[0142] Using the discriminator in the generative adversarial network to perform loss assessment on the audio features and the initial speech features;

[0143] If the loss evaluation does not meet the preset conditions, the generator and the discriminator are optimized according to the result of the loss evaluation to obtain a target generative adversarial network;

[0144] Utilizing the generator in the target generative adversarial network to calculate the random text, to obtain a target speech signal;

[0145] The target voice signal is voice read to obtain a playable voice.

[0146] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0147] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0148] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0149] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0150] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0151] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Among them, artificial intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0152] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

[0153] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A speech synthesis method based on a generative adversarial network, characterized in that: The method comprises: Obtaining text input, performing feature analysis on the text input, and obtaining audio features; Obtaining random text, and inputting the random text into a generator in a pre-built generative adversarial network to obtain an initial speech signal; Using the discriminator in the generative adversarial network to perform loss assessment on the audio features and the initial speech features; If the loss evaluation does not meet the preset conditions, the generator and the discriminator are optimized according to the result of the loss evaluation to obtain a target generative adversarial network; Utilizing the generator in the target generative adversarial network to calculate the random text, to obtain a target speech signal; The target voice signal is voice read to obtain a playable voice.

2. The speech synthesis method based on generative adversarial network according to claim 1, characterized in that: The performing feature analysis on the text input to obtain audio features includes: Performing attribute analysis on the text input to obtain multi-source attributes; generating a basic unit of speech according to the multi-source attributes; Perform feature mapping on the basic speech unit to obtain audio features.

3. The speech synthesis method based on generative adversarial network as claimed in claim 2, characterized in that: The performing attribute analysis on the text input to obtain multi-source attributes includes: Predicting the duration of the text input to obtain a predicted duration; Performing phoneme extraction on the text input to obtain text phonemes; Perform keyword screening on the text input to obtain text keywords; The predicted duration, the text phonemes and the text keywords are used as multi-source attributes.

4. The speech synthesis method based on generative adversarial network according to claim 1, characterized in that: The step of inputting the random text into a generator in a pre-constructed generative adversarial network to obtain an initial speech signal comprises: Converting the random text into random text features; Using the generator to upsample and residual connect the random text features to obtain convolution features; The convolution feature is normalized to obtain an initial speech signal.

5. The speech synthesis method based on generative adversarial network according to claim 1, characterized in that: The step of inputting the random text into a generator in a pre-constructed generative adversarial network to obtain an initial speech signal comprises: Converting the random text into random text features; mapping the random text features to vocoder parameters using the generator; Reconstructing the vocoder parameters to obtain reconstructed parameters; A speech waveform is constructed according to the reconstruction parameters, and a speech signal is generated according to the speech waveform.

6. The speech synthesis method based on generative adversarial network according to claim 1, characterized in that: The using the discriminator in the generative adversarial network to perform loss evaluation on the audio features and the initial speech features includes: Using the discriminator to calculate the audio feature and the initial speech feature respectively, to obtain a first parameter feature and a second parameter feature; A loss value is calculated according to the discriminator, the first parameter feature, and the second parameter feature.

7. The speech synthesis method based on a generative adversarial network according to any one of claims 1 to 6, characterized in that: The step of performing voice reading on the target voice signal to obtain a playable voice includes: Extracting characteristic parameters of the target speech signal; Encoding and encrypting the characteristic parameters to obtain encoded parameters; Transmitting the encoding parameters using a preset vocoder channel; The speech waveform is restored according to the characteristic parameters received through the channel.

8. A speech synthesis device based on a generative adversarial network, characterized in that: The device comprises: A text input analysis module, used to obtain text input, perform feature analysis on the text input, and obtain audio features; The first processing module of the generator is used to obtain random text and input the random text into the generator in the pre-built generative adversarial network to obtain an initial speech signal; A discriminator processing module, used for performing loss assessment on the audio features and the initial speech features using the discriminator in the generative adversarial network; An adversarial network optimization module, used for optimizing the generator and the discriminator according to the result of the loss evaluation to obtain a target generative adversarial network when the loss evaluation does not meet the preset conditions; A generator second processing module, used to calculate the random text using the generator in the target generative adversarial network to obtain a target speech signal; The playable speech generation module is used to perform speech reading on the target speech signal to obtain a playable speech.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the speech synthesis method based on a generative adversarial network as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the speech synthesis method based on a generative adversarial network as described in any one of claims 1 to 7 is implemented.