Loudness adjustment method and apparatus, and storage medium and electronic device

By detecting the distance and loudness between devices, loudness balance in dual-device co-playing scenarios is achieved, the problem of unbalanced equipment loudness is solved, and the user experience is improved.

WO2025148524A1PCT designated stage expired Publication Date: 2025-07-17HUIZHOU VISION NEW TECH CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/132881
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-08
Filing Date
2024-11-19
Publication Date
2025-07-17

AI Technical Summary

Technical Problem

In the dual-device co-play scenario, the unbalanced device loudness problem leads to poor user listening experience, and the existing solutions are poor.

Method used

By detecting the distance between the speaker and the microphone in the first device, the distance between the first device and the second device, the loudness received by the microphone of the first device and the loudness of the second device, the loudness attenuation value of the speaker in the second device relative to the speaker in the first device, and the loudness adjustment is made according to the loudness difference and attenuation value, the loudness balance of the equipment is achieved.

Benefits of technology

It effectively improves the device loudness balance effect in dual-device co-playing scenarios and improves user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024132881_17072025_PF_FP_ABST
    Figure CN2024132881_17072025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the field of audio playback. Disclosed are a loudness adjustment method and apparatus, and a storage medium and an electronic device. The method comprises: measuring a first distance, a second distance, a first loudness and a second loudness; on the basis of the first distance and the second distance, calculating a loudness attenuation value; on the basis of the first loudness, the second loudness and the loudness attenuation value, calculating a loudness adjustment value; and on the basis of the loudness adjustment value, performing loudness equalization adjustment. The present application improves the loudness equalization effect of devices in a dual-device co-playback scenario.
Need to check novelty before this filing date? Find Prior Art

Description

Loudness adjustment method, device, storage medium and electronic device

[0001] This application claims priority to the Chinese patent application filed with the China Patent Office on January 8, 2024, with application number 202410028841.7 and application name “Loudness Adjustment Method, Device, Storage Medium and Electronic Device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of sound playback technology, and in particular to a loudness adjustment method, device, storage medium, and electronic device. Background Art

[0003] In modern home entertainment, dual-device usage scenarios are becoming increasingly common. In dual-device usage scenarios, there are co-play scenarios in which a first device (such as a TV) and a second device (such as a sound bar) collaboratively play the same audio (usually the audio provided by the first device).

[0004] In a co-broadcast scenario, while the coordinated sound generation of a first device (such as a TV) and a second device (such as a sound bar) can provide a better listening experience, it can easily lead to loudness imbalance, resulting in a poor listening experience for the user. Current solutions to this problem typically involve manual loudness measurement and adjustment, or simply automatic loudness adjustment based on the distance between the devices. Technical issues

[0005] Under the current method, there is usually a problem of poor device loudness balancing in dual-device co-broadcasting scenarios, resulting in a poor user experience. Technical Solutions

[0006] The embodiment of the present application provides a solution that can effectively improve the device loudness balancing effect in a dual-device co-broadcasting scenario and enhance the user experience.

[0007] The embodiments of this application provide the following technical solutions:

[0008] According to one embodiment of the present application, a loudness adjustment method includes: detecting a first distance between a speaker and a microphone in a first device, a second distance between the microphone in the first device and a second device, a first loudness of a sound played by the microphone of the first device when receiving the sound played by the second device, and a second loudness of a sound played by the microphone of the first device; calculating, based on the first distance and the second distance, a loudness attenuation value of the speaker in the second device relative to the speaker in the first device; calculating, based on the first loudness, the second loudness, and the loudness attenuation value, a loudness adjustment value of the speaker in the second device; and performing loudness equalization adjustment on the second device in a co-broadcasting scenario based on the loudness adjustment value, wherein the first device and the second device in the co-broadcasting scenario collaboratively play the same audio.

[0009] In some embodiments of the present application, the first distance is detected in the following manner: obtaining a first noise playback time and a first noise reception time of the first device for a first test noise; subtracting the first noise playback time from the first noise reception time to obtain a first time difference; and performing calculation based on the first time difference to obtain a first distance between the speaker and the microphone in the first device.

[0010] In some embodiments of the present application, the second distance is detected in the following manner: obtaining a second noise playback time of the second device for a second test noise and a second noise reception time of the first device for the second test noise; subtracting the second noise playback time from the second noise reception time to obtain a second time difference; and performing calculation based on the second time difference to obtain a second distance between the microphone in the first device and the second device.

[0011] In some embodiments of the present application, the first loudness is detected in the following manner: obtaining a first test signal received by a microphone in the first device, where the first test signal is a signal received when a speaker in the first device plays a first test noise; and obtaining a first loudness at the microphone in the first device based on the first test signal.

[0012] In some embodiments of the present application, the second loudness is detected in the following manner: obtaining a second test signal received by a microphone in the first device, where the second test signal is a signal received when a speaker in the second device plays a second test noise; and obtaining the second loudness at the microphone in the first device based on the second test signal.

