Tone conversion method, device, electronic device, storage medium and program product
By training a timbre conversion model that can keep the pronunciation phonemes unchanged, it solves the problem of audio pronunciation standardization that cannot be effectively solved in the existing technology, achieves the effect of beautifying speech, and improves the transmission effect and listening experience of audio.
Patent Information
- Application Number
- CN202410684121.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-29
- Publication Date
- 2024-08-23
- Estimated Expiration
- 2044-05-29
AI Technical Summary
Existing speech beautification technology mainly focuses on the auditory quality of audio, such as pitch, frequency and appeal, but fails to effectively solve the problem of pronunciation standardization in audio.
By acquiring the training audio of multiple speakers, performing fundamental frequency transformation and content feature extraction, using the timbre conversion model for phoneme classification and text recognition, a timbre conversion model that can keep the pronunciation phonemes unchanged is trained to achieve timbre conversion.
It realizes the conversion of accented audio into standard pronunciation while keeping the phonemes unchanged, improving the transmission effect and accuracy of speech and improving the listening experience of audio.
Smart Images

Figure CN118298837B
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of speech processing technology, and in particular to a training method for a timbre conversion model, a timbre conversion method, a training device for a timbre conversion model, a timbre conversion device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art
[0002] Voice conversion refers to a technical method that converts an input voice into the voice of a specific speaker without changing the audio content. Voice conversion technology can be used for voice beautification. Through voice beautification, users can process their imperfect voices to achieve better expression effects. Whether in singing, dubbing, or audio and video creation, voice beautification can play an important role and bring users a better sound experience.
[0003] At present, the main problems that voice beautification solves include: adjusting the pitch and frequency of singing; changing the voice after pitch adjustment; making the audio tone more appealing, etc. That is, the existing voice beautification technologies all focus on solving the quality of audio listening, such as audio rhythm, pitch, timbre, appeal, etc., but do not pay attention to whether the pronunciation in the audio is standard. Summary of the invention
[0004] The present invention provides a technical solution for tone conversion.
[0005] According to one aspect of the present disclosure, a method for training a timbre conversion model is provided, comprising:
[0006] Acquire a first training audio set, wherein the first training audio set includes a plurality of first training audios corresponding to a plurality of speakers;
[0007] For any first training audio in the first training audio set, performing baseband conversion on the first training audio to obtain baseband converted audio corresponding to the first training audio;
[0008] Extracting respectively a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio by using a first timbre conversion model;
[0009] Performing phoneme classification on the first content feature vector sequence and the second content feature vector sequence respectively to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence;
[0010] The first timbre conversion model is trained according to the first phoneme classification result and the second phoneme classification result.
[0011] In a possible implementation, the method further includes:
[0012] Performing text recognition on the first content feature vector sequence to obtain a first text recognition result corresponding to the first content feature vector sequence;
[0013] The first timbre conversion model is trained according to the first text recognition result and the annotated text corresponding to the first training audio.
[0014] In one possible implementation,
[0015] The method further comprises: encoding the first training audio through the first timbre conversion model to obtain a first audio feature vector sequence corresponding to the first training audio; encoding the baseband conversion audio through the first timbre conversion model to obtain a second audio feature vector sequence corresponding to the baseband conversion audio;
[0016] The method of extracting a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio respectively by using the first timbre conversion model includes: performing content encoding on the first audio feature vector sequence by using the first timbre conversion model to obtain a first content feature vector sequence corresponding to the first training audio; and performing content encoding on the second audio feature vector sequence by using the first timbre conversion model to obtain a second content feature vector sequence corresponding to the baseband conversion audio.
[0017] In a possible implementation, the method further includes:
[0018] Performing speaker encoding on the first audio feature vector sequence by using the first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio;
[0019] Performing speaker classification on the first speaker feature vector to obtain a speaker prediction result corresponding to the first training audio;
[0020] The first timbre conversion model is trained according to the speaker prediction result and speaker annotation information corresponding to the first training audio.
[0021] In a possible implementation, the first timbre conversion model includes a shared encoder, a first content encoder, and a first speaker encoder;
[0022] The encoding of the first training audio by the first timbre conversion model to obtain a first audio feature vector sequence corresponding to the first training audio includes: encoding the first training audio by the shared encoder to obtain a first audio feature vector sequence corresponding to the first training audio;
[0023] The step of encoding the baseband conversion audio by using the first timbre conversion model to obtain a second audio feature vector sequence corresponding to the baseband conversion audio comprises: encoding the baseband conversion audio by using the shared encoder to obtain a second audio feature vector sequence corresponding to the baseband conversion audio;
[0024] The step of encoding the first audio feature vector sequence by the first timbre conversion model to obtain a first content feature vector sequence corresponding to the first training audio includes: encoding the first audio feature vector sequence by the first content encoder to obtain a first content feature vector sequence corresponding to the first training audio;
[0025] The step of encoding the second audio feature vector sequence by the first timbre conversion model to obtain a second content feature vector sequence corresponding to the baseband conversion audio comprises: encoding the second audio feature vector sequence by the first content encoder to obtain a second content feature vector sequence corresponding to the baseband conversion audio;
[0026] The step of performing speaker encoding on the first audio feature vector sequence by using the first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio includes: performing speaker encoding on the first audio feature vector sequence by using the first speaker encoder to obtain a first speaker feature vector corresponding to the first training audio.
[0027] In a possible implementation manner, the shared encoder, the first content encoder, and the first speaker encoder are jointly trained.
[0028] In a possible implementation, the first timbre conversion model further includes a first decoder, and the method further includes:
[0029] In response to the shared encoder, the first content encoder, and the first speaker encoder being trained to satisfy a first preset training condition, the first decoder is trained based on the first training audio set.
[0030] In a possible implementation, the first decoder includes a mel-spectrum generator and a synthetic audio generator.
[0031] According to one aspect of the present disclosure, there is provided a method for timbre conversion, comprising:
[0032] Acquire a second timbre conversion model and a first timbre conversion model trained by the timbre conversion model training method;
[0033] Get the audio to be converted and the standard speaker audio;
[0034] Obtaining a standard pronunciation audio corresponding to the audio to be converted based on the audio to be converted and the standard speaker audio using the second timbre conversion model;
[0035] The accent-corrected audio corresponding to the audio to be converted is obtained based on the audio to be converted and the standard pronunciation audio through the first timbre conversion model.
[0036] According to one aspect of the present disclosure, a training device for a timbre conversion model is provided, comprising:
[0037] A fourth acquisition module, configured to acquire a first training audio set, wherein the first training audio set includes a plurality of first training audios corresponding to a plurality of speakers;
[0038] a baseband conversion module, configured to perform baseband conversion on any first training audio in the first training audio set to obtain a baseband converted audio corresponding to the first training audio;
[0039] An extraction module, used to extract a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio respectively through a first timbre conversion model;
[0040] a phoneme classification module, configured to perform phoneme classification on the first content feature vector sequence and the second content feature vector sequence respectively, to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence;
[0041] The third training module is used to train the first timbre conversion model according to the first phoneme classification result and the second phoneme classification result.
[0042] In a possible implementation manner, the device further includes:
[0043] a text recognition module, configured to perform text recognition on the first content feature vector sequence to obtain a first text recognition result corresponding to the first content feature vector sequence;
[0044] The fourth training module is used to train the first timbre conversion model according to the first text recognition result and the annotated text corresponding to the first training audio.
[0045] In one possible implementation,
[0046] The device further includes: a first audio encoding module, configured to encode the first training audio through the first timbre conversion model to obtain a first audio feature vector sequence corresponding to the first training audio; a second audio encoding module, configured to encode the baseband conversion audio through the first timbre conversion model to obtain a second audio feature vector sequence corresponding to the baseband conversion audio;
[0047] The extraction module is used to: perform content encoding on the first audio feature vector sequence through the first timbre conversion model to obtain a first content feature vector sequence corresponding to the first training audio; and perform content encoding on the second audio feature vector sequence through the first timbre conversion model to obtain a second content feature vector sequence corresponding to the baseband conversion audio.
[0048] In a possible implementation manner, the device further includes:
[0049] a speaker encoding module, configured to perform speaker encoding on the first audio feature vector sequence by using the first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio;
[0050] a speaker classification module, configured to perform speaker classification on the first speaker feature vector to obtain a speaker prediction result corresponding to the first training audio;
[0051] The fifth training module is used to train the first timbre conversion model according to the speaker prediction result and the speaker annotation information corresponding to the first training audio.
[0052] In a possible implementation, the first timbre conversion model includes a shared encoder, a first content encoder, and a first speaker encoder;
[0053] The first audio encoding module is used to: encode the first training audio through the shared encoder to obtain a first audio feature vector sequence corresponding to the first training audio;
[0054] The second audio encoding module is used to: encode the baseband conversion audio through the shared encoder to obtain a second audio feature vector sequence corresponding to the baseband conversion audio;
[0055] The extraction module is used to: encode the first audio feature vector sequence through the first content encoder to obtain a first content feature vector sequence corresponding to the first training audio; encode the second audio feature vector sequence through the first content encoder to obtain a second content feature vector sequence corresponding to the baseband conversion audio;
[0056] The speaker encoding module is used to: perform speaker encoding on the first audio feature vector sequence through the first speaker encoder to obtain a first speaker feature vector corresponding to the first training audio.
[0057] In a possible implementation manner, the shared encoder, the first content encoder, and the first speaker encoder are jointly trained.
[0058] In a possible implementation, the first timbre conversion model further includes a first decoder, and the device further includes:
[0059] A sixth training module is used to train the first decoder based on the first training audio set in response to the shared encoder, the first content encoder and the first speaker encoder being trained to meet a first preset training condition.
[0060] In a possible implementation, the first decoder includes a mel-spectrum generator and a synthetic audio generator.
[0061] According to one aspect of the present disclosure, there is provided a timbre conversion device, comprising:
[0062] A second acquisition module, used to acquire a second timbre conversion model and a first timbre conversion model trained by the timbre conversion model training device;
[0063] A third acquisition module is used to acquire the audio to be converted and the standard speaker audio;
[0064] A first conversion module, configured to obtain a standard pronunciation audio corresponding to the audio to be converted based on the audio to be converted and the standard speaker audio by using the second timbre conversion model;
[0065] The second conversion module is used to obtain the accent-corrected audio corresponding to the audio to be converted based on the audio to be converted and the standard pronunciation audio through the first timbre conversion model.
[0066] According to one aspect of the present disclosure, an electronic device is provided, comprising: one or more processors; a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.
[0067] According to one aspect of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored, and the computer program instructions implement the above method when executed by a processor.
[0068] According to one aspect of the present disclosure, a computer program product is provided, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.
[0069] In an embodiment of the present disclosure, a first training audio set is obtained, wherein the first training audio set includes multiple first training audios corresponding to multiple speakers, and for any first training audio in the first training audio set, a baseband conversion is performed on the first training audio to obtain a baseband conversion audio corresponding to the first training audio, and a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio are respectively extracted through a first timbre conversion model, and phoneme classification is performed on the first content feature vector sequence and the second content feature vector sequence to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence, and the first timbre conversion model is trained based on the first phoneme classification result and the second phoneme classification result, so that the first timbre conversion model obtained by training can keep the pronunciation phonemes unchanged before and after the timbre conversion.
[0070] It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
[0071] Further features and aspects of the present disclosure will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used to illustrate the technical solutions of the present disclosure together with the specification.
[0073] Figure 1 A flowchart of a method for training a timbre conversion model provided by an embodiment of the present disclosure is shown.
[0074] Figure 2 A schematic diagram showing a timbre conversion method provided by an embodiment of the present disclosure is shown.
[0075] Figure 3 A block diagram of a training device for a timbre conversion model provided by an embodiment of the present disclosure is shown.
[0076] Figure 4 A block diagram of an electronic device 1900 provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0077] Various exemplary embodiments, features and aspects of the present disclosure will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise specified.
[0078] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0079] The term "and / or" herein is only a description of the association relationship of the associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the term "at least one" herein represents any combination of at least two of any one or more of a plurality of. For example, including at least one of A, B, and C can represent including any one or more elements selected from the set consisting of A, B, and C.
[0080] In addition, in order to better illustrate the present disclosure, numerous specific details are given in the following specific embodiments. It should be understood by those skilled in the art that the present disclosure can also be implemented without certain specific details. In some examples, methods, means, components and circuits well known to those skilled in the art are not described in detail in order to highlight the subject matter of the present disclosure.
[0081] Accents have a great impact on the communication of voice content. Converting an audio with an accent to standard pronunciation (such as standard Mandarin pronunciation) while maintaining the rhythm, rhyme and timbre can beautify the audio content. This conversion can not only improve the listening experience of the audio, but also enhance the communication effect of the voice from the content level, so that the information can be delivered more accurately and smoothly.
[0082] Figure 1 A flow chart of a method for training a timbre conversion model provided by an embodiment of the present disclosure is shown. In one possible implementation, the executor of the method for training a timbre conversion model may be a training device for the timbre conversion model. For example, the method for training a timbre conversion model may be executed by a terminal device or a server or other electronic device. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device or a wearable device. In some possible implementations, the method for training a timbre conversion model may be implemented by a processor calling computer-readable instructions stored in a memory. For example Figure 1 As shown, the training method of the timbre conversion model includes steps S11 to S15.
[0083] In step S11, a first training audio set is obtained, wherein the first training audio set includes a plurality of first training audios corresponding to a plurality of speakers.
[0084] In step S12, for any first training audio in the first training audio set, a baseband conversion is performed on the first training audio to obtain a baseband converted audio corresponding to the first training audio.
[0085] In step S13, a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio are respectively extracted through a first timbre conversion model.
[0086] In step S14, phoneme classification is performed on the first content feature vector sequence and the second content feature vector sequence respectively to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence.
[0087] In step S15, the first timbre conversion model is trained according to the first phoneme classification result and the second phoneme classification result.
[0088] In the disclosed embodiment, the first timbre conversion model can be used to convert the timbre of the input audio into the timbre of the target speaker, and the pronunciation phonemes remain the same as the input audio. For example, after the first timbre conversion model is trained, the first timbre conversion model can be used to convert the standard pronunciation audio with the timbre of the standard speaker into the timbre of the target speaker, and keep the phonemes unchanged, so as to obtain the accent-corrected audio with the timbre of the target speaker and the pronunciation of the standard.
[0089] In a possible implementation, the first timbre conversion model may adopt a timbre conversion model based on zero-shot learning, for example, a timbre conversion model such as LVC-VC, ACE-VC, etc., which is not limited here. By adopting a timbre conversion model based on zero-shot learning, even if a large amount of audio of the target speaker cannot be collected in advance, a better timbre conversion effect can still be obtained for the target speaker.
[0090] In a possible implementation, the first timbre conversion model may include a shared encoder, a first content encoder, a first speaker encoder and a first decoder. The output end of the shared encoder may be connected to the input end of the first content encoder and the input end of the first speaker encoder, and the output end of the first content encoder and the output end of the first speaker encoder may be connected to the input end of the first decoder. The shared encoder may be used to extract an audio feature vector sequence corresponding to the input audio. The first content encoder may be used to perform content encoding on the audio feature vector sequence extracted by the shared encoder to obtain a content feature vector sequence corresponding to the input audio. The first speaker encoder may be used to perform speaker encoding on the audio feature vector sequence extracted by the shared encoder to obtain a speaker feature vector corresponding to the input audio. The first decoder may be used to obtain synthesized audio based on the content feature vector sequence output by the first content encoder and the speaker feature vector output by the first speaker encoder.
[0091] In some application scenarios, the content encoder may also be called a speech recognition (Automatic Speech Recognition, ASR) encoder, a speech recognition module, a content encoding module, etc., which is not limited here.
[0092] As an example of this implementation, in the training of the first timbre conversion model, the shared encoder, the first content encoder and the first speaker encoder may be jointly trained first, and then the first decoder may be trained.
[0093] As another example of this implementation, in the training of the first timbre conversion model, the shared encoder, the first content encoder, the first speaker encoder and the first decoder may be trained simultaneously.
[0094] In another possible implementation, the first timbre conversion model may include a first content encoder, a first speaker encoder and a first decoder. The output end of the first content encoder and the output end of the first speaker encoder may be connected to the input end of the first decoder. The first content encoder may be used to extract a content feature vector sequence corresponding to the input audio. The first speaker encoder may be used to extract a speaker feature vector corresponding to the input audio. The first decoder may be used to obtain a synthesized audio based on the content feature vector sequence output by the first content encoder and the speaker feature vector output by the first speaker encoder.
[0095] As an example of this implementation, the shared encoder, the first content encoder and the first speaker encoder are jointly trained. In this example, in the training of the first timbre conversion model, the first content encoder and the first speaker encoder may be jointly trained first, and then the first decoder may be trained.
[0096] As another example of this implementation, in the training of the first timbre conversion model, the first content encoder, the first speaker encoder and the first decoder may be trained separately.
[0097] As another example of this implementation, in the training of the first timbre conversion model, the first content encoder, the first speaker encoder and the first decoder may be trained simultaneously.
[0098] In a possible implementation, the first decoder includes a mel-spectrum generator and a synthetic audio generator.
[0099] As an example of this implementation, after completing the training of the shared encoder, the first content encoder and the first speaker encoder, the content feature vector sequence output by the first content encoder and the speaker feature vector output by the first speaker encoder can be used to jointly train the mel-spectrogram generator.
[0100] As an example of this implementation, the synthetic audio generator may adopt HiFi-GAN, etc., which is not limited here. The synthetic audio generator may be used to generate synthetic audio according to the mel spectrum output by the mel spectrum generator.
[0101] In the embodiment of the present disclosure, the first timbre conversion model may be trained based on the first training audio set, wherein the first training audio set includes a plurality of first training audios.
[0102] The first training audio may represent the training audio in the first training audio set. In a possible implementation, the first training audio set may include a large number of training audios corresponding to a large number of speakers. Any first training audio in the first training audio set may be an audio with an accent or an audio without an accent, which is not limited here. In an embodiment of the present disclosure, the first training audio set includes at least a plurality of first training audios with accents. In a possible implementation, the first training audio set includes a plurality of first training audios with accents and a plurality of first training audios without accents. In a possible implementation, the first training audio set includes first training audios with different accents. Among them, the audio without an accent may represent the audio of a standard preset language, and the audio with an accent may represent the audio of a non-standard preset language. For example, the audio without an accent may represent the audio of standard Mandarin, and the audio with an accent may represent the audio of Mandarin with confusion of flat and retroflex tongue, confusion of front and back nasal sounds, or the audio of Mandarin affected by dialects. Of course, in addition to Chinese, the embodiments of the present disclosure may also be applied to the timbre conversion of audio in other languages, which is not limited here.
[0103] For any first training audio in the first training audio set, a pitch-shift transform may be performed on the first training audio to obtain a pitch-shifted audio corresponding to the first training audio. In the disclosed embodiment, the first training audio is processed by pitch-shifting, and when training the first timbre conversion model, the similarity between the phoneme classification results of the content feature vector sequence corresponding to the audio before and after the pitch-shifting is maximized, so that the speaker information and content information in the speech can be better separated.
[0104] In the disclosed embodiment, the first content feature vector sequence corresponding to the first training audio and the second content feature vector sequence corresponding to the baseband conversion audio can be respectively extracted by the first timbre conversion model. The first content feature vector sequence can represent the content feature vector sequence extracted by the first timbre conversion model from the first training audio, and the second content feature vector sequence can represent the content feature vector sequence extracted by the first timbre conversion model from the baseband conversion audio.
[0105] When training the first timbre conversion model, the first content feature vector sequence and the second content feature vector sequence can be respectively classified by phonemes to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence. The first phoneme classification result can represent the phoneme classification result corresponding to the first content feature vector sequence, that is, the phoneme classification result corresponding to the first training audio. The second phoneme classification result can represent the phoneme classification result corresponding to the second content feature vector sequence, that is, the phoneme classification result corresponding to the baseband conversion audio. The first phoneme classification result can include the classification prediction results of each phoneme in the first training audio, and the second phoneme classification result can include the classification prediction results of each phoneme in the baseband conversion audio.
[0106] In a possible implementation, a phoneme classifier may be used to perform phoneme classification on a content feature vector sequence to obtain a phoneme classification result corresponding to the content feature vector sequence. For example, a phoneme classifier may be used to perform phoneme classification on a first content feature vector sequence to obtain a first phoneme classification result corresponding to the first content feature vector sequence, and a phoneme classifier may be used to perform phoneme classification on a second content feature vector sequence to obtain a second phoneme classification result corresponding to the second content feature vector sequence.
[0107] After the training of the first timbre conversion model is completed, that is, in the application stage of the first timbre conversion model, the phoneme classifier may not be used.
[0108] In an embodiment of the present disclosure, the value of the first loss function corresponding to the first timbre conversion model can be determined according to the cosine similarity between the first phoneme classification result and the second phoneme classification result, and the first timbre conversion model can be trained according to the value of the first loss function. The first timbre conversion model thus trained can better maintain the pronunciation phonemes before and after the timbre conversion. In an embodiment of the present disclosure, the training goal of the first timbre conversion model may include reducing the cross entropy loss between the phoneme classification result corresponding to each speech frame in the first training audio and its true phoneme classification result. By using the pronunciation phonemes as the training target of the first timbre conversion model, the content feature vector sequence extracted by the first timbre conversion model can better retain the information related to the phonemes.
[0109] In the embodiment of the present disclosure, since the first timbre conversion model is trained based on the phoneme classification result corresponding to the content feature vector sequence, the first timbre conversion model is able to learn the ability to extract the pronunciation phoneme information from the input audio. That is, the content feature vector sequence extracted by the first timbre conversion model trained in the embodiment of the present disclosure for the input audio will mainly contain the pronunciation phoneme information.
[0110] In a possible implementation, the method further includes: encoding the first training audio through the first timbre conversion model to obtain a first audio feature vector sequence corresponding to the first training audio; encoding the baseband conversion audio through the first timbre conversion model to obtain a second audio feature vector sequence corresponding to the baseband conversion audio; extracting the first content feature vector sequence corresponding to the first training audio and the second content feature vector sequence corresponding to the baseband conversion audio through the first timbre conversion model, respectively, includes: content encoding the first audio feature vector sequence through the first timbre conversion model to obtain a first content feature vector sequence corresponding to the first training audio; content encoding the second audio feature vector sequence through the first timbre conversion model to obtain a second content feature vector sequence corresponding to the baseband conversion audio.
[0111] As an example of this implementation method, the first training audio can be encoded by a shared encoder in the first timbre conversion model to obtain a first audio feature vector sequence corresponding to the first training audio, and the baseband conversion audio can be encoded by the shared encoder to obtain a second audio feature vector sequence corresponding to the baseband conversion audio.
[0112] As an example of this implementation method, the first content encoder in the first timbre conversion model can be used to perform content encoding on the first audio feature vector sequence to obtain a first content feature vector sequence corresponding to the first training audio, and the second audio feature vector sequence can be used to perform content encoding on the first content encoder to obtain a second content feature vector sequence corresponding to the baseband conversion audio.
[0113] In a possible implementation, the method further includes: performing text recognition on the first content feature vector sequence to obtain a first text recognition result corresponding to the first content feature vector sequence; and training the first timbre conversion model according to the first text recognition result and the annotated text corresponding to the first training audio.
[0114] In this implementation, during the training of the first timbre conversion model, a text recognition module may be used to perform text recognition on the first content feature vector sequence to obtain a first text recognition result corresponding to the first content feature vector sequence. The value of the second loss function corresponding to the first timbre conversion model may be determined based on the difference information between the first text recognition result and the annotated text corresponding to the first training audio, and the first timbre conversion model may be trained based on the value of the second loss function.
[0115] In this implementation, text recognition is performed on the first content feature vector sequence to obtain a first text recognition result corresponding to the first content feature vector sequence, and the first timbre conversion model is trained based on the first text recognition result and the annotated text corresponding to the first training audio, thereby improving the accuracy of speech recognition performed by the first timbre conversion model.
[0116] In another possible implementation, the method further includes: performing text recognition on the second content feature vector sequence to obtain a second text recognition result corresponding to the second content feature vector sequence; and training the first timbre conversion model based on the second text recognition result and the annotated text corresponding to the first training audio.
[0117] In a possible implementation, the method further includes: performing speaker encoding on the first audio feature vector sequence through the first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio; performing speaker classification on the first speaker feature vector to obtain a speaker prediction result corresponding to the first training audio; and training the first timbre conversion model according to the speaker prediction result and speaker annotation information corresponding to the first training audio.
[0118] As an example of this implementation, the first audio feature vector sequence may be speaker encoded by a first speaker encoder in a first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio.
[0119] In this implementation, during the training of the first timbre conversion model, a speaker classification module may be used to perform speaker classification on the first speaker feature vector to obtain a speaker prediction result corresponding to the first training audio. The value of the third loss function corresponding to the first timbre conversion model may be determined based on the difference information between the speaker prediction result and the speaker annotation information corresponding to the first training audio, and the first timbre conversion model may be trained based on the value of the third loss function.
[0120] In this implementation, speaker encoding is performed on the first audio feature vector sequence through the first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio, speaker classification is performed on the first speaker feature vector to obtain a speaker prediction result corresponding to the first training audio, and the first timbre conversion model is trained based on the speaker prediction result and speaker annotation information corresponding to the first training audio, thereby improving the accuracy of speaker classification performed by the first timbre conversion model, so that the speaker feature vector extracted by the trained first timbre conversion model can more accurately reflect the characteristics of the speaker.
[0121] In a possible implementation, the first timbre conversion model includes a shared encoder, a first content encoder and a first speaker encoder; encoding the first training audio through the first timbre conversion model to obtain a first audio feature vector sequence corresponding to the first training audio includes: encoding the first training audio through the shared encoder to obtain a first audio feature vector sequence corresponding to the first training audio; encoding the baseband conversion audio through the first timbre conversion model to obtain a second audio feature vector sequence corresponding to the baseband conversion audio includes: encoding the baseband conversion audio through the shared encoder to obtain a second audio feature vector sequence corresponding to the baseband conversion audio; performing content encoding on the first audio feature vector sequence through the first timbre conversion model to obtain a second audio feature vector sequence corresponding to the first training audio The first content feature vector sequence includes: encoding the first audio feature vector sequence through the first content encoder to obtain a first content feature vector sequence corresponding to the first training audio; the content encoding of the second audio feature vector sequence through the first timbre conversion model to obtain a second content feature vector sequence corresponding to the baseband conversion audio includes: encoding the second audio feature vector sequence through the first content encoder to obtain a second content feature vector sequence corresponding to the baseband conversion audio; the speaker encoding of the first audio feature vector sequence through the first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio includes: speaker encoding of the first audio feature vector sequence through the first speaker encoder to obtain a first speaker feature vector corresponding to the first training audio.
[0122] In this implementation, for any first training audio, a first audio feature vector sequence corresponding to the first training audio can be extracted through a shared encoder (e.g., Conformer in ACE-V), and for any baseband conversion audio corresponding to the first training audio, a second audio feature vector sequence corresponding to the baseband conversion audio can be extracted through a shared encoder. The shared encoder can be used as a shared part between the first content encoder and the first speaker encoder, and the audio feature vector sequence output by the shared encoder can be used for two downstream tasks, speech recognition and speaker recognition. That is, the audio feature vector sequence output by the shared encoder can be used as the input of the first content encoder and the first speaker encoder.
[0123] In another possible implementation, the first timbre conversion model may include a first content encoder and a first speaker encoder. In this implementation, the first timbre conversion model may not include a shared encoder, that is, the first content encoder and the first speaker encoder may be encoded independently.
[0124] In a possible implementation, the first timbre conversion model also includes a first decoder, and the method further includes: in response to the shared encoder, the first content encoder and the first speaker encoder being trained to meet a first preset training condition, training the first decoder based on the first training audio set.
[0125] The second pre-training condition may be a preset convergence condition, a preset number of iterations, a preset number of epochs, etc., which are not limited here.
[0126] In this implementation, after completing the training of the shared encoder, the first content encoder and the first speaker encoder, the content feature vector sequence output by the first content encoder and the speaker feature vector output by the first speaker encoder can be used to jointly train the first decoder in the first timbre conversion model.
[0127] In this implementation, in order to ensure that the converted audio has the same prosodic rhythm as the input audio corresponding to the target speaker, in this implementation, the duration predictor and pitch predictor in ACE-VC may be removed.
[0128] In a possible implementation, when audios of multiple target speakers are collected in advance, the audios of the multiple target speakers can be used as third training audios to obtain a third training audio set. After the first timbre conversion model is trained based on the first training audio set, the third training audio set can be used to train the first timbre conversion model. The first timbre conversion model thus trained can achieve a better timbre conversion effect for the target speaker. For example, if audios of a large number of target speakers are collected in advance, the audios of a large number of target speakers can be used as third training audios to train the first timbre conversion model, thereby training a first timbre conversion model specifically for the target speaker.
[0129] In an embodiment of the present disclosure, a first training audio set is obtained, wherein the first training audio set includes multiple first training audios corresponding to multiple speakers, and for any first training audio in the first training audio set, a baseband conversion is performed on the first training audio to obtain a baseband conversion audio corresponding to the first training audio, and a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio are respectively extracted through a first timbre conversion model, and phoneme classification is performed on the first content feature vector sequence and the second content feature vector sequence to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence, and the first timbre conversion model is trained based on the first phoneme classification result and the second phoneme classification result, so that the first timbre conversion model obtained by training can keep the pronunciation phonemes unchanged before and after the timbre conversion.
[0130] The disclosed embodiment also provides another method for training a timbre conversion model. The method for training a timbre conversion model includes: obtaining a first training audio set and a second training audio set, wherein the first training audio set includes a plurality of first training audios corresponding to a plurality of speakers, and the second training audio set includes a plurality of second training audios corresponding to a standard speaker, wherein the standard speaker represents a speaker with standard pronunciation; for any first training audio in the first training audio set, performing character recognition and character prediction on the first training audio through the second content encoder to obtain a third text recognition result corresponding to the first training audio; training the second content encoder according to the third text recognition result and the annotated text corresponding to the first training audio; and training the second timbre conversion model based on the first training audio set and the second training audio set in response to the second content encoder being trained to meet a second preset training condition.
[0131] In the disclosed embodiment, the second timbre conversion model can be used to convert the timbre of the input audio into the timbre of a standard speaker, the text content remains unchanged, and the pronunciation becomes the standard pronunciation (for example, the pronunciation of standard Mandarin). That is, the second timbre conversion model can be used to convert input audio with different timbres and different accents into the standard Mandarin speech of a standard speaker. The standard speaker can refer to a speaker with standard pronunciation.
[0132] In the embodiment of the present disclosure, the second timbre conversion model includes a second content encoder. The second content encoder can be used to extract a content feature vector sequence corresponding to the input audio.
[0133] In the disclosed embodiment, the second timbre conversion model may further include a second speaker encoder and a second decoder. The second speaker encoder may be used to extract a speaker feature vector corresponding to the input audio. The second decoder may be used to decode the input information and output the synthesized audio.
[0134] Of course, other modules can be designed for the second timbre conversion model according to the actual application scenario requirements and the personal preferences of the R&D personnel, which are not limited here.
[0135] In an embodiment of the present disclosure, a second timbre conversion model may be trained based on a first training audio set and a second training audio set. The first training audio set includes a plurality of first training audios, and the second training audio set includes a plurality of second training audios. The second training audio may represent training audio in the second training audio set. In an embodiment of the present disclosure, all second training audios are audios of standard speakers, that is, all speakers in the second training audios are standard speakers. For example, all speakers in the second training audios are the same standard speaker. In a possible implementation, the second training audio set may include a large number of second training audios corresponding to the same standard speaker.
[0136] In the disclosed embodiment, the second content encoder can be pre-trained. For any first training audio in the first training audio set, the second content encoder can perform character recognition and character prediction on the first training audio to obtain a third text recognition result corresponding to the first training audio. In the disclosed embodiment, the second content encoder not only performs character recognition on the input audio, but also performs character prediction on the input audio, thereby being able to extract not only the phoneme information of the input audio, but also the semantic information of the input audio. That is, the content feature vector sequence extracted by the second content encoder includes the actual semantic information of the input audio. The second content encoder simultaneously considers acoustic information and language information, thereby being able to achieve modeling of text content and reduce the impact of accents.
[0137] In some application scenarios, characters may also be referred to as text symbols, etc., which is not limited here.
[0138] In a possible implementation, performing character recognition and character prediction on the first training audio by the second content encoder to obtain a third text recognition result corresponding to the first training audio includes: obtaining a third audio feature vector sequence corresponding to the first training audio; encoding the third audio feature vector sequence by the second content encoder to obtain a fourth audio feature vector sequence corresponding to the first training audio; and performing character recognition and character prediction based on the fourth audio feature vector sequence by the second content encoder to obtain a third text recognition result corresponding to the first training audio.
[0139] In one example, the third audio feature vector sequence can be Represented as T, where T can represent the number of audio feature vectors in the third audio feature vector sequence. The length of the fourth audio feature vector sequence can be less than T, that is, compared with the third audio feature vector sequence, the fourth audio feature vector sequence can be a more compact and higher-level representation.
[0140] In this implementation, a third audio feature vector sequence corresponding to the first training audio is obtained, the third audio feature vector sequence is encoded by the second content encoder to obtain a fourth audio feature vector sequence corresponding to the first training audio, and character recognition and character prediction are performed by the second content encoder based on the fourth audio feature vector sequence to obtain a third text recognition result corresponding to the first training audio, thereby encoding the third audio feature vector sequence by the second content encoder to capture the main features of the third audio feature vector sequence.
[0141] In a possible implementation, performing character recognition and character prediction based on the fourth audio feature vector sequence by the second content encoder to obtain a third text recognition result corresponding to the first training audio includes: for an audio feature vector to be processed in the fourth audio feature vector sequence, performing character recognition based on the audio feature vector to be processed and a character prediction result corresponding to the audio feature vector to be processed by the second content encoder to obtain a character recognition result corresponding to the audio feature vector to be processed, wherein the audio feature vector to be processed represents the audio feature vector that has not yet been character recognized and is ranked first among the audio feature vectors in the fourth audio feature vector sequence; performing character prediction based on the recognized characters corresponding to the fourth audio feature vector sequence by the second content encoder to obtain a character prediction result corresponding to the fourth audio feature vector sequence.
[0142] In this implementation, the second content encoder can perform character recognition on the audio feature vectors in the fourth audio feature vector sequence in sequence, that is, the second content encoder can perform character recognition on the audio feature vectors in the fourth audio feature vector sequence in chronological order. Therefore, the audio feature vector to be processed in the fourth audio feature vector sequence can represent the audio feature vector that has not yet been subjected to character recognition and is ranked first among the audio feature vectors in the fourth audio feature vector sequence. The character prediction result corresponding to the audio feature vector to be processed can be the most recent character prediction result obtained by the second content encoder, that is, the character prediction result corresponding to the audio feature vector to be processed can include the information of the last character predicted by the second content encoder. In the case where the second content encoder has not predicted a character based on the fourth audio feature vector sequence, for example, in the case where the second content encoder has not recognized a character based on the audio feature vector before the audio feature vector to be processed, the character prediction result corresponding to the audio feature vector to be processed can be empty.
[0143] Among them, any character recognition result can be a character, or can be empty. Any character prediction result can be a character, or can be empty.
[0144] In this implementation, for the audio feature vector to be processed in the fourth audio feature vector sequence, the second content encoder performs character recognition based on the audio feature vector to be processed and the character prediction result corresponding to the audio feature vector to be processed, so as to obtain the character recognition result corresponding to the audio feature vector to be processed, wherein the audio feature vector to be processed represents the audio feature vector with the highest sorting among the audio feature vectors in the fourth audio feature vector sequence that have not yet been character recognized, and the second content encoder performs character prediction based on the recognized characters corresponding to the fourth audio feature vector sequence, so as to obtain the character prediction result corresponding to the fourth audio feature vector sequence, thereby improving the accuracy of the second content encoder in character recognition and character prediction for the first training audio, thereby helping the second timbre conversion model to convert the input audio with an accent into audio with standard pronunciation.
[0145] In one possible implementation, the second content encoder may adopt a RNN-T (RNN-Transducer) network structure. Of course, in other possible implementations, the second content encoder may also adopt other speech recognition (Automatic Speech Recognition, ASR) model structures, as long as the second content encoder can realize character recognition and character prediction for the input audio.
[0146] In a possible implementation, the second content encoder includes an encoding module, an identification module and a prediction module, wherein the output ends of the encoding module and the prediction module are connected to the input end of the identification module, and the output end of the identification module is connected to the input end of the prediction module; the encoding of the third audio feature vector sequence by the second content encoder to obtain a fourth audio feature vector sequence corresponding to the first training audio comprises: encoding the third audio feature vector sequence by the encoding module to obtain a fourth audio feature vector sequence corresponding to the first training audio; the encoding of the third audio feature vector sequence by the second content encoder based on the audio feature vector to be processed and the audio feature vector corresponding to the audio feature vector to be processed The character prediction result is used to perform character recognition to obtain the character recognition result corresponding to the audio feature vector to be processed, including: performing character recognition based on the audio feature vector to be processed and the character prediction result corresponding to the audio feature vector to be processed by the recognition module, and obtaining the character recognition result corresponding to the audio feature vector to be processed; the character prediction is performed based on the recognized characters corresponding to the fourth audio feature vector sequence by the second content encoder to obtain the character prediction result corresponding to the fourth audio feature vector sequence, including: performing character prediction based on the recognized characters corresponding to the fourth audio feature vector sequence by the prediction module, and obtaining the character prediction result corresponding to the fourth audio feature vector sequence.
[0147] In this implementation, the encoding module is similar to an acoustic model and can be used to encode audio features. The prediction module is similar to a language model and can be used to predict the next character based on the current input character. The recognition module can combine the information output by the encoding module and the prediction module to obtain the character recognition result.
[0148] In some application scenarios, the encoding module may also be called an encoder, etc., the recognition module may also be called a joiner, a fusion processing module, a combination module, etc., and the prediction module may also be called a predictor, etc., which are not limited here.
[0149] In a possible implementation, the second content encoder includes an encoding module, a recognition module, and a prediction module, wherein the output of the encoding module and the output of the prediction module serve as inputs of the recognition module, and the output of the recognition module serves as input of the prediction module.
[0150] In a possible implementation, before the recognition module recognizes a character, the output of the prediction module is empty. Accordingly, before the prediction module outputs a valid character prediction result, the recognition module can perform character recognition based only on the audio feature vectors in the fourth audio feature vector sequence.
[0151] In the disclosed embodiment, the second content encoder can be trained based on a large number of first training audios and their annotated texts. The training goal of the second content encoder is to extract the same content feature vector sequence for input audios with the same content and different accents. For example, after the second content encoder is trained, the second content encoder can extract almost the same content feature vector sequence for the input audio with an accent "Have you eaten (ci1) rice (huan4) today?" and the input audio without an accent "Have you eaten (chi1) rice (fan4) today?".
[0152] In the embodiment of the present disclosure, the third text recognition result corresponding to the first training audio may represent the text recognition result obtained by the second content encoder for recognizing the first training audio during the training phase of the second content encoder. Represents, where N may represent the number of characters recognized for the first training audio, and After the training of the second content encoder is completed, that is, in the use phase of the second content encoder, the second content encoder may only extract a content encoding feature vector sequence without outputting a text recognition result.
[0153] In an embodiment of the present disclosure, in response to the second content encoder being trained to satisfy a second preset training condition, a second timbre conversion model can be trained based on the first training audio set and the second training audio set. During the training of the second timbre conversion model, the parameters of the second content encoder can remain fixed, or can be updated along with other modules in the second timbre conversion model. In one example, the second timbre conversion model can adopt a network structure of ConsistencyVC, which is not limited here. In this example, the content encoder in the network structure of ConsistencyVC can be replaced by the second content encoder.
[0154] The second preset training condition may be a preset convergence condition, a preset number of iterations, a preset number of epochs, etc., which are not limited here.
[0155] In a possible implementation, the second timbre conversion model further includes a second speaker encoder; the training of the second timbre conversion model based on the first training audio set and the second training audio set includes: for any first training audio in the first training audio set and any second training audio in the second training audio set, extracting a fifth content feature vector sequence corresponding to the first training audio through the second content encoder, and extracting a second speaker feature vector corresponding to the second training audio through the second speaker encoder; generating a first synthetic audio corresponding to the first training audio and the second training audio based on the fifth content feature vector sequence and the second speaker feature vector; and training the second timbre conversion model based on the first synthetic audio.
[0156] In this implementation, during the process of training the second timbre conversion model, the second content encoder may be used to extract a content feature vector sequence corresponding to the input audio, and the second speaker encoder may be used to extract a speaker feature vector corresponding to the input audio.
[0157] In one example, the fifth content feature vector sequence can be express.
[0158] In this implementation, the first synthesized audio may represent audio synthesized by the second timbre conversion model based on the first training audio and the second training audio. As an example of this implementation, the fifth content feature vector sequence and the second speaker feature vector may be processed by the second decoder to obtain the first synthesized audio.
[0159] In a possible implementation, extracting the fifth content feature vector sequence corresponding to the first training audio through the second content encoder includes: determining the output of the last hidden layer of the recognition module in the second content encoder as the fifth content feature vector sequence corresponding to the first training audio.
[0160] Among them, the last hidden layer of the recognition module in the second content encoder can capture the high-level, abstract representation of the input audio, and can capture the key information and semantics in the input audio. Therefore, in this implementation, by determining the output of the last hidden layer of the recognition module in the second content encoder as the fifth content feature vector sequence corresponding to the first training audio, and performing subsequent training of the second timbre conversion model based on the fifth content feature vector sequence obtained thereby, it is helpful to make the second timbre conversion model keep the text content unchanged before and after the timbre conversion.
[0161] Of course, in other possible implementations, the output of other hidden layers of the second content encoder (such as the penultimate hidden layer of the recognition module, etc.) can also be used as the fifth content feature vector sequence corresponding to the first training audio, which is not limited here.
[0162] In a possible implementation, generating a first synthetic audio corresponding to the first training audio and the second training audio based on the fifth content feature vector sequence and the second speaker feature vector includes: aligning the length of the fifth content feature vector sequence with the length of the third audio feature vector sequence corresponding to the first training audio to obtain a sixth content feature vector sequence corresponding to the first training audio; and generating a first synthetic audio corresponding to the first training audio and the second training audio based on the sixth content feature vector sequence and the second speaker feature vector.
[0163] In a possible implementation manner, the second content encoder predicts at most one character for any audio feature vector in the third audio feature vector sequence.
[0164] In the standard RNN-T, each input audio feature vector may correspond to multiple output characters. In this implementation, each input audio feature vector is limited to correspond to at most one output character. This is conducive to aligning the fifth content feature vector sequence with the third audio feature vector sequence.
[0165] In a possible implementation, the training of the second timbre conversion model based on the first synthetic audio includes: inputting the first synthetic audio into a discriminator, and outputting, through the discriminator, a prediction result of an audio category corresponding to the first synthetic audio, wherein the audio category includes real audio and synthetic audio; and training the second timbre conversion model according to the prediction result of the audio category corresponding to the first synthetic audio.
[0166] In this implementation, during the training process of the second timbre conversion model, the discriminator can be used to determine whether the audio output by the second decoder is real audio. The training goal of the second timbre conversion model is to make the discriminator unable to distinguish between real standard speaker audio (such as the second training audio) and the synthesized audio generated by the second timbre conversion model. By adopting this implementation, it is helpful for the second timbre conversion model to synthesize more natural standard speaker audio.
[0167] In an embodiment of the present disclosure, a first training audio set and a second training audio set are obtained, wherein the first training audio set includes a plurality of first training audios corresponding to a plurality of speakers, and the second training audio set includes a plurality of second training audios corresponding to a standard speaker, wherein the standard speaker represents a speaker with standard pronunciation. For any first training audio in the first training audio set, character recognition and character prediction are performed on the first training audio by the second content encoder to obtain a third text recognition result corresponding to the first training audio. The second content encoder is trained according to the third text recognition result and the annotated text corresponding to the first training audio. In response to the second content encoder being trained until a second preset training condition is satisfied, the second timbre conversion model is trained based on the first training audio set and the second training audio set. The second timbre conversion model thus trained can be used to convert the audio with an accent into the audio of a standard speaker, and can automatically repair the part of the audio with an accent that is not pronounced standardly.
[0168] The disclosed embodiment also provides a method for voice conversion, including: obtaining a second voice conversion model and a first voice conversion model; obtaining audio to be converted and standard speaker audio; obtaining standard pronunciation audio corresponding to the audio to be converted based on the audio to be converted and the standard speaker audio through the second voice conversion model; obtaining accent-corrected audio corresponding to the audio to be converted based on the audio to be converted and the standard pronunciation audio through the first voice conversion model.
[0169] In the embodiment of the present disclosure, the audio to be converted may be any audio to be converted. For example, the audio to be converted may be audio with an accent.
[0170] The standard speaker audio may be any audio of the standard speaker. The standard speaker audio may be used to provide timbre information of the standard speaker. In a possible implementation, any second training audio in the second training audio set may be used as the standard speaker audio.
[0171] In the disclosed embodiment, the third content feature vector sequence corresponding to the audio to be converted and the third speaker feature vector corresponding to the standard speaker audio can be extracted by the second timbre conversion model. The standard pronunciation audio corresponding to the audio to be converted can be obtained by the second timbre conversion model based on the third content feature vector sequence and the third speaker feature vector. The text content of the standard pronunciation audio is the same as the audio to be converted, and the timbre is the same as the standard speaker audio.
[0172] In the disclosed embodiment, the fourth speaker feature vector corresponding to the audio to be converted and the fourth content feature vector sequence corresponding to the standard pronunciation audio can be extracted by the first timbre conversion model. The fourth speaker feature vector and the fourth content feature vector sequence can be processed by the first timbre conversion model to obtain the accent-corrected audio corresponding to the audio to be converted. Through the first timbre conversion model, the standard pronunciation audio can be reconverted into the timbre of the target speaker (i.e., the speaker in the audio to be converted), while keeping the pronunciation phonemes the same as the standard pronunciation audio. For example, through the first timbre conversion model, the standard pronunciation audio "Have you eaten (chi1) rice (fan4) today?" is converted back to the timbre of the target speaker, and the pronunciation of "eating" is kept as the phoneme "chi1 fan4", thereby achieving the purpose of accent correction.
[0173] The training method of the timbre conversion model and the timbre conversion method provided in the embodiments of the present disclosure can be applied to technical fields such as audio beautification, speech beautification, and timbre conversion, and are not limited here.
[0174] The following describes the training method of the timbre conversion model and the timbre conversion method provided by the embodiments of the present disclosure through a specific application scenario.
[0175] 1. Training Phase
[0176] 1. Training the second timbre conversion model
[0177] The second timbre conversion model may include a second content encoder, a second speaker encoder and a second decoder. The second content encoder may adopt a RNN-T network structure. The second content encoder may include an encoding module, a recognition module and a prediction module, wherein the output ends of the encoding module and the prediction module may be connected to the input end of the recognition module, and the output end of the recognition module may be connected to the input end of the prediction module.
[0178] The first training audio set may be used to train the second content encoder, and then the first training audio set and the second training audio set may be used to train the second speaker encoder and the second decoder in the second timbre conversion model. The first training audio set may include a large number of first training audios corresponding to a large number of speakers with different accents. The second training audio set may include a large number of second training audios corresponding to the same standard speaker.
[0179] When training the second content encoder, for any first training audio in the first training audio set, a third audio feature vector sequence corresponding to the first training audio can be obtained. The third audio feature vector sequence can be encoded by the encoding module to obtain a fourth audio feature vector sequence corresponding to the first training audio. Character recognition can be performed by the recognition module based on the audio feature vector to be processed in the fourth audio feature vector sequence and the character prediction result corresponding to the audio feature vector to be processed to obtain the character recognition result corresponding to the audio feature vector to be processed. Character prediction can be performed by the prediction module based on the recognized characters corresponding to the fourth audio feature vector sequence to obtain the character prediction result corresponding to the fourth audio feature vector sequence. The third text recognition result corresponding to the first training audio can be obtained based on the character prediction result corresponding to the fourth audio feature vector sequence. The second content encoder can be trained based on the third text recognition result and the annotated text corresponding to the first training audio.
[0180] In response to the second content encoder being trained to satisfy the second preset training condition, the second timbre conversion model can be trained based on the first training audio set and the second training audio set. Specifically, for any first training audio in the first training audio set and any second training audio in the second training audio set, the fifth content feature vector sequence corresponding to the first training audio can be extracted by the second content encoder, and the second speaker feature vector corresponding to the second training audio can be extracted by the second speaker encoder. Based on the fifth content feature vector sequence and the second speaker feature vector, a first synthetic audio corresponding to the first training audio and the second training audio can be generated. The first synthetic audio can be input into a discriminator, and the audio category prediction result corresponding to the first synthetic audio can be output by the discriminator, wherein the audio category includes real audio and synthetic audio. The second timbre conversion model can be trained based on the audio category prediction result corresponding to the first synthetic audio and the real audio category of the first synthetic audio.
[0181] 2. Training the first timbre conversion model
[0182] The first timbre conversion model may include a shared encoder, a first content encoder, a first speaker encoder, and a first decoder, wherein the output of the shared encoder may be connected to the input of the first content encoder and the input of the first speaker encoder, and the output of the first content encoder and the output of the first speaker encoder may be connected to the input of the first decoder.
[0183] In the training of the first timbre conversion model, the shared encoder, the first content encoder and the first speaker encoder may be jointly trained first, and then the first decoder may be trained. The first decoder may include a mel spectrum generator and a synthetic audio generator.
[0184] The first training audio set may be used to train the first timbre conversion model. For any first training audio in the first training audio set, the first training audio may be subjected to a baseband conversion to obtain a baseband conversion audio corresponding to the first training audio. The first training audio may be encoded by a shared encoder to obtain a first audio feature vector sequence corresponding to the first training audio, and the baseband conversion audio may be encoded by a shared encoder to obtain a second audio feature vector sequence corresponding to the baseband conversion audio. The three audio feature vector sequences may be encoded by a first content encoder to obtain a first content feature vector sequence corresponding to the first training audio, and the second audio feature vector sequence may be encoded by the first content encoder to obtain a second content feature vector sequence corresponding to the baseband conversion audio. The first content feature vector sequence and the second content feature vector sequence may be subjected to phoneme classification respectively to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence. The value of the first loss function corresponding to the first timbre conversion model may be determined according to the cosine similarity between the first phoneme classification result and the second phoneme classification result.
[0185] A text recognition module may be used to perform text recognition on the first content feature vector sequence to obtain a first text recognition result corresponding to the first content feature vector sequence. A value of a second loss function corresponding to the first timbre conversion model may be determined based on difference information between the first text recognition result and the annotated text corresponding to the first training audio.
[0186] The first audio feature vector sequence may be speaker encoded by a first speaker encoder to obtain a first speaker feature vector corresponding to the first training audio. The first speaker feature vector may be speaker classified by a speaker classification module to obtain a speaker prediction result corresponding to the first training audio. The value of the third loss function corresponding to the first timbre conversion model may be determined based on difference information between the speaker prediction result and speaker annotation information corresponding to the first training audio.
[0187] The shared encoder, the first content encoder, and the first speaker encoder may be jointly trained according to the value of the first loss function, the value of the second loss function, and the value of the third loss function.
[0188] In response to the shared encoder, the first content encoder and the first speaker encoder being trained to meet a first preset training condition, the first decoder in the first timbre conversion model can be jointly trained using a content feature vector sequence output by the first content encoder and a speaker feature vector output by the first speaker encoder.
[0189] 2. Use Phase
[0190] Figure 2 FIG. 1 is a schematic diagram showing a method for converting timbre provided by an embodiment of the present disclosure. Figure 2 As shown, in this application scenario, the audio to be converted and the standard speaker audio can be obtained, wherein the audio to be converted can be audio with an accent, and the standard speaker audio can be audio of a standard speaker.
[0191] In the first stage, the third content feature vector sequence corresponding to the audio to be converted can be extracted through the second content encoder in the second timbre conversion model, and the third speaker feature vector corresponding to the standard speaker audio can be extracted through the second speaker encoder in the second timbre conversion model. The standard pronunciation audio is obtained according to the third content feature vector sequence and the third speaker feature vector. The text content of the standard pronunciation audio is the same as the audio to be converted, and the timbre is the same as the standard speaker audio. For example, the audio to be converted is the target speaker's accented audio "Have you eaten (ci1) rice (huan4) today", and the standard pronunciation audio is the audio with the pronunciation "Have you eaten (chi1) rice (fan4) today" and the timbre is the timbre of the standard speaker.
[0192] In the second stage, the fourth speaker feature vector corresponding to the audio to be converted and the fourth content feature vector sequence corresponding to the standard pronunciation audio can be extracted by the first timbre conversion model. The fourth speaker feature vector and the fourth content feature vector sequence can be processed by the first timbre conversion model to obtain the accent-corrected audio corresponding to the audio to be converted. The pronunciation phonemes of the accent-corrected audio are the same as those of the standard pronunciation audio, and the timbre is the same as that of the audio to be converted.
[0193] Thus, in the first stage, the audio with an accent is converted into a standard pronunciation audio with a timbre of a standard speaker by the second timbre conversion model that maintains the text content. In the second stage, the standard pronunciation audio is converted back to the timbre of the target speaker by the first timbre conversion model that maintains the pronunciation phonemes, while keeping the pronunciation in the standard pronunciation audio unchanged, still standard Mandarin. Thus, the original audio with an accent can be beautified by the second timbre conversion model and the first timbre conversion model, that is, the non-standard accent in the original audio is repaired without changing the timbre of the input speech. That is, by processing the original audio by the second timbre conversion model and the first timbre conversion model, an audio with the same timbre as the original audio, consistent rhythm and rhyme, and standard pronunciation and no accent can be obtained.
[0194] The disclosed embodiment also provides a timbre conversion method, comprising: obtaining a first timbre conversion model trained by the timbre conversion model training method; obtaining audio to be converted and standard pronunciation audio; extracting a fourth content feature vector sequence corresponding to the standard pronunciation audio and a fourth speaker feature vector corresponding to the audio to be converted through the first timbre conversion model; processing the fourth speaker feature vector and the fourth content feature vector sequence through the first timbre conversion model to obtain accent-corrected audio corresponding to the audio to be converted.
[0195] It can be understood that the above-mentioned various method embodiments mentioned in the present disclosure can be combined with each other to form a combined embodiment without violating the principle logic. Due to space limitations, the present disclosure will not repeat them. It can be understood by those skilled in the art that in the above-mentioned method of the specific implementation method, the specific execution order of each step should be determined according to its function and possible internal logic.
[0196] In addition, the present disclosure also provides a training device for a timbre conversion model, a timbre conversion device, an electronic device, a computer-readable storage medium, and a computer program product, all of which can be used to implement any timbre conversion model training method or timbre conversion method provided by the present disclosure. The corresponding technical solutions and technical effects can be found in the corresponding records in the method part and will not be repeated here.
[0197] Figure 3 FIG. 1 is a block diagram of a training device for a timbre conversion model provided by an embodiment of the present disclosure. Figure 3 As shown, the training device of the timbre conversion model includes:
[0198] A fourth acquisition module 31 is used to acquire a first training audio set, wherein the first training audio set includes a plurality of first training audios corresponding to a plurality of speakers;
[0199] A baseband conversion module 32, configured to perform baseband conversion on any first training audio in the first training audio set to obtain a baseband converted audio corresponding to the first training audio;
[0200] An extraction module 33, configured to extract a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio respectively through a first timbre conversion model;
[0201] A phoneme classification module 34, configured to perform phoneme classification on the first content feature vector sequence and the second content feature vector sequence, respectively, to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence;
[0202] The third training module 35 is used to train the first timbre conversion model according to the first phoneme classification result and the second phoneme classification result.
[0203] In a possible implementation manner, the device further includes:
[0204] a text recognition module, configured to perform text recognition on the first content feature vector sequence to obtain a first text recognition result corresponding to the first content feature vector sequence;
[0205] The fourth training module is used to train the first timbre conversion model according to the first text recognition result and the annotated text corresponding to the first training audio.
[0206] In one possible implementation,
[0207] The device further includes: a first audio encoding module, configured to encode the first training audio through the first timbre conversion model to obtain a first audio feature vector sequence corresponding to the first training audio; a second audio encoding module, configured to encode the baseband conversion audio through the first timbre conversion model to obtain a second audio feature vector sequence corresponding to the baseband conversion audio;
[0208] The extraction module 33 is used to: perform content encoding on the first audio feature vector sequence through the first timbre conversion model to obtain a first content feature vector sequence corresponding to the first training audio; perform content encoding on the second audio feature vector sequence through the first timbre conversion model to obtain a second content feature vector sequence corresponding to the baseband conversion audio.
[0209] In a possible implementation manner, the device further includes:
[0210] a speaker encoding module, configured to perform speaker encoding on the first audio feature vector sequence by using the first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio;
[0211] a speaker classification module, configured to perform speaker classification on the first speaker feature vector to obtain a speaker prediction result corresponding to the first training audio;
[0212] The fifth training module is used to train the first timbre conversion model according to the speaker prediction result and the speaker annotation information corresponding to the first training audio.
[0213] In a possible implementation, the first timbre conversion model includes a shared encoder, a first content encoder, and a first speaker encoder;
[0214] The first audio encoding module is used to: encode the first training audio through the shared encoder to obtain a first audio feature vector sequence corresponding to the first training audio;
[0215] The second audio encoding module is used to: encode the baseband conversion audio through the shared encoder to obtain a second audio feature vector sequence corresponding to the baseband conversion audio;
[0216] The extraction module 33 is used to: encode the first audio feature vector sequence through the first content encoder to obtain a first content feature vector sequence corresponding to the first training audio; encode the second audio feature vector sequence through the first content encoder to obtain a second content feature vector sequence corresponding to the baseband conversion audio;
[0217] The speaker encoding module is used to: perform speaker encoding on the first audio feature vector sequence through the first speaker encoder to obtain a first speaker feature vector corresponding to the first training audio.
[0218] In a possible implementation manner, the shared encoder, the first content encoder, and the first speaker encoder are jointly trained.
[0219] In a possible implementation, the first timbre conversion model further includes a first decoder, and the device further includes:
[0220] A sixth training module is used to train the first decoder based on the first training audio set in response to the shared encoder, the first content encoder and the first speaker encoder being trained to meet a first preset training condition.
[0221] In a possible implementation, the first decoder includes a mel-spectrum generator and a synthetic audio generator.
[0222] The present disclosure also provides a device for converting tone color, including:
[0223] A second acquisition module, used for acquiring the second timbre conversion model and the first timbre conversion model;
[0224] A third acquisition module is used to acquire the audio to be converted and the standard speaker audio;
[0225] A first conversion module, configured to obtain a standard pronunciation audio corresponding to the audio to be converted based on the audio to be converted and the standard speaker audio by using the second timbre conversion model;
[0226] The second conversion module is used to obtain the accent-corrected audio corresponding to the audio to be converted based on the audio to be converted and the standard pronunciation audio through the first timbre conversion model.
[0227] The embodiment of the present disclosure also provides a training device for a timbre conversion model. The second timbre conversion model includes a second content encoder. The training device for the timbre conversion model includes: a first acquisition module, used to acquire a first training audio set and a second training audio set, wherein the first training audio set includes a plurality of first training audios corresponding to a plurality of speakers, and the second training audio set includes a plurality of second training audios corresponding to a standard speaker, wherein the standard speaker represents a speaker with standard pronunciation; a prediction module, used to perform character recognition and character prediction on any first training audio in the first training audio set through the second content encoder to obtain a third text recognition result corresponding to the first training audio; a first training module, used to train the second content encoder according to the third text recognition result and the annotated text corresponding to the first training audio; a second training module, used to train the second timbre conversion model based on the first training audio set and the second training audio set in response to the second content encoder being trained to meet a second preset training condition.
[0228] In a possible implementation, the prediction module is used to:
[0229] Obtaining a third audio feature vector sequence corresponding to the first training audio;
[0230] Encoding the third audio feature vector sequence by the second content encoder to obtain a fourth audio feature vector sequence corresponding to the first training audio;
[0231] The second content encoder performs character recognition and character prediction based on the fourth audio feature vector sequence to obtain a third text recognition result corresponding to the first training audio.
[0232] In a possible implementation, the prediction module is used to:
[0233] For the audio feature vector to be processed in the fourth audio feature vector sequence, character recognition is performed by the second content encoder based on the audio feature vector to be processed and the character prediction result corresponding to the audio feature vector to be processed, so as to obtain a character recognition result corresponding to the audio feature vector to be processed, wherein the audio feature vector to be processed represents the audio feature vector that is ranked first among the audio feature vectors in the fourth audio feature vector sequence that have not yet been character recognized;
[0234] The second content encoder performs character prediction based on the recognized characters corresponding to the fourth audio feature vector sequence to obtain a character prediction result corresponding to the fourth audio feature vector sequence.
[0235] In a possible implementation, the second content encoder includes an encoding module, an identification module, and a prediction module, wherein output ends of the encoding module and the prediction module are connected to an input end of the identification module, and the output end of the identification module is connected to an input end of the prediction module;
[0236] The prediction module is used to:
[0237] Encoding the third audio feature vector sequence by the encoding module to obtain a fourth audio feature vector sequence corresponding to the first training audio;
[0238] Performing character recognition based on the audio feature vector to be processed and the character prediction result corresponding to the audio feature vector to be processed by the recognition module to obtain a character recognition result corresponding to the audio feature vector to be processed;
[0239] The prediction module performs character prediction based on the recognized characters corresponding to the fourth audio feature vector sequence to obtain a character prediction result corresponding to the fourth audio feature vector sequence.
[0240] In a possible implementation, before the recognition module recognizes a character, the output of the prediction module is empty.
[0241] In a possible implementation manner, the second content encoder predicts at most one character for any audio feature vector in the third audio feature vector sequence.
[0242] In a possible implementation, the second timbre conversion model further includes a second speaker encoder;
[0243] The second training module is used to:
[0244] For any first training audio in the first training audio set and any second training audio in the second training audio set, extracting a fifth content feature vector sequence corresponding to the first training audio by the second content encoder, and extracting a second speaker feature vector corresponding to the second training audio by the second speaker encoder;
[0245] Generate a first synthesized audio corresponding to the first training audio and the second training audio based on the fifth content feature vector sequence and the second speaker feature vector;
[0246] Based on the first synthesized audio, the second timbre conversion model is trained.
[0247] In a possible implementation, the second training module is used to:
[0248] The output of the last hidden layer of the recognition module in the second content encoder is determined as a fifth content feature vector sequence corresponding to the first training audio.
[0249] In a possible implementation, the second training module is used to:
[0250] Aligning the length of the fifth content feature vector sequence with the length of the third audio feature vector sequence corresponding to the first training audio to obtain a sixth content feature vector sequence corresponding to the first training audio;
[0251] Based on the sixth content feature vector sequence and the second speaker feature vector, a first synthesized audio corresponding to the first training audio and the second training audio is generated.
[0252] In a possible implementation, the second training module is used to:
[0253] Inputting the first synthesized audio into a discriminator, and outputting, through the discriminator, a prediction result of an audio category corresponding to the first synthesized audio, wherein the audio category includes real audio and synthesized audio;
[0254] The second timbre conversion model is trained according to the audio category prediction result corresponding to the first synthesized audio.
[0255] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. Its specific implementation and technical effects can refer to the description of the above method embodiments. For the sake of brevity, they will not be repeated here.
[0256] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, wherein the computer program instructions implement the above method when executed by a processor. The computer-readable storage medium may be a non-volatile computer-readable storage medium, or may be a volatile computer-readable storage medium.
[0257] The embodiment of the present disclosure further provides a computer program, including a computer-readable code. When the computer-readable code is executed in an electronic device, a processor in the electronic device executes the above method.
[0258] The embodiments of the present disclosure also provide a computer program product, including a computer-readable code, or a non-volatile computer-readable storage medium carrying the computer-readable code. When the computer-readable code runs in an electronic device, a processor in the electronic device executes the above method.
[0259] An embodiment of the present disclosure also provides an electronic device, comprising: one or more processors; and a memory for storing executable instructions; wherein the one or more processors are configured to call the executable instructions stored in the memory to execute the above method.
[0260] The electronic device may be provided as a terminal, a server, or a device in other forms.
[0261] Figure 4 1 is a block diagram of an electronic device 1900 provided in an embodiment of the present disclosure. For example, the electronic device 1900 may be provided as a server or a terminal. Figure 4 , the electronic device 1900 includes a processing component 1922, which further includes one or more processors, and a memory resource represented by a memory 1932 for storing instructions executable by the processing component 1922, such as an application. The application stored in the memory 1932 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 1922 is configured to execute instructions to perform the above method.
[0262] The electronic device 1900 may also include a power supply component 1926 configured to perform power management of the electronic device 1900, a wired or wireless network interface 1950 configured to connect the electronic device 1900 to a network, and an input / output interface 1958 (I / O interface). The electronic device 1900 may operate based on an operating system stored in the memory 1932, such as a Microsoft Server operating system (Windows Server 2003). TM ), a graphical user interface operating system launched by Apple (MacOS X TM ), a multi-user, multi-process computer operating system (Unix TM ), a free and open source Unix-like operating system (Linux TM ), an open source Unix-like operating system (FreeBSD TM ) or similar.
[0263] In an exemplary embodiment, a non-volatile computer-readable storage medium is also provided, such as a memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to perform the above method.
[0264] The present disclosure may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present disclosure.
[0265] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the above. More specific examples (a non-exhaustive list) of computer-readable storage media include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the above. The computer-readable storage medium used herein is not to be interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0266] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0267] The computer program instructions for performing the operations of the present disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The computer-readable program instructions may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect through the Internet). In some embodiments, by using the state information of the computer-readable program instructions to personalize an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), the electronic circuit may execute the computer-readable program instructions, thereby implementing various aspects of the present disclosure.
[0268] Various aspects of the present disclosure are described herein with reference to flowcharts and / or block diagrams of methods, devices (systems) and computer program products according to embodiments of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of boxes in the flowchart and / or block diagram can be implemented by computer-readable program instructions.
[0269] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0270] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0271] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0272] The computer program product may be implemented in hardware, software or a combination thereof. In one optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (SDK) and the like.
[0273] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0274] If the technical solution of the embodiments of the present disclosure involves personal information, the product using the technical solution of the embodiments of the present disclosure has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing the personal information. If the technical solution of the embodiments of the present disclosure involves sensitive personal information, the product using the technical solution of the embodiments of the present disclosure has obtained the individual's separate consent before processing the sensitive personal information, and at the same time meets the requirement of "explicit consent". For example, at the personal information collection device such as the camera, a clear and obvious sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that he or she agrees to collect his or her personal information; or on the device for processing personal information, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload his or her personal information; among which, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.
[0275] The embodiments of the present disclosure have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and changes will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or improvements to the technology in the market, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein.
Claims
1. A method for training a timbre conversion model, characterized in that: include: Acquire a first training audio set, wherein the first training audio set includes a plurality of first training audios corresponding to a plurality of speakers; For any first training audio in the first training audio set, performing baseband conversion on the first training audio to obtain baseband converted audio corresponding to the first training audio; Extracting respectively a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio by using a first timbre conversion model; Performing phoneme classification on the first content feature vector sequence and the second content feature vector sequence respectively to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence, wherein the first phoneme classification result includes a classification prediction result of each phoneme in the first training audio, and the second phoneme classification result includes a classification prediction result of each phoneme in the fundamental frequency conversion audio; According to the first phoneme classification result and the second phoneme classification result, a value of a first loss function corresponding to the first timbre conversion model is determined, and according to the value of the first loss function, the first timbre conversion model is trained.
2. The method according to claim 1, characterized in that The method further comprises: Performing text recognition on the first content feature vector sequence to obtain a first text recognition result corresponding to the first content feature vector sequence; The first timbre conversion model is trained according to the first text recognition result and the annotated text corresponding to the first training audio.
3. The method according to claim 1, characterized in that The method further comprises: encoding the first training audio through the first timbre conversion model to obtain a first audio feature vector sequence corresponding to the first training audio; encoding the baseband conversion audio through the first timbre conversion model to obtain a second audio feature vector sequence corresponding to the baseband conversion audio; The method of extracting a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio respectively by using the first timbre conversion model includes: performing content encoding on the first audio feature vector sequence by using the first timbre conversion model to obtain a first content feature vector sequence corresponding to the first training audio; and performing content encoding on the second audio feature vector sequence by using the first timbre conversion model to obtain a second content feature vector sequence corresponding to the baseband conversion audio.
4. The method according to claim 3, characterized in that The method further comprises: Performing speaker encoding on the first audio feature vector sequence by using the first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio; Performing speaker classification on the first speaker feature vector to obtain a speaker prediction result corresponding to the first training audio; The first timbre conversion model is trained according to the speaker prediction result and speaker annotation information corresponding to the first training audio.
5. The method according to claim 4, characterized in that The first timbre conversion model includes a shared encoder, a first content encoder and a first speaker encoder; The encoding of the first training audio by the first timbre conversion model to obtain a first audio feature vector sequence corresponding to the first training audio includes: encoding the first training audio by the shared encoder to obtain a first audio feature vector sequence corresponding to the first training audio; The step of encoding the baseband conversion audio by using the first timbre conversion model to obtain a second audio feature vector sequence corresponding to the baseband conversion audio comprises: encoding the baseband conversion audio by using the shared encoder to obtain a second audio feature vector sequence corresponding to the baseband conversion audio; The step of encoding the first audio feature vector sequence by the first timbre conversion model to obtain a first content feature vector sequence corresponding to the first training audio includes: encoding the first audio feature vector sequence by the first content encoder to obtain a first content feature vector sequence corresponding to the first training audio; The step of encoding the second audio feature vector sequence by the first timbre conversion model to obtain a second content feature vector sequence corresponding to the baseband conversion audio comprises: encoding the second audio feature vector sequence by the first content encoder to obtain a second content feature vector sequence corresponding to the baseband conversion audio; The step of performing speaker encoding on the first audio feature vector sequence by using the first timbre conversion model to obtain a first speaker feature vector corresponding to the first training audio includes: performing speaker encoding on the first audio feature vector sequence by using the first speaker encoder to obtain a first speaker feature vector corresponding to the first training audio.
6. The method according to claim 5, characterized in that The shared encoder, the first content encoder, and the first speaker encoder are jointly trained.
7. The method according to claim 5, characterized in that The first timbre conversion model further includes a first decoder, and the method further includes: In response to the shared encoder, the first content encoder, and the first speaker encoder being trained to satisfy a first preset training condition, the first decoder is trained based on the first training audio set.
8. The method according to claim 7, characterized in that The first decoder includes a mel spectrum generator and a synthetic audio generator.
9. A method for converting timbre, characterized in that: include: Acquire a second timbre conversion model and a first timbre conversion model trained by the timbre conversion model training method according to any one of claims 1 to 8; Get the audio to be converted and the standard speaker audio; Obtaining a standard pronunciation audio corresponding to the audio to be converted based on the audio to be converted and the standard speaker audio using the second timbre conversion model; The accent-corrected audio corresponding to the audio to be converted is obtained based on the audio to be converted and the standard pronunciation audio through the first timbre conversion model.
10. A training device for a timbre conversion model, characterized in that: include: A fourth acquisition module, configured to acquire a first training audio set, wherein the first training audio set includes a plurality of first training audios corresponding to a plurality of speakers; a baseband conversion module, configured to perform baseband conversion on any first training audio in the first training audio set to obtain a baseband converted audio corresponding to the first training audio; An extraction module, used to extract a first content feature vector sequence corresponding to the first training audio and a second content feature vector sequence corresponding to the baseband conversion audio respectively through a first timbre conversion model; a phoneme classification module, configured to perform phoneme classification on the first content feature vector sequence and the second content feature vector sequence, respectively, to obtain a first phoneme classification result corresponding to the first content feature vector sequence and a second phoneme classification result corresponding to the second content feature vector sequence, wherein the first phoneme classification result includes a classification prediction result of each phoneme in the first training audio, and the second phoneme classification result includes a classification prediction result of each phoneme in the base frequency conversion audio; The third training module is used to determine the value of the first loss function corresponding to the first timbre conversion model according to the first phoneme classification result and the second phoneme classification result, and train the first timbre conversion model according to the value of the first loss function.
11. A timbre conversion device, characterized in that: include: A second acquisition module, used to acquire a second timbre conversion model and the first timbre conversion model trained by the timbre conversion model training device according to claim 10; A third acquisition module is used to acquire the audio to be converted and the standard speaker audio; A first conversion module, configured to obtain a standard pronunciation audio corresponding to the audio to be converted based on the audio to be converted and the standard speaker audio by using the second timbre conversion model; The second conversion module is used to obtain the accent-corrected audio corresponding to the audio to be converted based on the audio to be converted and the standard pronunciation audio through the first timbre conversion model.
12. An electronic device, characterized in that: include: one or more processors; a memory for storing executable instructions; The one or more processors are configured to call executable instructions stored in the memory to execute the method according to any one of claims 1 to 9.
13. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.
14. A computer program product comprising computer readable code, or a non-volatile computer readable storage medium carrying computer readable code, characterized in that: When the computer readable code is executed in an electronic device, a processor in the electronic device executes the method according to any one of claims 1 to 9.
