Sound changing method and device and storage medium

By automatically identifying the fundamental frequency of the voice signal, judging the user's gender and adjusting the characteristic parameters, the problem of users manually inputting gender information in the prior art is solved, and the automatic voice change and privacy protection of the voice signal is realized, improving the user experience.

CN119207439APending Publication Date: 2024-12-27BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310774096.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-06-27
Publication Date
2024-12-27

Smart Images

  • Figure CN119207439A_ABST
    Figure CN119207439A_ABST
Patent Text Reader

Abstract

The invention relates to a voice changing method and device and a storage medium. The voice changing method comprises the following steps: acquiring a voice signal of a to-be-changed voice, and determining a target tone after voice changing; extracting the fundamental frequency of the voice signal, and determining the gender information of the user sending the voice signal based on the fundamental frequency of the voice signal; and on the basis of the gender information and the target tone, adjusting characteristic parameters of the voice signal, and changing the voice of the voice signal. Through the method disclosed by the invention, the gender information of the user can be automatically and accurately recognized based on the fundamental frequency of the voice signal, so that the voice of the voice signal is changed, the privacy of the user is protected, and the voice changing effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing, and in particular to a voice changing method, device and storage medium. Background Art

[0002] Voice conversion usually refers to the process of "specially processing" the acoustic features of one person's voice to make it sound like another person's voice.

[0003] In recent years, with the rapid development of information processing and artificial intelligence technology, voice conversion technology has been applied in many fields. For example, in the entertainment field, the user's voice can be converted into a loli voice, an uncle voice, etc. through voice changing, thereby increasing the user's fun. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present disclosure provides a voice changing method, device and storage medium.

[0005] According to a first aspect of an embodiment of the present disclosure, a voice changing method is provided, comprising: obtaining a speech signal to be changed, and determining a target timbre after the voice change; extracting a fundamental frequency of the speech signal, and based on the fundamental frequency of the speech signal, determining gender information of a user who sends the speech signal; based on the gender information and the target timbre, adjusting characteristic parameters of the speech signal to change the voice of the speech signal.

[0006] In one implementation, the extracting of the fundamental frequency of the voice signal and determining the gender information of the user who sends the voice signal based on the fundamental frequency of the voice signal includes: extracting the fundamental frequency that meets the conditions in the voice signal in real time frame by frame, and determining a first fundamental frequency and a second fundamental frequency based on the fundamental frequency that meets the conditions; the fundamental frequency that meets the conditions is a fundamental frequency that is greater than or equal to a first fundamental frequency threshold and less than or equal to a second fundamental frequency threshold, the first fundamental frequency is the average of the fundamental frequencies extracted from the starting frame of the voice signal to the current frame, and the second fundamental frequency is the average of the fundamental frequencies extracted within a specified number of frames before the current frame; based on the first fundamental frequency and the second fundamental frequency, the gender information of the user who sends the voice signal is determined.

[0007] In one implementation manner, determining the gender information of the user who sends the voice signal based on the first fundamental frequency and the second fundamental frequency includes: if the first fundamental frequency is less than or equal to a first threshold, determining the gender information of the user who sends the voice signal based on the second fundamental frequency, a fourth threshold, and a fifth threshold; if the first fundamental frequency is greater than the first threshold and greater than or equal to the second threshold, determining the gender information of the user who sends the voice signal based on the second fundamental frequency, a third threshold, and the fourth threshold; if the first fundamental frequency is greater than the first threshold and less than the second threshold, determining the gender information of the user who sends the voice signal based on the second fundamental frequency, the first threshold, and the second threshold; the first threshold is the lower limit value of the fundamental frequency of the voice signal sent by a female user, and the second threshold is the upper limit value of the fundamental frequency of the voice signal sent by a male user; the first threshold is less than the second threshold, the third threshold is greater than the first threshold, and the third threshold is less than the fourth threshold, the fourth threshold is less than the fifth threshold, and the fifth threshold is less than the second threshold.

[0008] In one implementation, the determining of the gender information of the user who sends the voice signal based on the second fundamental frequency, the fourth threshold and the fifth threshold includes: if the second fundamental frequency is less than or equal to the fourth threshold, determining that the gender of the user who sends the voice signal is male; if the second fundamental frequency is greater than the fourth threshold and greater than the fifth threshold, determining that the gender of the user who sends the voice signal is female; if the second fundamental frequency is greater than the fourth threshold and less than or equal to the fifth threshold, determining that the gender of the user who sends the voice signal is to be determined.

[0009] In one implementation, the determining of the gender information of the user who sends the voice signal based on the second fundamental frequency, the third threshold and the fourth threshold includes: if the second fundamental frequency is greater than or equal to the fourth threshold, determining that the gender of the user who sends the voice signal is female; if the second fundamental frequency is less than the fourth threshold and less than the third threshold, determining that the gender of the user who sends the voice signal is male; if the second fundamental frequency is less than the fourth threshold and greater than or equal to the third threshold, determining that the gender of the user who sends the voice signal is to be determined.

[0010] In one implementation, the determining of the gender information of the user who sends the voice signal based on the second fundamental frequency, the first threshold and the second threshold includes: if the second fundamental frequency is greater than or equal to the second threshold, determining that the gender of the user who sends the voice signal is female; if the second fundamental frequency is less than the second threshold and less than or equal to the first threshold, determining that the gender of the user who sends the voice signal is male; if the second fundamental frequency is less than the second threshold and greater than the first threshold, determining that the gender of the user who sends the voice signal is to be determined.

[0011] In one embodiment, the extracting the fundamental frequency of the speech signal includes: caching the acquired speech signal to be changed in a buffer, and when the cumulative duration of the cached speech signal reaches a duration threshold, framing, windowing, and frequency domain transformation of the speech signal to obtain frequency domain features corresponding to the speech signal; based on the frequency domain features, extracting the fundamental frequency of the speech signal.

[0012] According to a second aspect of an embodiment of the present disclosure, a voice changing device is provided, comprising: an acquisition unit, for acquiring a voice signal to be changed and determining a target timbre after the voice change; a processing unit, for extracting the fundamental frequency of the voice signal and, based on the fundamental frequency of the voice signal, determining the gender information of a user who sends the voice signal; and for adjusting characteristic parameters of the voice signal based on the gender information and the target timbre to change the voice signal.