[0013] In some embodiments of the present application, the calculating based on the first distance and the second distance to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device includes: calculating a ratio of the first distance to the second distance to obtain a distance ratio; and performing a loudness attenuation calculation based on the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device.

[0014] In some embodiments of the present application, the loudness attenuation calculation is performed based on the distance ratio to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device, including: according to the formula P′=20log 10 (K) Calculation is performed to obtain the loudness attenuation value, wherein P′ refers to the loudness attenuation value and K refers to the distance ratio.

[0015] In some embodiments of the present application, calculating based on the first loudness, the second loudness, and the loudness attenuation value to obtain a loudness adjustment value for the speaker in the second device includes: calculating a difference between the first loudness and the second loudness to obtain a loudness difference; calculating a sum of the loudness difference and the loudness attenuation value to obtain a gain value; and obtaining the loudness adjustment value for the speaker in the second device based on the gain value.

[0016] In some embodiments of the present application, obtaining a loudness adjustment value for the speaker in the second device based on the gain value includes: determining a corresponding gain distribution range based on the device types of the first device and the second device; performing gain distribution processing within the gain distribution range of the gain value to obtain multiple gain distribution values; and using the multiple gain distribution values ​​as the loudness adjustment value for the speaker in the second device.

[0017] According to one embodiment of the present application, a loudness adjustment device includes: a detection module configured to detect a first distance between a speaker and a microphone in a first device, a second distance between the microphone in the first device and a second device, a first loudness of a sound played by the microphone of the first device when receiving the sound played by the second device, and a second loudness of a sound played by the microphone of the first device; a first calculation module configured to calculate, based on the first distance and the second distance, a loudness attenuation value of the speaker in the second device relative to the speaker in the first device; a second calculation module configured to calculate, based on the first loudness, the second loudness, and the loudness attenuation value, a loudness adjustment value of the speaker in the second device; and an adjustment module configured to perform loudness equalization adjustment on the second device in a co-broadcasting scenario based on the loudness adjustment value, wherein the first and second devices in the co-broadcasting scenario cooperatively play the same audio.

[0018] In some embodiments of the present application, the detection module is used to: obtain a first noise playback time and a first noise reception time of the first device for a first test noise; calculate the difference between the first noise playback time and the first noise reception time to obtain the first time difference; and calculate based on the first time difference to obtain a first distance between the speaker and the microphone in the first device.

[0019] In some embodiments of the present application, the detection module is used to: obtain a second noise playback time of the second device for a second test noise and a second noise reception time of the first device for the second test noise; calculate the difference between the second noise playback time and the second noise reception time to obtain a second time difference; and calculate based on the second time difference to obtain a second distance between the microphone in the first device and the second device.

[0020] In some embodiments of the present application, the detection module is used to: obtain a first test signal received by the microphone in the first device, where the first test signal is a signal received when the speaker in the first device plays a first test noise; and obtain a first loudness at the microphone in the first device based on the first test signal.

[0021] In some embodiments of the present application, the detection module is used to: obtain a second test signal received by the microphone in the first device, where the second test signal is a signal received when the speaker in the second device plays a second test noise; and obtain a second loudness at the microphone in the first device based on the second test signal.

[0022] In some embodiments of the present application, the first calculation module is used to: calculate the ratio of the first distance to the second distance to obtain a distance ratio; and perform loudness attenuation calculation based on the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device.

[0023] In some embodiments of the present application, the first calculation module is used to: according to the formula P′=20log 10 (K) Calculation is performed to obtain the loudness attenuation value, wherein P′ refers to the loudness attenuation value and K refers to the distance ratio.

[0024] In some embodiments of the present application, the second calculation module is configured to: calculate a difference between the first loudness and the second loudness to obtain a loudness difference; calculate a sum of the loudness difference and the loudness attenuation value to obtain a gain value; and obtain a loudness adjustment value for the speaker in the second device based on the gain value.

[0025] In some embodiments of the present application, the second calculation module is used to: determine the corresponding gain distribution range according to the device types of the first device and the second device; perform gain distribution processing within the gain distribution range of the gain value to obtain multiple gain distribution values; and use the multiple gain distribution values ​​as loudness adjustment values ​​of the speaker in the second device.

[0026] According to another embodiment of the present application, a storage medium stores a computer program thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method described in the embodiment of the present application.

[0027] According to another embodiment of the present application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the method described in the embodiment of the present application.

[0028] According to another embodiment of the present application, a computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in various optional implementations described in the embodiments of the present application. Beneficial effects

[0029] In an embodiment of the present application, a first distance between a speaker and a microphone in a first device, a second distance between the microphone in the first device and a second device, a first loudness of a sound played by the microphone of the first device when receiving the sound played by the second device are detected; a loudness attenuation value of the speaker in the second device relative to the speaker in the first device is calculated based on the first distance and the second distance; a loudness adjustment value of the speaker in the second device is calculated based on the first loudness, the second loudness, and the loudness attenuation value; and loudness equalization adjustment is performed on the second device in a co-broadcast scenario based on the loudness adjustment value, wherein the first device and the second device in the co-broadcast scenario collaboratively play the same audio.

