Voice processing method and device, electronic equipment and medium

By adjusting user voice parameters through emotion matching algorithms, the problem of mismatch between user voice and character emotions in cloud games has been solved, improving the immersion and adaptability of voice interaction.

CN121570797APending Publication Date: 2026-02-27MIGU COMIC CO LTD +2
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511580636.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-31
Publication Date
2026-02-27

AI Technical Summary

Technical Problem

In existing cloud gaming technologies, the user's voice cannot be adaptively matched with the game character, resulting in a disconnect between voice expression and game plot, which affects immersion and interactivity.

Method used

An emotion matching algorithm is used to assess the user's voice emotion and the virtual character's emotion, and the user's voice parameters such as tone, speech rate and volume are adjusted in real time to make the user's voice emotion match the virtual character's emotional state.

Benefits of technology

It enhances the immersiveness and scene adaptability of voice interaction, meeting users' needs for personalized and highly immersive experiences.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121570797A_ABST
    Figure CN121570797A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a voice processing method and device, electronic equipment and a medium, and relates to the technical field of cloud games, and one specific implementation mode of the method comprises the steps that according to user voice input by a user in a current virtual scene and a virtual character state generated when the user operates a virtual character, the virtual character is processed according to the user voice input by the user and the virtual character state generated when the user operates the virtual character; and determining a user voice emotion and a virtual character emotion, determining an emotion matching result between the user voice emotion and the virtual character emotion in combination with an emotion matching algorithm, and adjusting voice parameters of the user voice according to a target parameter range corresponding to the virtual character emotion when the emotion matching result is that the emotion is not matched. According to the process, the user voice can fit the emotional state of the role in the current scene in real time, the dynamic adaptation of the user voice and the virtual role emotion is realized, the disjoint illegal feeling of the user emotion and the role emotion is avoided, and the immersion of voice interaction and the scene adaptability are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of cloud gaming technology, specifically to a voice processing method, apparatus, electronic device, and medium. Background Technology

[0002] Cloud gaming, as a new generation of gaming, relies on cloud computing technology to place game execution and rendering on cloud servers and stream the video to user terminals via the network. In this model, low latency and highly immersive real-time interactive experiences become core requirements, while voice functionality, as an important medium for communication and collaboration between users, is crucial for enhancing the social experience of games.

[0003] Currently, there are three main ways to implement voice functionality using related technologies. The first is to directly capture and transmit the user's real voice signal, preserving the original characteristics of the voice. The second is to pre-record or generate a series of characteristic sound effect templates, which users can select and apply to their output voice in the game. The third is to provide a set of pre-made short audio clips independent of the user's voice, which users can play in the game by triggering commands.

[0004] However, the relevant technologies are insufficient in terms of the diversity and personalization of sound effects. They lack the ability to perceive and dynamically respond to the user's emotional state in real time, and cannot adaptively adjust the voice effects according to changes in the game context, making it difficult to meet users' needs for distinctive voice performance. Summary of the Invention

[0005] This application provides a voice processing method, device, electronic device, and medium to solve the problem of the inability of user voice and game character to adaptively match in related technologies. This application uses an emotion matching algorithm to evaluate whether the user's voice emotion matches the virtual character's emotion. If they do not match, the user's voice emotion is adjusted in real time in multiple dimensions such as pitch, speech rate, and volume according to the target parameter range corresponding to the virtual character's emotion, so that the user's emotional expression is more in line with the current emotional state of the game character, thereby improving the immersion and scene adaptability of voice interaction.

[0006] In a first aspect, embodiments of this application provide a voice processing method, which includes: determining the user's voice emotion and the virtual character's emotion based on the user's voice input in the current virtual scene and the virtual character's state generated by the user's operation of the virtual character; determining the emotion matching result between the user's voice emotion and the virtual character's emotion based on an emotion matching algorithm; and adjusting the voice parameters of the user's voice based on the target parameter range corresponding to the virtual character's emotion when the emotion matching result is an emotion mismatch, wherein the voice parameters include at least one of pitch, speech rate, and volume.

[0007] In some embodiments, determining the user's voice emotion and the virtual character emotion based on the user's voice input in the current virtual scene and the virtual character state generated by the user's operation of the virtual character includes: extracting key voice features of the user's voice, identifying the key voice features through an emotion recognition model, and determining the user's voice emotion corresponding to the user's voice; obtaining the virtual character state through a game data acquisition tool, and determining the virtual character emotion based on the virtual character state.

[0008] In some embodiments, the virtual character's state includes multiple state data. Determining the virtual character's emotion based on the virtual character's state includes: normalizing the multiple state data to obtain the character's emotion value corresponding to each state data; determining the emotion index corresponding to each character's emotion value based on a preset weight and emotion index algorithm, whereby the emotion index represents the degree of influence of each state data on the virtual character's emotion; performing nonlinear processing on each emotion index, and determining a comprehensive emotion index based on each nonlinearly processed emotion index; and determining the virtual character's emotion corresponding to the comprehensive emotion index based on the comprehensive emotion index and a preset emotion threshold.

[0009] In some embodiments, the virtual character state includes multiple state data. Determining the virtual character's emotion based on the virtual character state includes: performing fuzzy variable processing on each state data in the multiple state data to obtain a fuzzy set corresponding to the multiple state data; determining the membership degree of multiple emotion types based on the fuzzy set and preset fuzzy rules; and determining the virtual character's emotion based on the membership degree of multiple emotion types.

[0010] In some embodiments, the emotion matching algorithm includes a four-dimensional emotion algorithm and a vector difference algorithm. Based on the emotion matching algorithm, determining the emotion matching result between the user's voice emotion and the virtual character's emotion includes: based on the four-dimensional emotion algorithm, determining a first emotion vector of the user's voice emotion and a second emotion vector of the virtual character's emotion; based on the vector difference algorithm, determining the emotion vector difference between the first emotion vector and the second emotion vector; when the emotion vector difference is less than a preset difference threshold, determining that the user's voice emotion matches the virtual character's emotion; when the emotion vector difference is greater than or equal to the preset difference threshold, determining that the user's voice emotion does not match the virtual character's emotion.