[0013] In one embodiment, the processing unit extracts the fundamental frequency of the voice signal in the following manner, and determines the gender information of the user who sends the voice signal based on the fundamental frequency of the voice signal: extracting the fundamental frequency that meets the conditions in the voice signal in real time frame by frame, and determining the first fundamental frequency and the second fundamental frequency based on the fundamental frequency that meets the conditions; the fundamental frequency that meets the conditions is a fundamental frequency that is greater than or equal to a first fundamental frequency threshold and less than or equal to a second fundamental frequency threshold, the first fundamental frequency is the average of the fundamental frequencies extracted from the starting frame of the voice signal to the current frame, and the second fundamental frequency is the average of the fundamental frequencies extracted within a specified number of frames before the current frame; based on the first fundamental frequency and the second fundamental frequency, the gender information of the user who sends the voice signal is determined.

[0014] In one embodiment, the processing unit determines the gender information of the user who sends the voice signal based on the first fundamental frequency and the second fundamental frequency in the following manner: if the first fundamental frequency is less than or equal to a first threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the fourth threshold and the fifth threshold; if the first fundamental frequency is greater than the first threshold and greater than or equal to the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the third threshold and the fourth threshold; if the first fundamental frequency is greater than the first threshold and less than the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the first threshold and the second threshold; the first threshold is the lower limit value of the fundamental frequency of the voice signal sent by a female user, and the second threshold is the upper limit value of the fundamental frequency of the voice signal sent by a male user; the first threshold is less than the second threshold, the third threshold is greater than the first threshold, and the third threshold is less than the fourth threshold, the fourth threshold is less than the fifth threshold, and the fifth threshold is less than the second threshold.

[0015] In one embodiment, the processing unit determines the gender information of the user who sends the voice signal based on the second fundamental frequency, the fourth threshold and the fifth threshold in the following manner: if the second fundamental frequency is less than or equal to the fourth threshold, the gender of the user who sends the voice signal is determined to be male; if the second fundamental frequency is greater than the fourth threshold and greater than the fifth threshold, the gender of the user who sends the voice signal is determined to be female; if the second fundamental frequency is greater than the fourth threshold and less than or equal to the fifth threshold, the gender of the user who sends the voice signal is to be determined.

[0016] In one embodiment, the processing unit determines the gender information of the user who sends the voice signal based on the second fundamental frequency, the third threshold and the fourth threshold in the following manner: if the second fundamental frequency is greater than or equal to the fourth threshold, the gender of the user who sends the voice signal is determined to be female; if the second fundamental frequency is less than the fourth threshold and less than the third threshold, the gender of the user who sends the voice signal is determined to be male; if the second fundamental frequency is less than the fourth threshold and greater than or equal to the third threshold, the gender of the user who sends the voice signal is to be determined.

[0017] In one embodiment, the processing unit determines the gender information of the user who sends the voice signal based on the second fundamental frequency, the first threshold and the second threshold in the following manner: if the second fundamental frequency is greater than or equal to the second threshold, the gender of the user who sends the voice signal is determined to be female; if the second fundamental frequency is less than the second threshold and less than or equal to the first threshold, the gender of the user who sends the voice signal is determined to be male; if the second fundamental frequency is less than the second threshold and greater than the first threshold, the gender of the user who sends the voice signal is to be determined.

[0018] In one embodiment, the processing unit extracts the fundamental frequency of the speech signal in the following manner: the acquired speech signal to be changed is cached in a buffer, and when the cumulative duration of the cached speech signal reaches a duration threshold, the speech signal is framed, windowed, and frequency-domain transformed to obtain frequency domain features corresponding to the speech signal; based on the frequency domain features, the fundamental frequency of the speech signal is extracted.

[0019] According to a third aspect of an embodiment of the present disclosure, a voice changing device is provided, comprising: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to: execute the method described in the first aspect or any one implementation of the first aspect.

[0020] According to a fourth aspect of an embodiment of the present disclosure, a storage medium is provided, in which instructions are stored. When the instructions in the storage medium are executed by a processor of a terminal, the terminal is enabled to execute the method described in the first aspect or any one of the implementations of the first aspect.

[0021] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: automatically identifying the gender information of the user through the fundamental frequency of the voice signal, and then adjusting the characteristic parameters of the voice signal according to the gender information and the target timbre to achieve voice change of the voice signal. The method protects the privacy of the user, reasonably and efficiently utilizes the characteristic parameters of the voice signal to optimize the voice change effect, and improves the user experience.

[0022] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0024] Figure 1 The figure is a flow chart of a voice changing method according to an exemplary embodiment.

[0025] Figure 2The invention is a flowchart showing a method for determining gender information of a user who sends a voice signal according to an exemplary embodiment.

[0026] Figure 3 The figure is a flow chart showing another method for determining the gender information of a user who sends a voice signal according to an exemplary embodiment.

[0027] Figure 4 The figure is a flow chart showing another method for determining the gender information of a user who sends a voice signal according to an exemplary embodiment.

[0028] Figure 5 The figure is a flow chart showing another method for determining the gender information of a user who sends a voice signal according to an exemplary embodiment.

[0029] Figure 6 The figure is a flow chart showing another method for determining the gender information of a user who sends a voice signal according to an exemplary embodiment.

[0030] Figure 7 The figure is a flow chart showing another method for determining gender information of a user who sends a voice signal according to an exemplary embodiment.

[0031] Figure 8 The figure is a flow chart showing the working principle of a voice changing method according to an exemplary embodiment.

[0032] Fig. 9 The figure is a flow chart of a delay calculation method according to an exemplary embodiment.

[0033] Fig.10 The figure is a block diagram showing the working principle of a voice changing method according to an exemplary embodiment.

[0034] Fig.11 The figure is a block diagram of a voice changing device according to an exemplary embodiment.

[0035] Fig.12 The invention is a block diagram showing a device for voice changing method according to an exemplary embodiment.

[0036] Fig.13 The invention is a block diagram showing a device for voice changing method according to an exemplary embodiment. DETAILED DESCRIPTION

[0037] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present disclosure.

[0038] As people's lives become more and more enriched, voice changing is gradually applied to various scenarios. For example, in the game world, the user's voice can be converted into a loli voice, an uncle voice, etc., to increase the fun of the game and improve the user's sense of participation.

[0039] In the related art, it is necessary to know the gender of the user, and then perform voice changing based on the gender information and target timbre provided by the user. Among them, obtaining the gender of the user involves user privacy and affects the user experience.

[0040] Based on this, the present disclosure provides a voice changing method, which can automatically determine the user's gender based on the user's voice, realize automatic updating of gender information, and improve user experience.