[0030] In this way, in a dual-device co-broadcasting scenario, by detecting the first distance, the second distance, the first loudness, and the second loudness, calculating the loudness attenuation value of the speaker in the second device relative to the speaker in the first device based on the first distance and the second distance, and calculating the loudness adjustment value of the speaker in the second device based on the first loudness, the second loudness, and the loudness attenuation value, the loudness equalization adjustment of the second device is performed in the co-broadcasting scenario. This can effectively equalize the loudness of the first device and the second device in the dual-device co-broadcasting scenario, effectively improve the device loudness equalization effect in the dual-device co-broadcasting scenario, and enhance the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] 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. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0032] FIG1 shows a flow chart of a loudness adjustment method according to an embodiment of the present application.

[0033] FIG2 shows a flow chart of loudness attenuation value calculation according to an embodiment of the present application.

[0034] FIG3 shows a flow chart of loudness adjustment value calculation according to an embodiment of the present application.

[0035] FIG4 shows a block diagram of a loudness adjustment device according to an embodiment of the present application.

[0036] FIG5 shows a block diagram of an electronic device according to an embodiment of the present application.

[0037] Implementation Methods of the Application

[0038] The present disclosure will be further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the examples provided herein are merely for explaining the present disclosure and are not intended to limit the present disclosure. In addition, the examples provided below are partial examples for implementing the present disclosure, rather than providing all examples for implementing the present disclosure. In the absence of conflict, the technical solutions described in the examples of the present disclosure may be implemented in any combination.

[0039] It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus comprising a series of elements includes not only the elements explicitly stated, but also other elements not explicitly listed, or also includes elements inherent to the implementation of the method or apparatus. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other related elements (such as steps in the method or units in the apparatus, for example, a unit may be part of a circuit, part of a processor, part of a program or software, etc.) in the method or apparatus comprising the element.

[0040] For example, the loudness adjustment method provided in the embodiments of the present disclosure includes a series of steps, but the loudness adjustment method provided in the embodiments of the present disclosure is not limited to the steps described. Similarly, the loudness adjustment device provided in the embodiments of the present disclosure includes a series of units, but the device provided in the embodiments of the present disclosure is not limited to including the units explicitly described and may also include units required for obtaining relevant information or performing processing based on the information.

[0041] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those skilled in the art to which the present disclosure pertains. The terms used herein are for the purpose of describing specific embodiments only and are not intended to limit the present disclosure.

[0042] Figure 1 schematically illustrates a flow chart of a loudness adjustment method according to an embodiment of the present application. The loudness adjustment method can be executed by any device or server with processing capabilities, such as a television, computer, mobile phone, smartwatch, or home appliance, or a server such as a cloud server or a physical server.

[0043] In a specific embodiment of the present application, the loudness adjustment method is performed by a device, which may be one of the first device and the second device, or another device other than the first device and the second device (e.g., a mobile phone held by a user).

[0044] As shown in FIG. 1 , the loudness adjustment method may include steps S110 to S140 .

[0045] Step S110: Detect a first distance between a speaker and a microphone in a first device, a second distance between the microphone in the first device and a second device, a first loudness of a sound played locally by the microphone of the first device, and a second loudness of a sound played by the second device. Step S120: Calculate, based on the first distance and the second distance, to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device. Step S130: Calculate, based on the first loudness, the second loudness, and the loudness attenuation value, to obtain a loudness adjustment value of the speaker in the second device. Step S140: Perform loudness equalization adjustment on the second device in a co-broadcasting scenario based on the loudness adjustment value, wherein the first device and the second device in the co-broadcasting scenario collaboratively play the same audio.

[0046] In a dual-device co-broadcasting scenario, relevant detection can be performed on the first device and the second device, and the first distance, the second distance, the first loudness, and the second loudness can be obtained through the detection.

[0047] The first distance is the distance between the speaker and the microphone in the first device (such as a TV), and the second distance is the distance between the microphone in the first device (such as a TV) and the second device (such as a sound bar).

[0048] The first loudness is the loudness at the microphone of the first device when the microphone of the first device receives the sound played by the local end (that is, the sound played by the speaker of the first device). The second loudness is the loudness at the microphone of the first device when the microphone of the first device receives the sound played by the second device.

[0049] By calculating based on the first distance and the second distance, a loudness attenuation value of the speaker in the second device relative to the speaker in the first device can be obtained. The loudness attenuation value can reflect the degree of loudness attenuation of the speaker in the second device relative to the speaker in the first device under the current position distribution of the first and second devices.

[0050] A calculation is performed based on the first loudness, the second loudness, and the loudness attenuation value to obtain a loudness adjustment value for the speaker in the second device. Based on the loudness adjustment value, loudness equalization is performed on the second device in the co-broadcast scenario (specifically, the loudness of the second device can be increased by the loudness adjustment value). This effectively achieves device loudness equalization in the dual-device co-broadcast scenario, in which the first device and the second device collaboratively play the same audio.