[0011] In some embodiments, adjusting the voice parameters of a user's voice based on a target parameter range corresponding to the virtual character's emotion includes: determining the deviation value between the voice parameters of the user's voice and the center value of the target parameter range; determining the adjustment direction based on the deviation value; determining the adjustment amount of the voice parameters based on the adjustment direction, the deviation value, the boundary value of the target parameter range, and a preset adjustment coefficient; and adjusting the voice parameters based on the adjustment amount.

[0012] Secondly, embodiments of this application provide a voice processing apparatus, the apparatus comprising: The determining unit is used to determine the user's voice emotion and the virtual character's emotion based on the user's voice input and the virtual character's state generated by the user's operation of the virtual character in the current virtual scene. The matching unit is used to determine the emotion matching result between the user's voice emotion and the virtual character's emotion based on the emotion matching algorithm; The adjustment unit is used to adjust the voice parameters of the user's voice based on the target parameter range corresponding to the virtual character's emotion when the emotion matching result is an emotion mismatch. The voice parameters include at least one of pitch, speech rate, and volume.

[0013] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor, wherein, when the processor runs the computer program, it performs the method described in any embodiment of the first aspect.

[0014] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described in any embodiment of the first aspect.

[0015] Fifthly, embodiments of this application provide a computer program product including a computer program that, when executed by a processor, performs the method described in any embodiment of the first aspect.

[0016] This application provides a voice processing method that obtains the user's voice emotion and the virtual character's emotion based on the user's voice input in the current virtual scene and the virtual character's state generated by the user's operation of the virtual character. It then combines this with an emotion matching algorithm to obtain the emotion matching result between the user's voice emotion and the virtual character's emotion. When the emotion matching result is an emotion mismatch, the user's voice parameters are adjusted in real time according to the target parameter range corresponding to the virtual character's emotion. This ensures that the user's voice matches the game character's emotional state in the current scene, preventing a disconnect between the user's emotion and the character's emotion. This significantly improves the immersiveness and scene adaptability of voice interaction, meeting the user's needs for personalized and highly immersive game experiences.

[0017] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description

[0018] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are merely embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort, and this application can be applied to other similar scenarios based on the provided drawings.

[0019] Figure 1 A flowchart illustrating a speech processing method provided in an embodiment of this application; Figure 2 A flowchart illustrating the second speech processing method provided in this application embodiment; Figure 3 A flowchart illustrating the third speech processing method provided in this application embodiment; Figure 4 A flowchart illustrating the fourth speech processing method provided in this application embodiment; Figure 5 A general flowchart of a speech processing scheme provided in an embodiment of this application; Figure 6 This is a schematic diagram of the structure of a voice processing device provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0020] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. The described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0021] It should be noted that the terms "system," "device," "unit," and / or "module" used in this application are methods of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they can be replaced by other expressions.

[0022] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.

[0023] With the rapid development of cloud computing, high-speed networks, and streaming media technologies, cloud gaming has gradually matured as a new gaming model. This model offloads complex game calculations and graphics rendering tasks to cloud servers, streaming real-time visuals to users' various terminal devices via the network. This new gaming experience allows users to enjoy high-quality games on devices such as mobile phones, tablets, and thin and light laptops without relying on high-performance local hardware. In the cloud gaming architecture, to achieve true immersion, in addition to ensuring high-definition image quality and low-latency transmission, real-time voice interaction has become a core element in enhancing the user's social experience. Through voice communication, users can effectively collaborate tactically, share emotions, and interact within a community in multiplayer online games, greatly enriching the social dimension of the game.

[0024] Currently, there are three main technical solutions for implementing voice functionality in cloud gaming platforms: The first method uses the user's original voice transmission scheme. This method directly acquires the user's original voice signal using audio acquisition equipment, encodes and compresses it, and then transmits it to a cloud server over the network. The server then distributes it to other game users. This scheme fully preserves the original characteristics of the voice, including timbre, pitch, and emotional fluctuations, and can most realistically reflect the speaker's state.

[0025] The second method uses a preset sound template scheme, which embeds a series of pre-made sound processing templates on the cloud server or client. These templates are generated based on digital signal processing algorithms or artificial intelligence speech synthesis technology. During gameplay, users can choose different sound effect templates, such as voice changing, reverb, and pitch adjustment. The system will process the collected voice signals in real time before transmitting them.

[0026] The third approach uses a voice emoticon scheme, which provides a pre-built audio library independent of the user's voice, containing various facial expressions, ambient sound effects, and unique sound clips. Users can trigger these audio clips through shortcut buttons or specific gestures on the game interface, and the system will insert the selected audio clips into the voice stream or send them separately to other users.

[0027] However, the related technologies fall short in terms of the diversity and personalization of sound effects, failing to meet users' demands for distinctive voice performance. Furthermore, due to the lack of real-time perception and dynamic response to users' emotional states, they cannot adaptively adjust voice effects according to changes in the game context. Most importantly, the technologies fail to effectively integrate user voice with the game character's state, resulting in a disconnect between voice expression and the game plot, impacting the naturalness and immersion of game interaction.

[0028] To address the aforementioned issues, this application proposes a voice processing method aimed at enhancing the immersion and interactivity of cloud gaming. This method utilizes an emotion matching algorithm to obtain the emotion matching result between the user's voice emotion and the virtual character's emotion. When the emotion matching result is mismatched, to ensure consistency between the user's real-time voice emotion and the virtual character's emotion, the user's voice parameters are adjusted in real-time according to the target parameter range corresponding to the virtual character's emotion. This allows the user's voice emotion to better match the virtual character's emotional state in the current scene, preventing a disconnect between the user's emotion and the character's emotion, improving the immersion and scene adaptability of voice interaction, and meeting users' needs for personalized and highly immersive gaming experiences.