[0041] The voice changing method provided by the present disclosure can realize voice privacy protection and voice expansion data, and can be applied to a variety of scenarios. In the game scenario, the fun of the game can be increased by changing the player's voice, and the player's experience and authenticity can be enhanced. In the social scenario, the voice can be changed during the user's call to improve the user's activity. In the entertainment scenario, the voice changing technology can be used to beautify the user's voice and add fun to entertainment (such as singing).

[0042] Figure 1 is a flow chart of a voice changing method according to an exemplary embodiment. Figure 1 As shown, the voice changing method is applied in a terminal, including the following steps.

[0043] In step S11, a speech signal to be voice-changed is obtained, and a target timbre after voice-changed is determined.

[0044] In step S12, the fundamental frequency of the speech signal is extracted, and based on the fundamental frequency of the speech signal, the gender information of the user who sends the speech signal is determined.

[0045] In step S13, based on the gender information and the target timbre, the characteristic parameters of the speech signal are adjusted to change the voice of the speech signal.

[0046] In the embodiments of the present disclosure, the source of the voice signal is not fixed. The voice signal can be a voice clip recorded in advance by the user, or a voice signal input by the user in real time. The target timbre is the timbre selected by the user. The present disclosure provides a variety of target timbres for the user to choose from, such as Lolita voice, uncle voice, royal sister voice, etc. The present disclosure does not limit the type of target timbre.

[0047] In the disclosed embodiment, the gender information of the user who sends the voice signal is determined by the fundamental frequency of the voice signal, and then the characteristic parameters are adjusted according to the gender information and the target timbre to achieve voice change. This method protects user privacy and improves the user experience.

[0048] In the present disclosure, the gender information of the user who sends the voice signal is determined based on the fundamental frequency, and the process is described below.

[0049] Figure 2 is a flow chart showing a method for determining gender information of a user who sends a voice signal according to an exemplary embodiment. Figure 2 As shown, the method includes the following steps.

[0050] In step S21, fundamental frequencies that meet the conditions are extracted from the speech signal in real time frame by frame, and a first fundamental frequency and a second fundamental frequency are determined based on the fundamental frequencies that meet the conditions.

[0051] In step S22, based on the first fundamental frequency and the second fundamental frequency, the gender information of the user who sends the voice signal is determined.

[0052] In the disclosed embodiment, there are multiple algorithms for extracting the fundamental frequency. For example, a DIO (digital input out) filtering algorithm is used, which mainly includes three steps: filtering a segment of speech signal using low-pass filters with different cutoff frequencies, calculating the candidate fundamental frequency and credibility in each filtered signal (i.e., extracting four spans from the sine wave, calculating the standard deviation of the four spans, the larger the standard deviation, the lower the credibility), and selecting the candidate fundamental frequency with the highest credibility (i.e., the lowest standard deviation) as the fundamental frequency of the segment of speech signal.

[0053] In the disclosed embodiment, the fundamental frequency that meets the conditions is a fundamental frequency that is greater than or equal to the first fundamental frequency threshold and less than or equal to the second fundamental frequency threshold. The first fundamental frequency is the average of the fundamental frequencies extracted from the start frame of the speech signal to the current frame, and the second fundamental frequency is the average of the fundamental frequencies extracted within a specified number of frames before the current frame. For example, 10 fundamental frequencies are extracted within 100ms, which are 165, 155, 160, 150, 155, 160, 165, 175, 170, and 180, respectively. The average of the 10 fundamental frequencies is calculated to obtain a first fundamental frequency of 163.5, and the average of the 4 fundamental frequencies extracted within the most recent 40ms is calculated to obtain a second fundamental frequency of 172.5.

[0054] According to an embodiment of the present disclosure, the first fundamental frequency and the second fundamental frequency are determined based on the fundamental frequency, and then the gender information of the user who sends the voice signal is determined. The use of double average values ​​can effectively improve the accuracy of identifying the gender information of the user of the voice signal.

[0055] In the present disclosure, taking human voice as an example, the fundamental frequency is actually the frequency of the natural vibration of the vocal cords during voiced sounds, which is manifested as the pitch of the voice. Generally speaking, the fundamental frequency of male speech is relatively low, while the fundamental frequency of female speech is relatively high. Therefore, the gender of the speaker can be determined by the fundamental frequency.

[0056] In the present disclosure, the above-mentioned determination of the gender information of the user who sends the voice signal based on the first fundamental frequency and the second fundamental frequency is mainly carried out by judging whether the first fundamental frequency and the second fundamental frequency meet corresponding conditions to determine the gender information of the corresponding user who sends the voice signal.

[0057] Figure 3 is a flow chart showing another method for determining the gender information of a user who sends a voice signal according to an exemplary embodiment. Figure 3 As shown, the method includes the following steps.

[0058] In step S31, a first fundamental frequency and a second fundamental frequency of a speech signal are input.

[0059] In step S32, if the first fundamental frequency is less than or equal to the first threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the fourth threshold and the fifth threshold.

[0060] In step S33, if the first fundamental frequency is greater than the first threshold and greater than or equal to the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the third threshold and the fourth threshold.

[0061] In step S34, if the first fundamental frequency is greater than the first threshold and less than the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the first threshold and the second threshold.

[0062] In the disclosed embodiment, the first threshold is the lower limit of the fundamental frequency of the voice signal emitted by the female user, and the second threshold is the upper limit of the fundamental frequency of the voice signal emitted by the male user. It should be noted that the first threshold is less than the second threshold, the third threshold is greater than the first threshold, and the third threshold is less than the fourth threshold, the fourth threshold is less than the fifth threshold, and the fifth threshold is less than the second threshold.

[0063] According to an embodiment of the present disclosure, a specific judgment method is provided to determine the gender of the user who sends the voice signal, and the gender information of the user who sends the voice signal can be determined more accurately through this judgment method.

[0064] In the present disclosure, based on the above judgment method, it can be determined whether the gender of the user who sends the voice signal is male, female, or undetermined. It should be noted that the user's gender is undetermined, which means that the gender information of the current user is not updated, and the last gender information is still used. If the last determined gender information of the user is male, then the user's gender is undetermined, which can be understood as the current user's gender is male.

[0065] In the present disclosure, when the first fundamental frequency is less than or equal to the first threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the fourth threshold and the fifth threshold.

[0066] Figure 4 is a flow chart showing another method for determining the gender information of a user who sends a voice signal according to an exemplary embodiment. Figure 4 As shown, the method includes the following steps.