[0051] In this manner, based on steps S110 to S140, in a dual-device co-broadcasting scenario, by detecting the first distance, the second distance, the first loudness, and the second loudness, calculating the loudness attenuation value of the speaker in the second device relative to the speaker in the first device based on the first distance and the second distance, and calculating the loudness adjustment value of the speaker in the second device based on the first loudness, the second loudness, and the loudness attenuation value, loudness equalization adjustment is performed on the second device in the co-broadcasting scenario. This can effectively equalize the loudness of the first device and the second device in the dual-device co-broadcasting scenario, effectively improving the device loudness equalization effect in the dual-device co-broadcasting scenario, and enhancing the user experience.

[0052] The following describes further optional specific embodiments of each step performed when loudness adjustment is performed in the embodiment of FIG. 1 .

[0053] In one embodiment, the first distance is detected in the following manner: obtaining a first noise playback time and a first noise reception time of the first device for a first test noise; calculating the difference between the first noise playback time and the first noise reception time to obtain the first time difference; and calculating based on the first time difference to obtain a first distance between the speaker and the microphone in the first device.

[0054] The first device and the second device can be connected via a wired or wireless connection, and the first device is controlled to play a first test noise while the microphone of the first device also receives the sound. Then, the start time of the first device playing the first test noise (i.e., the first noise playing time) can be detected.

[0055] The microphone of the first device can receive the played first test noise to obtain a received noise signal S1, and can detect the signal start time of the noise signal S1 received by the first device (i.e., the first noise reception time). The difference between the first noise playback time t1 and the first noise reception time t2 is calculated to obtain a first time difference Δt1.

[0056] Furthermore, in some embodiments, the first distance l1 between the speaker and the microphone in the first device is obtained by calculating according to the first time difference Δt1 according to the formula l1=c*Δt1 (where c represents the speed of sound).

[0057] Furthermore, in another method, the first distance l1 between the speaker and the microphone in the first device is calculated according to the formula l1=m1*c*Δt1 (where c represents the speed of sound). This can further enhance the effect of the first distance on the loudness balance adjustment, thereby further enhancing the overall loudness balance effect.

[0058] Among them, m1 can be a first distance adjustment coefficient, m1 can correspond one-to-one to the device placement feature of the first device, the device placement feature of the first device can be obtained by performing image detection on a device placement image containing the first device, the device placement feature of the first device can reflect the placement position of the first device in the venue and the surrounding environment and other characteristics, and the device placement image of the first device can be obtained by camera capture.

[0059] In one embodiment, the second distance is detected in the following manner: obtaining a second noise playback time of the second device for a second test noise and a second noise reception time of the first device for the second test noise; calculating the difference between the second noise playback time and the second noise reception time to obtain the second time difference; and calculating based on the second time difference to obtain the second distance between the microphone in the first device and the second device.

[0060] The second device is controlled to play a second test noise while the microphone of the first device also receives the sound, and then the start time of playing the second test noise by the second device (ie, the second noise playing time) can be detected.

[0061] The microphone of the first device can receive the played second test noise to obtain a received noise signal S2, and can detect the start time of the noise signal S2 received by the first device (i.e., the second noise reception time). The second noise playback time t3 is subtracted from the second noise reception time t4 to obtain a second time difference Δt2.

[0062] Furthermore, in some embodiments, the second distance l2 between the microphone in the first device and the second device is obtained by calculating according to the second time difference Δt2 according to the formula l2=c*Δt2 (where c represents the speed of sound).

[0063] Furthermore, in some embodiments, based on the second time difference Δt2, the second distance l2 between the speaker in the first device and the second device is calculated according to the formula l2 = m2*c*Δt2 (where c represents the speed of sound). This can further enhance the effect of the second distance on loudness equalization adjustment, thereby further enhancing the overall loudness equalization effect.

[0064] Among them, m2 can be a second distance adjustment coefficient, m2 can correspond one-to-one to the combined device placement characteristics of the first device and the second device, the combined device placement characteristics of the first device and the second device can be obtained by performing image detection on the device placement image including the first device and the second device, the combined device placement characteristics of the first device and the second device can comprehensively reflect the placement positions and surrounding environment characteristics of the first device and the second device in the venue, and the device placement image including the first device and the second device can be obtained by camera capture.

[0065] In one embodiment, the first loudness is detected in the following manner: obtaining a first test signal received by a microphone in the first device, where the first test signal is a signal received when a speaker in the first device plays a first test noise; and obtaining a first loudness at the microphone in the first device based on the first test signal.

[0066] The first device is controlled to play a first test noise while the microphone of the first device also receives the sound. Then, the microphone of the first device can receive the played first test noise to obtain a received noise signal S1, which is the first test signal.

[0067] The first loudness P1 at the microphone in the first device when the speaker in the first device plays the first test noise can be calculated based on the first test signal.

