Audio playing method, device and equipment, storage medium and vehicle
By identifying and analyzing the historical voice content of users in the car and automatically adjusting the audio playback status, it solves the problem of audio playback interfering with user conversations in the existing technology, achieves the effect of automatically reducing interference, and improves the in-car travel experience.
Patent Information
- Application Number
- CN202310324160.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-29
- Publication Date
- 2024-10-01
AI Technical Summary
The existing audio playback method cannot automatically adjust the audio status in the car, causing interference to the user's conversation, and cannot achieve the effect of automatically reducing interference.
By identifying the target user's historical voice content, obtaining the duration of his voice in a specific period, determining the conversation status information, and automatically adjusting the audio playback status during the conversation, such as reducing the volume or interrupting playback.
It realizes automatic adjustment of audio status when users are talking, reducing interference to conversations and improving the fun and convenience of traveling by car.
Smart Images

Figure CN118737149A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of vehicle technology, and in particular, relates to an audio playback method, device, equipment, storage medium and vehicle. Background Art
[0002] With the continuous development of science and technology, vehicles have brought great convenience to people's lives and travel. In order to increase the fun of traveling by car, the atmosphere in the car can be changed by playing audio. However, the existing audio playback method is single. If there are people in the car talking, the audio playback can only be adjusted manually to reduce the interference of the audio playback on the user's conversation, and the audio playback method cannot be automatically adjusted. Summary of the invention
[0003] Embodiments of the present application provide an audio playback method, apparatus, device, storage medium, and vehicle that can automatically adjust the playback status of a target audio, thereby reducing interference of the playback audio with a user's conversation.
[0004] In a first aspect, an embodiment of the present application provides an audio playback method, the method comprising:
[0005] Playing a target audio, where the target audio is audio that matches an emotion category of a target user, where the emotion category of the target user is obtained by identifying historical speech content of the target user;
[0006] At the target time point, obtaining the historical voice duration of the target user, where the historical voice duration is the duration of the historical voice input by the target user within a target time period, and the target time period is a time period before the target time point and separated from the target time point by a preset time period;
[0007] Determine conversation state information corresponding to the historical voice duration, wherein the conversation state information is used to indicate whether the target user is in a conversation state;
[0008] When the conversation status information indicates that the target user is in a conversation state, the playing state of the target audio is adjusted.
[0009] In a second aspect, an embodiment of the present application provides an audio playback device, the device comprising:
[0010] A playing module, used for playing a target audio, wherein the target audio is an audio that matches an emotion category of a target user, wherein the emotion category of the target user is obtained by identifying a historical voice content of the target user;
[0011] A first acquisition module is used to acquire the historical voice duration of the target user at a target time point, where the historical voice duration is the duration of the historical voice input by the target user within a target time period, and the target time period is a time period before the target time point and separated from the target time point by a preset time period;
[0012] A first determination module, used to determine conversation state information corresponding to the historical voice duration, wherein the conversation state information is used to indicate whether the target user is in a conversation state;
[0013] An adjustment module is used to adjust the playing state of the target audio when the conversation state information indicates that the target user is in a conversation state.
[0014] In a third aspect, an embodiment of the present application provides an electronic device, comprising: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the audio playback method as described in any one of the above is implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the audio playback method as described in any one of the above is implemented.
[0016] In a fifth aspect, an embodiment of the present application provides a vehicle, comprising: an electronic device, wherein the electronic device is used to implement the audio playback method as described in any one of the above.
[0017] The audio playback method, device, equipment, storage medium and vehicle of the embodiment of the present application can play the target audio, and at the target time point, based on the historical voice duration of the target user, determine the conversation state information corresponding to the historical voice duration, the historical voice duration is the duration of the historical voice input by the target user within the target time period, the target time period is before the target time point and is separated from the target time point by a preset time period, the conversation state information is used to indicate whether the target user is in a conversation state, and when the conversation state information indicates that the target user is in a conversation state, adjust the playback state of the target audio. In this way, the present embodiment can determine whether the target user is in a conversation state by the historical voice duration of the target user, and automatically adjust the playback state of the target audio when the target user is in a conversation state, thereby reducing the interference of the playback of the target audio on the user's conversation. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0019] Figure 1 is a flowchart of an audio playback method provided in an embodiment of the present application;
[0020] Figure 2 is a structural diagram of an audio playback device provided in an embodiment of the present application;
[0021] Figure 3 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.
[0023] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0024] With the continuous development of science and technology, vehicles have brought great convenience to people's lives and travel. In order to increase the fun of traveling by car, the atmosphere in the car can be changed by playing audio. However, the existing audio playback method is single. If there are people in the car talking, the audio playback can only be adjusted manually to reduce the interference of the audio playback on the user's conversation, and the audio playback method cannot be automatically adjusted.
[0025] In order to solve the problems of the prior art, the embodiments of the present application provide an audio playback method, device, equipment, storage medium and vehicle. The audio playback method provided by the embodiments of the present application is first introduced below.
[0026] Figure 1 FIG. 1 is a flow chart of an audio playback method provided by an embodiment of the present application. Figure 1 As shown, an audio playing method may include the following steps S101 to S104.
[0027] S101. Play a target audio, where the target audio is audio that matches an emotion category of a target user, and the emotion category of the target user is obtained by identifying historical voice content of the target user.
[0028] S102. At the target time point, obtain the historical voice duration of the target user, where the historical voice duration is the duration of the historical voice input by the target user within a target period of time, and the target period of time is a period before the target time point and separated from the target time point by a preset period of time.
[0029] S103: Determine conversation state information corresponding to the historical voice duration, where the conversation state information is used to indicate whether the target user is in a conversation state.
[0030] S104: When the conversation status information indicates that the target user is in a conversation status, adjust the playing status of the target audio.
[0031] The audio playback method of the embodiment of the present application can play the target audio, and at the target time point, based on the historical voice duration of the target user, determine the conversation state information corresponding to the historical voice duration, the historical voice duration is the duration of the historical voice input by the target user within the target time period, the target time period is before the target time point and is separated from the target time point by a preset time period, the conversation state information is used to indicate whether the target user is in a conversation state, and when the conversation state information indicates that the target user is in a conversation state, adjust the playback state of the target audio. In this way, the present embodiment can determine whether the target user is in a conversation state by the historical voice duration of the target user, and automatically adjust the playback state of the target audio when the target user is in a conversation state, thereby reducing the interference of playing the target audio on the user's conversation.
[0032] The above audio playback method is mainly applied to vehicle terminals. The present application is not limited thereto, and can also be a vehicle central control system or other terminal equipment with data processing capabilities.
[0033] The specific implementation methods of the above steps are introduced below.
[0034] In S101, the target audio is audio that matches the emotion category of the target user. The emotion category may include but is not limited to happiness, anger, like, disgust, excitement, fear, happiness, sadness, surprise and calmness.
[0035] The target user's emotion category is obtained by identifying the target user's historical voice content. The target user's emotion category can be obtained by semantically identifying the target user's historical voice content through natural language processing technology.
[0036] In S102, the target user may be a driver of the vehicle, or a user in the autonomous driving vehicle.
[0037] The above target time point, for example, can be a time point half an hour after the target user gets on the bus, but is not limited thereto, and can also be other values. The time point can be set according to user needs, and this application does not make specific limitations here. Similarly, the preset time length can be a manually set half an hour, or other values.
[0038] The above-mentioned target time period can be a time period before the target time point and separated from the target time point by a preset time period. For example, it can be a time period of half an hour from the time the target user gets on the bus. The present application is not limited to this and can also be other values, which are not specifically limited here.
[0039] The above-mentioned historical voice duration can be the duration of the historical voice input by the target user within the target time period. For example, it can be the total duration of the voice input by the vehicle driver within half an hour of getting on the vehicle (for example, 15 minutes). It should be noted that the historical voice duration is less than or equal to the preset duration.
[0040] The above-mentioned acquisition of the historical voice duration of the target user may be to collect the historical voice of the target user through a microphone in the vehicle, and calculate the duration of the historical voice input by the target user within the target time period in the vehicle terminal.
[0041] In S103, the conversation status information may be used to indicate whether the target user is in a conversation state.
[0042] The above-mentioned determination of the conversation status information corresponding to the historical voice duration may include, when the historical voice duration is not zero, determining that the conversation status information indicates that the target user is in a conversation state; and when the historical voice duration is zero, determining that the conversation status information indicates that the target user is not in a conversation state.
[0043] In S104, the above-mentioned adjustment of the playing state of the target audio may be to reduce the playing volume of the target audio, or to monitor the input state of the real-time voice, and when the input state indicates that the real-time voice starts to be input, interrupt the playing of the target audio. Among them, reducing the playing volume of the target audio may be to reduce the playing volume to a preset first threshold, and the first threshold may be other volume values lower than before adjusting the playing state of the target audio, and may even be 0, that is, the target audio is played silently.
[0044] In some embodiments, the above S104 may specifically include:
[0045] When the conversation state information indicates that the target user is in a conversation state, the historical voice duration is compared with a preset threshold to obtain a first comparison result, the preset threshold is less than or equal to the preset duration, and the first comparison result is used to indicate whether the historical voice duration is less than the preset threshold;
[0046] When the first comparison result indicates that the duration of the historical speech is greater than or equal to the preset threshold, reducing the playback volume of the target audio to a preset first threshold;
[0047] When the first comparison result indicates that the historical speech duration is less than a preset threshold, the input state of the real-time speech is monitored, and when the input state indicates that the real-time speech starts to be input, the playing of the target audio is interrupted.
[0048] The above-mentioned preset threshold is less than or equal to the preset duration, and the first comparison result is used to indicate whether the historical voice duration is less than the preset threshold.
[0049] In the above-mentioned case where the conversation status information indicates that the target user is in a conversation state, by comparing the historical voice duration with the preset threshold, a first comparison result is obtained, which can identify what kind of conversation state the target user is in, for example, a high-frequency conversation with a historical voice duration greater than or equal to the preset threshold, or a low-frequency conversation with a historical voice duration less than the preset threshold.
[0050] The above-mentioned first comparison result indicates that the duration of the historical voice is greater than or equal to the preset threshold, which means that the historical voice input by the target user within the target time period is relatively long. In the case of this high-frequency conversation, the playback volume of the target audio is reduced to the preset first threshold, and then the audio is played at the volume of the first threshold, thereby reducing the interference of the playback audio on the conversation of the target user.
[0051] The above-mentioned first comparison result indicates that the length of the historical voice is less than the preset threshold, which means that the historical voice input by the target user within the target time period is relatively short. In the case of this low-frequency conversation, by monitoring the input status of the real-time voice and interrupting the playback of the target audio when the input status indicates that the real-time voice starts to be input, the interference of the playback audio on the conversation of the target user is reduced.
[0052] When the above-mentioned input status indicates that real-time voice input starts, the playback of the target audio is interrupted. When the real-time voice starts to be input, the playback of the target audio can be directly interrupted. Alternatively, the input status of the real-time voice can be monitored. When the input status indicates that the real-time voice input starts, the volume of the audio is reduced by a preset unit amplitude in a preset unit time period, and when the playback volume is reduced to a third threshold, the playback of the target audio is interrupted.
[0053] In this embodiment, the historical voice duration is compared with a preset threshold to obtain a comparison result, and based on different situations indicated by the first comparison result, the playback status of the target audio is adjusted according to different strategies to meet various user needs.
[0054] As an implementation of the present application, in order to restore the playback state of the target audio when the conversation ends, after reducing the playback volume of the target audio to a preset first threshold, the following may also be included:
[0055] In response to the resume playback instruction, the playback volume is increased to a preset second threshold value, where the second threshold value is greater than the first threshold value;
[0056] The target audio is played at a playback volume of a second threshold.
[0057] The above-mentioned resume playback instruction may be a resume playback instruction issued by the user through manual operation of the vehicle-mounted terminal, or may be a resume playback instruction issued by collecting user voice input.
[0058] The second threshold may be the volume before adjusting the target audio playback state, or may be the target user's usual volume.
[0059] In this embodiment, when the conversation ends, the playback volume of the target audio is controlled to increase to the second threshold by resuming the playback instruction, and the target audio is played at the playback volume of the second threshold, thereby restoring the playback state of the target audio.
[0060] In some embodiments, the above-mentioned monitoring of the input state of the real-time voice and interrupting the playing of the target audio when the input state indicates that the real-time voice starts to be input may specifically include:
[0061] Monitor the input status of real-time voice;
[0062] When the input state indicates that the real-time voice input starts, the target audio is played at a lower volume by a preset unit amplitude in a preset unit period;
[0063] When the playback volume decreases to a third threshold, playback of the target audio is interrupted.
[0064] The above-mentioned real-time voice may be the voice input by the target user in real time after the target time point.
[0065] The preset unit time period reduces the volume by a preset unit amplitude. For example, the volume may be reduced by 1 level in 1 second, each level of volume is the volume of the preset unit amplitude, and each second is the preset unit time period.
[0066] The third threshold may be another volume value lower than that before adjusting the target audio playback state, or may even be 0, that is, the target audio is stopped from being played when the playback volume is reduced to mute.
[0067] In this embodiment, by first reducing the volume of the audio by a preset unit amplitude in a preset unit time period and then interrupting the playback of the target audio, the audio can disappear smoothly during the user conversation, so that the user has a better experience.
[0068] As another implementation of the present application, in order to restore the audio playback state when the conversation ends, in the above-mentioned monitoring of the input state of the real-time voice, when the input state indicates that the real-time voice starts to be input, after interrupting the playback of the target audio, it may also include:
[0069] When the input state indicates that the real-time voice input is finished, continue to play the target audio at a playback volume of a third threshold;
[0070] The target audio is played by increasing the playback volume by a preset unit amplitude in a preset unit time period until the playback volume reaches a fourth threshold value, and the fourth threshold value is greater than the third threshold value.
[0071] The above-mentioned situation where the real-time voice input ends may be that if there is no input within a preset period of time after the real-time voice stops inputting, it is determined that the real-time voice input ends.
[0072] In this embodiment, by continuing to play the audio first, and then increasing the playback volume by a preset unit amplitude during a preset unit period to play the target audio, the audio can be slowly played when the user conversation ends, thereby providing a better user experience.
[0073] As an implementation of the present application, in order to encourage people in the car to talk, the target audio may include target music. Before the above S101, it may also include:
[0074] Obtain the historical voice content of the target user;
[0075] Identify the target user’s emotion category based on historical speech content;
[0076] Determine the target music that matches the emotion category of the target user in a preset music library, where the music library includes music of different emotion categories;
[0077] The above S101 may specifically include:
[0078] Play the target music.
[0079] The above historical voice content may be the content information of the historical conversation input by the target user and the intelligent robot in the car.
[0080] The above-mentioned acquisition of historical voice content input by the target user in the car within a preset time period may, for example, be to collect historical voice content input by the driver within half an hour of getting on the car through a microphone provided in the car.
[0081] The above emotion categories, by way of example, may include but are not limited to happiness, anger, like, disgust, excitement, fear, happiness, sadness, surprise and calmness.
[0082] The above-mentioned identification of the emotion category of the target user based on the historical voice content may be exemplarily performed by semantically identifying the historical voice content through natural language processing (NLP) technology to determine the emotion category of the target user.
[0083] The target music mentioned above may be music in the music library that relaxes the target user.
[0084] In the above, in the preset music library, the target music matching the emotion category of the target user is determined. For example, when the emotion category of the target user belongs to the positive emotion type, such as happiness, the music with the emotion category of happiness in the music library is determined as the target music; if the emotion category of the target user belongs to the negative emotion type, such as sadness, in order to enable the target user to recover from negative emotions to calmness, thereby improving driving safety, the music with the emotion category of calmness in the music library is determined as the target music.
[0085] The target music may be played directly through a vehicle audio system connected to the vehicle terminal.
[0086] The above-mentioned adjustment of the playing status of the target music when the conversation status information indicates that the target user is in a conversation status may be to reduce the playing volume of the target music and continue to play the target music when the conversation status information indicates that the target user is in a conversation status, or to interrupt the playing of the target music when the input status indicates that real-time voice starts to be input.
[0087] In this embodiment, the target user's emotional category can be identified based on the historical voice content input by the target user, and music matching the user's emotional category can be played, so that the atmosphere in the car can become relaxed, thereby encouraging people in the car to talk and increasing the fun of traveling.
[0088] As an implementation of the present application, in order to improve the efficiency of classifying the music in the music library according to the emotion category, the method for forming the music library may include:
[0089] Get at least one piece of music;
[0090] Input at least one piece of music into a music emotion classification model to determine the emotion category of each piece of music, wherein the music emotion classification model is a model trained based on historical music and the emotion categories corresponding to the historical music;
[0091] At least one piece of music and the emotion category of each piece of music are stored in a music library.
[0092] The above music includes dialogue gap music and dialogue background music. Among them, dialogue gap music is a piece of music suitable for creating an atmosphere when there is no dialogue in the car. Dialogue background music is background music suitable for dialogue.
[0093] The above-mentioned music emotion classification model can be a model obtained by machine learning training based on historical music and the emotion categories corresponding to historical music.
[0094] In this embodiment, a music emotion classification model is obtained by training historical music and the emotion categories corresponding to the historical music, and the music is classified into emotion categories. When there are a large number of music in the music library, for example, more than 10,000, compared with manually marking the emotion categories of each music, the efficiency of classifying the music in the music library according to emotion categories can be improved.
[0095] As another implementation of the present application, in order to improve the accuracy of the target music matching, after inputting at least one music into the music emotion classification model and determining the emotion category of each music, the following may also be included:
[0096] Inputting at least one piece of music and the emotion category of each piece of music into an emotion adaptation scoring model to determine the adaptation score of each piece of music, wherein the emotion adaptation scoring model is trained based on historical music, the emotion category corresponding to the historical music, and the adaptation score of the historical music and the corresponding emotion category;
[0097] At least one piece of music and the emotion category and suitability score of each piece of music are stored in a music library.
[0098] The above-mentioned emotion adaptation scoring model is a model trained based on historical music, emotion categories corresponding to historical music, and the adaptation scores between historical music and corresponding emotion categories.
[0099] In this embodiment, the emotion adaptation scoring model is used to determine the fitness score of each piece of music in the music library, thereby helping the user to find the music that matches his emotion category and has the highest fitness.
[0100] In some embodiments, determining the target music matching the emotion category of the target user in the preset music library may specifically include:
[0101] Determine at least one candidate music that matches the emotion category of the target user in a preset music library;
[0102] When there are multiple candidate music pieces, the candidate music piece with the highest fitness score is determined as the target music piece.
[0103] The candidate music is at least one piece of music in the music library that matches the emotion category of the target user. If there is only one candidate music, the candidate music is determined as the target music. If there are multiple candidate music, the candidate music with the highest fitness score is determined as the target music, or the candidate music ranked in the top three fitness scores is determined as the target music, of course, it is not limited to the top three, and is not specifically limited in this embodiment.
[0104] In this embodiment, among a plurality of candidate music that matches the emotion category of the target user, the candidate music with the highest fitness score can be determined as the target music, thereby improving the accuracy of the target music matching.
[0105] As another implementation of the present application, in order to further identify the user's emotions and thus accurately match the music, before determining the target music matching the target user's emotion category in the preset music library, the following may also be included:
[0106] Obtain the target user's body status information;
[0107] Compare the limb state information with the preset limb state information to obtain a second comparison result, where the second comparison result is used to indicate whether the limb state information of the target user meets the preset limb state information;
[0108] Based on the second comparison result, identifying the emotion level of the target user;
[0109] Determining the target music matching the emotion category of the target user in the preset music library may specifically include:
[0110] In the preset music library, target music matching the target user's emotion category and emotion level is determined, and the music library also corresponds to music of different emotion levels.
[0111] The above-mentioned limb state information may include the amplitude of the user's limb movement changes, the pressure information of the seat on which the user sits caused by the user's limb movement changes and / or the pressure information of the steering wheel held by the driver, and may also include the user's pupil information.
[0112] The above-mentioned acquisition of the target user's limb state information can be by acquiring the user's limb movement change amplitude and / or pupil information through an in-vehicle camera, acquiring the user's seat pressure information by setting a pressure sensor element on the seat cushion or backrest, and acquiring the driver's steering wheel pressure information by setting a pressure sensor element on the steering wheel.
[0113] The above-mentioned body state information is compared with the preset body state information to obtain a comparison result, and then based on the comparison result, the emotional level of the target user is identified. Exemplarily, the amplitude of the change of the user's body movement can be compared with the preset first amplitude and / or second amplitude to obtain a comparison result. When the comparison result indicates that the amplitude of the change of the target user's body movement is greater than the first amplitude, the emotional level of the target user is determined to be the first intensity; when the comparison result indicates that the amplitude of the change of the target user's body movement is greater than the second amplitude, the emotional level of the target user is determined to be the second intensity, wherein the second amplitude is greater than the first amplitude, and the second intensity is greater than the first intensity; when there are three or more emotional levels, and so on, the emotional level of the user is determined.
[0114] Alternatively, the user's seat pressure information or steering wheel pressure information may also be compared with a preset first pressure threshold and / or second pressure threshold to obtain a comparison result. When the comparison result indicates that the pressure information is greater than the first pressure threshold, the target user's emotional level is determined to be a first intensity; when the comparison result indicates that the pressure information is greater than the second pressure threshold, the target user's emotional level is determined to be a second intensity, and the second pressure threshold is greater than the first pressure threshold.
[0115] Alternatively, the target user's emotional level can be identified through the user's pupil information. Since the pupil is the main component of the eye, it is like the eyes and eyeballs, and different changes can also reflect different emotional levels. The pupil of a person will change with the emotional level. If the emotional level of positive emotions such as happiness and excitement is strong, the pupil will become larger and the eyes will shine; on the contrary, if the emotional level of negative emotions such as anger, disgust, negativity, etc. is strong, the pupil will shrink very small; and if the emotional level is normal, the pupil will not change much.
[0116] Each piece of music in the above music library has been marked with two dimensions: emotion category and emotion level. According to the emotion category and emotion level of the user, the corresponding target music can be found.
[0117] In this embodiment, the user's emotional level is further identified through the user's body state information, and target music that matches the user's emotional category and emotional level can be determined in a preset music library to improve the accuracy of music matching.
[0118] As another implementation of the present application, in order to play music that matches the conversation scene between two people, the above-mentioned identification of the target user's emotion category based on the historical voice content may specifically include:
[0119] Based on the historical voice content, determining the dialogue type of the historical voice content, the dialogue type includes a single-person conversation mode and a two-person conversation mode;
[0120] In the case where the conversation type is a two-person conversation mode, an emotion category of a first user and an emotion category of a second user among target users are identified.
[0121] The above historical voice content may be content information of a historical conversation between the first user and the second user. The target user may include the first user and the second user. For example, the first user and the second user may be a driver and a passenger, or a passenger and a passenger. The above conversation type may include a single-person conversation mode and a two-person conversation mode. The single-person conversation mode may be a mode in which the target user talks to an intelligent robot in the car, and the two-person conversation mode may be a mode in which the driver talks to a passenger, or a mode in which a passenger talks to a passenger.
[0122] The above-mentioned identification of the emotion category of the first user and the emotion category of the second user among the target users also uses natural language processing technology to semantically identify historical voice content to determine the emotion category of the first user and the emotion category of the second user.
[0123] In this embodiment, based on the historical voice content, it is possible to identify whether the conversation type is a single-person conversation mode or a two-person conversation mode, and in the two-person conversation mode, identify the emotion category of the first user and the emotion category of the second user among the target users, so as to subsequently match the first target music and the second target music.
[0124] In some embodiments, the target music may include first target music and second target music, the first target music being music that matches the emotion category of the first user, and the second target music being music that matches the emotion category of the second user;
[0125] Before playing the target music, the following may also be included:
[0126] Calculating the correlation between the emotion category of the first user and the emotion category of the second user;
[0127] The above-mentioned target music to be played may specifically include:
[0128] When the correlation degree is greater than the first threshold, playing the first target music;
[0129] When the correlation degree is less than or equal to the first threshold and greater than the second threshold, playing the second target music, the second threshold is less than the first threshold;
[0130] When the correlation degree is less than or equal to the second threshold, the first target music and the second target music are played alternately.
[0131] Since the target users include the first user and the second user, the above-mentioned determination of the target music matching the emotion category of the target user in the preset music library may also include determining the first target music matching the emotion category of the first user and the second target music matching the emotion category of the second user in the music library.
[0132] The correlation between the emotion category of the first user and the emotion category of the second user may be the similarity between the emotion category of the first user and the emotion category of the second user, thereby obtaining the similarity relationship between the emotion categories of the first user and the second user in the two-person conversation mode.
[0133] When the above correlation degree is greater than the first threshold, it means that the emotion category of the first user is the same as the emotion category of the second user, and the first target music is played.
[0134] When the above correlation degree is less than or equal to the first threshold and greater than the second threshold, it means that the emotion category of the first user is similar to the emotion category of the second user, and the second target music is played.
[0135] When the above correlation degree is less than or equal to the second threshold, it means that the emotion category of the first user is opposite to the emotion category of the second user, and the first target music and the second target music are played alternately.
[0136] In this embodiment, corresponding music is played based on the correlation between the emotion category of the first user and the emotion category of the second user, thereby matching different music playing requirements in the conversation mode between two people.
[0137] In some embodiments, considering that identity attribute differences may lead to differences in the conversation between two users, in order to meet the needs of playing music for users with different attributes, before playing the target music, the following may also be included:
[0138] Based on the historical voice content, identifying attribute information of the first user and attribute information of the second user;
[0139] When the correlation degree is less than or equal to the first threshold and greater than the second threshold, playing the second target music includes:
[0140] When the degree of association is less than or equal to the first threshold and greater than the second threshold, and the attribute information of the first user is the same as the attribute information of the second user, the second target music is played.
[0141] In some embodiments, when the degree of association is less than or equal to a first threshold and greater than a second threshold, and the attribute information of the first user and the attribute information of the second user are opposite, music matching the emotion category of the user whose attribute information indicates that the first user and the second user are female is played.
[0142] The above-mentioned attribute information may be information used to represent the user's identity attributes. For example, it may be information representing the user's gender, or it may be information indicating that the user's attribute is a driver or a passenger.
[0143] The above-mentioned identifying the attribute information of the first user and the attribute information of the second user based on historical voice content may be inputting the historical voice content into a sound gender recognition model to identify the attribute information of the first user and the attribute information of the second user, wherein the sound gender recognition model is a model trained based on historical voice samples and the attribute information of each historical voice sample.
[0144] In the above case where the correlation degree is less than or equal to the first threshold and greater than the second threshold, and the attribute information of the first user and the attribute information of the second user are opposite, it means that the emotion categories of the first user and the second user are similar, and the genders of the first user and the second user are opposite, then the target music corresponding to the female user is played.
[0145] In this embodiment, taking into account that differences in identity attributes will lead to differences in the conversation between two users, when the emotion categories of the first user and the second user are similar, if the first user and the second user are of opposite genders, the target music corresponding to the female user is played, which can meet the needs of users of different genders to play music, making the atmosphere in the car relaxed, thereby encouraging users in the car to talk.
[0146] Based on the audio playback method provided in the above embodiment, the present application also provides a specific implementation of an audio playback device. Please refer to the following embodiment.
[0147] like Figure 2 As shown, an audio playback device 200 provided in an embodiment of the present application may include the following modules: a playback module 201 , a first acquisition module 202 , a first determination module 203 and an adjustment module 204 .
[0148] The playing module 201 is used to play the target audio, where the target audio is the audio that matches the emotion category of the target user, and the emotion category of the target user is obtained by identifying the historical voice content of the target user.
[0149] The first acquisition module 202 is used to acquire the historical voice duration of the target user at the target time point, where the historical voice duration is the duration of the historical voice input by the target user within a target period, and the target period is a period before the target time point and separated from the target time point by a preset time period;
[0150] The first determination module 203 is used to determine the conversation state information corresponding to the historical voice duration, where the conversation state information is used to indicate whether the target user is in a conversation state;
[0151] The adjustment module 204 is used to adjust the playing state of the target audio when the conversation state information indicates that the target user is in a conversation state.
[0152] The audio playback device of the embodiment of the present application can play the target audio, and at the target time point, based on the historical voice duration of the target user, determine the conversation state information corresponding to the historical voice duration, the historical voice duration is the duration of the historical voice input by the target user within the target time period, the target time period is before the target time point and is separated from the target time point by a preset time period, the conversation state information is used to indicate whether the target user is in a conversation state, and when the conversation state information indicates that the target user is in a conversation state, adjust the playback state of the target audio. In this way, the present embodiment can determine whether the target user is in a conversation state by the historical voice duration of the target user, and automatically adjust the playback state of the target audio when the target user is in a conversation state, thereby reducing the interference of playing the target audio on the user's conversation.
[0153] In some embodiments, the adjustment module 204 may specifically include:
[0154] A comparison unit, configured to compare the historical voice duration with a preset threshold value when the conversation state information indicates that the target user is in a conversation state, to obtain a first comparison result, the preset threshold value is less than or equal to the preset duration, and the first comparison result is used to indicate whether the historical voice duration is less than the preset threshold value;
[0155] A reducing unit, configured to reduce the playback volume of the target audio to a preset first threshold value when the first comparison result indicates that the historical speech duration is greater than or equal to the preset threshold value;
[0156] The interruption unit is used to monitor the input state of the real-time voice when the first comparison result indicates that the length of the historical voice is less than a preset threshold, and interrupt the playing of the target audio when the input state indicates that the real-time voice starts to be input.
[0157] As an implementation of the present application, in order to restore the audio playing state when the conversation ends, the adjustment module 203 may further include:
[0158] A first increasing unit, configured to increase the playback volume of the target audio to a preset second threshold value in response to a resume playback instruction, where the second threshold value is greater than the first threshold value;
[0159] The first control unit is used to play the target audio at a playback volume of a second threshold.
[0160] In some embodiments, the interruption unit may specifically include:
[0161] A monitoring subunit, used to monitor the input status of real-time speech;
[0162] A reducing subunit, used to reduce the playback volume of the target audio by a preset unit amplitude in a preset unit period when the input state indicates that the real-time voice starts to be input;
[0163] The interruption subunit is used to interrupt the playing of the target audio when the playing volume is reduced to a third threshold.
[0164] As another implementation of the present application, in order to restore the audio playing state when the conversation ends, the adjustment module 204 may further include:
[0165] A second control unit, configured to continue playing the target audio at a playback volume of a third threshold value when the input state indicates that the real-time voice input has ended;
[0166] The second increasing unit is used to increase the playback volume of the target audio by a preset unit amplitude in a preset unit time period until the playback volume reaches a fourth threshold value, and the fourth threshold value is greater than the third threshold value.
[0167] As an implementation of the present application, in order to encourage people in the car to talk, the target audio includes target music, and the device 200 may further include:
[0168] The second acquisition module is used to acquire the historical voice content of the target user;
[0169] A first recognition module is used to recognize the emotion category of the target user based on the historical voice content;
[0170] A second determination module is used to determine target music that matches the emotion category of the target user in a preset music library, where the music library includes music of different emotion categories;
[0171] The playing module 201 can be specifically used to play target music.
[0172] As an implementation of the present application, in order to improve the efficiency of classifying the music in the music library according to the emotion category, the above-mentioned device 200 may also include:
[0173] A third acquisition module, used to acquire at least one piece of music;
[0174] A third determination module is used to input at least one piece of music into a music emotion classification model to determine the emotion category of each piece of music, where the music emotion classification model is a model trained based on historical music and emotion categories corresponding to the historical music;
[0175] The first storage module is used to store at least one piece of music and the emotion category of each piece of music in the music library.
[0176] As another implementation of the present application, in order to improve the accuracy of target music matching, the above-mentioned device 200 may further include:
[0177] A fourth determination module is used to input at least one piece of music and the emotion category of each piece of music into an emotion adaptation scoring model to determine the fitness score of each piece of music, wherein the emotion adaptation scoring model is trained based on historical music, the emotion category corresponding to the historical music, and the fitness score of the historical music and the corresponding emotion category;
[0178] The second storage module is used to store at least one piece of music and the emotion category and suitability score of each piece of music in the music library.
[0179] In some embodiments, the second determining module may specifically include:
[0180] A first determining unit is used to determine at least one candidate music matching the emotion category of the target user in a preset music library;
[0181] The second determination unit is used to determine the candidate music with the highest fitness score as the target music when there are multiple candidate music.
[0182] As another implementation of the present application, in order to further identify the user's emotions and thus accurately match the music, the above-mentioned device 200 may also include:
[0183] The fourth acquisition module is used to acquire the limb status information of the target user;
[0184] A comparison module, used to compare the limb state information with the preset limb state information to obtain a second comparison result, wherein the second comparison result is used to indicate whether the limb state information of the target user meets the preset limb state information;
[0185] A second identification module, used to identify the emotion level of the target user based on the second comparison result;
[0186] The second determination module is specifically used to determine the target music that matches the emotion category and emotion level of the target user in a preset music library, and the music library also corresponds to music of different emotion levels.
[0187] As another implementation of the present application, in order to play music matching the conversation scene between two people, the first recognition module may specifically include:
[0188] A third determining unit is used to determine the dialogue type of the historical voice content based on the historical voice content, where the dialogue type includes a single-person conversation mode and a two-person conversation mode;
[0189] The identification unit is used to identify the emotion category of the first user and the emotion category of the second user among the target users when the dialogue type is a two-person conversation mode.
[0190] In some embodiments, the target music includes first target music and second target music, the first target music is music matching the emotion category of the first user, and the second target music is music matching the emotion category of the second user;
[0191] The above-mentioned device 200 may further include:
[0192] A calculation module, used to calculate the correlation between the emotion category of the first user and the emotion category of the second user;
[0193] The above-mentioned playback module may specifically include:
[0194] A first playing unit, configured to play the first target music when the correlation degree is greater than a first threshold;
[0195] A second playing unit, configured to play second target music when the correlation degree is less than or equal to the first threshold and greater than a second threshold, and the second threshold is less than the first threshold;
[0196] The third playing unit is used to alternately play the first target music and the second target music when the correlation degree is less than or equal to the second threshold.
[0197] In some embodiments, considering that identity attribute differences may lead to differences in the conversation between two users, in order to meet the needs of playing music for users with different attributes, the above device 200 may further include:
[0198] A third recognition module, used to recognize attribute information of the first user and attribute information of the second user based on historical voice content;
[0199] The second playing unit is specifically used to play the second target music when the correlation degree is less than or equal to the first threshold and greater than the second threshold, and the attribute information of the first user is the same as the attribute information of the second user.
[0200] Based on the audio playback method provided in the above embodiment, the present application also provides a specific implementation of the electronic device. Please refer to the following embodiment.
[0201] Figure 3 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0202] The electronic device may include a processor 301 and a memory 302 storing computer program instructions.
[0203] Specifically, the processor 301 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0204] The memory 302 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 302 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 302 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 302 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 302 is a non-volatile solid-state memory.
[0205] In certain embodiments, the memory 302 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0206] The processor 301 implements any one of the audio playing methods in the above embodiments by reading and executing the computer program instructions stored in the memory 302 .
[0207] In one example, the electronic device may further include a communication interface 303 and a bus 310. Figure 3 As shown, the processor 301, the memory 302, and the communication interface 303 are connected via a bus 310 and communicate with each other.
[0208] The communication interface 303 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0209] Bus 310 includes hardware, software or both, and the parts of electronic equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 310 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.
[0210] The electronic device can execute the audio playback method in the embodiment of the present application, thereby realizing the combination Figure 1 and Figure 2 The described audio playback method and device.
[0211] In addition, in combination with the audio playback method in the above embodiment, the embodiment of the present application can provide a computer-readable storage medium for implementation. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any of the audio playback methods in the above embodiment is implemented.
[0212] In combination with the audio playing method in the above embodiment, the embodiment of the present application can provide a vehicle for implementation. The vehicle includes: an electronic device for implementing any one of the above audio playing methods.
[0213] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0214] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0215] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0216] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0217] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
[0218] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the term "comprises" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
Claims
1. An audio playback method, characterized in that: The method comprises: Playing a target audio, where the target audio is audio that matches an emotion category of a target user, where the emotion category of the target user is obtained by identifying historical speech content of the target user; At the target time point, obtaining the historical voice duration of the target user, where the historical voice duration is the duration of the historical voice input by the target user within a target time period, and the target time period is a time period before the target time point and separated from the target time point by a preset time period; Determine conversation state information corresponding to the historical voice duration, wherein the conversation state information is used to indicate whether the target user is in a conversation state; When the conversation status information indicates that the target user is in a conversation state, the playing state of the target audio is adjusted.
2. The method according to claim 1, characterized in that When the conversation state information indicates that the target user is in a conversation state, adjusting the playing state of the target audio includes: In the case where the conversation state information indicates that the target user is in a conversation state, comparing the historical voice duration with a preset threshold to obtain a first comparison result, the preset threshold is less than or equal to the preset duration, and the first comparison result is used to indicate whether the historical voice duration is less than the preset threshold; When the first comparison result indicates that the duration of the historical speech is greater than or equal to the preset threshold, reducing the playback volume of the target audio to a preset first threshold; When the first comparison result indicates that the historical speech duration is less than the preset threshold, the input state of the real-time speech is monitored, and when the input state indicates that the real-time speech starts to be input, the playing of the target audio is interrupted.
3. The method according to claim 2, characterized in that After reducing the playback volume of the target audio to a preset first threshold, the method further includes: In response to the resume playback instruction, increasing the playback volume of the target audio to a preset second threshold, where the second threshold is greater than the first threshold; The target audio is played at a playback volume of the second threshold.
4. The method according to claim 2, characterized in that The step of monitoring the input state of the real-time voice and interrupting the playing of the target audio when the input state indicates that the real-time voice starts to be input comprises: Monitor the input status of real-time voice; When the input state indicates that the real-time voice starts to be input, the target audio is played at a volume reduced by a preset unit amplitude in a preset unit time period; When the playback volume decreases to a third threshold, playback of the target audio is interrupted.
5. The method according to claim 4, characterized in that In the step of monitoring the input state of the real-time voice, when the input state indicates that the real-time voice starts to be input, after interrupting the playing of the target audio, the method further includes: When the input state indicates that the real-time voice input is finished, continue to play the target audio at the playback volume of the third threshold; The target audio is played by increasing the playback volume by the preset unit amplitude during the preset unit time period until the playback volume reaches a fourth threshold value, and the fourth threshold value is greater than the third threshold value.
6. The method according to claims 1 to 5, characterized in that The target audio includes target music; Before playing the target audio, the method further includes: Acquire historical voice content of the target user; Based on the historical voice content, identifying the emotion category of the target user; Determine target music that matches the emotion category of the target user in a preset music library, wherein the music library includes music of different emotion categories; The playing target audio includes: The target music is played.
7. The method according to claim 6, characterized in that The method for forming the music library comprises: Get at least one piece of music; Inputting at least one of the music into a music emotion classification model to determine the emotion category of each of the music, wherein the music emotion classification model is a model trained based on historical music and the emotion categories corresponding to the historical music; At least one of the music and the emotion category of each of the music are stored in the music library.
8. The method according to claim 6, characterized in that The identifying the emotion category of the target user based on the historical voice content includes: Based on the historical voice content, determining a conversation type of the historical voice content, the conversation type including a single-person conversation mode and a two-person conversation mode; When the conversation type is the two-person conversation mode, an emotion category of a first user and an emotion category of a second user among the target users are identified.
9. The method according to claim 8, characterized in that The target music includes first target music and second target music, the first target music is music matching the emotion category of the first user, and the second target music is music matching the emotion category of the second user; Before playing the target music, the method further includes: Calculating a correlation between the emotion category of the first user and the emotion category of the second user; The playing of the target music comprises: When the correlation degree is greater than a first threshold, playing the first target music; When the correlation degree is less than or equal to the first threshold and greater than a second threshold, playing the second target music, the second threshold being less than the first threshold; When the degree of association is less than or equal to the second threshold, the first target music and the second target music are played alternately.
10. The method according to claim 8, characterized in that Before playing the target music, the method further includes: Based on the historical voice content, identifying attribute information of the first user and attribute information of the second user; When the correlation degree is less than or equal to the first threshold and greater than a second threshold, playing the second target music includes: When the degree of association is less than or equal to the first threshold and greater than a second threshold, and the attribute information of the first user is the same as the attribute information of the second user, the second target music is played.
11. An audio playback device, characterized in that: The device comprises: A playing module, used for playing a target audio, wherein the target audio is an audio that matches an emotion category of a target user, wherein the emotion category of the target user is obtained by identifying a historical voice content of the target user; A first acquisition module is used to acquire the historical voice duration of the target user at a target time point, where the historical voice duration is the duration of the historical voice input by the target user within a target time period, and the target time period is a time period before the target time point and separated from the target time point by a preset time period; A first determination module, used to determine conversation state information corresponding to the historical voice duration, wherein the conversation state information is used to indicate whether the target user is in a conversation state; An adjustment module is used to adjust the playing state of the target audio when the conversation state information indicates that the target user is in a conversation state.
12. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the audio playback method according to any one of claims 1 to 10 is implemented.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the audio playback method according to any one of claims 1 to 10 is implemented.
14. A vehicle, characterized in that: include: An electronic device, wherein the electronic device is used to implement the audio playback method as described in any one of claims 1-10.
