Audio data playing method, device and readable storage medium
By extracting and separating the audio sub-data in the video data, and adjusting the gain according to the number of smart speakers and the user distance, the listening effect problem of the smart TV system when playing video audio is solved, and personalized playback and user experience of audio data are realized. promote.
Patent Information
- Application Number
- CN202010667246.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-09
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2040-07-09
AI Technical Summary
When the smart TV system plays video and audio data, it cannot effectively make personalized adjustments based on the user's location and the number of smart speakers, resulting in poor listening effects.
Extract the audio data from the video data, separate and gain adjust different types of audio sub-data according to the number of smart speakers in the smart TV environment and the user distance, and play them through each smart speaker.
It realizes personalized playback of audio data and improves the listening effect and comfort of users when watching videos on smart TVs.
Smart Images

Figure CN112333531B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart home technology, and in particular to an audio data playing method, device and readable storage medium. Background Art
[0002] With the development of smart Internet of Things technology, smart homes have been promoted to thousands of households. Smart TVs, smart speakers, etc. are connected through the smart Internet of Things to form a smart TV system to realize video and audio playback.
[0003] The current smart TV system plays the audio data in the video based on whether it is connected to a smart speaker. If a smart speaker is connected, the audio data is played in the mode of connecting to the smart speaker. However, a video usually involves multiple types of audio data, such as music, ambient sound, etc., and different users watch smart TVs in different positions; if they are all played in the same mode, the listening effect will be affected. Therefore, the current problem of affecting the listening effect of the playback of audio data in the video is a technical problem that needs to be solved urgently.
[0004] The above contents are only used to assist in understanding the technical solution of the present invention and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present invention is to provide an audio data playback method, device and readable storage medium, aiming to solve the technical problem of affecting the listening effect of the playback of audio data in a video in the prior art.
[0006] To achieve the above object, the present invention provides an audio data playback method, which is applied to a smart doorbell system, wherein the smart doorbell system is at least connected to a doorbell and a light source, and the audio data playback method comprises the following steps:
[0007] Extracting audio data from video data played by a smart TV, and determining the number of smart speakers that are turned on in an environment where the smart TV is located;
[0008] Separating various types of audio sub-data from the audio data according to the number of speakers;
[0009] The gain of each audio sub-data is adjusted according to the distance between the user and the smart TV in the environment where the smart TV is located, and the gain-adjusted audio sub-data is played based on each smart speaker.
[0010] Preferably, the step of separating various types of audio sub-data from the audio data according to the number of speakers comprises:
[0011] If the number of the speaker is only one, two types of audio sub-data are separated from the audio data according to the time sequence of formation of each audio signal element in the audio data, wherein the two types of audio sub-data are dialogue data and background sound data;
[0012] If the number of the speakers is two, three types of audio sub-data are separated from the audio data according to the time sequence in which the audio signal elements in the audio data are formed, wherein the three types of audio sub-data are dialogue data, background sound data and music data;
[0013] If the number of the speakers is three, four types of audio sub-data are separated from the audio data according to the time sequence in which the audio signal elements in the audio data are formed, wherein the four types of audio sub-data are dialogue data, background sound data, music data and ambient sound data.
[0014] Preferably, the step of playing each of the audio sub-data after gain adjustment based on each of the smart speakers comprises:
[0015] If the number of the speakers is only one, the dialogue data after gain adjustment is transmitted to the smart speakers for playing based on the time sequence, and the background sound data is played by the speakers of the smart TV based on the time sequence;
[0016] If there are two speakers, the dialogue data and music data after gain adjustment are transmitted to each of the smart speakers for playing based on the time sequence, and the background sound data is played by the speakers of the smart TV based on the time sequence;
[0017] If the number of the speakers is three, the gain-adjusted dialogue data, music data and ambient sound data are transmitted to each of the smart speakers for playback based on the time sequence, and the background sound data is played by the speakers of the smart TV based on the time sequence.
[0018] Preferably, the step of adjusting the gain of each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located comprises:
[0019] Determine whether the distance between the user and the smart TV in the environment where the smart TV is located is less than a preset threshold;
[0020] If the distance is less than a preset threshold, obtaining attenuation factors corresponding to each of the audio sub-data;
[0021] According to each of the attenuation factors, gain attenuation adjustment is performed on each of the audio sub-data.
[0022] Preferably, after the step of determining whether the distance between the user and the smart TV in the environment where the smart TV is located is less than a preset threshold, the step includes:
[0023] If the distance is greater than or equal to a preset threshold, acquiring enhancement factors corresponding to each of the audio sub-data respectively;
[0024] According to each enhancement factor, gain enhancement adjustment is performed on each audio sub-data.
[0025] Preferably, before the step of adjusting the gain of each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located, the step includes:
[0026] Based on the camera in the smart TV, a user image of a user in the environment where the smart TV is located is collected, and a pixel ratio between a face pixel area in the user image and a total pixel area of the user image is detected;
[0027] The distance between the user and the smart TV is determined according to the pixel ratio.
[0028] Preferably, the step of determining the number of smart speakers in the environment where the smart TV is located and in an on state comprises:
[0029] Based on the camera in the smart TV, an environmental image of the environment where the smart TV is located is collected, wherein the environmental image includes a smart speaker graphic;
[0030] Identify the smart speaker graphics in each of the environment images to determine the speaker model of the environment smart speaker in the environment where the smart TV is located;
[0031] The speaker model of each of the environmental smart speakers is compared with the currently online smart speaker model, the smart speakers in the environment where the smart TV is located that are turned on are determined, and the number of the smart speakers that are turned on is counted.
[0032] Preferably, the step of performing gain adjustment on each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located comprises:
[0033] The gain adjusted by each of the audio sub-data is displayed on a display screen of the smart TV.
[0034] To achieve the above-mentioned purpose, the present invention also provides an audio data playback device, which includes a memory, a processor, and an audio data playback program stored in the memory and executable on the processor, and the audio data playback program, when executed by the processor, implements the steps of the audio data playback method as described above.
[0035] In addition, to achieve the above-mentioned purpose, the present invention also provides a readable storage medium, on which an audio data playback program is stored, and when the audio data playback program is executed by a processor, the steps of the above-mentioned audio data playback method are implemented.
[0036] An audio data playback method, device and readable storage medium proposed in an embodiment of the present invention first extract audio data from the video data played by a smart TV, and determine the number of smart speakers currently turned on in the environment where the smart TV is located; then separate various types of audio sub-data from the audio data according to the number of speakers; and then perform gain adjustment on each separated audio sub-data according to the distance between the user and the smart TV in the environment where the smart speaker is located, and then each smart speaker in the turned-on state plays each gain-adjusted audio sub-data. The present invention separates various types of audio sub-data and plays them by each smart speaker, which is conducive to users accurately listening to and feeling various types of audio sub-data; and the audio sub-data is played after gain adjustment according to the distance between the user and the smart TV, and the volume of the playback matches the distance between the user and the smart TV, which is conducive to improving the comfort of users listening to various types of audio sub-data. Therefore, personalized playback of audio data based on the number of smart speakers and the distance of the user is realized, which improves the listening effect of the user on the audio during the video watching process through the smart TV. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention;
[0038] Figure 2 FIG. 4 is a flow chart of a first embodiment of an audio data playing method according to the present invention.
[0039] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0040] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0041] The present invention provides an audio data playing device, such as Figure 1 As shown, Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the audio data playback device of the present invention.
[0042] like Figure 1As shown, the audio data playback device may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001.
[0043] Those skilled in the art will understand that Figure 1 The hardware structure of the audio data playback device shown in the figure does not constitute a limitation on the audio data playback device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0044] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and an audio data playback program.
[0045] exist Figure 1 In the hardware structure of the audio data playback device shown, the network interface 1004 is mainly used to connect to the background server and perform data communication with the background server; the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the audio data playback program stored in the memory 1005 and perform the following operations:
[0046] Extracting audio data from video data played by a smart TV, and determining the number of smart speakers that are turned on in an environment where the smart TV is located;
[0047] Separating various types of audio sub-data from the audio data according to the number of speakers;
[0048] The gain of each audio sub-data is adjusted according to the distance between the user and the smart TV in the environment where the smart TV is located, and the gain-adjusted audio sub-data is played based on each smart speaker.
[0049] Furthermore, the step of separating various types of audio sub-data from the audio data according to the number of speakers includes:
[0050] If the number of the speaker is only one, two types of audio sub-data are separated from the audio data according to the time sequence of formation of each audio signal element in the audio data, wherein the two types of audio sub-data are dialogue data and background sound data;
[0051] If the number of the speakers is two, three types of audio sub-data are separated from the audio data according to the time sequence in which the audio signal elements in the audio data are formed, wherein the three types of audio sub-data are dialogue data, background sound data and music data;
[0052] If the number of the speakers is three, four types of audio sub-data are separated from the audio data according to the time sequence in which the audio signal elements in the audio data are formed, wherein the four types of audio sub-data are dialogue data, background sound data, music data and ambient sound data.
[0053] Furthermore, the step of playing each of the audio sub-data after gain adjustment based on each of the smart speakers includes:
[0054] If the number of the speakers is only one, the dialogue data after gain adjustment is transmitted to the smart speakers for playing based on the time sequence, and the background sound data is played by the speakers of the smart TV based on the time sequence;
[0055] If there are two speakers, the dialogue data and music data after gain adjustment are transmitted to each of the smart speakers for playing based on the time sequence, and the background sound data is played by the speakers of the smart TV based on the time sequence;
[0056] If the number of the speakers is three, the gain-adjusted dialogue data, music data and ambient sound data are transmitted to each of the smart speakers for playback based on the time sequence, and the background sound data is played by the speakers of the smart TV based on the time sequence.
[0057] Furthermore, the step of performing gain adjustment on each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located includes:
[0058] Determine whether the distance between the user and the smart TV in the environment where the smart TV is located is less than a preset threshold;
[0059] If the distance is less than a preset threshold, obtaining attenuation factors corresponding to each of the audio sub-data;
[0060] According to each of the attenuation factors, gain attenuation adjustment is performed on each of the audio sub-data.
[0061] Further, after the step of determining whether the distance between the user and the smart TV in the environment where the smart TV is located is less than a preset threshold, the processor 1001 can be used to call the audio data playback program stored in the memory 1005 and perform the following operations:
[0062] If the distance is greater than or equal to a preset threshold, acquiring enhancement factors corresponding to each of the audio sub-data respectively;
[0063] According to each enhancement factor, gain enhancement adjustment is performed on each audio sub-data.
[0064] Further, before the step of adjusting the gain of each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located, the processor 1001 can be used to call the audio data playback program stored in the memory 1005 and perform the following operations:
[0065] Based on the camera in the smart TV, a user image of a user in the environment where the smart TV is located is collected, and a pixel ratio between a face pixel area in the user image and a total pixel area of the user image is detected;
[0066] The distance between the user and the smart TV is determined according to the pixel ratio.
[0067] Furthermore, the step of determining the number of smart speakers in the environment where the smart TV is located and in an on state includes:
[0068] Based on the camera in the smart TV, an environmental image of the environment where the smart TV is located is collected, wherein the environmental image includes a smart speaker graphic;
[0069] Identify the smart speaker graphics in each of the environment images to determine the speaker model of the environment smart speaker in the environment where the smart TV is located;
[0070] The speaker model of each of the environmental smart speakers is compared with the currently online smart speaker model, the smart speakers in the environment where the smart TV is located that are turned on are determined, and the number of the smart speakers that are turned on is counted.
[0071] Further, after the step of performing gain adjustment on each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located, the processor 1001 can be used to call the audio data playback program stored in the memory 1005, and perform the following operations:
[0072] The gain adjusted by each of the audio sub-data is displayed on a display screen of the smart TV.
[0073] The specific implementation of the audio data playback device of the present invention is basically the same as the various embodiments of the audio data playback method described below, and will not be repeated here.
[0074] In order to better understand the above technical solution, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art.
[0075] In order to better understand the above technical solution, the above technical solution will be described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0076] Reference Figure 2 The first embodiment of the audio data playing method of the present invention provides an audio data playing method, which is applied to a smart doorbell system, wherein the smart doorbell system is at least connected to a doorbell and a light source, and the audio data playing method comprises:
[0077] Step S10, extracting audio data from the video data played by the smart TV, and determining the number of smart speakers in an on state in the environment where the smart TV is located;
[0078] The audio data playback method in this embodiment is applied to a smart TV system, which at least includes a smart TV, a smart speaker and a control center. The smart TV includes a speaker for playing audio data. The smart speaker and the speaker in the smart TV are controlled by the control center to play the audio data contained in the video data in the smart TV. The video data can be a movie, a TV series, or a musical. This embodiment preferably takes a movie as an example. Specifically, the video data currently played by the smart TV is first obtained, and the audio data is extracted from the video data and stored in the memory by removing the video channel information in the video data for playback by the smart speaker.
[0079] Considering that there are many smart speakers included in the smart TV system, not all smart speakers exist in the environment where the smart TV is located. For example, the smart TV is located in the living room, while smart speakers are installed in the living room and the bedroom. Moreover, for the smart speakers located in the environment where the smart TV is located, it is also possible that they are disconnected from the smart TV or not turned on. Therefore, before playing the extracted audio data through the smart speakers, first determine the smart speakers that are turned on in the environment where the smart TV is located, as well as the number of speakers, in order to effectively play the audio data. Specifically, the steps of determining the number of smart speakers that are turned on in the environment where the smart TV is located include:
[0080] Step S11, based on the camera in the smart TV, collecting an environmental image of the environment where the smart TV is located, wherein the environmental image includes a smart speaker graphic;
[0081] Step S12, identifying the smart speaker graphics in each of the environment images, and determining the speaker model of the environment smart speaker in the environment where the smart TV is located;
[0082] Step S13, compare the speaker model of each of the environmental smart speakers with the currently online smart speaker model, determine the smart speakers that are turned on in the environment where the smart TV is located, and count the number of the smart speakers that are turned on.
[0083] Furthermore, the smart TV is provided with a rotating camera that can shoot the environment in which it is located. Based on the rotating camera, the environment image of the environment in which the smart TV is located is collected, and the collected environment image contains the smart speaker graphic. In the collection process, first identify whether the environment imaging contains a smart speaker. If it contains a smart speaker, control the camera to shoot, obtain the environment image containing the smart speaker graphic, and control the camera to rotate according to a predetermined trajectory to shoot the next environment image containing the smart speaker graphic. If it is identified that the environment imaging does not contain a smart speaker, control the camera to rotate according to a predetermined trajectory, and continue to identify whether the environment imaging contains a smart speaker, until the camera rotates one circle according to the predetermined trajectory, and all environment images containing smart speaker graphics are captured.
[0084] Furthermore, a recognition algorithm is pre-set, and the environment image containing the smart speaker graphic is recognized by the recognition algorithm to obtain the speaker model of the smart speaker represented by the smart speaker graphic, that is, the speaker model of the environment smart speaker in the environment where the smart TV is located. Then, the model of the smart speaker that is currently turned on and connected to the smart TV and is currently online is read, and the speaker model of each identified environment smart speaker is compared with the model of the currently online smart speaker to determine the smart speaker with the same model. The smart speaker with the same model is the smart speaker in the environment where the smart TV is located and is turned on, which can be used to play the extracted audio data. In addition, the number of smart speakers in the turned-on state is counted to obtain the number of smart speakers in the turned-on state, which represents the number of speakers that can play audio data.
[0085] Step S20, separating various types of audio sub-data from the audio data according to the number of speakers;
[0086] Furthermore, in this embodiment, different types of audio data are played with different smart speakers. The types of audio data in a movie include at least dialogue, narration, monologue, background sound, music, ambient sound, etc. Human voices such as dialogue, narration, and monologue are collectively referred to as dialogue, and various types of audio data are used as audio sub-data. Different types of audio sub-data have different vibration ranges, so that various types of audio sub-data can be separated from the audio data according to their respective vibration ranges. In addition, because different smart speakers play different types of audio sub-data, the audio sub-data is separated according to the number of smart speakers that can be effectively played in the environment where the smart TV is located, that is, according to the number of smart speakers that are in the turned-on state. The more smart speakers are in the turned-on state, the more types of separated audio sub-data there are, and vice versa, the fewer types of separated audio sub-data there are.
[0087] Step S30, performing gain adjustment on each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located, and playing each audio sub-data after gain adjustment based on each smart speaker.
[0088] It is understandable that different users are at different distances from the smart TV when watching it. For example, the distance between a smart TV in one family and the viewing seat is 0.5m, while the distance between a smart TV in another family and the viewing seat is 1m, etc. Therefore, in order to facilitate users to listen to the audio data played through the smart speaker, this embodiment performs gain adjustment on each audio sub-data according to the distance between the user and the smart TV, so as to change the volume of each audio sub-data played by the smart speaker through the adjusted gain. Among them, before the gain adjustment, the distance between the user and the smart TV in the environment where the smart TV is located is first detected by the rotating camera on the smart TV. Therefore, according to the distance between the user and the smart TV in the environment where the smart TV is located, the step of gain adjustment for each audio sub-data includes:
[0089] Step a1, based on the camera in the smart TV, collecting a user image of a user in the environment where the smart TV is located, and detecting a pixel ratio between a face pixel area in the user image and a total pixel area of the user image;
[0090] Step a2: determining the distance between the user and the smart TV according to the pixel ratio.
[0091] Further, the control center calls the camera installed in the smart TV, and uses the camera to shoot the user image of the user in the environment where the smart TV is located. Then the user image is identified, the position of the face is determined, and the pixels at the position of the face are detected to determine the pixel area of the face in the user image. At the same time, the pixels of the entire user image are detected to obtain the total pixel area. Thereafter, a ratio operation is performed between the face pixel area and the total pixel area to obtain the pixel ratio between the two. The size of the pixel ratio is used to characterize the distance between the user and the smart TV. The larger the pixel ratio, the closer the distance between the user and the smart TV, and vice versa. The proportional relationship between the pixel ratio and the distance can be pre-set, the farthest distance from the smart TV is detected, and the user image is obtained by shooting the user at the distance, and then the farthest pixel ratio between the face pixel area and the total pixel area is calculated. At the same time, the closest distance is detected, and the closest pixel ratio is calculated for the closest distance. The proportional relationship between the pixel ratio and the distance is generated according to the farthest pixel ratio and the farthest distance, and the closest pixel ratio and the closest distance. During the actual detection process, the distance between the user and the smart TV can be obtained through the pixel ratio and this proportional relationship.
[0092] Furthermore, after determining the distance between the user and the smart TV, the gain of each type of audio sub-data can be adjusted according to the distance, and the various types of audio sub-data with adjusted gain can be played through each smart speaker, so that the playback of the audio data in the movie can achieve the best playback effect. In addition, the adjusted gain of each type of audio sub-data and the type of audio sub-data played by each smart speaker can be displayed on the display screen of the smart TV to remind the user of the gain size of each type of audio sub-data and the playback status of each smart speaker, so as to facilitate the user's switching and changing.
[0093] An audio data playback method proposed in an embodiment of the present invention first extracts audio data from video data played by a smart TV, and determines the number of smart speakers currently turned on in the environment where the smart TV is located; then, according to the number of speakers, separates various types of audio sub-data from the audio data; and then, according to the distance between the user and the smart TV in the environment where the smart speaker is located, performs gain adjustment on each separated audio sub-data, and then each smart speaker in the turned-on state plays each gain-adjusted audio sub-data. The present invention separates various types of audio sub-data and plays them by each smart speaker, which is conducive to users accurately listening to and feeling various types of audio sub-data; and, after the audio sub-data is played after gain adjustment according to the distance between the user and the smart TV, the volume of the playback matches the distance between the user and the smart TV, which is conducive to improving the comfort of users listening to various types of audio sub-data. Therefore, personalized playback of audio data based on the number of smart speakers and the distance of the user is realized, which improves the listening effect of the user on the audio during the process of watching videos on the smart TV.
[0094] Further, based on the first embodiment of the audio data playing method of the present invention, a second embodiment of the audio data playing method of the present invention is proposed. In the second embodiment, the step of separating various types of audio sub-data from the audio data according to the number of speakers includes:
[0095] Step S21, if the number of the speaker is only one, separating two types of audio sub-data from the audio data according to the time sequence of formation of each audio signal element in the audio data, wherein the two types of audio sub-data are dialogue data and background sound data;
[0096] Step S22, if the number of the speakers is two, then according to the time sequence of formation of each audio signal element in the audio data, three types of audio sub-data are separated from the audio data, wherein the three types of audio sub-data are dialogue data, background sound data and music data;
[0097] Step S23, if the number of the speakers is three, four types of audio sub-data are separated from the audio data according to the time sequence of formation of each audio signal element in the audio data, wherein the four types of audio sub-data are dialogue data, background sound data, music data and ambient sound data.
[0098] In this embodiment, audio sub-data is separated according to the number of smart speakers, and each smart speaker plays it. Specifically, if the number of smart speakers is single, that is, there is a smart speaker in the environment where the smart TV is located that is turned on and can be used to play audio data. At this time, according to the time sequence of the formation of each audio signal element in the audio data, the audio data is separated, and two types of audio sub-data including dialogue data and background sound data are extracted therefrom. Among them, the time sequence of the formation of the audio signal elements represents the different audio contents of the audio data in the time sequence; the dialogue data is the sound made by the characters in the movie; the background sound data is the background sound in the movie other than the character's language, music and environmental sound, such as the noise of the crowd, the noise of the market, the hawking sound, etc. Separation is performed according to the time sequence of formation, which ensures that the separated dialogue data and background sound data correspond to the original video data, which is convenient for the user to watch and listen.
[0099] Furthermore, if it is determined that there are two smart speakers, that is, there are two smart speakers in the environment where the smart TV is located that are turned on and can be used to play audio data. At this time, the audio data is also separated according to the time sequence of the formation of each audio signal element in the audio data, and three types of audio sub-data including dialogue data, background sound data and music data are extracted therefrom. Among them, the music data is the music formed by playing and singing in the movie.
[0100] Furthermore, if it is determined that there are three smart speakers, that is, there are three smart speakers in the environment where the smart TV is located that are turned on and can be used to play audio data. At this time, the audio data is separated according to the time sequence of the formation of each audio signal element in the audio data, and four types of audio sub-data including dialogue data, background sound data, music data and ambient sound data are extracted from it. Among them, the ambient sound data is the natural sounds such as wind, rain, thunder and lightning, birds singing and insects chirping described in the movie.
[0101] Furthermore, after the audio data is separated into various audio sub-data according to the number of smart speakers, and the gain of each audio sub-data is adjusted according to the distance between the user and the smart TV, each smart speaker can play the various audio sub-data after gain adjustment. Specifically, the steps of playing each audio sub-data after gain adjustment based on each smart speaker include:
[0102] Step S31, if the number of the speakers is only one, the dialogue data after gain adjustment is transmitted to the smart speakers based on the time sequence for playing, and the speakers of the smart TV play the background sound data based on the time sequence;
[0103] Step S32, if there are two speakers, the dialogue data and music data after gain adjustment are transmitted to each of the smart speakers for playing based on the time sequence, and the speakers of the smart TV play the background sound data based on the time sequence;
[0104] Step S33, if the number of the speakers is three, the gain-adjusted dialogue data, music data and ambient sound data are transmitted to each of the smart speakers for playback based on the time sequence, and the background sound data is played by the speakers of the smart TV based on the time sequence.
[0105] Understandably, the smart TV itself includes a speaker, and the smart speaker's playback of audio sub-data is actually the smart speaker and the speakers in the smart TV jointly playing various audio sub-data. Specifically, for the case where the number of speakers is single, the separated audio sub-data are dialogue data and background sound data. The dialogue data is transmitted to the smart speaker for playback according to the time sequence of formation, and the background sound data is played by the speakers of the smart TV in the time sequence of formation to form a two-dimensional audio sound effect. Playing in the time sequence of formation ensures the synchronization between the played audio and video, which is beneficial to the user's viewing of the movie. It should be noted that the speakers for playing the dialogue data and background sound data can be interchanged according to demand, that is, the background sound data is played by the smart speaker, and the comparison data is played by the speakers in the smart TV.
[0106] Furthermore, for the case where there are two speakers, the separated audio sub-data are dialogue data, background sound data and music data. The dialogue data and music data are transmitted to the two smart speakers for playback according to the time sequence of formation, and the background sound data is played by the speakers of the smart TV in the time sequence of formation to form a three-dimensional audio sound effect. Among them, the two smart speakers are located in different positions, and the specific type of the played audio sub-data can be set according to demand, such as the two smart speakers are respectively located on the left and right sides of the smart TV, the smart speaker on the left is set to play the dialogue data, and the smart speaker on the right is set to play the music data, or they are swapped with each other, without limitation. In addition, the type of audio sub-data played by the smart speakers and the speakers in the smart TV can also be set according to demand, such as setting the speakers in the smart TV to play the dialogue data, and the two smart speakers to play the music data and the background sound data respectively.
[0107] Furthermore, for the case where there are three speakers, the separated audio sub-data are dialogue data, background sound data, music data and ambient sound data. The dialogue data, music data and ambient sound data are transmitted to the three smart speakers for playback according to the time sequence of formation, and the background sound data is played by the speakers of the smart TV in the time sequence of formation to form a four-dimensional audio sound effect. Similarly, the three smart speakers are located in different positions, and the specific types of the played audio sub-data can be set according to demand, such as the three smart speakers are respectively located on the left and right sides and in front of the smart TV, and the smart speaker on the left is set to play dialogue data, the smart speaker on the right plays music data, and the smart speaker in the front plays ambient sound data, or they are swapped with each other, without limitation. In addition, the types of audio sub-data played by the smart speakers and the speakers in the smart TV can also be set according to demand, such as setting the speakers in the smart TV to play dialogue data, and the three smart speakers to play music data, background sound data and ambient sound data respectively.
[0108] In this embodiment, the audio data is separated into various types of audio sub-data according to the number of speakers of the smart speaker, and the gain of each type of audio sub-data is adjusted according to the distance between the user and the smart TV. Then, each type of audio sub-data is played through each smart speaker to form a variety of audio sound effects, thereby improving the user's listening experience.
[0109] Furthermore, based on the first embodiment or the second embodiment of the audio data playback method of the present invention, a third embodiment of the audio data playback method of the present invention is proposed. In the third embodiment, the step of adjusting the gain of each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located includes:
[0110] Step S34, determining whether the distance between the user and the smart TV in the environment where the smart TV is located is less than a preset threshold;
[0111] Step S35, if the distance is less than a preset threshold, obtaining attenuation factors corresponding to each of the audio sub-data;
[0112] Step S36: performing gain attenuation adjustment on each of the audio sub-data according to each of the attenuation factors.
[0113] When performing gain adjustment on audio sub-data, this embodiment can perform gain adjustment with different values for different types of audio sub-data; at the same time, a variety of different values can be set for gain adjustment according to different distances. Specifically, a preset threshold representing the distance is pre-set, and the distance between the user and the smart TV obtained based on the pixel ratio is compared with the preset threshold to determine whether the distance is less than the preset threshold. If it is less than the preset threshold, it means that the distance between the user and the smart TV is relatively close, and the volume played by the smart speaker needs to be lowered, and the gain needs to be attenuated. Pre-set the attenuation factor for attenuating each audio sub-data, obtain the attenuation factor corresponding to each audio sub-data, and adjust the gain of each audio sub-data according to each attenuation factor.
[0114] It should be noted that although the number of speakers in the smart speakers may be different, each audio sub-data is set with its own attenuation factor, and the attenuation factor of each audio sub-data can be set to be the same or different; for example, the attenuation factor of the dialogue data is set to 0.8, and the attenuation factor of the background sound data is set to 0.6, etc. When obtaining the attenuation factor, it is obtained according to the number of speakers of the smart speakers in the turned-on state. If the number of speakers of the smart speakers in the turned-on state is one, the attenuation factors corresponding to the dialogue data and the background sound data are obtained respectively; if the number of speakers of the smart speakers in the turned-on state is two, the attenuation factors corresponding to the dialogue data, the background sound data and the music data are obtained respectively; through the attenuation factor of each audio sub-data, the gain attenuation of each audio sub-data is adjusted.
[0115] In addition, when the distance between the user and the smart TV is less than the preset threshold and the user is relatively close to the smart TV, different values can be set for the same attenuation factor according to the degree of closeness, so as to perform multi-level attenuation adjustment according to the distance. For example, for the above-mentioned case where the attenuation factor of the dialogue data is 0.8 and the attenuation factor of the background sound data is 0.6, if the distance is not only less than the preset threshold, but also less than the preset first-level threshold; wherein the preset first-level threshold is less than the preset threshold, it means that the distance between the user and the smart TV is too close. At this time, the attenuation factor of the dialogue data can be set to 0.6, and the attenuation factor of the background sound data can be set to 0.4, so as to further attenuate each type of audio sub-data. Multi-level attenuation adjustment is achieved by adjusting the distance to ensure that the user always has a good listening effect.
[0116] Furthermore, after the step of determining whether the distance between the user and the smart TV in the environment where the smart TV is located is less than a preset threshold, the step includes:
[0117] Step S37, if the distance is greater than or equal to a preset threshold, obtaining enhancement factors corresponding to each of the audio sub-data;
[0118] Step S38: performing gain enhancement adjustment on each of the audio sub-data according to each of the enhancement factors.
[0119] Furthermore, if the distance is greater than or equal to the preset threshold value, it means that the distance between the user and the smart TV is far, and the volume of the smart speaker needs to be increased, and the gain needs to be enhanced. An enhancement factor for enhancing each audio sub-data is preset, and the enhancement factor corresponding to each audio sub-data is obtained respectively, and the gain of each audio sub-data is enhanced and adjusted according to each enhancement factor.
[0120] Similarly, each audio sub-data is set with its own enhancement factor, and the enhancement factor of each audio sub-data can be set to be the same or different; for example, the enhancement factor of the dialogue data is set to 1.2, and the enhancement factor of the background sound data is set to 1.1, etc. When obtaining the enhancement factor, it is also obtained according to the number of smart speakers in the turned-on state. If the number of smart speakers in the turned-on state is one, the enhancement factors corresponding to the dialogue data and the background sound data are obtained respectively; if the number of smart speakers in the turned-on state is two, the enhancement factors corresponding to the dialogue data, the background sound data and the music data are obtained respectively; through the enhancement factors of each audio sub-data, the gain enhancement adjustment is performed on each audio sub-data.
[0121] Moreover, when the distance between the user and the smart TV is greater than or equal to the preset threshold and the user is far away from the smart TV, different values can be set for the same enhancement factor according to the degree of distance, so as to perform multi-level enhancement adjustment according to the distance. For example, for the above-mentioned dialogue data, the enhancement factor is 1.2, and the enhancement factor of the background sound data is 1.1. If the distance is not only greater than or equal to the preset threshold, but also greater than the preset secondary threshold; wherein the preset secondary threshold is greater than the preset threshold, it means that the distance between the user and the smart TV is too far. At this time, the enhancement factor of the dialogue data can be set to 1.5, and the enhancement factor of the background sound data can be set to 1.2, so as to further enhance each type of audio sub-data. Multi-level enhancement adjustment is achieved by adjusting the distance to ensure that the user always has a good listening effect.
[0122] In this embodiment, when performing gain adjustment on the audio sub-data, different values are used for gain adjustment for different types of audio sub-data, so that different types of audio sub-data are played with different strengths, which is conducive to reflecting different listening effects of different types of audio sub-data. At the same time, a variety of different values are set for gain adjustment according to different distances, ensuring that users always have a good listening effect. In this way, the listening effect of the audio when the user watches a video on a smart TV is improved from multiple aspects.
[0123] In addition, the present invention also provides a readable storage medium, on which an audio data playback program is stored. When the audio data playback program is executed by a processor, the steps of each embodiment of the above-mentioned audio data playback method are implemented.
[0124] In the embodiment of the readable storage medium of the present invention, all technical features of the above-mentioned audio data playback method embodiments are included, and the description and explanation content are basically the same as those of the above-mentioned image optimization method embodiments, and will not be repeated here.
[0125] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system 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 system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0126] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0127] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present invention.
[0128] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for playing audio data, characterized in that: The audio data playing method comprises the following steps: Extracting audio data from video data played by a smart TV, and determining the number of smart speakers that are turned on in an environment where the smart TV is located; According to the number of the speakers, various types of audio sub-data are separated from the audio data according to their respective vibration ranges; According to the distance between the user and the smart TV in the environment where the smart TV is located, the gain of each audio sub-data is adjusted, and each of the audio sub-data after the gain adjustment is played based on each of the smart speakers; wherein the gain of each audio sub-data is adjusted according to the distance; The step of separating various types of audio sub-data from the audio data according to the number of speakers comprises: If the number of the speakers is three, four types of audio sub-data are separated from the audio data according to the time sequence in which the audio signal elements in the audio data are formed, wherein the four types of audio sub-data are dialogue data, background sound data, music data and ambient sound data; The dialogue data, music data and ambient sound data after gain adjustment are transmitted to each of the smart speakers for playing based on the time sequence, and the speakers of the smart TV play the background sound data based on the time sequence; The step of performing gain adjustment on each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located comprises: Determine whether the distance between the user and the smart TV in the environment where the smart TV is located is less than a preset threshold; If the distance is less than a preset threshold, then obtaining attenuation factors corresponding to each of the audio sub-data respectively; wherein a different attenuation factor is set for each of the audio sub-data; According to each of the attenuation factors, gain attenuation adjustment is performed on each of the audio sub-data.
2. The audio data playing method according to claim 1, characterized in that: The step of separating various types of audio sub-data from the audio data according to the number of speakers comprises: If the number of the speaker is only one, two types of audio sub-data are separated from the audio data according to the time sequence of formation of each audio signal element in the audio data, wherein the two types of audio sub-data are dialogue data and background sound data; If the number of the speakers is two, three types of audio sub-data are separated from the audio data according to the time sequence in which the audio signal elements in the audio data are formed, wherein the three types of audio sub-data are dialogue data, background sound data and music data.
3. The audio data playing method according to claim 2, characterized in that: The step of playing each of the audio sub-data after gain adjustment based on each of the smart speakers comprises: If the number of the speakers is only one, the dialogue data after gain adjustment is transmitted to the smart speakers for playing based on the time sequence, and the background sound data is played by the speakers of the smart TV based on the time sequence; If there are two speakers, the gain-adjusted dialogue data and music data are transmitted to each of the smart speakers for playing based on the time sequence, and the background sound data is played by the speakers of the smart TV based on the time sequence.
4. The audio data playing method according to claim 3, characterized in that: The step of determining whether the distance between the user and the smart TV in the environment where the smart TV is located is less than a preset threshold comprises: If the distance is greater than or equal to a preset threshold, acquiring enhancement factors corresponding to each of the audio sub-data respectively; According to each enhancement factor, gain enhancement adjustment is performed on each audio sub-data.
5. The audio data playing method according to any one of claims 1 to 4, characterized in that: The step of adjusting the gain of each audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located comprises: Based on the camera in the smart TV, a user image of a user in the environment where the smart TV is located is collected, and a pixel ratio between a face pixel area in the user image and a total pixel area of the user image is detected; The distance between the user and the smart TV is determined according to the pixel ratio.
6. The audio data playing method according to any one of claims 1 to 4, characterized in that: The step of determining the number of smart speakers in the environment where the smart TV is located and in an on state comprises: Based on the camera in the smart TV, an environmental image of the environment where the smart TV is located is collected, wherein the environmental image includes a smart speaker graphic; Identify the smart speaker graphics in each of the environment images to determine the speaker model of the environment smart speaker in the environment where the smart TV is located; The speaker model of each of the environmental smart speakers is compared with the currently online smart speaker model, the smart speakers in the environment where the smart TV is located that are turned on are determined, and the number of the smart speakers that are turned on is counted.
7. The audio data playing method according to any one of claims 1 to 4, characterized in that: After the step of performing gain adjustment on each of the audio sub-data according to the distance between the user and the smart TV in the environment where the smart TV is located, the following steps are included: The gain adjusted by each of the audio sub-data is displayed on a display screen of the smart TV.
8. An audio data playback device, characterized in that: The audio data playback device includes a memory, a processor, and an audio data playback program stored in the memory and executable on the processor. When the audio data playback program is executed by the processor, the steps of the audio data playback method as described in any one of claims 1 to 7 are implemented.
9. A readable storage medium, characterized in that: The readable storage medium stores an audio data playback program, and when the audio data playback program is executed by the processor, the steps of the audio data playback method according to any one of claims 1 to 7 are implemented.