[0068] In one embodiment, the second loudness is detected in the following manner: obtaining a second test signal received by the microphone in the first device, where the second test signal is a signal received when the speaker in the second device plays a second test noise; and obtaining the second loudness at the microphone in the first device based on the second test signal.

[0069] The second device is controlled to play a second test noise while the microphone of the first device also receives the sound. Then, the microphone of the first device can receive the played second test noise to obtain a received noise signal S2, which is the second test signal.

[0070] The first loudness P2 at the microphone in the first device when the speaker in the second device plays the second test noise can be calculated based on the second test signal.

[0071] Furthermore, in one embodiment of the present application, the first and second test noises use pink noise: also known as 1 / f noise or fractal noise, a sound signal with specific power spectrum characteristics at different frequencies. Using pink noise as the first and second test noises can further enhance the loudness equalization effect.

[0072] In one embodiment, referring to FIG. 2 , the calculating based on the first distance and the second distance to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device may include: step S210, calculating a ratio of the first distance to the second distance to obtain a distance ratio; and step S220, performing a loudness attenuation calculation based on the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device.

[0073] The ratio of the first distance to the second distance is calculated to obtain a distance ratio, which may reflect a ratio of the distance between the speaker in the first device and the microphone in the first device to the distance between the microphone in the first device and the second device.

[0074] By calculating the loudness attenuation based on the distance ratio, the loudness attenuation value of the speaker in the second device relative to the speaker in the first device can be accurately obtained. This loudness attenuation value can accurately reflect the degree of loudness attenuation of the speaker in the second device relative to the speaker in the first device under the current position distribution of the first and second devices.

[0075] In one embodiment, the loudness attenuation calculation based on the distance ratio to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device may specifically include: according to the formula P′=20log 10 (K) Calculation is performed to obtain the loudness attenuation value, wherein P′ refers to the loudness attenuation value and K refers to the distance ratio.

[0076] According to the formula P'=20log 10 (K) The calculated loudness attenuation value P′ is used for loudness equalization adjustment, which can effectively ensure the loudness equalization adjustment effect.

[0077] It is understood that in other embodiments, the loudness attenuation calculation is performed based on the distance ratio to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device, which can be calculated based on other formulas (for example, P′=15log 10 (K)) is calculated.

[0078] In one embodiment, referring to FIG. 3 , the step of calculating based on the first loudness, the second loudness, and the loudness attenuation value to obtain a loudness adjustment value for the speaker in the second device may include: step S310, calculating a difference between the first loudness and the second loudness to obtain a loudness difference; calculating a sum of the loudness difference and the loudness attenuation value to obtain a gain value; and step S320, obtaining a loudness adjustment value for the speaker in the second device based on the gain value.

[0079] The difference between the first loudness P1 and the second loudness P2 is calculated to obtain the loudness difference P1-P2. The sum of the loudness difference P1-P2 and the loudness attenuation value P' is calculated to obtain a gain value P0 = P1-P2+P'. Based on the gain value P0, the loudness adjustment value of the speaker in the second device can be obtained.

[0080] In some embodiments, the loudness adjustment value of the speaker in the second device is obtained according to the gain value, which may be specifically: the gain value is used as the loudness adjustment value of the speaker in the second device.

[0081] In some embodiments, obtaining the loudness adjustment value of the speaker in the second device based on the gain value may include: determining a corresponding gain distribution range based on the device types of the first device and the second device; performing gain distribution processing within the gain distribution range of the gain value to obtain multiple gain distribution values; and using the multiple gain distribution values ​​as the loudness adjustment value of the speaker in the second device.

[0082] The device types of the first device and the second device may be device models of the first device and the second device, and the device types of the first device and the second device may be queried from the predetermined range table to determine corresponding gain distribution ranges.

[0083] Gain distribution processing is performed within the gain distribution range of the gain value to obtain multiple gain distribution values. For example, the gain value is P0, the gain distribution range is -5 to +5, and the gain distribution range of the gain value is P0-5 to P0+5. Within the range of P0-5 to P0+5, multiple values ​​(i.e., multiple gain distribution values) are generated at predetermined intervals with uniform distribution.

[0084] The multiple gain distribution values ​​are used as the loudness adjustment values ​​of the speaker in the second device. The multiple gain distribution values ​​can be cyclically used to perform loudness balance adjustment in a dual-device co-broadcasting scenario, and a good loudness balance effect can be achieved when the devices are placed in different environments.

[0085] To facilitate better implementation of the loudness adjustment method provided in the embodiments of the present application, the embodiments of the present application also provide a loudness adjustment device based on the aforementioned loudness adjustment method. The meanings of the terms herein are the same as those in the aforementioned loudness adjustment method. For specific implementation details, please refer to the description in the method embodiments. Figure 4 shows a block diagram of a loudness adjustment device according to one embodiment of the present application.