[0067] In step S41, a first fundamental frequency and a second fundamental frequency of a speech signal are input.

[0068] In step S42, if the first fundamental frequency is less than or equal to the first threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the fourth threshold and the fifth threshold.

[0069] In step S43, if the second fundamental frequency is less than or equal to the fourth threshold, it is determined that the gender of the user who sends the voice signal is male.

[0070] In step S44, if the second fundamental frequency is greater than the fourth threshold and greater than the fifth threshold, it is determined that the gender of the user who sends the voice signal is female.

[0071] In step S45, if the second fundamental frequency is greater than the fourth threshold and less than or equal to the fifth threshold, it is determined that the gender of the user who sends the voice signal is undetermined.

[0072] Through the method of the embodiment of the present disclosure, when the first fundamental frequency is less than or equal to the first threshold, the gender information of the user who sends the voice signal can be directly determined based on the second fundamental frequency, thereby providing the gender information for subsequent adjustment of feature parameters.

[0073] In the present disclosure, when the first fundamental frequency is greater than or equal to the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the third threshold, and the fourth threshold.

[0074] Figure 5 is a flow chart showing another method for determining the gender information of a user who sends a voice signal according to an exemplary embodiment. Figure 5 As shown, the method includes the following steps.

[0075] In step S51, a first fundamental frequency and a second fundamental frequency of a speech signal are input.

[0076] In step S52, if the first fundamental frequency is greater than or equal to the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the third threshold and the fourth threshold.

[0077] In step S53, if the second fundamental frequency is greater than or equal to the fourth threshold, it is determined that the gender of the user who sends the voice signal is female.

[0078] In step S54, if the second fundamental frequency is smaller than the fourth threshold and smaller than the third threshold, it is determined that the gender of the user who sends the voice signal is male.

[0079] In step S55, if the second fundamental frequency is less than the fourth threshold value and greater than or equal to the third threshold value, it is determined that the gender of the user who sends the voice signal is undetermined.

[0080] Through the method of the embodiment of the present disclosure, when the first fundamental frequency is greater than or equal to the second threshold, the gender information of the user who sends the voice signal can be directly determined based on the second fundamental frequency, thereby providing the gender information for subsequent adjustment of feature parameters.

[0081] In the present disclosure, when the first fundamental frequency is greater than the first threshold and less than the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the first threshold and the second threshold.

[0082] Figure 6 is a flow chart showing another method for determining the gender information of a user who sends a voice signal according to an exemplary embodiment. Figure 6 As shown, the method includes the following steps.

[0083] In step S61, a first fundamental frequency and a second fundamental frequency of a speech signal are input.

[0084] In step S62, if the first fundamental frequency is greater than the first threshold and less than the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the first threshold and the second threshold.

[0085] In step S63, if the second fundamental frequency is greater than or equal to the second threshold, it is determined that the gender of the user who sends the voice signal is female.

[0086] In step S64, if the second fundamental frequency is less than the second threshold and less than or equal to the first threshold, it is determined that the gender of the user who sends the voice signal is male.

[0087] In step S65, if the second fundamental frequency is less than the second threshold and greater than the first threshold, it is determined that the gender of the user who sends the voice signal is undetermined.

[0088] Through the method of the embodiment of the present disclosure, when the first fundamental frequency is greater than the first threshold and less than the second threshold, the gender information of the user who sends the voice signal can be directly determined based on the second fundamental frequency, thereby providing the gender information for subsequent adjustment of feature parameters.

[0089] To facilitate overall understanding, the following is a comprehensive description of the above-mentioned determination of the gender information of the user who sends the voice signal based on the fundamental frequency of the voice signal.

[0090] Figure 71 is a flowchart of another method for determining the gender information of a user who sends a voice signal according to an exemplary embodiment. In the following example, F0 represents the fundamental frequency, f0_mean represents the first fundamental frequency, and f0_mean_s represents the second fundamental frequency. The first fundamental frequency threshold is set to 70, and the second fundamental frequency threshold is set to 400. The first threshold is set to 155, the second threshold is set to 185, the third threshold is set to 160, the fourth threshold is set to 170, and the fifth threshold is set to 180.

[0091] Input the fundamental frequency F0 of the speech signal, and determine whether F0 satisfies F0>=70 and F0<=400. If so, calculate and update f0_mean and f0_mean_s, otherwise directly enter the subsequent judgment process.

[0092] In the subsequent judgment process, when f0_mean<=155: If f0_mean_s<=170, the gender information of the user who sent the voice signal is determined to be male. If f0_mean_s>180, the gender of the user who sent the voice signal is determined to be female. If f0_mean_s>170 and f0_mean_s<=180, the gender of the user who sent the voice signal is determined to be undetermined.

[0093] When f0_mean>=185: If f0_mean_s>=170, the gender information of the user who sent the voice signal is determined to be female. If f0_mean_s<160, the gender information of the user who sent the voice signal is determined to be male. If f0_mean_s<170 and f0_mean_s>=160, the gender information of the user who sent the voice signal is determined to be undetermined.

[0094] When f0_mean>155 and f0_mean<185: If f0_mean_s>=185, the gender information of the user who sent the voice signal is determined to be female. If f0_mean_s<=155, the gender information of the user who sent the voice signal is determined to be male. If f0_mean_s<185 and f0_mean_s>155, the gender information of the user who sent the voice signal is determined to be undetermined.

[0095] For ease of understanding, the following examples are given. If f0_mean=155 and f0_mean_s=160 are input, the gender is determined to be male. If f0_mean=155 and f0_mean_s=190 are input, the gender is determined to be female. If f0_mean=155 and f0_mean_s=175 are input, the gender is determined to be undetermined. If f0_mean=185 and f0_mean_s=175 are input, the gender is determined to be female. If f0_mean=185 and f0_mean_s=150 are input, the gender is determined to be male. If f0_mean=185 and f0_mean_s=165 are input, the gender is determined to be undetermined. If f0_mean=175 and f0_mean_s=190 are input, the gender is determined to be female. If f0_mean=175 and f0_mean_s=150 are input, the gender is determined to be male. If f0_mean=175, f0_mean_s=175, the gender is determined to be undetermined.

[0096] In the disclosed embodiment, a real-time update strategy and a double average method are adopted to accurately determine the gender information of the speech signal, thereby achieving effective adjustment of the feature parameters.

[0097] In the voice changing method disclosed in the present invention, a target speech signal is synthesized based on feature parameters. The basic principle of the voice changing method is described below.