[0029] The following is a detailed description of a speech processing method provided in this application, with reference to the accompanying drawings.

[0030] Figure 1 A flowchart of a speech processing method provided in an embodiment of this application is shown. Figure 1 As shown, the speech processing method includes steps 101-103.

[0031] Step 101: Determine the user's voice emotion and the virtual character's emotion based on the user's voice input and the virtual character's state generated by the user's operation of the virtual character in the current virtual scene.

[0032] In the embodiments of this application, the emotions of users and virtual characters are divided into six states: painful state, excited state, tense state, disappointed state, angry state, and relaxed state.

[0033] This application collects users' voice data in real time through in-game or external voice input devices (such as microphones), and then uses a trained emotion recognition model to analyze the user's voice data. The emotion recognition model outputs the probability of each emotion in the form of a probability distribution, such as pain, excitement, tension, etc., thereby determining the current user's voice emotion based on the probability distribution of each output emotion.

[0034] Regarding the determination of virtual character emotions, this application comprehensively determines the emotions of virtual characters by acquiring multiple core state data, including health points, resource points, and task completion rate. Two main schemes are employed to determine the emotions of virtual characters from their state data: One approach is emotion derivation based on numerical calculations. This involves normalizing, weighting, nonlinearly processing, and comprehensively judging the virtual character's state data to transform it into a clear emotion. Another approach is emotion deduction based on fuzzy logic, which uses fuzzy sets and pre-defined fuzzy rules to infer the emotions of virtual characters.

[0035] Understandably, both approaches essentially use the virtual character's state as input, transforming the objective state into subjective emotion through standardized computational logic, thereby determining the virtual character's emotion in the current virtual scene. The difference lies in the approach: the numerical calculation-based emotion derivation scheme emphasizes precise quantification, while the fuzzy logic-based scheme prioritizes flexible adaptation, allowing users to choose which approach to use based on the needs of the virtual scene.

[0036] Step 102: Based on the emotion matching algorithm, determine the emotion matching result between the user's voice emotion and the virtual character's emotion.

[0037] In the embodiments of this application, in order to achieve the matching of user voice emotion with virtual character emotion, it is necessary to compare the emotional state of the user and the character, so as to determine whether to make real-time adjustment of the user voice based on the emotion matching result between the user voice emotion and the virtual character emotion.

[0038] Specifically, each emotion of the user and the character (i.e., pain, excitement, tension, disappointment, anger, and relaxation) is mapped to a four-dimensional emotion vector. By calculating the difference between the user's and the character's emotion vectors in the four-dimensional space, it is determined whether the user's voice emotion and the virtual character's emotion match.

[0039] If the difference between the user's and the character's emotion vectors in four-dimensional space is within an acceptable range, then the user's voice emotion is considered to match the virtual character's emotion, and no adjustment to the user's voice is required. If the difference between the user's and the character's emotion vectors in four-dimensional space exceeds an acceptable range, then the user's voice emotion is considered to be mismatched with the virtual character's emotion, and the user's real-time voice needs to be adjusted to better match the virtual character's emotion.

[0040] Step 103: When the emotion matching result is an emotion mismatch, adjust the voice parameters of the user's voice based on the target parameter range corresponding to the virtual character's emotion. The voice parameters include at least one of pitch, speech rate, and volume.

[0041] In the embodiments of this application, if the user's voice emotion and the virtual character's emotion do not match, it is necessary to adjust the user's real-time voice from multiple dimensions (i.e., tone, speech rate, and volume) to make the user's voice emotion and the virtual character's emotion consistent.

[0042] The target parameter range includes the range of tone, speech rate, and volume under six emotional states (namely, pain, excitement, tension, disappointment, anger, and relaxation).

[0043] Specifically, this application uses the center value of the target parameter range corresponding to the virtual character's emotion as the anchor point. By calculating the deviation between the user's real-time voice parameter value and the center value of the target parameter range, the adjustment direction and magnitude of the user's voice parameters are determined based on the deviation value. Then, based on the deviation value, adjustment direction, and other information, the adjustment amount is calculated, and the adjusted voice parameters are finally obtained based on the adjustment amount. This allows the user's voice tone, speech rate, and volume to align with the target range corresponding to the virtual character's current emotion, achieving matching between the user's voice emotion and the virtual character's emotion.

[0044] In summary, the speech processing method proposed in this application determines the user's speech emotion and the virtual character's emotion based on the user's input speech and the virtual character's state generated by the user's operation of the virtual character in the current virtual scene. It then uses an emotion matching algorithm to obtain the emotion matching result between the user's speech emotion and the virtual character's emotion. When the emotion matching result is a mismatch, the speech parameters of the user's speech are adjusted in real time according to the target parameter range corresponding to the virtual character's emotion. This ensures that the user's speech matches the emotional state of the game character in the current scene, preventing a disconnect between the user's emotion and the character's emotion. This significantly improves the immersiveness and scene adaptability of speech interaction, meeting the user's needs for personalized and highly immersive game experiences.

[0045] As one possible implementation method, Figure 2 A flowchart of the second online voice processing method is shown. Based on the above embodiments, the user's voice input in the current virtual scene and the virtual character's state generated by the user's operation of the virtual character are used to determine the user's voice emotion and the virtual character's emotion, including the following steps: Step 201: Extract key speech features from the user's speech, and identify the key speech features using an emotion recognition model to determine the user's speech emotion.

[0046] In the embodiments of this application, the key voice features of the user's voice include, but are not limited to, the following: Spectral characteristics: used to capture the energy distribution of speech signals at different frequencies.

[0047] Tonal features: used to reflect the pitch information of speech.

[0048] Speech rate characteristics: used to measure the speed and rhythm of speech signals.

[0049] Energy characteristics: used to reflect the changes in sound intensity of a speech signal over different time periods.