[0086] As shown in FIG4 , a loudness adjustment apparatus 400 may include: a detection module 410 configured to detect a first distance between a speaker and a microphone in a first device, a second distance between the microphone in the first device and a second device, a first loudness of the microphone of the first device receiving a sound played locally, and a second loudness of the microphone of the first device receiving a sound played by the second device; a first calculation module 420 configured to calculate, based on the first distance and the second distance, a loudness attenuation value of the speaker in the second device relative to the speaker in the first device; a second calculation module 430 configured to calculate, based on the first loudness, the second loudness, and the loudness attenuation value, a loudness adjustment value of the speaker in the second device; and an adjustment module 440 configured to perform loudness equalization adjustment on the second device in a co-broadcasting scenario based on the loudness adjustment value, wherein the first and second devices in the co-broadcasting scenario jointly play the same audio.

[0087] In some embodiments of the present application, the detection module is used to: obtain a first noise playback time and a first noise reception time of the first device for a first test noise; calculate the difference between the first noise playback time and the first noise reception time to obtain the first time difference; and calculate based on the first time difference to obtain a first distance between the speaker and the microphone in the first device.

[0088] In some embodiments of the present application, the detection module is used to: obtain a second noise playback time of the second device for a second test noise and a second noise reception time of the first device for the second test noise; calculate the difference between the second noise playback time and the second noise reception time to obtain a second time difference; and calculate based on the second time difference to obtain a second distance between the microphone in the first device and the second device.

[0089] In some embodiments of the present application, the detection module is used to: obtain a first test signal received by the microphone in the first device, where the first test signal is a signal received when the speaker in the first device plays a first test noise; and obtain a first loudness at the microphone in the first device based on the first test signal.

[0090] In some embodiments of the present application, the detection module is used to: obtain a second test signal received by the microphone in the first device, where the second test signal is a signal received when the speaker in the second device plays a second test noise; and obtain a second loudness at the microphone in the first device based on the second test signal.

[0091] In some embodiments of the present application, the first calculation module is used to: calculate the ratio of the first distance to the second distance to obtain a distance ratio; and perform loudness attenuation calculation based on the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device.

[0092] In some embodiments of the present application, the first calculation module is used to: according to the formula P′=20log 10 (K) Calculation is performed to obtain the loudness attenuation value, wherein P′ refers to the loudness attenuation value and K refers to the distance ratio.

[0093] In some embodiments of the present application, the second calculation module is configured to: calculate a difference between the first loudness and the second loudness to obtain a loudness difference; calculate a sum of the loudness difference and the loudness attenuation value to obtain a gain value; and obtain a loudness adjustment value for the speaker in the second device based on the gain value.

[0094] In some embodiments of the present application, the second calculation module is used to: determine the corresponding gain distribution range according to the device types of the first device and the second device; perform gain distribution processing within the gain distribution range of the gain value to obtain multiple gain distribution values; and use the multiple gain distribution values ​​as loudness adjustment values ​​of the speaker in the second device.

[0095] It should be noted that, although several modules or units of the device for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiment of the application, the features and functions of two or more modules or units described above can be concretized in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into multiple modules or units to be concretized.

[0096] In addition, an embodiment of the present application further provides an electronic device, as shown in FIG5 . FIG5 shows a block diagram of an electronic device according to an embodiment of the present application. Specifically:

[0097] The electronic device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will appreciate that the electronic device structure shown in FIG5 does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0098] Processor 501 is the control center of the electronic device. It utilizes various interfaces and circuits to connect the various components of the entire computer device. By running or executing software programs and / or modules stored in memory 502 and accessing data stored in memory 502, it performs various computer device functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, processor 501 may include one or more processing cores; preferably, processor 501 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interfaces, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into processor 501.

[0099] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, at least one application required for a function (such as a sound playback function, an image playback function, etc.); the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0100] The electronic device also includes a power supply 503 for supplying power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 via a power management system, thereby enabling the power management system to manage charging, discharging, and power consumption. The power supply 503 can also include one or more DC or AC power supplies, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and other arbitrary components.

[0101] The electronic device may further include an input unit 504, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0102] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the electronic device will load the executable files corresponding to one or more computer program processes into the memory 502 according to the following instructions, and the processor 501 will run the computer program stored in the memory 502, thereby realizing the various functions of the aforementioned embodiments of the present application. For example, the processor 501 may perform the following steps:

[0103] Detecting a first distance between a speaker and a microphone in a first device, a second distance between the microphone in the first device and a second device, a first loudness of a sound played locally by the microphone of the first device, and a second loudness of a sound played by the second device; calculating based on the first distance and the second distance to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device; calculating based on the first loudness, the second loudness, and the loudness attenuation value to obtain a loudness adjustment value of the speaker in the second device; and performing loudness equalization adjustment on the second device in a co-broadcasting scenario based on the loudness adjustment value, wherein the first device and the second device in the co-broadcasting scenario collaboratively play the same audio.

[0104] In some embodiments of the present application, the method further includes: obtaining a first noise playback time and a first noise reception time of the first device for a first test noise; calculating the difference between the first noise playback time and the first noise reception time to obtain a first time difference; and calculating based on the first time difference to obtain a first distance between a speaker and a microphone in the first device.