[0098] Speech signals contain a variety of important acoustic features. The present disclosure mainly involves three acoustic features: fundamental frequency (F0), spectral envelope (SP), and aperiodic index (AP). Taking human voice as an example, the fundamental frequency is actually the frequency of the natural vibration of the vocal cords during voiced sounds, which is manifested as the high and low sense of voice tone. The spectrum is the sum of the envelope and the details of the spectrum, and the smooth curve of the resonance peak point is the envelope. Among them, the resonance peak is a collection of peak values ​​representing the main frequency components of the speech, and each resonance peak frequency and its bandwidth are used as parameters. A higher bandwidth can make the sound sound louder or crisper, and a lower bandwidth can give a deep and thick characteristic. The aperiodic index is the ratio of white noise to pulse sequence energy. For unvoiced sounds, the white noise ratio is very high and the aperiodic ratio is very high; while for voiced sounds, the white noise ratio is very low and the aperiodic ratio is very low.

[0099] Figure 8 is a flow chart showing the working principle of a voice changing method according to an exemplary embodiment. Figure 8 As shown, the method includes the following steps.

[0100] In step S81, a speech signal to be voice-changed is acquired, and a target timbre after voice-changed is determined.

[0101] In step S82, the speech signal is temporarily stored in a buffer, and when the accumulated duration of the speech signal reaches a duration threshold, the speech signal is framed, windowed, and frequency-domain transformed.

[0102] In the disclosed embodiment, a time delay calculation unit is used to extract features of the segmented voice signal to be changed in real time. This process ensures that the user does not feel the delay when changing the voice. Since the conversion process is relatively complicated, the preset time threshold is determined based on the current algorithm, which avoids adding complexity to the algorithm due to multiple conversions and shortens the time for the voice signal to change.

[0103] For the specific delay calculation process, see Fig. 9 , Fig. 9 FIG. 1 is a flow chart of a method for calculating a time delay according to an exemplary embodiment. Fig. 9 As shown, the voice signal to be changed is input and temporarily stored in the buffer. When certain conditions are met, framing, windowing and frequency domain transformation operations are performed to extract features. For example, when the cumulative duration of the voice signal in the buffer reaches 200ms, the voice signal is framed, windowed and frequency-domain transformed to obtain the acoustic features of the voice signal.

[0104] It should be noted that the above feature extraction is based on the source-filter model, which extracts the acoustic features of the speech signal by simulating the production process of human voice, including the input excitation part (corresponding to the excitation formed by the joint action of the human lung airflow and the vocal cords) and the output vocal tract resonance part (corresponding to the tuning movement of the human vocal tract). Among them, three kinds of acoustic features are mainly extracted by frame: fundamental frequency (voiced sound), spectrum envelope (timbre) and non-periodic index (ratio of clear and voiced sound). Among them, the fundamental frequency determines the position of each pulse in the pulse sequence, and the spectrum envelope describes the timbre and speech content of the frame, which is the frequency response of the linear time-invariant system. The non-periodic index describes the influence of vocal cord vibration or white noise mixing.

[0105] In step S83, the fundamental frequency of the voice signal is extracted, and based on the fundamental frequency of the voice signal, the gender information of the user who sends the voice signal is determined.

[0106] In step S84, an adjustment factor is determined based on the gender information and the target timbre, and the feature parameter is adjusted based on the adjustment factor.

[0107] In the disclosed embodiment, different gender information and different target timbres correspond to different adjustment factors, wherein the adjustment factors include a fundamental frequency adjustment factor and a spectrum envelope adjustment factor. Adjusting the characteristic parameters based on the adjustment factors includes: adjusting the fundamental frequency based on the fundamental frequency adjustment factor, and adjusting the spectrum envelope based on the spectrum envelope adjustment factor.

[0108] For ease of understanding, an example is given. For example, if it has been determined that the gender information of the user who sends the voice signal is female and the target timbre is a loli voice, the adjustment factor (2, 1.5) is determined, that is, all the input fundamental frequencies are multiplied by 2, and the spectrum envelope is stretched by 1.5, thereby obtaining the updated fundamental frequency and spectrum envelope. For another example, if it has been determined that the gender information of the user who sends the voice signal is male and the target timbre is a loli voice, the adjustment factor (3.2, 2) is determined, that is, all the input fundamental frequencies are multiplied by 3, and the spectrum envelope is stretched by 2, thereby obtaining the updated fundamental frequency and spectrum envelope. It can be understood that since the fundamental frequencies and spectrum envelopes of different gender information have different phase differences with different target timbres, when adjusting the characteristic parameters, the determined adjustment factors are also different.