[0050] This application constructs an emotion recognition model, training it with deep learning on user input voice data acquired from in-game or external voice input devices (such as microphones), enabling the model to recognize the emotions in the voice. The training process is as follows: Data preprocessing: The emotion recognition model preprocesses the collected user voice data to extract key voice features; Model selection: Select a neural network structure suitable for processing sequential data (speech is a time-series signal), such as Long Short-Term Memory (LSTM) network, Convolutional Neural Network (CNN), etc., and train the model. Feature selection: From the preprocessed features, select the features that are most critical to distinguishing emotions (such as tone of voice and speech rate that differ significantly under different emotions) to reduce redundancy; Model training: The emotion recognition model is trained using a speech dataset labeled with emotion tags (such as speech samples labeled "excitement" and "pain"). This allows the emotion recognition model to learn the correspondence between key speech features and emotions, enabling it to accurately predict different emotional states.

[0051] During gameplay, the system continuously acquires the user's current voice data from their voice input device. It rapidly extracts core features such as spectrum, tone, and speech rate from the real-time voice (consistent with the feature dimensions used during model training). These extracted key voice features are then input into a pre-trained emotion recognition model. The model outputs a probability distribution for each emotion (e.g., pain, excitement, tension) based on these key voice features. Based on the emotion probability distribution output by the model, the emotion with the highest probability is selected as the user's final emotional state (e.g., if "excitement" has the highest probability, the user is determined to be in an excited state).

[0052] Step 202: Obtain the virtual character's state using a game data acquisition tool, and determine the virtual character's emotion based on the virtual character's state.

[0053] In the embodiments of this application, the virtual character state includes multiple state data, namely, health points, resource points, task completion rate, etc., wherein: Health Points (HP): Health points change when a virtual character takes damage or uses healing items.

[0054] Resource value: The resource value changes when a virtual character acquires resources (such as gold coins, energy, etc.) or consumes resources (such as purchasing items, using skills, etc.).

[0055] Task Completion: Games typically feature various tasks and achievements. When a virtual character completes a task or achieves an achievement, the task completion rate increases.

[0056] This application obtains the virtual character status through game data acquisition tools in the following three main ways: One approach is to utilize the interfaces and functionalities provided by the game engine: Game engines typically offer a series of Application Programming Interfaces (APIs) or functions that can be used to directly access the state information of virtual characters. For example, in Unreal Engine, attribute values ​​of virtual characters can be obtained through relevant functions. Developers can leverage these APIs to write code to obtain information such as the virtual character's health, resource values, and quest completion status.

[0057] Secondly, game events can be monitored: event listeners can be set up in the game to monitor user behavior and actions, such as virtual characters being injured, acquiring resources, or completing tasks. When these events occur, the game engine will automatically trigger the corresponding event handling functions. Within these event handling functions, the user's virtual character state information can be retrieved and recorded.

[0058] Third, query the attributes of the game's virtual character object: Virtual character objects typically have various attributes, including health points, resource points, and task completion rate. You can directly query the attributes of the game's virtual character object to obtain the current status information of the virtual character.

[0059] This application determines the emotions of a virtual character based on their state using two methods: emotion derivation based on numerical calculation and emotion derivation based on fuzzy logic. Specifically: The sentiment derivation process based on numerical calculation is as follows: 1) Normalize multiple state data to obtain the character's emotional state value corresponding to each state data.

[0060] This application uses the user's virtual character state as the emotion dimension. First, the current value of each emotion dimension i (health points, resource points, task completion rate) is normalized, converting it to a value within the range [0, 1]. The specific normalization formula is as follows:

[0061] in, It is the current value of emotion dimension i. and These are the minimum and maximum values ​​of the emotion dimension i, respectively.

[0062] For example, suppose the status data collected in the game are as follows: the virtual character's current health is 50, with a minimum of 0 and a maximum of 100; the virtual character's current resource value is 150, with a minimum of 0 and a maximum of 300; the virtual character's current task completion rate is 70%, with a minimum of 0% and a maximum of 100%. Normalizing these status data, the character's emotional state value corresponding to each status data is shown in the table below: Table 1 is an example table of normalized virtual character status data.

[0063] 2) Based on the preset weights and the emotion index algorithm, determine the emotion index corresponding to the emotion value of each character's state.

[0064] In the embodiments of this application, the emotion index represents the degree of influence of each state data on the virtual character's emotion. It is understood that the preset weights can be values ​​manually set by developers based on experience, or weights can be automatically learned by an algorithm based on historical data. The specific weights can be adjusted according to actual needs and circumstances, and are not limited in this embodiment. The emotion index algorithm calculates the normalized value (i.e., the character's state emotion value) by multiplying it by the corresponding preset weight, thereby obtaining the emotion index corresponding to each character's state emotion value. The specific formula is as follows:

[0065] in, These are the preset weights corresponding to each emotion dimension i. For example, assuming different weights are set for each emotion dimension i, namely, health value weight is 0.4, resource value weight is 0.3, and task completion weight is 0.3, then the emotion index corresponding to each character's state emotion value is shown in the table below: Table 2 is an example table of sentiment index.

[0066] 3) Perform non-linear processing on each sentiment index, and determine the comprehensive sentiment index based on each non-linearly processed sentiment index; In the embodiments of this application, the changes in user emotions are not linear. For example, when the life value drops from 100 (normalized value 1.0) to 90 (normalized value 0.9), the emotion hardly fluctuates; however, when it drops from 20 (0.2) to 10 (0.1), the emotion may quickly change from "tension" to "pain". If the initial emotion index is used directly for calculation, this non-linear characteristic will be ignored, leading to a distortion in emotion judgment. Therefore, it is necessary to perform non-linear processing on each emotion index to obtain the non-linearly processed emotion index. The specific formula is as follows:

[0067] The sigmoid function is a non-linear function. This is the gain parameter. By summing the non-linear emotion indices of each emotion dimension i, we can obtain the comprehensive emotion index, as shown in the following formula:

[0068] For example, suppose the gain parameter Set to 1, perform non-linear processing on each sentiment index as shown in the table below: Table 3 shows an example of a non-linear sentiment index.