[0105] In some embodiments of the present application, the method further includes: obtaining a second noise playback time of the second device for a second test noise and a second noise reception time of the first device for the second test noise; calculating the difference between the second noise playback time and the second noise reception time to obtain a second time difference; and calculating based on the second time difference to obtain a second distance between the microphone in the first device and the second device.

[0106] In some embodiments of the present application, the method further includes: obtaining a first test signal received by a microphone in the first device, where the first test signal is a signal received when a speaker in the first device plays a first test noise; and obtaining a first loudness at the microphone in the first device based on the first test signal.

[0107] In some embodiments of the present application, the method further includes: obtaining a second test signal received by the microphone in the first device, where the second test signal is a signal received when the speaker in the second device plays a second test noise; and obtaining a second loudness at the microphone in the first device based on the second test signal.

[0108] In some embodiments of the present application, the calculating based on the first distance and the second distance to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device includes: calculating a ratio of the first distance to the second distance to obtain a distance ratio; and performing a loudness attenuation calculation based on the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device.

[0109] In some embodiments of the present application, the loudness attenuation calculation is performed based on the distance ratio to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device, including: according to the formula P′=20log 10 (K) Calculation is performed to obtain the loudness attenuation value, wherein P′ refers to the loudness attenuation value and K refers to the distance ratio.

[0110] In some embodiments of the present application, calculating based on the first loudness, the second loudness, and the loudness attenuation value to obtain a loudness adjustment value for the speaker in the second device includes: calculating a difference between the first loudness and the second loudness to obtain a loudness difference; calculating a sum of the loudness difference and the loudness attenuation value to obtain a gain value; and obtaining the loudness adjustment value for the speaker in the second device based on the gain value.

[0111] In some embodiments of the present application, obtaining a loudness adjustment value for the speaker in the second device based on the gain value includes: determining a corresponding gain distribution range based on the device types of the first device and the second device; performing gain distribution processing within the gain distribution range of the gain value to obtain multiple gain distribution values; and using the multiple gain distribution values ​​as the loudness adjustment value for the speaker in the second device.

[0112] Those skilled in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be accomplished by a computer program, or by controlling related hardware through a computer program. The computer program may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0113] To this end, an embodiment of the present application further provides a storage medium storing a computer program, which can be loaded by a processor to execute the steps of any method provided in the embodiment of the present application.

[0114] The storage medium may be a computer-readable storage medium, and the storage medium may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0115] Since the computer program stored in the storage medium can execute the steps of any method provided in the embodiments of the present application, the beneficial effects that can be achieved by the method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.

[0116] Those skilled in the art will readily conceive of other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art that are not disclosed herein.

[0117] It should be understood that the present application is not limited to the embodiments that have been described above and shown in the accompanying drawings, but various modifications and changes may be made without departing from the scope thereof.

Claims

1. A loudness adjustment method, wherein, Including: Detecting a first distance between a speaker and a microphone in a first device, a second distance between the microphone in the first device and a second device, a first loudness of the microphone in the first device receiving the sound played by the local end, and a second loudness of the microphone in the first device receiving the sound played by the second device; Calculating based on the first distance and the second distance to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device; Calculating based on the first loudness, the second loudness, and the loudness attenuation value to obtain a loudness adjustment value of the speaker in the second device; Performing loudness equalization adjustment on the second device in a co-play scenario, where in the co-play scenario, the first device and the second device cooperate to play the same audio.

2. The method according to claim 1, wherein, The first distance is detected in the following manner: Obtaining a first noise playing time and a first noise receiving time of the first device for a first test noise; Calculating the difference between the first noise playing time and the first noise receiving time to obtain a first time difference; Calculating based on the first time difference to obtain the first distance between the speaker and the microphone in the first device.

3. The method according to claim 1, wherein The second distance is detected in the following manner: Obtaining a second noise playing time of the second device for a second test noise and a second noise receiving time of the first device for the second test noise; Calculating the difference between the second noise playing time and the second noise receiving time to obtain a second time difference; Calculating based on the second time difference to obtain the second distance between the microphone in the first device and the second device.

4. The method according to claim 1, wherein The first loudness is detected in the following manner: Obtaining a first test signal received by the microphone in the first device, where the first test signal is the signal received when the speaker in the first device plays a first test noise; Obtaining the first loudness at the microphone in the first device based on the first test signal.

5. The method according to claim 1, wherein, The second loudness is detected in the following manner: Obtaining a second test signal received by the microphone in the first device, where the second test signal is the signal received when the speaker in the second device plays a second test noise; Obtaining the second loudness at the microphone in the first device based on the second test signal.

6. The method according to claim 1, wherein The calculating based on the first distance and the second distance to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device includes: Calculating the ratio of the first distance to the second distance to obtain a distance ratio; Performing loudness attenuation calculation based on the distance ratio to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device.