[0109] It should be noted that when converting male voice to female voice, since the pitch of male and female voices is higher than that of male voices, and the interval between voiceprints is wider, it is necessary to increase the fundamental frequency and widen the spectrum envelope. To increase the fundamental frequency is to multiply all fundamental frequencies by a multiple and increase them at the same time, rather than changing all fundamental frequencies to a fixed value. If all fundamental frequencies are changed to a fixed value, a mechanical and ruthless voice (like a robot's voice) will be synthesized. Therefore, the adjustment strategy determines the voice change effect.

[0110] In step S85, the voice of the speech signal is changed based on the characteristic parameters.

[0111] In the disclosed embodiment, based on the initial non-periodic index of the speech signal, and the adjusted and updated fundamental frequency and spectrum envelope, a new speech signal is synthesized by a vocoder to achieve real-time voice change.

[0112] For ease of understanding, the basic principle process of the above-mentioned voice changing method is further illustrated below with reference to the accompanying diagrams. Fig.10 FIG. 1 is a block diagram showing the working principle of a voice changing method according to an exemplary embodiment. Fig.10 As shown, firstly, the voice signal to be changed is input, and the fundamental frequency F0 is extracted by the time delay calculation unit. Among them, the features extracted by the time delay calculation unit also include the spectrum envelope SP and the non-periodic index AP. Furthermore, it is necessary to perform gender judgment based on the extracted fundamental frequency F0, and the gender judgment module mainly includes the above-mentioned method for determining the gender information of the user who sends the voice signal. Then, parameters are distributed according to the target timbre selected by the user and the gender information of the user obtained by judgment. The parameters specifically distributed in the parameter distribution process are the determined adjustment factors, and the fundamental frequency F0 and the spectrum envelope SP are updated according to the distributed parameters (i.e., the adjustment factors). The updated fundamental frequency F0 and spectrum envelope SP have been obtained through the above process. The vocoder performs speech synthesis based on the new fundamental frequency F0 and the new spectrum envelope SP, as well as the initial non-periodic index AP, and outputs the target speech signal.

[0113] Specifically, the DIO algorithm can be used to extract the base frequency F0, which has been described in detail in this disclosure, so it will not be repeated here. Linear predictive coding (LPC), Cepstrum method, etc. can be used to extract the spectrum envelope. It should be noted that the LPC principle is that the present value of a speech sample can be approximated by a weighted linear combination of several past values ​​of speech samples. The Cepstrum method is to perform Fourier transform on a signal, take the absolute value, take the logarithm, phase unfold, and perform Fourier transform on the log spectrum. The frequency spectrum is the Cepstrum, and the value domain can only be called pseudo-frequency (pseudo-frequency domain). The envelope is a low-frequency component, and the details of the spectrum are high-frequency components; the low-frequency part of the Cepstrum is obtained by low-pass filtering, and then the envelope of the spectrum is obtained by inverse Fourier transform. The Platinum algorithm can be used to extract non-periodic indexes. A variety of different algorithms can be used to extract the base frequency, spectrum envelope, and non-periodic index, which are not specifically limited in this disclosure.

[0114] In the disclosed embodiment, the acoustic features of the speech signal are extracted through the feature extraction model, the gender information of the speech signal is determined based on the fundamental frequency, and the feature parameters are adjusted to achieve voice change. This method reasonably and efficiently utilizes the feature parameters of the speech signal, protects the user's privacy, and can synthesize a variety of characteristic timbres to enhance the user's experience.

[0115] Based on the same concept, the embodiment of the present disclosure also provides a voice changing device.

[0116] It is understandable that the voice changing device provided in the embodiment of the present disclosure includes hardware structures and / or software modules corresponding to the execution of each function in order to realize the above functions. In combination with the units and algorithm steps of each example disclosed in the embodiment of the present disclosure, the embodiment of the present disclosure can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Technical users in this field can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the technical solution of the embodiment of the present disclosure.

[0117] Fig.11 is a block diagram of a voice changing device 100 according to an exemplary embodiment. Fig.11 The device 100 includes an acquisition unit 101 and a processing unit 102.

[0118] The acquisition unit 101 is used to acquire a speech signal to be voice-changed and determine a target timbre after the voice-changed speech signal.

[0119] The processing unit 102 is used to extract the fundamental frequency of the voice signal, and determine the gender information of the user who sends the voice signal based on the fundamental frequency of the voice signal; and to adjust the characteristic parameters of the voice signal based on the gender information and the target timbre to change the voice signal.

[0120] In one embodiment, the processing unit 102 extracts the fundamental frequency of the voice signal in the following manner, and determines the gender information of the user who sends the voice signal based on the fundamental frequency of the voice signal: extracting the fundamental frequency that meets the conditions in the voice signal in real time frame by frame, and determining the first fundamental frequency and the second fundamental frequency based on the fundamental frequency that meets the conditions; the fundamental frequency that meets the conditions is a fundamental frequency that is greater than or equal to the first fundamental frequency threshold and less than or equal to the second fundamental frequency threshold, the first fundamental frequency is the average of the fundamental frequencies extracted from the start frame of the voice signal to the current frame, and the second fundamental frequency is the average of the fundamental frequencies extracted within a specified number of frames before the current frame; based on the first fundamental frequency and the second fundamental frequency, the gender information of the user who sends the voice signal is determined.

[0121] In one embodiment, the processing unit 102 determines the gender information of the user who sends the voice signal based on the first fundamental frequency and the second fundamental frequency in the following manner: if the first fundamental frequency is less than or equal to the first threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the fourth threshold and the fifth threshold; if the first fundamental frequency is greater than the first threshold and greater than or equal to the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the third threshold and the fourth threshold; if the first fundamental frequency is greater than the first threshold and less than the second threshold, the gender information of the user who sends the voice signal is determined based on the second fundamental frequency, the first threshold and the second threshold; the first threshold is the lower limit value of the fundamental frequency of the voice signal sent by a female user, and the second threshold is the upper limit value of the fundamental frequency of the voice signal sent by a male user; the first threshold is less than the second threshold, the third threshold is greater than the first threshold, and the third threshold is less than the fourth threshold, the fourth threshold is less than the fifth threshold, and the fifth threshold is less than the second threshold.

[0122] In one embodiment, the processing unit 102 determines the gender information of the user who sends the voice signal based on the second fundamental frequency, the fourth threshold and the fifth threshold in the following manner: if the second fundamental frequency is less than or equal to the fourth threshold, the gender of the user who sends the voice signal is determined to be male; if the second fundamental frequency is greater than the fourth threshold and greater than the fifth threshold, the gender of the user who sends the voice signal is determined to be female; if the second fundamental frequency is greater than the fourth threshold and less than or equal to the fifth threshold, the gender of the user who sends the voice signal is to be determined.

[0123] In one embodiment, the processing unit 102 determines the gender information of the user who sends the voice signal based on the second fundamental frequency, the third threshold and the fourth threshold in the following manner: if the second fundamental frequency is greater than or equal to the fourth threshold, the gender of the user who sends the voice signal is determined to be female; if the second fundamental frequency is less than the fourth threshold and less than the third threshold, the gender of the user who sends the voice signal is determined to be male; if the second fundamental frequency is less than the fourth threshold and greater than or equal to the third threshold, the gender of the user who sends the voice signal is to be determined.

[0124] In one embodiment, the processing unit 102 determines the gender information of the user who sends the voice signal based on the second fundamental frequency, the first threshold and the second threshold in the following manner: if the second fundamental frequency is greater than or equal to the second threshold, the gender of the user who sends the voice signal is determined to be female; if the second fundamental frequency is less than the second threshold and less than or equal to the first threshold, the gender of the user who sends the voice signal is determined to be male; if the second fundamental frequency is less than the second threshold and greater than the first threshold, the gender of the user who sends the voice signal is to be determined.

[0125] In one embodiment, the processing unit 102 extracts the fundamental frequency of the speech signal in the following manner: the acquired speech signal to be changed is cached in a buffer, and when the cumulative duration of the cached speech signal reaches a duration threshold, the speech signal is framed, windowed, and frequency-domain transformed to obtain frequency domain features corresponding to the speech signal; based on the frequency domain features, the fundamental frequency of the speech signal is extracted.

[0126] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0127] Fig.12 2 is a block diagram of a device 200 for a voice changing method according to an exemplary embodiment. For example, the device 200 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0128] Reference Fig.12 , the device 200 may include one or more of the following components: a processing component 202 , a memory 204 , a power component 206 , a multimedia component 208 , an audio component 210 , an input / output (I / O) interface 212 , a sensor component 214 , and a communication component 216 .