[0069] Then, the non-linear emotion indices of each emotion dimension are summed to obtain the comprehensive emotion index:

[0070] This application can determine the emotions of virtual characters based on the CompositeEmotionIndex.

[0071] 4) Based on the comprehensive emotion index and the preset emotion threshold, determine the virtual character's emotion corresponding to the comprehensive emotion index.

[0072] In the embodiments of this application, the preset emotion threshold can be a threshold set manually by the researchers based on experience, or it can be a threshold determined by calculating the average of historical emotion values. It can be adjusted according to the actual situation, and is not limited in the embodiments of this application.

[0073] Specifically, based on the CompositeEmotionIndex and preset emotion thresholds, different virtual character emotions can be determined, with the following specific rules:

[0074] X, Y, Z, and W are preset different emotion thresholds. For example, assuming the preset emotion thresholds are X=1.0, Y=1.5, Z=2.0, and W=2.5, and based on the comprehensive emotion index of 1.6394 obtained above, since 1.5 (Y) < 1.6394 < 2.0 (Z), the virtual character's emotion can be determined to be "tension".

[0075] The sentiment derivation process based on fuzzy logic is as follows: 1) Perform fuzzy variable processing on each state data in multiple state data to obtain a fuzzy set corresponding to multiple state data.

[0076] In the embodiments of this application, multiple state data corresponding to the virtual character's state are quantified into fuzzy variables (health value, resource value, task completion degree). Each fuzzy variable can be defined as one or more fuzzy sets, such as "low", "medium", and "high".

[0077] For example, the fuzzy sets corresponding to fuzzy variables can be defined as follows: Health (HP): Low (0-30%), Medium (20-70%), High (60-100%) Resource value: low (0-30%), moderate (20-70%), sufficient (60-100%). Task completion rate: Low (0-30%), Medium (20-70%), High (60-100%).

[0078] 2) Determine the membership degree of multiple emotion types based on fuzzy sets and preset fuzzy rules.

[0079] In the embodiments of this application, preset fuzzy rules describe the fuzzy relationships between different virtual character state variables, and how to infer specific virtual character emotions from fuzzy variables. It is understood that the preset fuzzy rules are manually set by developers based on actual conditions and can be adjusted according to actual needs; therefore, they are not restricted in the embodiments of this application.

[0080] Specifically, based on fuzzy sets and pre-defined fuzzy rules, fuzzy inference methods are used to calculate the membership degree of each emotional state (pain, excitement, tension, disappointment, anger, and relaxation). Fuzzy inference methods calculate the probability of each emotional state by using the intersection or union of fuzzy sets.

[0081] For example, the preset fuzzy rules are: if the life value is "low" and the resource value is "few", the emotional state is "painful"; if the resource value is "sufficient" and the task completion rate is "high", the emotional state is "excited"; if the life value is "medium" and the resource value is "few", the emotional state is "tense".

[0082] Then, based on the preset fuzzy rules, the membership degree of each emotional state is calculated: For the state of suffering, if the intersection of the virtual character's "low" health and "few" resources is the largest, then the membership degree of the state of suffering is relatively high. For the excited state, if there is a large overlap between the resource value "sufficient" and the task completion degree "high", then the membership degree of the excited state is moderate.

[0083] For a state of stress: if there is a large overlap between "medium" health and "low" resource values, then the membership degree of the state of stress is low.

[0084] 3) Determine the emotions of virtual characters based on the membership of multiple emotion types.

[0085] This application determines the main emotion of the current character by converting the membership degree obtained by fuzzy reasoning based on fuzzy sets and preset fuzzy rules into a specific emotional state.

[0086] For example, if the membership degree obtained through reasoning is high, the virtual character's emotion can be determined to be pain; if the membership degree obtained through reasoning is medium, the virtual character's emotion can be determined to be excitement; and if the membership degree obtained through reasoning is low, the virtual character's emotion can be determined to be tension.

[0087] In summary, this application predicts the user's voice emotion through a trained emotion recognition model and comprehensively determines the virtual character's emotion from three aspects: life value, resource value, and task completion degree, laying the foundation for subsequent judgment on whether the user's voice emotion matches the virtual character's emotion.

[0088] As one possible implementation method, Figure 3 A flowchart of the third speech processing method is shown. Based on the above embodiments, the emotion matching algorithm includes a four-dimensional emotion algorithm and a vector difference algorithm. Based on the emotion matching algorithm, the emotion matching result between the user's voice emotion and the virtual character's emotion is determined, including the following steps: Step 301: Based on the four-dimensional emotion algorithm, determine the first emotion vector of the user's voice emotion and the second emotion vector of the virtual character's emotion.

[0089] In the embodiments of this application, in order to accurately match the emotions of users and virtual characters, the specific manifestations of each emotional state (pain, excitement, tension, disappointment, anger, and relaxation) in the four-dimensional emotion model (pleasure (V), arousal (A), tension (T), and sense of control (C)) are first clearly defined. Referring to relevant psychological research findings and data collected during actual gameplay, the specific characteristic values ​​of each emotional state in these four dimensions are shown in the table below: Table 4 shows an example table of feature values ​​for the four-dimensional emotion model.

[0090] These characteristic values ​​can serve as standards or criteria for measuring and judging whether a user's emotions match those of a virtual character.

[0091] Specifically, each emotional state is mapped to a four-dimensional vector ( V , A , T , C The first emotion vector of the user's voice emotion is ( ). Vp , A p , T p , C p The second emotion vector of a virtual character's emotion is represented by ( ). V r , A r , T r , C r The values ​​are represented by ). According to Table 4, the emotion vector values ​​of the user and the virtual character in six emotional states can be obtained.

[0092] Step 302: Based on the vector difference algorithm, determine the difference in emotion vectors between the first emotion vector and the second emotion vector.

[0093] In the embodiments of this application, the vector difference algorithm uses Euclidean distance to calculate the difference in emotion vectors between the user and the virtual character in four-dimensional space. The specific formula for the emotion vector difference is as follows:

[0094] This application will determine whether the user's voice emotion matches the virtual character's emotion based on the difference in emotion vectors between the user and the virtual character.

[0095] Step 303: When the difference in emotion vectors is less than a preset difference threshold, determine that the user's voice emotion matches the virtual character's emotion.

[0096] In the embodiments of this application, the preset difference threshold represents the maximum acceptable difference in emotion vectors, which can be set manually by the R&D personnel according to the actual situation, and is not restricted in the embodiments of this application.

[0097] Specifically, when the emotion vector difference Within acceptable limits (i.e.) If the user's voice emotion matches the virtual character's emotion (based on a preset difference threshold), it means that the user's emotion is basically consistent with the character's emotion, and therefore no adjustment to the user's voice is required.

[0098] Step 304: When the difference in emotion vectors is greater than or equal to a preset difference threshold, it is determined that the user's voice emotion does not match the virtual character's emotion.

[0099] In the embodiments of this application, if the emotion vector difference When the difference exceeds the acceptable range (i.e., the preset difference threshold is ≤) If the user's voice emotion does not match the virtual character's emotion, it means that the difference between the user's emotion and the character's emotion is too large. Therefore, it is necessary to adjust the user's real-time voice to make the user's voice emotion consistent with the virtual character's emotion.

[0100] In summary, this application obtains the first emotion vector of the user's voice emotion and the second emotion vector of the virtual character's emotion, thereby calculating the difference in emotion vectors between the user and the virtual character. Based on the difference in emotion vectors, the matching result between the user's voice emotion and the virtual character's emotion is obtained. If the result matches, there is no need to adjust the user's voice. If the result does not match, the user's real-time voice needs to be adjusted to make the user's voice emotion more in line with the character's context, thereby enhancing the user's immersive experience in voice interaction.

[0101] As one possible implementation method, Figure 4 A flowchart of the fourth speech processing method is shown. Based on the above embodiments, the speech parameters of the user's speech are adjusted according to the target parameter range corresponding to the virtual character's emotion, including the following steps: Step 401: Determine the deviation between the voice parameters of the user's speech and the center value of the target parameter range.

[0102] In embodiments of this application, voice parameters include pitch, speech rate, and volume. Adjusting the voice parameters of a user's voice means adjusting at least one of the pitch, speech rate, and volume to match the user's voice emotion with the emotion of the virtual character.

[0103] The target parameter range refers to the range of parameters such as tone, speech rate, and volume under different emotional states. This range is based on empirical values ​​obtained from psychological research and real-time game data collection. It can be adjusted according to actual needs and circumstances, but is not limited in this embodiment. Examples are shown in the table below: Table 5 shows examples of target parameter ranges for different emotional states.

[0104] The center value of the target parameter range is defined as half the sum of the upper and lower limits of the target parameter range, as shown in the following formula:

[0105] The deviation between the real-time voice parameter values ​​of the user's speech and the center value of the target parameter range is as follows:

[0106] Step 402: Determine the adjustment direction based on the deviation value.

[0107] In embodiments of this application, the adjustment direction can be determined based on the direction and magnitude of the deviation between the user's voice parameters and the center value of the target parameter range. Specifically, if the deviation value is greater than 0, the adjustment direction is 1; if the deviation value is less than 0, the adjustment direction is -1; and if the deviation value is 0, the adjustment direction is 0. The specific adjustment direction formula is as follows:

[0108] Step 403: Determine the adjustment amount of the voice parameters based on the adjustment direction, deviation value, boundary value of the target parameter range, and preset adjustment coefficient.

[0109] In the embodiments of this application, the preset adjustment coefficient is set manually by the R&D personnel according to the actual situation, and can be adjusted according to actual needs. It is not restricted in the embodiments of this application.

[0110] Based on the deviation values ​​and adjustment directions of the speech parameters obtained above, the adjustment amount of the speech parameters can be calculated. The specific adjustment amount formula is as follows:

[0111] in, k The preset adjustment coefficients are understood to be used to ensure that different speech parameters can have different adjustment coefficients, which are mainly used to ensure that the adjustment results are brought into the target parameter range.

[0112] Step 404: Adjust the voice parameters based on the adjustment amount.

[0113] In the embodiments of this application, after calculating the adjustment amount of the voice parameters, the initial adjustment result is the user's current voice parameter value plus or minus the corresponding adjustment amount. The specific formula for the initial adjustment result is as follows:

[0114] When the deviation value is positive, it means that the current voice parameter value is higher than the target parameter value, so the current voice parameter value needs to be reduced. Therefore, the initial adjustment result is the user's current voice parameter value minus the adjustment amount. When the deviation value is negative, it means that the current voice parameter value is lower than the target parameter value, so the current voice parameter value needs to be increased. Therefore, the initial adjustment result is the user's current voice parameter value plus the adjustment amount.

[0115] In addition, to ensure that the adjusted speech parameter values ​​are within the target parameter range, it is necessary to impose range constraints on the initially adjusted speech parameters to obtain the final adjustment result. The specific constraint formula is as follows:

[0116] To further explain the adjustment of speech parameters, this application provides a specific example, as follows: Assume the user's current emotional state is "painful state"; according to Table 5, the target parameter range for the painful state is: pitch range 80-150Hz, speech rate range 0.8-1.2x speed, and volume range 50-70dB; the user's current voice parameter values ​​are: pitch 130Hz, speech rate 1.5x speed, and volume 80dB. The pitch adjustment process is as follows: First, the center value of the target pitch range needs to be calculated, that is:

[0117] The deviation between the current user's pitch value and the center value of the target pitch range is:

[0118] Next, the adjustment direction is determined. Since the pitch deviation value (15) is greater than 0, the pitch adjustment direction is 1. Then, based on the adjustment direction, deviation value, boundary value of the target parameter range, and preset adjustment coefficient ( k Let's assume 1) Calculate the pitch adjustment as follows:

[0119] Since the pitch deviation value is positive, the user's current pitch value needs to be reduced. Therefore, the initial pitch adjustment result is:

[0120] Finally, range constraints were applied to the initially adjusted pitch, resulting in the final pitch adjustment as follows:

[0121] The process for adjusting speaking speed and volume is the same as described above, and will not be repeated here.

[0122] In summary, this application adjusts the user's real-time voice in multiple dimensions such as tone, speech rate, and volume, so that the user's voice matches the emotional state of the virtual character in the current scene. This can effectively avoid the disconnect between the user's emotions and the virtual character's emotions, significantly improve the immersiveness and scene adaptability of voice interaction, and meet the user's needs for personalized and highly immersive game experiences.

[0123] To further explain the entire speech processing process, please refer to... Figure 5 , Figure 5 This is a general flowchart of a speech processing scheme provided in an embodiment of this application.

[0124] In the embodiments of this application, the user's voice data is first analyzed and processed using a trained emotion recognition model. The emotion recognition model will give the probability of each emotion (pain, excitement, tension, disappointment, anger, relaxation) in the form of a probability distribution. Based on the probability distribution of each emotion output by the emotion recognition model, the current user's voice emotion is determined.

[0125] Next, this application first uses three methods (i.e., using the interfaces and functions provided by the game engine, listening to game events, and querying the attributes of the game virtual character object) to obtain the virtual character's state, namely, health points, resource points, task completion rate, etc.; then it designs two schemes (emotion inference based on numerical calculation and emotion inference based on fuzzy logic) to comprehensively deduce the virtual character's emotions from the three aspects of health points, resource points, and task completion rate.

[0126] Then, based on the emotion matching algorithm, each emotion of the user and the character (i.e., pain, excitement, tension, disappointment, anger, and relaxation) is mapped to a four-dimensional emotion vector. By calculating the difference between the emotion vectors of the user and the character in the four-dimensional space, the emotional state of the user and the virtual character is compared, that is, it is determined whether the user's voice emotion and the virtual character's emotion match.

[0127] Finally, based on the matching results, it is determined whether to adjust the user's voice. If the user's voice emotion matches the virtual character's emotion, then no adjustment is needed. If they do not match, the user's real-time voice needs to be adjusted through multiple dimensions (i.e., pitch, speech rate, and volume). Specifically, first, the deviation between the user's real-time voice parameter values ​​and the center value of the target parameter range is calculated. Based on the deviation value, the adjustment direction and magnitude of the user's voice parameters are determined. Then, based on the deviation value, adjustment direction, and other information, the adjustment amount of the user's voice parameters is calculated. Based on the adjustment amount, the adjusted voice parameters are calculated, thereby achieving the matching of the user's voice emotion with the virtual character's emotion.

[0128] To implement the above embodiments, this application also provides a voice processing device. Figure 6 This is a schematic diagram of the structure of a voice processing device 600 provided in an embodiment of this application. Figure 6 As shown, the device includes: The determining unit 610 is used to determine the user's voice emotion and the virtual character's emotion based on the user's voice input and the virtual character's state generated by the user's operation of the virtual character in the current virtual scene. The matching unit 620 is used to determine the emotion matching result between the user's voice emotion and the virtual character's emotion based on the emotion matching algorithm; The adjustment unit 630 is used to adjust the voice parameters of the user's voice based on the target parameter range corresponding to the virtual character's emotion when the emotion matching result is an emotion mismatch. The voice parameters include at least one of pitch, speech rate and volume.

[0129] In some embodiments, the determining unit 610 is configured to: extract key speech features of the user's speech, identify the key speech features through an emotion recognition model, and determine the user's speech emotion corresponding to the user's speech; obtain the virtual character's state through a game data acquisition tool, and determine the virtual character's emotion based on the virtual character's state.

[0130] In some embodiments, the determining unit 610 is configured to: normalize multiple state data to obtain the character state emotion value corresponding to each state data; determine the emotion index corresponding to each character state emotion value based on a preset weight and emotion index algorithm, wherein the emotion index represents the degree of influence of each state data on the virtual character's emotion; perform nonlinear processing on each emotion index, and determine a comprehensive emotion index based on each nonlinearly processed emotion index; and determine the virtual character's emotion corresponding to the comprehensive emotion index based on the comprehensive emotion index and a preset emotion threshold.

[0131] In some embodiments, the determining unit 610 is configured to: perform fuzzy variable processing on each state data in the plurality of state data to obtain a fuzzy set corresponding to the plurality of state data; determine the membership degree of multiple emotion types based on the fuzzy set and a preset fuzzy rule; and determine the virtual character's emotion based on the membership degree of the multiple emotion types.

[0132] In some embodiments, the matching unit 620 is configured to: determine a first emotion vector of the user's voice emotion and a second emotion vector of the virtual character's emotion based on a four-dimensional emotion algorithm; determine the emotion vector difference between the first emotion vector and the second emotion vector based on a vector difference algorithm; determine that the user's voice emotion matches the virtual character's emotion when the emotion vector difference is less than a preset difference threshold; and determine that the user's voice emotion does not match the virtual character's emotion when the emotion vector difference is greater than or equal to the preset difference threshold.

[0133] In some embodiments, the adjustment unit 630 is configured to: determine the deviation value between the voice parameters of the user's voice and the center value of the target parameter range; determine the adjustment direction based on the deviation value; determine the adjustment amount of the voice parameters according to the adjustment direction, the deviation value, the boundary value of the target parameter range and a preset adjustment coefficient; and adjust the voice parameters based on the adjustment amount.

[0134] The methods and apparatus provided in the embodiments of this application have been described above. To implement the functions of the methods provided in the embodiments of this application, the electronic device may include a hardware structure and software modules, and may implement the above functions in the form of a hardware structure, software modules, or a hardware structure plus software modules. One of the above functions may be executed in the form of a hardware structure, software modules, or a hardware structure plus software modules.

[0135] Figure 7 This is a block diagram illustrating an electronic device 700 for implementing the above-described voice processing method according to an exemplary embodiment. For example, the electronic device 700 may be a mobile phone, computer, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.

[0136] Reference Figure 7 The electronic device 700 may include a communication interface 701, capable of interacting with other devices; a processor 702, connected to the communication interface 701 to interact with other devices, used to execute the methods provided by one or more of the above-mentioned technical solutions when running a computer program; and a memory 703, on which the computer program is stored. Specifically, the specific processing procedure of the processor 702 can refer to the voice processing method described in the above embodiments of this application.

[0137] Of course, in practical applications, the various components in electronic device 700 are coupled together through bus system 704. It can be understood that bus system 704 is used to realize the connection and communication between these components. In addition to a data bus, bus system 704 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 7 The general designated all buses as Bus System 704.

[0138] The memory 703 in this embodiment is used to store various types of data to support the operation of the electronic device 700. Examples of such data include any computer program used to operate on the electronic device 700.

[0139] The methods disclosed in the embodiments of this application can be applied to processor 702, or implemented by processor 702. Processor 702 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 702 or by instructions in the form of software. The processor 702 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 702 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 703. Processor 702 reads the information in memory 703 and combines its hardware to complete the steps of the aforementioned method.

[0140] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.

[0141] Embodiments of this application also propose a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the speech processing method described in the above embodiments of this application.

[0142] Embodiments of this application also propose a computer program product, including a computer program that is executed by a processor using the speech processing method described in the above embodiments of this application.

[0143] Embodiments of this application also propose a chip including one or more interface circuits and one or more processors; the interface circuits are used to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory, and when the processor executes the computer instructions, it causes the electronic device to perform the voice processing method described in the above embodiments of this application.

[0144] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.

[0145] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.

[0146] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.

[0147] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processing module, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (control method), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic device, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.

[0148] It should be understood that various parts of the embodiments of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.

[0149] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.

[0150] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.

[0151] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.

Claims

1. A voice processing method, characterized by, The method comprises: determining a user voice emotion and a virtual character emotion based on a user voice input by a user in a current virtual scene and a virtual character state generated by the user operating a virtual character; determining an emotion matching result between the user voice emotion and the virtual character emotion based on an emotion matching algorithm; when the emotion matching result is emotion mismatch, adjusting a voice parameter of the user voice based on a target parameter range corresponding to the virtual character emotion, the voice parameter comprising at least one of pitch, speech rate and volume.

2. The method of claim 1, wherein, The determination of the user voice emotion and the virtual character emotion based on the user voice input by the user in the current virtual scene and the virtual character state generated by the user operating the virtual character comprises: extracting a voice key feature of the user voice, and identifying the voice key feature through an emotion recognition model to determine a user voice emotion corresponding to the user voice; obtaining the virtual character state through a game data acquisition tool, and determining the virtual character emotion based on the virtual character state.

3. The method of claim 2, wherein, The virtual character state comprises a plurality of state data, The determination of the virtual character emotion based on the virtual character state comprises: normalizing the plurality of state data to obtain a character state emotion value corresponding to each state data; determining an emotion index corresponding to each character state emotion value based on a preset weight and an emotion index algorithm, the emotion index representing an influence degree of the each state data on the virtual character emotion; nonlinearly processing each emotion index, and determining a comprehensive emotion index based on each nonlinearly processed emotion index; determining a virtual character emotion corresponding to the comprehensive emotion index based on the comprehensive emotion index and a preset emotion threshold.

4. The method of claim 2, wherein, The virtual character state comprises a plurality of state data, The determination of the virtual character emotion based on the virtual character state comprises: performing fuzzy variable processing on each state data in the plurality of state data to obtain a fuzzy set corresponding to the plurality of state data; determining a membership degree of a plurality of emotion types based on the fuzzy set and a preset fuzzy rule; determining the virtual character emotion based on the membership degrees of the plurality of emotion types.

5. The method of claim 1, wherein, The emotion matching algorithm comprises a four-dimensional emotion algorithm and a vector difference algorithm, The determination of the emotion matching result between the user voice emotion and the virtual character emotion based on the emotion matching algorithm comprises: determining a first emotion vector of the user voice emotion and a second emotion vector of the virtual character emotion based on the four-dimensional emotion algorithm; determining an emotion vector difference between the first emotion vector and the second emotion vector based on the vector difference algorithm; when the emotion vector difference is less than a preset difference threshold, determining that the user voice emotion matches the virtual character emotion; when the emotion vector difference is greater than or equal to the preset difference threshold, determining that the user voice emotion does not match the virtual character emotion.

6. The method of claim 1, wherein, The adjustment of the voice parameter of the user voice based on the target parameter range corresponding to the virtual character emotion comprises: determine a deviation value between the voice parameter of the user voice and a center value of the target parameter range; determine an adjustment direction based on the deviation value; determine an adjustment amount of the voice parameter according to the adjustment direction, the deviation value, a boundary value of the target parameter range, and a preset adjustment coefficient; adjust the voice parameter based on the adjustment amount.

7. A speech processing device, characterized by The device comprises: a determination unit configured to determine a user voice emotion and a virtual character emotion based on a user voice input by a user in a current virtual scene and a virtual character state generated by the user operating a virtual character; a matching unit configured to determine an emotion matching result between the user voice emotion and the virtual character emotion based on an emotion matching algorithm; an adjustment unit configured to adjust a voice parameter of the user voice based on a target parameter range corresponding to the virtual character emotion when the emotion matching result is emotion mismatch, the voice parameter comprising at least one of pitch, speech rate, and volume.

8. An electronic device, comprising: comprise: a processor and a memory for storing a computer program capable of running on the processor, wherein the processor is configured to execute the computer program to perform the method of any one of claims 1 to 6.

9. A non-transitory computer-readable storage medium having stored thereon computer instructions, wherein, The computer instructions are used to make the computer execute the method according to any one of claims 1 to 6.

10. A computer program product, characterised in that, comprise a computer program which, when executed by a processor, implements the method according to any one of claims 1 to 6.