Voice editing method and apparatus, and storage medium and electronic apparatus
Through voice mask processing in voice editing technology, the problem of poor voice editing fluency and realism caused by mismatch between model training and testing is solved, and a more efficient voice editing effect is achieved.
Patent Information
- Application Number
- PCT/CN2024/074070
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-03-20
- Filing Date
- 2024-01-25
- Publication Date
- 2024-09-26
AI Technical Summary
In existing voice editing technology, the mismatch between model training and model testing results in poor fluency and realism of voice editing results, and there is a lack of effective solutions.
By voice masking the original audio before voice editing, the voice editing training and testing goals are unified, the voice masking technology is used to locally modify the part of the audio to be edited, and the target text and masked audio are used for voice editing to generate the target Audio.
It improves the fluency and realism of the voice editing results, solves the problem of poor voice editing results caused by mismatch between training and testing, and achieves smoother and more realistic audio splicing.
Smart Images

Figure CN2024074070_26092024_PF_FP
Abstract
Description
Voice editing method, device, storage medium and electronic device
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This disclosure claims priority to Chinese patent application number 202310299825.7, filed on March 20, 2023, entitled “Voice Editing Method, Device, Storage Medium and Electronic Device”, the entire contents of which are incorporated by reference into this disclosure. Technical Field
[0003] The present disclosure relates to computer technology and artificial intelligence technology, and in particular to a voice editing method, device, storage medium, and electronic device. Background Art
[0004] With the development of deep learning, speech synthesis and text-based speech editing technologies have made significant progress. However, the speech editing methods provided by related technologies often suffer from a mismatch between model training and model testing, resulting in poor fluency and realism in the speech editing results.
[0005] To address the above-mentioned problems, no effective solutions have been proposed so far.
[0006] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute relevant technology known to ordinary technicians in the field.
[0007] Summary of the Invention
[0008] At least some embodiments of the present disclosure provide a voice editing method, device, storage medium, and electronic device to at least solve the technical problem that the voice editing methods provided in the related art have a mismatch between training and testing, resulting in low fluency and poor realism in the voice editing results.
[0009] According to one embodiment of the present disclosure, a speech editing method is provided, comprising: obtaining original audio and target text to be processed, wherein the target text is used to determine text content to be edited into the original audio; performing speech masking on the portion of the audio to be edited in the original audio to obtain a first masked audio; and performing speech editing on the target text and the first masked audio to obtain the target audio.
[0010] According to one embodiment of the present disclosure, another voice editing method is provided, in which a graphical user interface is provided through a terminal device, and the content displayed by the graphical user interface includes a voice editing control. The voice editing method includes: in response to a trigger operation performed on the voice editing control, a voice editing interface pops up; in response to an input operation performed on the voice editing interface, original audio and target text are imported, wherein the target text is used to determine the text content to be edited into the original audio; in response to an editing operation performed on the voice editing interface, a portion of audio to be edited is selected from the original audio; in response to a play operation performed on the voice editing interface, the target audio is played in a game scene, wherein the target audio is obtained by voice editing the target text and the masked audio, and the masked audio is obtained by voice masking the portion of audio to be edited.
[0011] According to one embodiment of the present disclosure, a model training method is also provided, including: obtaining training audio and training text to be processed, wherein the training text is used to determine the text content to be edited into the training audio; performing voice masking on the portion of the audio to be edited in the training audio to obtain masked training audio; using the masked training audio and training text to train an initial voice editing model to obtain a target voice editing model, wherein the target voice editing model is used to perform voice editing on the target text and the masked original audio to obtain the target audio, and the masked original audio is obtained by performing voice masking on the portion of the audio to be edited in the original audio.
[0012] According to one embodiment of the present disclosure, a speech editing device is also provided, including: an acquisition module for acquiring the original audio and target text to be processed, wherein the target text is used to determine the text content to be edited into the original audio; a masking module for performing speech masking on the audio portion to be edited in the original audio to obtain a first masked audio; and an editing module for performing speech editing on the target text and the first masked audio to obtain the target audio.
[0013] According to one embodiment of the present disclosure, a computer-readable storage medium is further provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned speech editing method or model training method when running.
[0014] According to one embodiment of the present disclosure, an electronic device is also provided, including: a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the above-mentioned voice editing method or model training method.
[0015] In at least some embodiments of the present application, by obtaining the original audio and target text to be processed, wherein the target text is used to determine the text content to be edited into the original audio; a first masked audio is obtained by voice masking the audio to be edited in the original audio; and the target text and the first masked audio are further voice edited to obtain the target audio, thereby achieving the purpose of first voice masking the original audio to be voice edited and then voice editing to obtain the target audio, thereby achieving the technical effect of improving the fluency and realism of the voice editing results, and further solving the technical problem of the voice editing method provided in the related art that the training and test do not match, resulting in low fluency and poor realism of the voice editing results. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The drawings described herein are used to provide a further understanding of the present disclosure and constitute a part of the present disclosure. The exemplary embodiments of the present disclosure and their descriptions are used to explain the present disclosure and do not constitute an improper limitation of the present disclosure. In the drawings:
[0017] FIG1 is a hardware structure block diagram of a mobile terminal according to a voice editing method according to one embodiment of the present disclosure;
[0018] FIG2 is a flow chart of a voice editing method according to one embodiment of the present disclosure;
[0019] FIG3 is a schematic diagram of an optional voice editing process according to one embodiment of the present disclosure;
[0020] FIG4 is a schematic diagram of an optional acoustic feature extraction process according to one embodiment of the present disclosure;
[0021] FIG5 is a flow chart of an optional voice editing method according to one embodiment of the present disclosure;
[0022] FIG6 is a schematic diagram of an optional voice editing method on a cloud server according to one embodiment of the present disclosure;
[0023] FIG7 is a flow chart of another voice editing method according to one embodiment of the present disclosure;
[0024] FIG8 is a flow chart of a model training method according to one embodiment of the present disclosure;
[0025] FIG9 is a structural block diagram of a voice editing device according to one embodiment of the present disclosure;
[0026] FIG10 is a structural block diagram of an optional voice editing device according to one embodiment of the present disclosure;
[0027] FIG11 is a schematic diagram of an electronic device according to one embodiment of the present disclosure. DETAILED DESCRIPTION
[0028] In order to enable those skilled in the art to better understand the solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the embodiments described are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present disclosure.
[0029] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that the numbers used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily 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 devices.
[0030] It should be noted that, in the specification of the present disclosure, the word "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present disclosure is not necessarily to be construed as being more preferred or advantageous than other embodiments. In order to enable any person skilled in the art to implement and use the present disclosure, the following description is given. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present disclosure can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present disclosure with unnecessary details. Therefore, the present disclosure is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present disclosure.
[0031] In the process of describing the embodiments of the present disclosure, some nouns or terms appearing in the description are subject to the following interpretations:
[0032] Text-to-Speech (TTS) technology uses a text-to-speech algorithm to convert text data into human voice audio. TTS can be used to generate virtual human voices with specific vocal cavities, emotions, and characteristics based on existing voice libraries.
[0033] Voice editing refers to the processing and modification of speech to achieve the required format and quality. Voice editing can include: processing voice files (such as replacement, deletion, insertion, cutting, concatenation, and calibration); changing sound characteristics (such as enhancing low frequencies or amplitude, reducing background noise, etc.); and setting expression tags (including location, annotations, and unit names). The above voice editing can help understand the specific voices or instruments used in the work.
[0034] With the development of deep learning, speech synthesis and text-based speech editing technologies have made significant progress. However, speech editing methods provided by related technologies often suffer from a mismatch between model training and model testing, resulting in poor fluency and realism in the resulting speech editing. Prior to this disclosure, no effective solution to this problem had been proposed in the related art.
[0035] In a possible implementation of the present disclosure, the inventors have found, after practice and careful research, that the voice editing methods commonly used in application scenarios involving voice editing in the fields of computer technology and artificial intelligence technology still have technical problems such as low fluency and poor realism in voice editing results. Based on this, the game scenarios applied to the embodiments of the present disclosure can be any application scenarios involving voice synthesis or voice editing in the fields of computer technology or artificial intelligence technology, and the game types targeted can be action, adventure, simulation, role-playing, and leisure games, etc.
[0036] The disclosed embodiment proposes a speech editing method, which adopts the technical concept of performing speech masking on the original audio before speech editing to unify the speech editing training objectives and test objectives, thereby achieving the technical effect of improving the fluency and realism of the speech editing results, and thus solving the technical problem that the speech editing methods provided in the related art have a mismatch between training and testing, resulting in low fluency and poor realism of the speech editing results.
[0037] The above-mentioned method embodiments involved in the present disclosure can be executed in a terminal device (e.g., a mobile terminal, a computer terminal, or a similar computing device). Taking running on a mobile terminal as an example, the mobile terminal can be a smartphone, a tablet computer, a PDA, a mobile Internet device, a game console, or other terminal device.
[0038] FIG1 is a hardware block diagram of a mobile terminal for a voice editing method according to one embodiment of the present disclosure. As shown in FIG1 , the mobile terminal may include one or more (only one is shown in FIG1 ) processors 102, a memory 104, a transmission device 106, an input / output device 108, and a display device 110. Taking the voice editing method applied to an electronic game scene through the mobile terminal as an example, the processor 102 calls and runs a computer program stored in the memory 104 to execute the voice editing method, and the generated target audio is transmitted to the input / output device 108 and / or the display device 110 via the transmission device 106, and the target audio is then provided to the player.
[0039] Still as shown in Figure 1, the processor 102 may include but is not limited to: a central processing unit (CPU), a graphics processing unit (GPU), a digital signal processing (DSP) chip, a microcontroller unit (MCU), a programmable logic device (Field Programmable Gate Array, FPGA), a neural network processor (NPU), a tensor processing unit (TPU), an artificial intelligence (AI) type processor, and other processing devices.
[0040] Those skilled in the art will appreciate that the structure shown in FIG1 is merely illustrative and does not limit the structure of the mobile terminal. For example, the mobile terminal may include more or fewer components than shown in FIG1 , or have a configuration different from that shown in FIG1 .
[0041] In some optional embodiments mainly based on gaming scenarios, the above-mentioned terminal device can also provide a human-computer interaction interface with a touch-sensitive surface, which can sense finger contact and / or gestures to perform human-computer interaction with a graphical user interface (GUI). The human-computer interaction function may include the following interactions: creating web pages, drawing, word processing, making electronic documents, games, video conferencing, instant messaging, sending and receiving emails, call interface, playing digital videos, playing digital music and / or web browsing, etc. The executable instructions for executing the above-mentioned human-computer interaction functions are configured / stored in a computer program product or readable storage medium executable by one or more processors.
[0042] The above-mentioned method embodiments involved in the present disclosure can also be executed in a server. Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. Taking the application of the voice editing method to an electronic game scene through an electronic game server as an example, the electronic game server can obtain the target audio in the electronic game scene based on the voice editing method, and provide the target audio to the player (for example, it can be rendered and displayed on the display screen of the player's terminal, or provided to the player through holographic projection, etc.).
[0043] According to one embodiment of the present disclosure, an embodiment of a voice editing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0044] In this embodiment, a voice editing method running on the above-mentioned terminal device is provided. FIG2 is a flow chart of a voice editing method according to one embodiment of the present disclosure. As shown in FIG2 , the method includes the following steps:
[0045] Step S21 , obtaining the original audio to be processed and the target text, wherein the target text is used to determine the text content to be edited into the original audio.
[0046] The voice editing method provided by the present disclosure can be applied to, but is not limited to, the following application scenarios: electronic games (for example, editing the original audio corresponding to game characters or game scenes), voice navigation systems (for example, used in automated equipment such as cars and robots to convert text into voice prompts to the user's current location and operation steps), digital telephone services (for example, in voice calls, online chats, intelligent customer service, etc., quickly converting text into voice as part of digital customer service), intelligent virtual assistants, technical education and lectures (for example, quickly generating corresponding audio from text information in slides for lectures), and audiobooks / news / advertisements (for example, quickly generating audio content from text content).
[0047] The above-mentioned original audio is the audio data to be processed in the above-mentioned application scenario. The above-mentioned target text is the text content to be edited into the original audio in the above-mentioned application scenario. The above-mentioned voice editing method of the embodiment of the present disclosure can be run on the client. The above-mentioned designation can be specified by the user through the client, or it can be specified by a computer application running on the client generating a control instruction according to the scenario requirements. In addition, the above-mentioned voice editing method of the embodiment of the present disclosure can also be run on the server, which can be an independent server, a server cluster or a cloud server. In particular, when the above-mentioned method is run on the cloud server, it interacts with the client in the form of Software as a Service (SaaS), obtains the original audio and target text sent by the client, and then performs corresponding voice editing, and then returns the voice editing result to the client.
[0048] Step S22, performing voice masking on the portion of the original audio to be edited to obtain a first masked audio;
[0049] To address speech synthesis or speech editing issues, the speech editing model employed in the speech editing process of the present disclosure incorporates a masked training strategy, compared to speech synthesis models employed in related technologies. This strategy converts the speech synthesis model used to address speech synthesis or speech editing issues into a speech editing model. This speech editing model, incorporating a masked training strategy, maintains consistent objectives during the model training and model testing (or model application) phases, thereby improving the speech editing performance of the speech editing model.
[0050] Specifically, the voice masking technique is used to locally modify the portion of the original audio to be edited. This localized audio editing method can include at least one of replacement, deletion, and insertion. Specifically, the portion of audio to be edited can be any audio segment selected by the user from the original audio. Voice masking technology is used to erase the original audio content corresponding to the portion to be edited from the original audio, while retaining the remaining contextual audio content in the original audio.
[0051] Step S23: performing voice editing on the target text and the first masked audio to obtain the target audio.
[0052] The aforementioned voice editing of the target text and the first masked audio can involve voice editing the first masked audio according to the text content to be edited into the original audio, as determined by the target text. The target audio obtained using this approach exhibits superior fluency and realism compared to voice editing results from related technologies.
[0053] Taking the scenario where an intelligent virtual assistant performs voice editing on a user's original voice as an example, the technical solution of the above method in the embodiment of the present disclosure is further introduced. For example, the above method is run on a client corresponding to the intelligent virtual assistant.
[0054] The client records the original voice to be voice edited by the user (that is, obtains the original audio), and obtains the target text input by the user, and determines the text content to be edited into the original audio based on the target text. In one optional implementation according to an embodiment of the present disclosure, the content of the original voice to be voice edited recorded by the original audio is "voice editing based on deep learning", and the text content determined by the target text is "machine learning". The voice editing requirement in the above scenario is: replace "deep learning" in the original audio with "machine learning". In other words, the audio part to be edited in the original audio is the audio corresponding to "deep learning".
[0055] In at least some embodiments of the present disclosure, by obtaining the original audio and target text to be processed, wherein the target text is used to determine the text content to be edited into the original audio; a first masked audio is obtained by voice masking the audio to be edited in the original audio; and the target text and the first masked audio are further voice edited to obtain the target audio, thereby achieving the purpose of first voice masking the original audio to be voice edited and then voice editing to obtain the target audio, thereby achieving the technical effect of improving the fluency and realism of the voice editing results, and further solving the technical problem of the voice editing method provided in the related art that the training and test do not match, resulting in low fluency and poor realism of the voice editing results.
[0056] In an exemplary application scenario, the original audio may be the original game audio to be used in a game application (APP), and the first masked audio may be the masked game audio. Specifically, voice masking may be performed on the portion of the original game audio to be used in the game application to be edited to obtain the masked game audio, and voice editing may be performed on the game content text to be used in the game application and the masked game audio to obtain the target game audio.
[0057] In existing game scenarios, non-player characters (NPCs) typically use pre-recorded fixed audio to interact with player characters controlled by the gamer. For example, when a gamer clicks on an NPC, the NPC typically plays "Welcome our great warriors here!" In this case, no matter which player clicks on the NPC, they will receive the same response. To enhance the game interaction experience within the game scenario, the technical solution proposed in this disclosure can be applied to add the player character's name to the original game audio. Specifically, the portion of the original game audio "Welcome our great warriors here!" to be edited, "Warriors are here," is voice-masked to produce the masked game audio "Welcome our great [XXXX] here!" Then, the game content text (the warrior player character's name is here) to be used in the game application and the masked game audio "Welcome our great [XXXX] here!" are voice-edited to produce the target game audio "Welcome our great [Warrior player character's name is here] here!" This allows personalized audio to be played for different game players.
[0058] In another exemplary application scenario, the original audio may be original multimedia dubbing to be used in a dubbing application (e.g., dubbing of a film or TV series, dubbing of anime, etc.), and the first masked audio may be masked multimedia dubbing. Specifically, voice masking may be performed on the portion of the dubbing to be edited in the original multimedia dubbing to be used in the dubbing application to obtain the masked multimedia dubbing, and voice editing may be performed on the dubbing content text and the masked multimedia dubbing to be used in the dubbing application to obtain the target multimedia dubbing.
[0059] In existing dubbing scenes, voice actors sometimes find that some text is omitted in the original multimedia dubbing after completing dubbing according to the script of a film and television drama. At this point, if re-recording the entire dubbing will not only consume manpower and time, but also be difficult to ensure that the dubbing re-recorded will not be omitted again. For this reason, the above-mentioned technical scheme proposed by the present disclosure can be applied, in the above-mentioned original film and television drama dubbing, the omitted text in the script can be inserted. Specifically, to the original film and television drama dubbing to be used in the dubbing application "Well, let's go together!" The middle dubbing "let's go together" to be edited is voice masked, and after masking, multimedia dubbing "Well, [XXXX] go!", and to the dubbing content text to be used in the dubbing application (we will go together tomorrow) and the multimedia dubbing "Well, [XXXX] go!" Voice editing is performed to obtain the target multimedia dubbing "Well, let's go together tomorrow!". Thus, not only can the tedious work brought by repeating dubbing be effectively avoided, but also the dubbing defect existing in the original film and television drama dubbing can be corrected in time. Taking the scenario where an intelligent virtual assistant performs voice editing on a user's original voice as an example, the technical solution of the above method in the embodiment of the present disclosure is further introduced. For example, the above method is run on a client corresponding to the intelligent virtual assistant.
[0060] Optionally, in step S22, performing voice masking on the portion of the original audio to be edited to obtain a first masked audio may include the following steps:
[0061] Step S221, obtaining the position information of the audio portion to be edited in the original audio;
[0062] Step S222: Perform voice masking on the portion of the original audio to be edited based on the position information to obtain a first masked audio.
[0063] In an optional embodiment, the client obtains the aforementioned position information by comparing the original audio with the portion of audio to be edited. The position information may be determined by the position IDs of multiple phonemes of the portion of audio to be edited in the original speech corresponding to the original audio. Using the mask portion of the speech editing model, the portion of audio to be edited in the original audio is speech-masked based on the position information to obtain a first masked audio.
[0064] Taking the scenario of an intelligent virtual assistant performing voice editing on a user's original speech as an example, the purpose of voice masking the portion of the original audio to be edited is to extract it from the original audio. For example, if the audio corresponding to "deep learning" is removed from the original audio corresponding to "voice editing based on deep learning," the resulting first masked audio will correspond to "voice editing based on [XXXX]."
[0065] FIG3 is a schematic diagram of an optional voice editing process according to one embodiment of the present disclosure. As shown in FIG3 , after obtaining the original audio, the mask portion is used to perform masking processing on the original audio to obtain a first masked audio.
[0066] Continuing with the example of an intelligent virtual assistant performing voice editing on a user's original speech, the location information of "deep learning" in "voice editing based on deep learning" is determined. This location information can be the grapheme ID of the content corresponding to the portion of audio to be edited. Then, based on the scenario requirement of replacing "deep learning" in the original audio with "machine learning" and the aforementioned location information, the audio "deep learning" in the audio "voice editing based on deep learning" is voice-masked to obtain the audio "voice editing based on [XXXX]".
[0067] Optionally, in step S23, performing voice editing on the target text and the first masked audio to obtain the target audio may include the following steps:
[0068] Step S231, performing speech conversion on the target text to obtain intermediate audio;
[0069] Step S232: perform voice splicing on the intermediate audio and the first masked audio to obtain the target audio.
[0070] During the process of voice-editing the target text and the first masked audio to obtain the target audio, the target text can be voice-converted to obtain the intermediate audio. For example, if the text content determined by the target text is "machine learning," the intermediate audio obtained by voice-converting the target text is the audio segment corresponding to "machine learning." The first masked audio "voice editing based on XXXX" is then voice-concatenated with the intermediate audio, namely "machine learning," to obtain the target audio "voice editing based on machine learning."
[0071] Optionally, in step S231, performing speech conversion on the target text to obtain target audio may include the following steps:
[0072] Step S2311: performing voice editing on the target text and the first masked audio to obtain target acoustic features, wherein the target acoustic features are used to determine the audio segment corresponding to the target text;
[0073] Step S2312: Perform voice coding on the target acoustic features to obtain intermediate audio.
[0074] Still taking the scenario where the intelligent virtual assistant performs voice editing on the user's original voice as an example, voice editing is performed on "machine learning" and the audio "voice editing based on [XXXX]" to obtain the target acoustic features corresponding to "machine learning"; the target acoustic features corresponding to "machine learning" are voice-coded to obtain the audio "machine learning" (i.e., intermediate audio); the audio "machine learning" and the audio "voice editing based on [XXXX]" are spliced to obtain the target audio, and the target audio is "voice editing based on machine learning".
[0075] The purpose of the above audio splicing is: based on the corresponding position of "deep learning" in the original audio, the content of the target text "machine learning" is spliced with the content corresponding to the audio after the first mask "voice editing based on [XXXX]" to obtain the content corresponding to the target audio "voice editing based on machine learning".
[0076] As shown in Figure 3, speech editing is performed based on the target text and the first masked audio to obtain the target acoustic features, and then the target acoustic features are vocoded using a neural vocoder to obtain intermediate audio, and then the intermediate audio is spliced with the first masked audio to obtain the target audio.
[0077] Through steps S2311 and S2312, the speech editing method is used to generate target acoustic features corresponding to the target text, thereby obtaining intermediate audio. Because the first masked audio is obtained based on the positional information of the audio portion to be edited in the original audio, the target audio generated by concatenating the intermediate audio with the first masked audio can exhibit better speech fluency and realism.
[0078] Optionally, in step S2311, performing voice editing on the target text and the first masked audio to obtain target acoustic features may include the following steps:
[0079] Step S23111, converting the target text into graphemes to obtain a phoneme sequence;
[0080] Step S23112: Use the target speech editing model to perform speech editing on the phoneme sequence and the first masked audio to obtain target acoustic features, wherein the target speech editing model is obtained through deep learning training using multiple sets of data, and the multiple sets of data include: training audio and training text, and the training text is the text corresponding to the audio part to be edited in the training audio.
[0081] Still as shown in Figure 3, in the process of performing speech editing on the target text and the first masked audio to obtain the target acoustic features, first, the target text is converted from graphemes to phonemes using the conversion part to obtain the phoneme sequence corresponding to the target text. The above-mentioned conversion part is a graph to tree (G2T) conversion part, and the G2T conversion part is used to represent the target text (which can be a single sentence or multiple segmented sentences) as a grammatical tree through natural language processing technology. The above-mentioned phoneme sequence can correspond to multiple nodes of the grammatical tree. Then, the above-mentioned target speech editing model is a sequence-to-sequence speech editing part, which uses the sequence-to-sequence speech editing part to perform speech editing on the phoneme sequence and the first masked audio to obtain the target acoustic features.
[0082] It should be noted that the multiple sets of data used to train the target speech editing model can be historical speech editing results, that is, data obtained by speech editing specified training audio using the speech editing model in the application scenario. Each set of data includes training audio corresponding to training text.
[0083] Still taking the scenario where the intelligent virtual assistant performs voice editing on the user's original voice as an example, the target text "machine learning" is converted from graphemes to phonemes to obtain the phoneme sequence corresponding to "machine learning"; the target voice editing model is used to perform voice editing on the phoneme sequence corresponding to "machine learning" and the audio "voice editing based on [XXXX]" to obtain the target acoustic features.
[0084] Optionally, the voice editing method may further include the following steps:
[0085] Step S241, performing voice masking on the portion of the audio to be edited in the training audio to obtain a second masked audio;
[0086] Step S242: using the initial speech editing model to perform speech editing on the second masked audio and the training text to obtain predicted acoustic features;
[0087] Step S243, determining a target loss by comparing the predicted acoustic features with the actual acoustic features corresponding to the training text;
[0088] Step S244: update the parameters of the initial speech editing model using the target loss to obtain a target speech editing model.
[0089] During the training of the target speech editing model through steps S241 to S244, a target loss for model training is calculated based on the training audio and training text. This target loss is then used to optimize and update the model parameters of the initial speech editing model to obtain the target speech editing model. The loss function corresponding to the target loss can be any commonly used loss function, and the present disclosure does not limit the method for calculating the target loss.
[0090] Optionally, the target speech editing model includes: an encoder, a feature modifier, and a decoder. In step S23112, speech editing is performed on the phoneme sequence and the first masked audio using the target speech editing model to obtain target acoustic features, which may include the following execution steps:
[0091] Step S23113, using an encoder to perform text feature space encoding on the phoneme sequence to obtain text features;
[0092] Step S23114: Using a feature adjuster to perform feature adjustment on the text feature and the first masked audio to obtain a first auditory perception feature, wherein the first auditory perception feature is an auditory perception feature corresponding to the target text;
[0093] Step S23115: Use a decoder to acoustically decode the first auditory perception feature to obtain a target acoustic feature.
[0094] Figure 4 is a schematic diagram of an optional acoustic feature extraction process according to one embodiment of the present disclosure. As shown in Figure 4, the sequence-to-sequence speech editing part in the target speech editing model includes: an encoder, a feature adjuster and a decoder, wherein the decoder is an acoustic decoder. The above-mentioned encoder is used to perform text feature space encoding on the factor sequence corresponding to the target text to obtain text features, and the text features are simultaneously passed to the feature adjuster and the acoustic decoder. Then, the above-mentioned feature adjuster is used to perform feature adjustment on the text features and the first masked audio to obtain the first auditory perception feature, wherein the first auditory perception feature is the auditory perception feature corresponding to the target text. Further, the above-mentioned acoustic decoder is used to acoustically decode the text features and the first auditory perception feature to obtain the above-mentioned target acoustic features.
[0095] Specifically, the encoder maps the phoneme sequence to a high-dimensional text feature space through a nonlinear transformation to encode the text feature, thereby obtaining the text feature.
[0096] Specifically, the feature modifier performs feature prediction and feature adjustment based on the text features and the first masked audio using a nonlinear transformation prediction method to obtain the first auditory perception feature. Similarly, the acoustic decoder performs acoustic feature prediction on the text features and the first auditory perception feature using a nonlinear transformation prediction method to obtain the target acoustic feature.
[0097] Still taking the scenario where an intelligent virtual assistant performs voice editing on the user's original voice as an example, the encoder is used to encode the phoneme sequence corresponding to "machine learning" in the text feature space to obtain the text features corresponding to "machine learning"; the feature adjuster is used to perform feature adjustment on the text features corresponding to "machine learning" and the audio "voice editing based on [XXXX]" to obtain the auditory perception features corresponding to "machine learning" in the target text; the decoder is used to acoustically decode the auditory perception features corresponding to "machine learning" to obtain the target acoustic features.
[0098] Optionally, in step S23114, using a feature adjuster to perform feature adjustment on the text feature and the first masked audio to obtain a first auditory perception feature may include the following steps:
[0099] Step S23116: extracting a second auditory perception feature from the first masked audio, wherein the second auditory perception feature is an auditory perception feature corresponding to the context audio associated with the portion of audio to be edited in the original audio;
[0100] Step S23117: Use a feature adjuster to perform feature adjustment on the text feature and the second auditory perception feature to obtain the first auditory perception feature.
[0101] Still as shown in Figure 4, the above-mentioned feature adjuster can also obtain the first auditory perception feature through the following steps: extracting features from the audio after the first mask to obtain the second auditory perception feature. Use the feature adjuster to perform feature adjustment on the text feature and the second auditory perception feature to obtain the first auditory perception feature. Still taking the scenario in which the intelligent virtual assistant performs voice editing on the user's original voice as an example, the above-mentioned second auditory perception feature is the auditory perception feature corresponding to "voice editing based on [XXXX]", and the auditory perception feature includes at least: pitch feature, energy feature and duration feature. Use the feature adjuster to perform feature adjustment on the text feature of "machine learning" and the second auditory perception feature of "voice editing based on [XXXX]" to obtain the auditory perception feature corresponding to "machine learning" (i.e., the first auditory perception feature).
[0102] Optionally, the first auditory perception feature includes at least one of the following: a pitch corresponding to the target text; an energy corresponding to the target text; or a duration corresponding to the target text.
[0103] Still taking the scenario where an intelligent virtual assistant performs voice editing on the user's original voice as an example, the first auditory perception feature includes at least one of the following: pitch features, energy features, and duration features corresponding to the text content "machine learning" in the target text.
[0104] Taking the scenario where an intelligent virtual assistant performs voice editing on the user's original voice as an example, the voice editing methods corresponding to the scenario requirements of the voice editing scenario may include, in addition to the above-mentioned replacement method, insertion method and deletion method.
[0105] For example, let's consider the original audio recording of the speech to be edited, where the content is "speech editing based on deep learning." If the scenario requires inserting "technology" between "learning" and "of," the portion of the original audio to be edited serves as the context for the insertion location, i.e., "learning," and the target text corresponds to "learning technology." A similar replacement method is then used to perform speech editing on the target text and the first masked audio, yielding the target audio, which corresponds to "speech editing based on deep learning technology."
[0106] For example, let's consider the original audio recording of the voice to be edited, where the content is "deep learning-based voice editing." If the scenario requires deleting the "voice" after "deep learning," the portion of the original audio to be edited is the context at the deletion location, i.e., "voice editing," and the target text is "edited." A similar replacement method is then used to perform voice editing on the target text and the first masked audio, yielding the target audio. This target audio corresponds to "deep learning-based editing."
[0107] It is easy to understand that the speech editing method provided by the embodiment of the present disclosure introduces audio masking processing, which can unify the training objectives and test objectives in the speech editing process, so that the target audio obtained after editing the audio to be edited in the original audio (especially at the audio splicing position) has higher fluency and realism.
[0108] It is easy to understand that in the speech editing method provided by the embodiment of the present disclosure, through the audio masking mechanism, in the process of training the speech editing model, the original audio and the first masked audio corresponding to the original audio and the target audio are used as training samples for model training, thereby enabling the trained target speech editing model to predict the partial audio corresponding to the target text (i.e., the intermediate audio, i.e., the partial audio to be spliced to the first masked audio) based on the first masked audio. Therefore, the training phase of the above-mentioned target speech editing model is consistent with the goals of the testing phase (or scenario application phase), avoiding the problem of poor speech editing effect caused by the mismatch between the training goal and the testing goal of the model in the related art. In addition, the above-mentioned training process can also ensure smoother audio splicing.
[0109] One embodiment of the present disclosure further provides a voice editing method, which is executed on a cloud server. FIG5 is a flow chart of an optional voice editing method according to one embodiment of the present disclosure. As shown in FIG5 , the voice editing method includes:
[0110] Step S51, receiving the original audio to be processed and the target text from the client, wherein the target text is used to determine the text content to be edited into the original audio;
[0111] Step S52: performing voice masking on the portion of the original audio to be edited to obtain a first masked audio, and performing voice editing on the target text and the first masked audio to obtain a target audio;
[0112] Step S53: Feedback the target audio to the client.
[0113] Optionally, FIG6 is a schematic diagram of an optional voice editing on a cloud server according to one embodiment of the present disclosure. As shown in FIG6 , the client uploads the original audio and the target text to the cloud server, wherein the target text is used to determine the text content to be edited into the original audio; the cloud server performs voice masking on the audio to be edited in the original audio to obtain the first masked audio, and performs voice editing on the target text and the first masked audio to obtain the target audio. The cloud server then feeds back the target audio to the client, and the final target audio is provided to the user through the client's graphical user interface.
[0114] It should be noted that the above-mentioned voice editing method provided in the embodiment of the present disclosure can be applied to, but is not limited to, actual application scenarios such as voice navigation systems, digital telephone services, intelligent virtual assistants, technical education / lectures, and audio books / news / advertisements. The method uses the SaaS server and the client to interact, and the client provides the original audio and target text to the server. The server performs voice masking on the audio to be edited in the original audio to obtain the first masked audio, and voice edits the target text and the first masked audio to obtain the target audio. The server returns the target audio to the client and provides it to the user.
[0115] One embodiment of the present disclosure further provides another voice editing method, in which a graphical user interface is provided by a terminal device, and the content displayed by the graphical user interface includes a voice editing control. FIG7 is a flow chart of another voice editing method according to one embodiment of the present disclosure. As shown in FIG7 , the voice editing method includes:
[0116] Step S71, in response to a trigger operation performed on the voice editing control, a voice editing interface pops up;
[0117] Step S72, in response to an input operation performed on the voice editing interface, importing the original audio and the target text, wherein the target text is used to determine the text content to be edited into the original audio;
[0118] Step S73, in response to the editing operation performed on the voice editing interface, selecting a portion of the audio to be edited from the original audio;
[0119] Step S74, in response to the play operation performed on the voice editing interface, the target audio is played in the game scene, wherein the target audio is obtained by voice editing the target text and the masked audio, and the masked audio is obtained by voice masking the audio to be edited.
[0120] At least a voice editing control is displayed in the above-mentioned graphical user interface. The user triggers the voice editing control to pop up a voice editing interface in the above-mentioned graphical user interface. Furthermore, the user imports the original audio and target text to be voice-edited through the voice editing interface, wherein the target text is used to determine the text content to be edited to the original audio; and selects the part of the audio to be edited from the original audio, and then voice-edits the target text and the masked audio, and plays the target audio in the game scene.
[0121] The triggering, inputting, editing, and playing operations described above may all be touch operations, which may include single-point touch and multi-point touch. The touch operation for each touch point may include clicking, long pressing, pressing hard, swiping, etc. The triggering, inputting, editing, and playing operations described above may also be performed using input devices such as a mouse and keyboard.
[0122] The above-mentioned input operation corresponds to the first control or the first touch area in the graphical user interface (such as a typing box, a handwriting input area, an input button (for example, pressing and holding the button records and receives the user's voice)); the above-mentioned editing operation corresponds to the second control or the second touch area in the graphical user interface (such as an editing box, an editing option bar, etc.); the above-mentioned playback operation corresponds to the third control or the third touch area in the graphical user interface (such as a playback area, a play button, etc.).
[0123] In an optional embodiment, the above voice editing tool can be inserted into the game client, and a voice editing control can be provided in the graphical user interface. By performing a touch operation or a mouse click operation on the voice editing control, the game player can pop up a voice editing interface. In the voice editing interface, the game player can import the original game voice and the game content text to be used through an import control, and select the audio segment to be edited from the original game voice. For example, if the original game voice to be used is "Welcome our great warrior here!", the user can select the audio segment corresponding to "warrior here", or can also select the first character "勇" and the last character "到". Then, the game server can perform voice masking on the voice segment to be edited in the original game voice "Welcome our great warrior here!" to be used in the game application, and obtain the masked game voice "Welcome our great [XXXX] here!". Then, voice editing is performed on the game content text (warrior player character name comes) to be used in the game application and the masked game voice "Welcome our great [XXXX] here!" to obtain the target game voice "Welcome our great [warrior player character name comes] here!". Thus, personalized audio can be played for different game players. In summary, according to the voice editing scenario provided by the embodiments of the present disclosure, it is possible to interact with the user in a visual form, and generate corresponding target audio according to the user's input operation, editing operation and playback operation, which is beneficial to the application in the actual scenario.
[0124] In summary, according to the voice editing scenario provided by the embodiments of the present disclosure, it is possible to interact with the user in a visual form, and generate corresponding target audio according to the user's input operation, editing operation and playback operation, which is beneficial to the application in the actual scenario.
[0125] One embodiment of the present disclosure further provides a model training method. FIG. 8 is a flowchart of a model training method according to one embodiment of the present disclosure. As shown in FIG. 8, the model training method includes:
[0126] Step S81, obtaining the training audio and training text to be processed, where the training text is used to determine the text content to be edited into the training audio;
[0127] Step S82, performing voice masking on the audio segment to be edited in the training audio to obtain the masked training audio;
[0128] Step S83, training the initial voice editing model with the masked training audio and the training text to obtain a target voice editing model, where the target voice editing model is used to perform voice editing on the target text and the masked original audio to obtain the target audio, and the masked original audio is obtained by performing voice masking on the audio segment to be edited in the original audio.
[0129] During the training of the target speech editing model used to implement the above-described speech editing method, the model's corresponding input requirements and output targets remain consistent with those during model testing or application. Specifically, in the application scenario, the target speech editing model is used to perform speech editing based on the original audio and target text, obtaining masked audio, and then obtaining the target audio. Correspondingly, during the training process, speech masking is performed based on the training audio and training text to obtain masked audio, and then obtaining the target training audio, thereby optimizing the parameters of the initial speech editing model to obtain the target speech editing model.
[0130] It is easy to understand that in the speech editing method provided by the embodiment of the present disclosure, through the audio masking mechanism, in the process of training the speech editing model, the original audio and the first masked audio corresponding to the original audio and the target audio are used as training samples for model training, thereby enabling the trained target speech editing model to predict the partial audio corresponding to the target text (i.e., the intermediate audio, i.e., the partial audio to be spliced to the first masked audio) based on the first masked audio. Therefore, the training phase of the above-mentioned target speech editing model is consistent with the goals of the testing phase (or scenario application phase), avoiding the problem of poor speech editing effect caused by the mismatch between the training goal and the testing goal of the model in the related art. In addition, the above-mentioned training process can also ensure smoother audio splicing.
[0131] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the relevant technology, can be embodied in the form of a software product, which is stored in a storage medium (such as a disk or optical disk) and includes a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present disclosure.
[0132] In this embodiment, a voice editing device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details already described will not be repeated here. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.
[0133] Figure 9 is a structural block diagram of a voice editing device according to one embodiment of the present disclosure. As shown in Figure 9, the device includes: an acquisition module 901, used to acquire the original audio and target text to be processed, wherein the target text is used to determine the text content to be edited into the original audio; a masking module 902, used to voice mask the audio portion to be edited in the original audio to obtain a first masked audio; and an editing module 903, used to voice edit the target text and the first masked audio to obtain the target audio.
[0134] Optionally, the masking module 902 is further configured to: obtain position information of the audio portion to be edited in the original audio; and perform voice masking on the audio portion to be edited in the original audio based on the position information to obtain a first masked audio.
[0135] Optionally, the editing module 903 is further configured to: perform speech conversion on the target text to obtain an intermediate audio; and perform speech splicing on the intermediate audio and the first masked audio to obtain the target audio.
[0136] Optionally, the editing module 903 is further used to: perform voice editing on the target text and the first masked audio to obtain target acoustic features, wherein the target acoustic features are used to determine the audio segment corresponding to the target text; and perform voice coding conversion on the target acoustic features to obtain intermediate audio.
[0137] Optionally, the above-mentioned editing module 903 is also used to: convert the target text into graphemes to obtain a phoneme sequence; use the target speech editing model to perform speech editing on the phoneme sequence and the audio after the first mask to obtain target acoustic features, wherein the target speech editing model is obtained through deep learning training using multiple sets of data, and the multiple sets of data include: training audio and training text, and the training text is the text corresponding to the audio part to be edited in the training audio.
[0138] Optionally, Figure 10 is a structural block diagram of an optional speech editing device according to one embodiment of the present disclosure. As shown in Figure 10, in addition to all the modules shown in Figure 9, the device also includes: an update module 904, which is used to speech mask the part of the audio to be edited in the training audio to obtain a second masked audio; use the initial speech editing model to speech edit the second masked audio and the training text to obtain predicted acoustic features; determine the target loss by comparing the predicted acoustic features with the real acoustic features corresponding to the training text; and use the target loss to update the parameters of the initial speech editing model to obtain a target speech editing model.
[0139] Optionally, the above-mentioned editing module 903 is also used to: use an encoder to perform text feature space encoding on the phoneme sequence to obtain text features; use a feature adjuster to perform feature adjustment on the text features and the first masked audio to obtain a first auditory perception feature, wherein the first auditory perception feature is the auditory perception feature corresponding to the target text; use a decoder to acoustically decode the first auditory perception feature to obtain a target acoustic feature.
[0140] Optionally, the above-mentioned editing module 903 is also used to: extract a second auditory perception feature from the first masked audio, wherein the second auditory perception feature is an auditory perception feature corresponding to the context audio associated with the audio part to be edited in the original audio; use a feature adjuster to perform feature adjustment on the text feature and the second auditory perception feature to obtain the first auditory perception feature.
[0141] Optionally, in the above-mentioned speech editing device, the first auditory perception feature includes at least one of the following: the pitch corresponding to the target text; the energy corresponding to the target text; and the duration corresponding to the target text.
[0142] Optionally, the above-mentioned masking module 902 is also used to: voice mask the part of the voice to be edited in the original game voice to be used in the game application to obtain the masked game voice; voice edit the target text and the first masked audio to obtain the target audio, including: voice edit the game content text to be used in the game application and the masked game voice to obtain the target game voice.
[0143] Optionally, the masking module 902 is further used to: perform voice masking on the part of the dubbing to be edited in the original multimedia dubbing to be used in the dubbing application to obtain the masked multimedia dubbing; perform voice editing on the target text and the first masked audio to obtain the target audio, which includes: perform voice editing on the dubbing content text to be used in the dubbing application and the masked multimedia dubbing to obtain the target multimedia dubbing.
[0144] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.
[0145] An embodiment of the present disclosure further provides a computer-readable storage medium, in which a computer program is stored. The computer program is configured to execute the steps of any one of the above method embodiments when run.
[0146] Optionally, in this embodiment, the above-mentioned computer-readable storage medium may include but is not limited to: a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk, and other media that can store computer programs.
[0147] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.
[0148] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0149] S1, obtaining the original audio and target text to be processed, wherein the target text is used to determine the text content to be edited into the original audio;
[0150] S2, performing voice masking on the portion of the original audio to be edited to obtain a first masked audio;
[0151] S3, performing voice editing on the target text and the first masked audio to obtain the target audio.
[0152] Optionally, the above-mentioned computer-readable storage medium is also configured to store a computer program for executing the following steps: obtaining position information of the audio portion to be edited in the original audio; performing voice masking on the audio portion to be edited in the original audio based on the position information to obtain a first masked audio.
[0153] Optionally, the computer-readable storage medium is further configured to store a computer program for executing the following steps: performing speech conversion on the target text to obtain intermediate audio; and performing speech splicing on the intermediate audio and the first masked audio to obtain target audio.
[0154] Optionally, the above-mentioned computer-readable storage medium is also configured to store a computer program for executing the following steps: performing voice editing on the target text and the first masked audio to obtain target acoustic features, wherein the target acoustic features are used to determine the audio segment corresponding to the target text; performing voice coding conversion on the target acoustic features to obtain intermediate audio.
[0155] Optionally, the computer-readable storage medium is further configured to store a computer program for executing the following steps: performing grapheme-to-phoneme conversion on the target text to obtain a phoneme sequence; performing voice editing on the phoneme sequence and the first masked audio using a target voice editing model to obtain target acoustic features, wherein the target voice editing model is obtained through deep learning training using multiple sets of data, and the multiple sets of data include: training audio and training text, and the training text is the text corresponding to the audio portion to be edited in the training audio.
[0156] Optionally, the computer-readable storage medium is further configured to store a computer program for executing the following steps: performing speech masking on the portion of the audio to be edited in the training audio to obtain a second masked audio; performing speech editing on the second masked audio and the training text using the initial speech editing model to obtain predicted acoustic features; determining a target loss by comparing the predicted acoustic features with the actual acoustic features corresponding to the training text; and using the target loss to update the parameters of the initial speech editing model to obtain a target speech editing model.
[0157] Optionally, the above-mentioned computer-readable storage medium is also configured to store a computer program for performing the following steps: using an encoder to perform text feature space encoding on a phoneme sequence to obtain text features; using a feature adjuster to perform feature adjustment on the text features and the first masked audio to obtain a first auditory perception feature, wherein the first auditory perception feature is the auditory perception feature corresponding to the target text; using a decoder to acoustically decode the first auditory perception feature to obtain a target acoustic feature.
[0158] Optionally, the computer-readable storage medium is further configured to store a computer program for executing the following steps: extracting a second auditory perception feature from the first masked audio, wherein the second auditory perception feature is an auditory perception feature corresponding to the context audio associated with the audio portion to be edited in the original audio; and using a feature adjuster to perform feature adjustment on the text feature and the second auditory perception feature to obtain the first auditory perception feature.
[0159] Optionally, the computer-readable storage medium is further configured to store a computer program for executing the following steps: the first auditory perception feature includes at least one of the following: the pitch corresponding to the target text; the energy corresponding to the target text; the duration corresponding to the target text.
[0160] Optionally, the above-mentioned computer-readable storage medium is also configured to store a computer program for executing the following steps: voice masking the part of the voice to be edited in the original game voice to be used in the game application to obtain the masked game voice; voice editing the target text and the first masked audio to obtain the target audio, including: voice editing the game content text to be used in the game application and the masked game voice to obtain the target game voice.
[0161] Optionally, the above-mentioned computer-readable storage medium is also configured to store a computer program for executing the following steps: voice masking the part of the dubbing to be edited in the original multimedia dubbing to be used in the dubbing application to obtain the masked multimedia dubbing; voice editing the target text and the first masked audio to obtain the target audio, including: voice editing the dubbing content text to be used in the dubbing application and the masked multimedia dubbing to obtain the target multimedia dubbing.
[0162] Optionally, the computer-readable storage medium is further configured to store a computer program for executing the following steps: receiving original audio and target text to be processed from a client, wherein the target text is used to determine the text content to be edited into the original audio; performing voice masking on the portion of the audio to be edited in the original audio to obtain a first masked audio, and performing voice editing on the target text and the first masked audio to obtain a target audio; and feeding back the target audio to the client.
[0163] Optionally, the above-mentioned computer-readable storage medium is also configured to store a computer program for performing the following steps: in response to a trigger operation performed on a voice editing control, a voice editing interface pops up; in response to an input operation performed on the voice editing interface, the original audio and target text are imported, wherein the target text is used to determine the text content to be edited into the original audio; in response to an editing operation performed on the voice editing interface, a portion of the audio to be edited is selected from the original audio; in response to a play operation performed on the voice editing interface, the target audio is played in a game scene, wherein the target audio is obtained by voice editing the target text and the masked audio, and the masked audio is obtained by voice masking the portion of the audio to be edited.
[0164] Optionally, the computer-readable storage medium is further configured to store a computer program for performing the following steps: obtaining training audio and training text to be processed, wherein the training text is used to determine the text content to be edited into the training audio; performing voice masking on the portion of the audio to be edited in the training audio to obtain masked training audio; and training an initial voice editing model using the masked training audio and training text to obtain a target voice editing model, wherein the target voice editing model is used to voice edit the target text and the masked original audio to obtain the target audio, and the masked original audio is obtained by voice masking the portion of the audio to be edited in the original audio.
[0165] In the computer-readable storage medium of the above embodiment, a technical solution for implementing a speech editing method is provided. The method involves obtaining the original audio to be processed and the target text, wherein the target text is used to determine the text content to be edited into the original audio; performing speech masking on the portion of the original audio to be edited to obtain a first masked audio; and further performing speech editing on the target text and the first masked audio to obtain the target audio. This achieves the purpose of first performing speech masking and then speech editing on the original audio to be speech edited to obtain the target audio, thereby achieving the technical effect of improving the fluency and realism of the speech editing results. This further solves the technical problem of the speech editing methods provided in the related art, which suffer from low fluency and poor realism due to mismatch between training and testing, resulting in speech editing results.
[0166] Through the description of the above embodiments, it is easy for those skilled in the art to understand that the example embodiments described herein can be implemented by software or by combining software with necessary hardware. Therefore, the technical solution according to the embodiments of the present disclosure can be embodied in the form of a software product, which can be stored in a computer-readable storage medium (which can be a CD-ROM, a USB flash drive, a mobile hard disk, etc.) or on a network, and includes several instructions to enable a computing device (which can be a personal computer, a server, a terminal device, or a network device, etc.) to execute the method according to the embodiments of the present disclosure.
[0167] In exemplary embodiments of the present disclosure, a computer-readable storage medium stores a program product capable of implementing the aforementioned method of the present embodiment. In some possible implementations, various aspects of the present disclosure may also be implemented in the form of a program product comprising program code. When the program product is executed on a terminal device, the program code is configured to cause the terminal device to execute the steps described in the "Exemplary Method" section of the present embodiment according to various exemplary embodiments of the present disclosure.
[0168] According to an embodiment of the present disclosure, a program product for implementing the above-mentioned method can be a portable compact disc read-only memory (CD-ROM) and include program code, and can be run on a terminal device, such as a personal computer. However, the program product of the embodiment of the present disclosure is not limited thereto. In the embodiment of the present disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0169] The program product may be implemented in any combination of one or more computer-readable media. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (non-exhaustive) of computer-readable storage media include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof.
[0170] It should be noted that the program code contained in the computer-readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RF, etc., or any appropriate combination of the above.
[0171] An embodiment of the present disclosure further provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any of the above method embodiments.
[0172] Optionally, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.
[0173] Optionally, in this embodiment, the processor may be configured to execute the following steps through a computer program:
[0174] S1, obtaining the original audio and target text to be processed, wherein the target text is used to determine the text content to be edited into the original audio;
[0175] S2, performing voice masking on the portion of the original audio to be edited to obtain a first masked audio;
[0176] S3, performing voice editing on the target text and the first masked audio to obtain the target audio.
[0177] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: obtaining position information of the audio portion to be edited in the original audio; performing voice masking on the audio portion to be edited in the original audio based on the position information to obtain a first masked audio.
[0178] Optionally, the processor may also be configured to execute the following steps through a computer program: performing speech conversion on the target text to obtain intermediate audio; and performing speech splicing on the intermediate audio and the first masked audio to obtain the target audio.
[0179] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: performing voice editing on the target text and the first masked audio to obtain target acoustic features, wherein the target acoustic features are used to determine the audio segment corresponding to the target text; performing voice coding conversion on the target acoustic features to obtain intermediate audio.
[0180] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: converting the target text into graphemes to obtain a phoneme sequence; using a target voice editing model to perform voice editing on the phoneme sequence and the audio after the first mask to obtain target acoustic features, wherein the target voice editing model is obtained through deep learning training using multiple sets of data, and the multiple sets of data include: training audio and training text, and the training text is the text corresponding to the audio part to be edited in the training audio.
[0181] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: speech masking the part of the audio to be edited in the training audio to obtain a second masked audio; using the initial speech editing model to speech edit the second masked audio and the training text to obtain predicted acoustic features; determining the target loss by comparing the predicted acoustic features with the actual acoustic features corresponding to the training text; and using the target loss to update the parameters of the initial speech editing model to obtain a target speech editing model.
[0182] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: using an encoder to perform text feature space encoding on the phoneme sequence to obtain text features; using a feature adjuster to perform feature adjustment on the text features and the first masked audio to obtain a first auditory perception feature, wherein the first auditory perception feature is the auditory perception feature corresponding to the target text; using a decoder to acoustically decode the first auditory perception feature to obtain a target acoustic feature.
[0183] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: extracting a second auditory perception feature from the first masked audio, wherein the second auditory perception feature is an auditory perception feature corresponding to the context audio associated with the audio portion to be edited in the original audio; and using a feature adjuster to perform feature adjustment on the text feature and the second auditory perception feature to obtain the first auditory perception feature.
[0184] Optionally, the processor may also be configured to execute the following steps through a computer program: the first auditory perception feature includes at least one of the following: the pitch corresponding to the target text; the energy corresponding to the target text; the duration corresponding to the target text.
[0185] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: voice masking the part of the voice to be edited in the original game voice to be used in the game application to obtain the masked game voice; voice editing the target text and the first masked audio to obtain the target audio, including: voice editing the game content text to be used in the game application and the masked game voice to obtain the target game voice.
[0186] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: voice masking the part of the dubbing to be edited in the original multimedia dubbing to be used in the dubbing application to obtain the masked multimedia dubbing; voice editing the target text and the first masked audio to obtain the target audio, including: voice editing the dubbing content text to be used in the dubbing application and the masked multimedia dubbing to obtain the target multimedia dubbing.
[0187] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: receiving the original audio and target text to be processed from the client, wherein the target text is used to determine the text content to be edited into the original audio; performing voice masking on the audio to be edited in the original audio to obtain a first masked audio, and performing voice editing on the target text and the first masked audio to obtain a target audio; and feeding back the target audio to the client.
[0188] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: in response to a trigger operation performed on a voice editing control, a voice editing interface pops up; in response to an input operation performed on the voice editing interface, the original audio and target text are imported, wherein the target text is used to determine the text content to be edited into the original audio; in response to an editing operation performed on the voice editing interface, a portion of the audio to be edited is selected from the original audio; in response to a play operation performed on the voice editing interface, the target audio is played in a game scene, wherein the target audio is obtained by voice editing the target text and the masked audio, and the masked audio is obtained by voice masking the portion of the audio to be edited.
[0189] Optionally, the above-mentioned processor can also be configured to perform the following steps through a computer program: obtaining training audio and training text to be processed, wherein the training text is used to determine the text content to be edited into the training audio; performing voice masking on the portion of the audio to be edited in the training audio to obtain masked training audio; using the masked training audio and training text to train the initial voice editing model to obtain a target voice editing model, wherein the target voice editing model is used to voice edit the target text and the masked original audio to obtain the target audio, and the masked original audio is obtained by voice masking the portion of the audio to be edited in the original audio.
[0190] In the electronic device of the above embodiment, a technical solution for implementing a voice editing method is provided. The method involves obtaining the original audio to be processed and the target text, wherein the target text is used to determine the text content to be edited into the original audio; performing voice masking on the portion of the original audio to be edited to obtain a first masked audio; and further voice editing the target text and the first masked audio to obtain the target audio. This achieves the purpose of first voice masking the original audio to be voice edited and then voice editing it to obtain the target audio, thereby achieving the technical effect of improving the fluency and realism of the voice editing results. This further solves the technical problem of the voice editing methods provided in related technologies, which suffer from low fluency and poor realism due to mismatch between training and testing, resulting in the voice editing results.
[0191] Figure 11 is a schematic diagram of an electronic device according to one embodiment of the present disclosure. As shown in Figure 11, the electronic device 1100 is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0192] As shown in Figure 11 , electronic device 1100 is implemented as a general-purpose computing device. Components of electronic device 1100 may include, but are not limited to, the aforementioned at least one processor 1110, the aforementioned at least one memory 1120, a bus 1130 connecting various system components (including memory 1120 and processor 1110), and a display 1140.
[0193] The memory 1120 stores program codes, which can be executed by the processor 1110 , so that the processor 1110 executes the steps described in the method section of the embodiment of the present disclosure according to various exemplary embodiments of the present disclosure.
[0194] The memory 1120 may include a readable medium in the form of a volatile storage unit, such as a random access memory unit (RAM) 11201 and / or a cache memory unit 11202, and may further include a read-only memory unit (ROM) 11203, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
[0195] In some examples, memory 1120 may also include a program / utility 11204 having a set (at least one) of program modules 11205. Such program modules 11205 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Memory 1120 may further include memory remotely located relative to processor 1110. These remote memories may be connected to electronic device 1100 via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0196] The bus 1130 may represent one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a local bus to the processor 1110, or any of a variety of bus architectures.
[0197] The display 1140 may be, for example, a touch screen liquid crystal display (LCD), which may enable a user to interact with a user interface of the electronic device 1100 .
[0198] Optionally, the electronic device 1100 may also communicate with one or more external devices 1200 (e.g., a keyboard, a pointing device, a Bluetooth device, etc.), one or more devices that enable a user to interact with the electronic device 1100, and / or any device that enables the electronic device 1100 to communicate with one or more other computing devices (e.g., a router, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 1150. Furthermore, the electronic device 1100 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 1160. As shown in FIG11 , the network adapter 1160 communicates with other modules of the electronic device 1100 via a bus 1130. It should be understood that although not shown in Figure 11, other hardware and / or software modules may be used in conjunction with the electronic device 1100, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) systems, tape drives, and data backup storage systems.
[0199] The electronic device 1100 may further include: a keyboard, a cursor control device (such as a mouse), an input / output interface (I / O interface), a network interface, a power supply and / or a camera.
[0200] Those skilled in the art will appreciate that the structure shown in FIG11 is merely illustrative and does not limit the structure of the electronic device described above. For example, the electronic device 1100 may further include more or fewer components than those shown in FIG11 , or have a configuration different from that shown in FIG11 . The memory 1120 may be used to store computer programs and corresponding data, such as the computer program and corresponding data corresponding to the voice editing method in the embodiment of the present disclosure. The processor 1110 executes various functional applications and data processing by running the computer program stored in the memory 1120, thereby implementing the voice editing method described above.
[0201] The serial numbers of the above-mentioned embodiments of the present disclosure are for description only and do not represent the advantages or disadvantages of the embodiments.
[0202] In the above embodiments of the present disclosure, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0203] In the several embodiments provided in the present disclosure, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only exemplary. For example, the division of the units can be a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0204] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0205] In addition, the functional units in the various embodiments of the present disclosure may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0206] If the integrated unit 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. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the relevant technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk or an optical disk.
[0207] The above is only a preferred embodiment of the present disclosure. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present disclosure. These improvements and modifications should also be regarded as within the scope of protection of the present disclosure.
Claims
1. A voice editing method, include: Acquire original audio and target text to be processed, wherein the target text is used to determine text content to be edited into the original audio; Performing voice masking on the part of the audio to be edited in the original audio to obtain a first masked audio; The target text and the first masked audio are voice edited to obtain the target audio.
2. The voice editing method according to claim 1, in, Performing voice masking on the part of the audio to be edited in the original audio to obtain the first masked audio includes: Obtaining location information of the portion of audio to be edited in the original audio; Perform voice masking on the portion of the audio to be edited in the original audio based on the position information to obtain the first masked audio.
3. The voice editing method according to claim 1, in, Performing voice editing on the target text and the first masked audio to obtain the target audio includes: Performing speech conversion on the target text to obtain intermediate audio; The intermediate audio and the first masked audio are voice-concatenated to obtain the target audio.
4. The voice editing method according to claim 3, in, Performing speech conversion on the target text to obtain the intermediate audio includes: Performing voice editing on the target text and the first masked audio to obtain a target acoustic feature, wherein the target acoustic feature is used to determine an audio segment corresponding to the target text; The target acoustic feature is subjected to vocoding conversion to obtain the intermediate audio.
5. The voice editing method according to claim 4, in, The target text and the first masked audio are voice edited to obtain the target acoustic features, including: Converting the target text into phonemes to obtain a phoneme sequence; The phoneme sequence and the first masked audio are speech-edited using a target speech editing model to obtain the target acoustic features, wherein the target speech editing model is obtained through deep learning training using multiple sets of data, and the multiple sets of data include: training audio and training text, and the training text is the text corresponding to the audio portion to be edited in the training audio.
6. The voice editing method according to claim 5, in, The voice editing method also includes: Performing voice masking on the part of the audio to be edited in the training audio to obtain a second masked audio; Use the initial speech editing model to perform speech editing on the second masked audio and the training text to obtain Predict acoustic features; Determining a target loss by comparing the predicted acoustic features with the actual acoustic features corresponding to the training text; The target loss is used to update the parameters of the initial speech editing model to obtain the target speech editing model.
7. The voice editing method according to claim 5, in, The target speech editing model includes: an encoder, a feature regulator and a decoder. The target speech editing model is used to perform speech editing on the phoneme sequence and the first masked audio to obtain the target acoustic features including: Using the encoder to perform text feature space encoding on the phoneme sequence to obtain text features; Using the feature adjuster to perform feature adjustment on the text feature and the first masked audio to obtain a first auditory perception feature, wherein the first auditory perception feature is an auditory perception feature corresponding to the target text; The first auditory perception feature is acoustically decoded using the decoder to obtain the target acoustic feature.
8. The voice editing method according to claim 7, in, Using the feature adjuster to perform feature adjustment on the text feature and the first masked audio to obtain the first auditory perception feature includes: Extracting a second auditory perception feature from the first masked audio, wherein the second auditory perception feature is an auditory perception feature corresponding to a context audio associated with the portion of audio to be edited in the original audio; The feature adjuster is used to perform feature adjustment on the text feature and the second auditory perception feature to obtain the first auditory perception feature.
9. The voice editing method according to claim 7, in, The first auditory perception feature includes at least one of the following: The pitch corresponding to the target text; The energy corresponding to the target text; The duration corresponding to the target text.
10. The voice editing method according to claim 1, in, Performing voice masking on the part of the audio to be edited in the original audio to obtain the first masked audio includes: Performing voice masking on a portion of the original game voice to be used in the game application to be edited, to obtain the masked game voice; Performing voice editing on the target text and the first masked audio to obtain the target audio includes: The game content text to be used in the game application and the masked game voice are voice edited to obtain the target game voice.
11. The voice editing method according to claim 1, in, Performing voice masking on the part of the audio to be edited in the original audio to obtain the first masked audio includes: Performing voice masking on the part of the dubbing to be edited in the original multimedia dubbing to be used in the dubbing application to obtain the masked multimedia dubbing; Performing voice editing on the target text and the first masked audio to obtain the target audio includes: The dubbing content text to be used in the dubbing application and the masked multimedia dubbing are voice edited to obtain the target multimedia dubbing.
12. A voice editing method, providing a graphical user interface through a terminal device, wherein the content displayed by the graphical user interface includes a voice editing control, and the voice editing method include: In response to a trigger operation performed on the voice editing control, a voice editing interface pops up; In response to an input operation performed on the voice editing interface, importing original audio and target text, wherein the target text is used to determine text content to be edited into the original audio; In response to an editing operation performed on the voice editing interface, selecting a portion of audio to be edited from the original audio; In response to a play operation performed on the voice editing interface, a target audio is played in a game scene, wherein the target audio is obtained by voice editing the target text and the masked audio, and the masked audio is obtained by voice masking the portion of audio to be edited.
13. A model training method, include: Acquire training audio and training text to be processed, wherein the training text is used to determine text content to be edited into the training audio; Performing voice masking on the part of the audio to be edited in the training audio to obtain masked training audio; The masked training audio and the training text are used to train an initial speech editing model to obtain a target speech editing model, wherein the target speech editing model is used to perform speech editing on the target text and the masked original audio to obtain the target audio, and the masked original audio is obtained by speech masking the part of the audio to be edited in the original audio.
14. A voice editing device, include: An acquisition module, used for acquiring the original audio to be processed and the target text, wherein the target text is used to determine the text content to be edited into the original audio; A masking module, used for performing voice masking on a portion of the original audio to be edited to obtain a first masked audio; An editing module is used to perform voice editing on the target text and the first masked audio to obtain a target audio.
15. A computer-readable storage medium having a computer program stored therein. in, The computer program is configured to execute the speech editing method described in any one of claims 1 to 12 or the model training method described in claim 13 when executed by a processor.
16. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the speech editing method described in any one of claims 1 to 12 or the model training method described in claim 13.
Citation Information
Patent Citations
Audio processing method and electronic device
CN106971749A
Phrase-based end-to-end text-to-speech (TTS) synthesis
CN111681641A
Voice processing method and related equipment
CN113421547A
Audio editing method and device, electronic equipment and storage medium
CN113724686A
Voice editing method and device, storage medium and electronic device
CN116434731A
Cited By
Audio editing method and system, terminal and storage medium
CN120148518A