[0129] The processing component 202 generally controls the overall operation of the device 200, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 202 may include one or more processors 220 to execute instructions to perform all or part of the steps of the above-mentioned method. In addition, the processing component 202 may include one or more modules to facilitate the interaction between the processing component 202 and other components. For example, the processing component 202 may include a multimedia module to facilitate the interaction between the multimedia component 208 and the processing component 202.

[0130] The memory 204 is configured to store various types of data to support operations on the device 200. Examples of such data include instructions for any application or method operating on the device 200, contact data, phone book data, messages, pictures, videos, etc. The memory 204 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0131] The power component 206 provides power to the various components of the device 200. The power component 206 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 200.

[0132] The multimedia component 208 includes a screen that provides an output interface between the device 200 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 208 includes a front camera and / or a rear camera. When the device 200 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0133] The audio component 210 is configured to output and / or input audio signals. For example, the audio component 210 includes a microphone (MIC), and when the device 200 is in an operation mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 204 or sent via the communication component 216. In some embodiments, the audio component 210 also includes a speaker for outputting audio signals.

[0134] I / O interface 212 provides an interface between processing component 202 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0135] The sensor assembly 214 includes one or more sensors for providing various aspects of the status assessment of the device 200. For example, the sensor assembly 214 can detect the open / closed state of the device 200, the relative positioning of components, such as the display and keypad of the device 200, the sensor assembly 214 can also detect the position change of the device 200 or a component of the device 200, the presence or absence of user contact with the device 200, the orientation or acceleration / deceleration of the device 200 and the temperature change of the device 200. The sensor assembly 214 can include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 214 can also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 214 can also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.

[0136] The communication component 216 is configured to facilitate wired or wireless communication between the device 200 and other devices. The device 200 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 216 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 216 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0137] In an exemplary embodiment, the apparatus 200 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above method.

[0138] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 204 including instructions, and the instructions can be executed by the processor 220 of the device 200 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0139] Fig.13 is a block diagram of a device 300 for a voice changing method according to an exemplary embodiment. For example, the device 300 may be provided as a server. Fig.13 , the apparatus 300 includes a processing component 322, which further includes one or more processors, and a memory resource represented by a memory 332 for storing instructions, such as an application, that can be executed by the processing component 322. The application stored in the memory 332 may include one or more modules, each corresponding to a set of instructions. In addition, the processing component 322 is configured to execute the instructions to perform the above method.

[0140] The device 300 may also include a power supply component 326 configured to perform power management of the device 300, a wired or wireless network interface 350 configured to connect the device 300 to a network, and an input / output (I / O) interface 358. The device 300 may operate based on an operating system stored in the memory 332, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, or the like.

[0141] It is to be understood that in the present disclosure, "plurality" refers to two or more than two, and other quantifiers are similar. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. The singular forms "a", "the" and "the" are also intended to include plural forms, unless the context clearly indicates other meanings.

[0142] It is further understood that the terms "first", "second", etc. are used to describe various information, but such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other, and do not indicate a specific order or degree of importance. In fact, the expressions "first", "second", etc. can be used interchangeably. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information.

[0143] It can be further understood that, unless otherwise specified, “connection” includes a direct connection without other components between the two, and also includes an indirect connection with other components between the two.

[0144] It is further understood that, although the operations are described in a specific order in the drawings in the embodiments of the present disclosure, it should not be understood as requiring the operations to be performed in the specific order shown or in a serial order, or requiring the execution of all the operations shown to obtain the desired results. In certain environments, multitasking and parallel processing may be advantageous.

[0145] Other embodiments of the present disclosure will be readily apparent to users of skill in the art after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure.

[0146] It should be understood that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the scope of the appended claims.

Claims

1. A voice changing method, characterized in that: include: Acquire the speech signal to be voice-changed and determine the target timbre after the voice-changed voice; Extracting the fundamental frequency of the voice signal, and determining the gender information of the user who sends the voice signal based on the fundamental frequency of the voice signal; Based on the gender information and the target timbre, characteristic parameters of the voice signal are adjusted to change the voice of the voice signal.

2. The method according to claim 1, characterized in that The extracting the fundamental frequency of the voice signal and determining the gender information of the user who sends the voice signal based on the fundamental frequency of the voice signal includes: Extracting the fundamental frequencies that meet the conditions in the speech signal in real time frame by frame, and determining the first fundamental frequency and the second fundamental frequency based on the fundamental frequencies that meet the conditions; The fundamental frequency that meets the condition is a fundamental frequency that is greater than or equal to a first fundamental frequency threshold and less than or equal to a second fundamental frequency threshold, the first fundamental frequency is an average of fundamental frequencies extracted from a starting frame to a current frame of the speech signal, and the second fundamental frequency is an average of fundamental frequencies extracted within a specified number of frames before the current frame; Based on the first fundamental frequency and the second fundamental frequency, gender information of a user who sends the voice signal is determined.

3. The method according to claim 2, characterized in that The determining, based on the first fundamental frequency and the second fundamental frequency, the gender information of the user who sends the voice signal includes: If the first fundamental frequency is less than or equal to a first threshold, determining the gender information of the user who sends the voice signal based on the second fundamental frequency, a fourth threshold and a fifth threshold; If the first fundamental frequency is greater than the first threshold and greater than or equal to the second threshold, determining the gender information of the user who sends the voice signal based on the second fundamental frequency, the third threshold and the fourth threshold; If the first fundamental frequency is greater than the first threshold and less than the second threshold, determining the gender information of the user who sends the voice signal based on the second fundamental frequency, the first threshold and the second threshold; The first threshold is the lower limit of the fundamental frequency of the voice signal emitted by a female user, and the second threshold is the upper limit of the fundamental frequency of the voice signal emitted by a male user; The first threshold is smaller than the second threshold, the third threshold is larger than the first threshold, the third threshold is smaller than the fourth threshold, the fourth threshold is smaller than the fifth threshold, and the fifth threshold is smaller than the second threshold.