7. The method according to claim 6, wherein, The performing loudness attenuation calculation based on the distance ratio to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device includes: According to the formula P′ = 20log 10 (K), the loudness attenuation value is calculated, where P′ refers to the loudness attenuation value and K refers to the distance ratio.

8. The method according to claim 1, wherein The calculating based on the first loudness, the second loudness, and the loudness attenuation value to obtain the loudness adjustment value of the speaker in the second device includes: Calculating the difference between the first loudness and the second loudness to obtain a loudness difference; Calculate the sum of the loudness difference and the loudness attenuation value to obtain a gain value; Obtain the loudness adjustment value of the speaker in the second device according to the gain value.

9. The method according to claim 8, wherein, The obtaining the loudness adjustment value of the speaker in the second device according to the gain value includes: Determine the corresponding gain distribution range according to the device types of the first device and the second device; Perform gain distribution processing within the gain distribution range of the gain value to obtain a plurality of gain distribution values; Use the plurality of gain distribution values as the loudness adjustment value of the speaker in the second device.

10. The method according to claim 2, wherein, The calculating, according to the first time difference, to obtain the first distance between the speaker and the microphone in the first device includes: Calculate according to the formula l1 = c * Δt1 to obtain the first distance between the speaker and the microphone in the first device, where c represents the speed of sound, l1 represents the first distance, and Δt1 represents the first time difference.

11. The method according to claim 2, wherein, The calculating, according to the first time difference, to obtain the first distance between the speaker and the microphone in the first device includes: Calculate according to the formula l1 = m1 * c * Δt1 to obtain the first distance between the speaker and the microphone in the first device, where c represents the speed of sound, l1 represents the first distance, Δt1 represents the first time difference, and m1 represents the first distance adjustment coefficient.

12. The method according to claim 3, wherein, The calculating, according to the second time difference, to obtain the second distance between the microphone in the first device and the second device includes: Calculate according to the formula l2 = c * Δt2 to obtain the second distance between the microphone in the first device and the second device, where c represents the speed of sound, l2 represents the second distance, and Δt2 represents the second time difference.

13. The method according to claim 3, wherein, The calculating, according to the second time difference, to obtain the second distance between the microphone in the first device and the second device includes: Calculate according to the formula l2 = m2 * c * Δt2 to obtain the second distance between the microphone in the first device and the second device, where c represents the speed of sound, l2 represents the second distance, Δt2 represents the second time difference, and m2 represents the second distance adjustment coefficient.

14. A loudness adjustment device, wherein, Includes: A detection module, configured to detect the first distance between the speaker and the microphone in the first device, the second distance between the microphone in the first device and the second device, the first loudness of the sound played by the microphone of the first device itself, and the second loudness of the sound played by the second device; A first calculation module, configured to calculate according to the first distance and the second distance to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device; A second calculation module, configured to calculate according to the first loudness, the second loudness, and the loudness attenuation value to obtain the loudness adjustment value of the speaker in the second device; An adjustment module, configured to perform loudness equalization adjustment on the second device in a co-playing scenario, where in the co-playing scenario, the first device and the second device cooperate to play the same audio.

15. The device according to claim 14, wherein, The detection module is configured to: obtain a first noise playback time and a first noise reception time of the first device for a first test noise; calculate the difference between the first noise playback time and the first noise reception time to obtain the first time difference; and calculate according to the first time difference to obtain a first distance between a speaker and a microphone in the first device.

16. The device according to claim 14, wherein, The detection module is configured to: obtain a second noise playback time of the second device for a second test noise and a second noise reception time of the first device for the second test noise; calculate the difference between the second noise playback time and the second noise reception time to obtain the second time difference; and calculate according to the second time difference to obtain a second distance between the microphone in the first device and the second device.

17. The apparatus according to claim 14, wherein, The detection module is configured to: obtain a first test signal received by the microphone in the first device, where the first test signal is a signal received when the speaker in the first device plays a first test noise; and obtain a first loudness at the microphone in the first device according to the first test signal.

18. The device according to claim 14, wherein, The detection module is configured to: obtain a second test signal received by the microphone in the first device, where the second test signal is a signal received when the speaker in the second device plays a second test noise; and obtain a second loudness at the microphone in the first device according to the second test signal.

19. A storage medium, wherein, A computer program is stored thereon, and when the computer program is executed by a processor of a computer, the computer is caused to execute the method according to any one of claims 1 to 13.

20. An electronic device, wherein, Comprising: a memory storing a computer program; a processor reading the computer program stored in the memory to execute the method according to any one of claims 1 to 13.

Citation Information

Patent Citations

  • Reducing unwanted sound transmission

    CN111567065A

  • Loudspeaker adjusting method and electronic device using same

    CN111970607A

  • Audio processing method and device, computer equipment, storage medium and program product

    CN114615599A

  • Feedback noise reduction method and device of earphone equipment, earphone equipment and storage medium

    CN114928785A

  • Loudness adjusting method and device, storage medium and electronic equipment

    CN117873177A