Sound generation method of electronic device and electronic device
By detecting sound sources and combining sound-generating devices for video data in electronic devices, the problem of insufficient correlation between audio and video positions in the existing technology is solved, and the sound-generating effect of dynamic adjustment and stereoscopic improvement is achieved.
Patent Information
- Application Number
- CN202110610790.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-01
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2041-06-01
AI Technical Summary
The number of sound-emitting devices in existing electronic devices is limited, and sound is usually emitted from a fixed single position. As a result, the positional correlation between audio and video during video playback is not strong, and the stereoscopic effect and high sound spatial resolution are lacking.
By performing video sound source detection on video data, the position of the sound source in the video display image is determined, and based on the position, the sound-emitting device group is combined to provide sound effects so that the position of the sound-emitting effect is consistent with the position of the sound source, thereby achieving dynamic adjustment and stereoscopic effect of the sound-emitting effect. Feeling enhanced.
It realizes the dynamic adjustment of the position of the sound effect of electronic equipment, improves the spatial resolution and three-dimensionality of the sound, and avoids the problem of insufficient positional correlation caused by the sound being emitted from a single position.
Smart Images

Figure CN115442549B
Abstract
Description
Technical Field
[0001] The present application relates to the field of electronic equipment processing, and in particular to a sound generation method of an electronic equipment and the electronic equipment. Background Art
[0002] Current terminal products are usually provided with a sound device. For example, a mobile phone is provided with a receiver on the top and a sound device on the bottom. When a video is played using the mobile phone, the sound device mode is usually turned on.
[0003] However, the number of sound-emitting devices configured in current terminal products is limited, and the sound is usually emitted from a single fixed position of the sound-emitting device, and the sound direction is single, resulting in a weak positional correlation between the video playback screen and the corresponding audio sound effect during the above-mentioned video playback process. Summary of the invention
[0004] The embodiments of the present application provide a sound emission method of an electronic device and an electronic device. The sound emission method can determine a sound emission device group based on the sound source position in a video display image, and provide a sound effect emitted at the sound source position through the sound emission device group, so that the overall sound emission effect position of the electronic device is exactly within a preset area of the sound source position in the video display image, and the overall sound emission effect position is basically consistent with the sound source position in the video display image, thereby avoiding the disadvantages of conventional electronic devices that sound is usually emitted from a single fixed position of the sound emission device and has a single sound emission direction, and finally realizes that the overall sound emission effect position of the electronic device changes with the sound source position in the video display image, thereby improving the sound emission spatial resolution of the entire electronic device.
[0005] The sound generation method of the electronic device comprises:
[0006] Performing video sound source detection on the input video data to determine the sound source position in the video display image corresponding to the video data;
[0007] Determining a sound-generating device group based on the sound source position, wherein the sound-generating device group includes at least one sound-generating device; and
[0008] The sound effect of the sound at the sound source position is provided by the sound-generating device group.
[0009] An embodiment of the present application also provides an electronic device, which is provided with a sound-generating device array. The electronic device includes a processor and a memory, in which a computer program is stored. The processor executes the above-mentioned sound-generating method by calling the computer program stored in the memory.
[0010] The present application also provides an electronic device, the electronic device comprising:
[0011] Display screen;
[0012] Sound-generating device array;
[0013] A processor, electrically connected to the display screen and each sound-generating device;
[0014] The processor is used to control the display screen to play the corresponding video display image according to the input video data;
[0015] The processor is also used to perform video sound source detection on the input video data to determine the sound source position in the video display image, determine the sound source group based on the sound source position, and provide sound effects emitted at the sound source position through the sound device group; wherein the sound device group includes at least one sound device.
[0016] The sound generation method of an electronic device provided in an embodiment of the present application performs video sound source detection on input video data to determine the sound source position in a video display image corresponding to the video data, and on the basis of obtaining the sound source position in the video display image, further determines a sound generation device group based on the sound source position, and provides a sound effect generated at the sound source position through the sound generation device group, so that the overall sound generation effect position of the electronic device is exactly within a preset area of the sound source position in the video display image, and the overall sound generation effect position is basically consistent with the sound source position in the video display image, thereby avoiding the disadvantages of conventional electronic devices that the sound is usually emitted from a single fixed position of the sound generation device and the sound generation direction is single, and finally realizes that the overall sound generation effect position of the electronic device changes with the sound source position in the video display image, thereby improving the sound generation spatial resolution and sound generation stereoscopic sense of the entire electronic device. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application, and those skilled in the art can obtain other drawings based on these drawings without creative work.
[0018] Figure 1 The first flowchart of a sound generation method of an electronic device provided in an embodiment of the present application is shown.
[0019] Figure 2 This is a schematic flow chart of the first method for determining a corresponding sound-emitting device group provided in an embodiment of the present application.
[0020] Figure 3 This is a schematic flow chart of the second method for determining a corresponding sound-emitting device group provided in an embodiment of the present application.
[0021] Figure 4 A second flow chart of a sound generation method of an electronic device provided in an embodiment of the present application.
[0022] Figure 5 A schematic diagram of an application interface of a sound-generating method of an electronic device provided in an embodiment of the present application.
[0023] Figure 6 for Figure 1 The flowchart of the method for determining the location of a sound source in a video display image in the embodiment shown is a schematic diagram.
[0024] Figure 7 for Figure 6 The illustrated embodiment is a flow chart of a method for determining the pixel points containing the sound source in the video display image and the corresponding sound source positions.
[0025] Figure 8 A structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0026] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0027] An embodiment of the present application provides a sound-generating method of an electronic device, wherein the electronic device is provided with at least two sound-generating devices, and may be a smart phone, a tablet computer, a gaming device, an AR (Augmented Reality) device, a car, a data storage device, an audio playback device, a video playback device, a laptop computer, a desktop computing device, a wearable device such as an electronic watch, an electronic glasses, an electronic helmet, an electronic bracelet, an electronic necklace, electronic clothing, and the like.
[0028] In some embodiments, the sound-generating device is a speaker.
[0029] refer to Figure 1 , Figure 1 This is a first flow chart of a sound generation method of an electronic device provided in an embodiment of the present application. The sound generation method includes the following steps:
[0030] 110 , performing video sound source detection on the input video data to determine the sound source position in the video display image corresponding to the video data.
[0031] The electronic device terminal obtains input video data and then plays the video data to obtain a corresponding video display image. The video data usually includes corresponding image data and audio data.
[0032] Among them, the electronic equipment terminal usually also needs to perform video sound source detection on the sound source position in the input video data, so as to analyze the video content in real time and locate the specific sound source position of the sound source in the video display image.
[0033] In order to improve the accuracy of the above-mentioned video sound source detection, a large amount of video data can be used for training in advance.
[0034] 120. Determine a sound-generating device group based on the sound source position, wherein the sound-generating device group includes at least one sound-generating device.
[0035] Among them, each sound-emitting device group usually includes at least one sound-emitting device, and the sound-emitting device groups corresponding to different sound source positions are different. In other words, the sound-emitting device group corresponding to a certain sound source position may only contain one independent sound-emitting device, or may include two or more sound-emitting devices, depending on the sound source position in the video display image corresponding to the video data.
[0036] Theoretically, for any of the above-mentioned sound source positions, the effect of sound generation at the sound source position can be virtually realized through the combination of various sound generating devices.
[0037] For example, two speakers (i.e., two sound-generating devices) are used to simulate a three-dimensional sound field. A portion of the input signal L is taken out and passed through a special filter XL to change its intensity and phase, and then sent to the output end to be superimposed with the input signal R to obtain an output signal L'+R; a portion of the other input signal R is taken out and passed through a special filter XR to change its intensity and phase, and then sent to the output end to be superimposed with the input signal L to obtain an output signal L+R'; then the parameters of the filters XL and XR are further adjusted so that the intensity difference and phase difference between the two ears of the listener are enhanced compared to the original ones, and the output sound sources L and R are respectively moved to the positions of L' and R', so that the listener hears that the sound seems to be emitted from L' and R', which means that L' and R' form a moving virtual sound source. Therefore, if the positions of L' and R' are deliberately made to overlap through calculation, the effect of the sound source emitting from the overlapping position of L' and R' can be virtualized through the two sound-generating devices.
[0038] 130, providing a sound effect at a sound source position through a sound device group.
[0039] Among them, after the sound-generating device group is determined, the sound effect of sounding at the sound source position can be achieved by controlling each sound-generating device in the sound-generating device group to work.
[0040] The above-mentioned sound generation method performs video sound source detection on the input video data to determine the sound source position in the video display image corresponding to the video data. On the basis of obtaining the sound source position in the video display image, the sound generation device group is determined based on the sound source position, and the sound effect generated at the sound source position is provided by the sound generation device group, so that the overall sound generation effect position of the electronic device is exactly within the preset area of the sound source position in the video display image, and the overall sound generation effect position is basically consistent with the sound source position in the video display image, thereby avoiding the shortcomings of conventional electronic devices that the sound is usually emitted from a single fixed position of the sound generation device and the sound generation direction is single, and finally the overall sound generation effect position of the electronic device changes with the sound source position in the video display image, thereby improving the sound generation spatial resolution and the sound generation stereoscopic sense of the entire electronic device.
[0041] refer to Figure 2 , Figure 2 A schematic diagram of a first method flow chart for determining a corresponding sound-emitting device group provided in an embodiment of the present application;
[0042] 121, determining whether the sound source position is located within a preset independent sound-emitting area corresponding to any sound-emitting device;
[0043] If not, proceed to step 122 for processing.
[0044] Among them, each sound-emitting device corresponds to its own preset independent sound-emitting area, and each sound source position within the preset independent sound-emitting area is provided with sound effects by the sound-emitting device. Therefore, after obtaining the above-mentioned sound source position, it is necessary to first determine whether the sound source position is within the preset independent sound-emitting area of a certain sound source device. It is usually necessary to compare the sound source position with the preset independent sound-emitting areas corresponding to each sound-emitting device.
[0045] 122, determine a preset joint sounding area where the sound source is located.
[0046] Among them, when the sound source position is not within the preset independent sound emission area of any sound emission device, it is necessary to compare the sound source position with the preset joint sound emission area corresponding to each sound emission device to determine the preset joint sound emission area specifically corresponding to the sound source position.
[0047] Among them, any position in the preset joint sound-emitting area is jointly sounded by multiple sound-emitting devices to provide the sound effect of the position.
[0048] 123. Determine a corresponding sound device group according to a preset joint sound emission area where the sound source position is located.
[0049] Among them, after the preset joint sound emission area where the sound source position is located is determined, the sound emission device group corresponding to the preset joint sound emission area can naturally be obtained.
[0050] The above method for determining the corresponding sound device group determines different sound device groups according to different sound source positions, and then can provide the sound effect of the sound source position through the sound device group, further enabling the above electronic device terminal to play the video display image, and the overall sound effect position of the electronic device is basically consistent with the sound source position in the video display image, and finally realizes that the overall sound effect position of the electronic device changes with the sound source position in the video display image, thereby improving the sound spatial resolution and sound stereoscopic sense of the entire electronic device.
[0051] refer to Figure 3 , Figure 3 A schematic flow chart of a second method for determining a corresponding sound-emitting device group provided in an embodiment of the present application;
[0052] 124. When the sound source position is located within a preset independent sound emitting area corresponding to any sound emitting device, directly determine the corresponding sound emitting device as a sound emitting device group.
[0053] Among them, each sound-emitting device corresponds to its own preset independent sound-emitting area, and each sound source position within the preset independent sound-emitting area is provided with sound effects by the sound-emitting device. Therefore, when it is determined that the sound source position is located in the preset independent sound-emitting area corresponding to any sound-emitting device, the corresponding sound-emitting device can be directly determined as the sound-emitting device group.
[0054] refer to Figure 4 , Figure 4 A second flow chart of a sound generation method of an electronic device provided in an embodiment of the present application is shown in FIG. Figure 2 Based on the embodiment shown, before step 121, the following steps are further included:
[0055] 125. Divide the video display screen of the electronic device into a plurality of preset independent sound emitting areas and preset joint sound emitting areas according to the initial configuration information of the sound emitting device array, each preset independent sound emitting area corresponds to a sound emitting device, and each preset joint sound emitting area corresponds to a plurality of sound emitting devices.
[0056] Among them, when dividing the video display screen of an electronic device into multiple preset independent sound areas and preset joint sound areas, it is necessary to comprehensively consider the initial configuration information of each sound device in the sound device array, such as the position, quantity, power and type (earpiece or speaker) of each sound device and other factors.
[0057] For each preset independent sound emission area, each sound source position within the preset independent sound emission area is provided with sound effects by the sound emission device. Of course, the more sound emission devices are set in each electronic device, the more preset independent sound emission areas there are, and correspondingly, the smaller each preset independent sound emission area is, and vice versa.
[0058] Similarly, for each sound-emitting device, if the power of the sound-emitting device is greater, the preset independent sound-emitting area will naturally expand according to the preset ratio, and vice versa.
[0059] Each preset independent sound-emitting area usually takes the actual physical position of the sound-emitting device as the area center, and each preset independent sound-emitting area has a corresponding sound-emitting device.
[0060] Among them, any position within the preset joint sound emission area is jointly sounded by multiple sound emitting devices to provide the sound effect of that position, and each preset joint sound emission area corresponds to multiple sound emitting devices. In other words, each sound emitting device can correspond to multiple preset joint sound emission areas.
[0061] Similarly, for each sound-emitting device, if the power of the sound-emitting device is greater, the preset independent sound-emitting area will naturally expand according to the preset ratio, and vice versa.
[0062] The more sound-emitting devices there are, the more preset joint sound-emitting areas there are.
[0063] In some embodiments, Figure 5 As shown, Figure 5 This is a schematic diagram of an application interface of a sound-generating method of an electronic device provided in an embodiment of the present application.
[0064] The sound device array in the electronic device 100 is a speaker array, which includes four speakers, including a first speaker 11, a second speaker 12, a third speaker 13 and a fourth speaker 14. The position of each speaker is as follows: Figure 5As shown, the terminal display screen of the electronic device 100 is divided into a plurality of preset independent sound emission areas and preset joint sound emission areas according to the initial configuration information of the speaker array, wherein the preset independent sound emission areas corresponding to the first speaker 11, the second speaker 12, the third speaker 13 and the fourth speaker 14 are A1, A3, A7 and A9 respectively, the preset joint sound emission area corresponding to the first speaker 11 and the second speaker 12 is A2, the preset joint sound emission area corresponding to the first speaker 11 and the third speaker 13 is A4, the preset joint sound emission area corresponding to the second speaker 12 and the fourth speaker 14 is A6, the preset joint sound emission area corresponding to the third speaker 13 and the fourth speaker 14 is A8, and the preset joint sound emission area corresponding to the first speaker 11, the second speaker 12, the third speaker 13 and the fourth speaker 14 is A5.
[0065] Among them, if the sound source position is located within the preset joint sound emission area A2, the first speaker 11 and the second speaker 12 corresponding to the preset joint sound emission area A2 both work; if the sound source position is located within the preset joint sound emission area A4, the second speaker 12 and the fourth speaker 14 both work; if the sound source position is located within the preset joint sound emission area A6, the second speaker 12 and the fourth speaker 14 both work; if the sound source position is located within the preset joint sound emission area A8, the third speaker 13 and the fourth speaker 14 both work.
[0066] Of course, the number of the above-mentioned speakers can be set to be more, not limited to 4. In this way, through the layout of more speakers, more preset independent sound areas and preset joint sound areas can be divided, thereby further increasing the sound space resolution of the electronic device 100, and then the sound position of the entire electronic device is closer to the real sound source position. Ultimately, when the electronic device 100 plays a video display image, the overall sound effect position changes with the position of the sound source in the video display image, further enhancing the three-dimensional sense of the overall sound effect of the electronic device 100.
[0067] In some embodiments, the video data includes image frame data and audio frame data, such as Figure 6 As shown, Figure 6 for Figure 1 In the embodiment shown, a schematic flow chart of a method for determining a sound source position in a video display image is shown, step 110 includes:
[0068] 112, extract corresponding image features and audio features from the image frame data and the audio frame data respectively.
[0069] Among them, the input video data usually includes image frame data and audio frame data. After the electronic device obtains the image frame data and the audio frame data, it is necessary to further extract corresponding image features and audio features from the image frame data and the audio frame data respectively.
[0070] 114 , aligning the audio features and the image features to map the audio features to corresponding positions in the image features.
[0071] Among them, the image frame data and audio frame data in step S112 are independently extracted features, and there is no clear correspondence between the extracted image features and audio features. At a certain moment, when the electronic device terminal is playing a video display image, since there are multiple image features in the video data corresponding to the video display image, and not every image feature makes a sound at a certain moment, it is necessary to match the sounding image features with the corresponding audio features at a certain moment. Therefore, in order to determine the location of the sound source, it is usually necessary to align the audio features and the image features to map the audio features to the corresponding positions in the image features.
[0072] 116 , performing sound source detection processing on the feature set after feature alignment to determine the pixel points containing the sound source and the corresponding sound source positions in the video display image corresponding to the video data.
[0073] The above method for determining the position of the sound source in the video display image not only does not change the current video format and does not increase the physical cost, but also can accurately obtain the position of the sound source in the video display image.
[0074] like Figure 7 As shown, Figure 7 for Figure 6 The schematic flow chart of the method for determining the pixel points containing the sound source and the corresponding sound source positions in the video display image in the embodiment shown includes:
[0075] 1162. The target detection algorithm based on the deep learning model performs sound source detection processing on the feature set after feature alignment to obtain the probability that each pixel in the video display image corresponding to the video data is a sound source.
[0076] Among them, when performing the above-mentioned sound source detection processing, a target detection algorithm based on a deep learning model can be used for detection. Through training and learning with a large amount of video data, the probability that each pixel in the video display image corresponding to the video data is the sound source can be accurately obtained.
[0077] Among them, when the target detection algorithm based on the deep learning model performs sound source detection processing on the feature set after feature alignment, the feature set after feature alignment is usually fully connected and nonlinearly activated in sequence through a fully connected layer and an activation layer to obtain the probability that each pixel in the video display image corresponding to the video data is a sound source.
[0078] 1164 , according to a preset sound source probability threshold and the probability that each pixel in the video display image is a sound source, determine the pixel point containing the sound source in the video display image and the corresponding sound source position.
[0079] Among them, to determine whether each pixel in the video display image is a sound source, it is necessary to set a certain preset sound source probability threshold. When the probability that any pixel in the video display image is a sound source exceeds this preset sound source probability threshold, the pixel is considered to be a pixel containing a sound source, and then the corresponding sound source position is obtained.
[0080] By setting a preset sound source probability threshold and combining the probability that each pixel point in the video display image is the sound source, the pixel points of the sound source in the video display image and the corresponding sound source position can be accurately judged, laying the foundation for the subsequent generation of the corresponding virtual sound device at the sound source position.
[0081] In some embodiments, the above-mentioned target detection algorithm based on the deep learning model adopts a one-stage target detection algorithm or a two-stage target detection algorithm.
[0082] Among them, the one-stage target detection algorithm or the two-stage target detection algorithm is a commonly used target detection algorithm.
[0083] In specific implementation, the present application is not limited by the execution order of the various steps described. If no conflict occurs, some steps can be performed in other orders or simultaneously.
[0084] In addition, an embodiment of the present application also provides an electronic device, which is provided with a sound device array. The electronic device includes a processor and a memory, in which a computer program is stored. The processor executes the above-mentioned sound generation method by calling the computer program stored in the memory.
[0085] Among them, the above-mentioned electronic devices can be smart phones, tablet computers, gaming devices, AR (Augmented Reality) devices, cars, data storage devices, audio playback devices, video playback devices, laptop computers, desktop computing devices, wearable devices such as electronic watches, electronic glasses, electronic helmets, electronic bracelets, electronic necklaces, electronic clothing and other devices.
[0086] like Figure 8 As shown, Figure 8This is a structural block diagram of an electronic device 100 provided in an embodiment of the present application, the electronic device 100 includes a processor 101, a memory 102, and a sound device array, and here, taking four sound devices as an example, the electronic device 100 includes a first sound device 103, a second sound device 104, a third sound device 105, and a fourth sound device 106. Among them, the processor 101 is electrically connected to the memory 102, and the first sound device 103, the second sound device 104, the third sound device 105, and the fourth sound device 106 are all electrically connected to the processor 101.
[0087] The processor 101 is the control center of the electronic device 100. It uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or calling computer programs stored in the memory 102, and calling data stored in the memory 102, thereby monitoring the electronic device as a whole.
[0088] In this embodiment, the processor 101 in the electronic device 100 loads instructions corresponding to the processes of one or more computer programs into the memory 102 according to the following steps, and the processor 101 runs the computer program stored in the memory 102, and controls the first sound device 103, the second sound device 104, the third sound device 105 and the fourth sound device 106, thereby performing the following steps:
[0089] Performing video sound source detection on the input video data to determine the sound source position in the video display image corresponding to the video data;
[0090] Determining a sound-generating device group based on the sound source position, wherein the sound-generating device group includes at least one sound-generating device; and
[0091] The sound effect of the sound at the sound source position is provided by the sound device group. In some embodiments, when determining the sound device group based on the sound source position, the processor 101 performs the following steps:
[0092] Determine whether the sound source position is located within a preset independent sound-emitting area corresponding to any sound-emitting device;
[0093] If not, determining a preset joint sounding area where the sound source position is located;
[0094] The corresponding sound-emitting device group is determined according to the preset joint sound-emitting area where the sound source position is located.
[0095] In some embodiments, when determining the corresponding sound-emitting device group, the processor 101 performs the following steps:
[0096] When the sound source position is located within a preset independent sound emitting area corresponding to any sound emitting device, the corresponding sound emitting device is directly determined as a sound emitting device group.
[0097] In some embodiments, before the step of determining whether the sound source position is located within a preset independent sound emission area corresponding to any sound emission device, the processor 101 further performs the following steps:
[0098] According to the initial configuration information of the sound device array, the video display screen of the electronic device is divided into multiple preset independent sound areas and preset joint sound areas, each preset independent sound area corresponds to a sound device, and each preset joint sound area corresponds to multiple sound devices.
[0099] In some embodiments, the video data includes image frame data and audio frame data. When performing video sound source detection on the input video data to determine the sound source position in the video display image corresponding to the video data, the processor 101 performs the following steps:
[0100] Extracting corresponding image features and audio features from the image frame data and the audio frame data respectively;
[0101] Aligning the audio features with the image features to map the audio features to corresponding positions in the image features;
[0102] The feature set after feature alignment is subjected to sound source detection processing to determine the pixel points containing the sound source and the corresponding sound source positions in the video display image corresponding to the video data.
[0103] In some embodiments, when performing sound source detection processing on the feature set after feature alignment to determine the pixel points containing the sound source and the corresponding sound source position in the video display image corresponding to the video data, the processor 101 performs the following steps:
[0104] The target detection algorithm based on the deep learning model performs sound source detection processing on the feature set after feature alignment to obtain the probability that each pixel in the video display image corresponding to the video data is the sound source;
[0105] According to a preset sound source probability threshold and the probability that each pixel in the video display image is a sound source, the pixel points containing the sound source in the video display image and the corresponding sound source positions are determined.
[0106] In some embodiments, when executing a target detection algorithm based on a deep learning model, the processor 101 uses a one-stage target detection algorithm or a two-stage target detection algorithm for detection processing.
[0107] The memory 102 may be used to store computer programs and data. The computer programs stored in the memory 102 include instructions that can be executed in the processor. The computer programs may constitute various functional modules. The processor 101 executes various functional applications and data processing by calling the computer programs stored in the memory 102.
[0108] In addition, an embodiment of the present application further provides an electronic device, the electronic device comprising:
[0109] Display screen;
[0110] Sound-generating device array;
[0111] A processor, electrically connected to the display screen and each sound-generating device;
[0112] The processor is used to control the display screen to play the corresponding video display image according to the input video data;
[0113] The processor is also used to perform video sound source detection on the input video data to determine the sound source position in the video display image, determine the sound source group based on the sound source position, and provide sound effects at the sound source position through the sound device group; wherein the sound device group includes at least one sound device.
[0114] In the description of this application, it should be understood that terms such as "first" and "second" are only used to distinguish similar objects and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features.
[0115] It should be noted that a person skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a computer program, and the computer program can be stored in a computer-readable storage medium, and the storage medium may include but is not limited to: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0116] The above is a detailed introduction to the sound-generating method, sound-generating device, storage medium and electronic device of the electronic device provided in the embodiments of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method and core idea of the present application. At the same time, for those skilled in the art, according to the idea of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A sound generating method of an electronic device, characterized in that: include: Performing video sound source detection on the input video data to determine the sound source position in the video display image corresponding to the video data; Dividing the video display screen of the electronic device into a plurality of preset independent sound emission areas, a plurality of first preset joint sound emission areas and a second preset joint sound emission area according to the initial configuration information of the sound emission device array, each of the preset independent sound emission areas corresponds to a sound emission device, each of the first preset joint sound emission areas is located between two of the sound emission devices, and the second preset joint sound emission area is located between a plurality of the first preset joint sound emission areas; When the sound source position is located within a preset independent sound-emitting area corresponding to any sound-emitting device, determining the corresponding sound-emitting device as a sound-emitting device group; When the sound source position is located within the first preset joint sound emission area, two sound emission devices adjacent to the first preset joint sound emission area are determined as a sound emission device group; when the sound source position is located within the second preset joint sound emission area, a plurality of sound emission devices corresponding to a plurality of the first preset joint sound emission areas adjacent to the second preset joint sound emission area are determined as a sound emission device group; wherein the sound emission device group includes at least one of the sound emission devices; as well as The sound effect of the sound at the sound source position is provided by the sound-generating device group.
2. The sound generation method according to claim 1, characterized in that: The step of providing the sound effect of sound emitted at the sound source position by the sound-emitting device group comprises: In combination with the video data and the sound source position, the sound content, volume and delay time corresponding to each sound device in the sound device group are determined, so as to provide the sound effect at the sound source position through the sound device group.
3. The sound generation method according to claim 1, characterized in that: The video data includes image frame data and audio frame data, and the step of performing video sound source detection on the input video data to determine the sound source position in the video display image corresponding to the video data includes: Extracting corresponding image features and audio features from the image frame data and the audio frame data respectively; Performing feature alignment on the audio feature and the image feature to map the audio feature to a corresponding position in the image feature; The feature set after the feature alignment is subjected to sound source detection processing to determine the pixel points containing the sound source and the corresponding sound source positions in the video display image corresponding to the video data.
4. The sound generation method according to claim 3, characterized in that: The step of performing sound source detection processing on the feature set after feature alignment to determine the pixel points containing the sound source and the corresponding sound source position in the video display image corresponding to the video data comprises: Performing sound source detection processing on the feature set after feature alignment using a target detection algorithm based on a deep learning model to obtain a probability that each pixel in a video display image corresponding to the video data is a sound source; According to a preset sound source probability threshold and the probability that each pixel in the video display image is a sound source, the pixel points containing the sound source in the video display image and the corresponding sound source positions are determined.
5. The method for producing sound according to claim 4, characterized in that: The target detection algorithm based on the deep learning model adopts a one-stage target detection algorithm or a two-stage target detection algorithm.
6. An electronic device, characterized in that: The electronic device is provided with a sound-generating device array, and includes a processor and a memory, wherein a computer program is stored in the memory, and the processor is used to execute the sound-generating method according to any one of claims 1 to 5 by calling the computer program stored in the memory.
7. An electronic device, characterized in that: The electronic device comprises: Display screen; Sound-generating device array; A processor, electrically connected to the display screen and each sound-generating device; The processor is used to control the display screen to play the corresponding video display image according to the input video data; The processor is further configured to perform video sound source detection on the input video data to determine the sound source position in the video display image; divide the video display screen of the electronic device into a plurality of preset independent sound emission areas, a plurality of first preset joint sound emission areas and a second preset joint sound emission area according to the initial configuration information of the sound emission device array, each of the preset independent sound emission areas corresponds to a sound emission device, each of the first preset joint sound emission areas is located between two of the sound emission devices, and the second preset joint sound emission area is located between a plurality of the first preset joint sound emission areas; when the sound source position is located in the preset independent sound emission area corresponding to any sound emission device, determine the corresponding sound emission device as a sound emission device group; when the sound source position is located in the first preset joint sound emission area, determine two sound emission devices adjacent to the first preset joint sound emission area as a sound emission device group; when the sound source position is located in the second preset joint sound emission area, determine a plurality of sound emission devices corresponding to a plurality of the first preset joint sound emission areas of the second preset joint sound emission area as a sound emission device group; and provide a sound effect emitted at the sound source position through the sound emission device group; wherein the sound emission device group includes at least one sound emission device.