4. The method according to claim 3, characterized in that The determining, based on the second fundamental frequency, the fourth threshold, and the fifth threshold, the gender information of the user who sends the voice signal includes: If the second fundamental frequency is less than or equal to the fourth threshold, determining that the gender of the user sending the voice signal is male; If the second fundamental frequency is greater than the fourth threshold and greater than the fifth threshold, it is determined that the gender of the user sending the voice signal is female; If the second fundamental frequency is greater than the fourth threshold and less than or equal to the fifth threshold, it is determined that the gender of the user who sends the voice signal is undetermined.

5. The method according to claim 3, characterized in that: The determining, based on the second fundamental frequency, the third threshold, and the fourth threshold, the gender information of the user who sends the voice signal includes: If the second fundamental frequency is greater than or equal to the fourth threshold, determining that the gender of the user sending the voice signal is female; If the second fundamental frequency is less than the fourth threshold and less than the third threshold, it is determined that the gender of the user sending the voice signal is male; If the second fundamental frequency is less than the fourth threshold and greater than or equal to the third threshold, it is determined that the gender of the user who sends the voice signal is undetermined.

6. The method according to claim 3, characterized in that The determining, based on the second fundamental frequency, the first threshold, and the second threshold, the gender information of the user who sends the voice signal includes: If the second fundamental frequency is greater than or equal to the second threshold, determining that the gender of the user sending the voice signal is female; If the second fundamental frequency is less than the second threshold and less than or equal to the first threshold, it is determined that the gender of the user sending the voice signal is male; If the second fundamental frequency is less than the second threshold and greater than the first threshold, it is determined that the gender of the user who sends the voice signal is undetermined.

7. The method according to claim 1, characterized in that The extracting the fundamental frequency of the speech signal comprises: The acquired voice signal to be changed is cached in a buffer, and when the cumulative duration of the cached voice signal reaches a duration threshold, the voice signal is framed, windowed, and frequency-domain changed to obtain frequency-domain features corresponding to the voice signal; Based on the frequency domain features, the fundamental frequency of the speech signal is extracted.

8. A voice changing device, characterized in that: include: An acquisition unit, used to acquire the voice signal to be voice-changed and determine the target timbre after the voice-changed voice; A processing unit is used to extract the fundamental frequency of the voice signal and determine the gender information of the user who sends the voice signal based on the fundamental frequency of the voice signal; and to adjust the characteristic parameters of the voice signal based on the gender information and the target timbre to change the voice of the voice signal.

9. The device according to claim 8, characterized in that The processing unit extracts the fundamental frequency of the voice signal and determines the gender information of the user who sends the voice signal based on the fundamental frequency of the voice signal in the following manner: Extracting the fundamental frequencies that meet the conditions in the speech signal in real time frame by frame, and determining the first fundamental frequency and the second fundamental frequency based on the fundamental frequencies that meet the conditions; The fundamental frequency that meets the condition is a fundamental frequency that is greater than or equal to a first fundamental frequency threshold and less than or equal to a second fundamental frequency threshold, the first fundamental frequency is an average of fundamental frequencies extracted from a starting frame to a current frame of the speech signal, and the second fundamental frequency is an average of fundamental frequencies extracted within a specified number of frames before the current frame; Based on the first fundamental frequency and the second fundamental frequency, gender information of a user who sends the voice signal is determined.

10. The device according to claim 9, characterized in that The processing unit determines the gender information of the user who sends the voice signal based on the first fundamental frequency and the second fundamental frequency in the following manner: If the first fundamental frequency is less than or equal to a first threshold, determining the gender information of the user who sends the voice signal based on the second fundamental frequency, a fourth threshold and a fifth threshold; If the first fundamental frequency is greater than the first threshold and greater than or equal to the second threshold, determining the gender information of the user who sends the voice signal based on the second fundamental frequency, the third threshold and the fourth threshold; If the first fundamental frequency is greater than the first threshold and less than the second threshold, determining the gender information of the user who sends the voice signal based on the second fundamental frequency, the first threshold and the second threshold; The first threshold is the lower limit of the fundamental frequency of the voice signal emitted by a female user, and the second threshold is the upper limit of the fundamental frequency of the voice signal emitted by a male user; The first threshold is smaller than the second threshold, the third threshold is larger than the first threshold, the third threshold is smaller than the fourth threshold, the fourth threshold is smaller than the fifth threshold, and the fifth threshold is smaller than the second threshold.

11. The device according to claim 10, characterized in that The processing unit determines the gender information of the user who sends the voice signal based on the second fundamental frequency, the fourth threshold and the fifth threshold in the following manner: If the second fundamental frequency is less than or equal to the fourth threshold, determining that the gender of the user sending the voice signal is male; If the second fundamental frequency is greater than the fourth threshold and greater than the fifth threshold, it is determined that the gender of the user sending the voice signal is female; If the second fundamental frequency is greater than the fourth threshold and less than or equal to the fifth threshold, it is determined that the gender of the user who sends the voice signal is undetermined.

12. The device according to claim 10, characterized in that The processing unit determines the gender information of the user who sends the voice signal based on the second fundamental frequency, the third threshold and the fourth threshold in the following manner: If the second fundamental frequency is greater than or equal to the fourth threshold, determining that the gender of the user sending the voice signal is female; If the second fundamental frequency is less than the fourth threshold and less than the third threshold, it is determined that the gender of the user sending the voice signal is male; If the second fundamental frequency is less than the fourth threshold and greater than or equal to the third threshold, it is determined that the gender of the user who sends the voice signal is undetermined.

13. The device according to claim 10, characterized in that The processing unit determines the gender information of the user who sends the voice signal based on the second fundamental frequency, the first threshold and the second threshold in the following manner: If the second fundamental frequency is greater than or equal to the second threshold, determining that the gender of the user sending the voice signal is female; If the second fundamental frequency is less than the second threshold and less than or equal to the first threshold, it is determined that the gender of the user sending the voice signal is male; If the second fundamental frequency is smaller than the second threshold and larger than the first threshold, it is determined that the gender of the user who sends the voice signal is undetermined.

14. The device according to claim 8, characterized in that The processing unit extracts the fundamental frequency of the speech signal in the following manner: The acquired voice signal to be changed is cached in a buffer, and when the accumulated duration of the voice signal cached reaches a duration threshold, the voice signal is framed, windowed, and frequency-domain changed; and the frequency-domain features corresponding to the voice signal are obtained; Based on the frequency domain features, the fundamental frequency of the speech signal is extracted.

15. A voice changing device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to: execute the method described in any one of claims 1-7.

16. A storage medium, characterized in that: The storage medium stores instructions, and when the instructions in the storage medium are executed by a processor of the terminal, the terminal is enabled to execute the method described in any one of claims 1 to 7.