技术领域Technical Field
本申请涉及声音播放技术领域,具体涉及一种响度调节方法、装置、存储介质及电子设备。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 technique
在现代家庭娱乐中,双设备使用场景越来越普遍,双设备使用场景存在第一设备(如电视)和第二设备(如Sound bar)协同播放相同音频(通常是第一设备中提供的音频)的共播场景。In modern home entertainment, dual-device usage scenarios are becoming more and more common. Dual-device usage scenarios include a co-broadcast scenario 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 in the first device).
在共播场景下,虽然第一设备(如电视)和第二设备(如Sound bar)协同发声能够带来更好的听感,但容易存在响度不均衡问题,会导致用户的听感不佳。而针对响度不均衡的问题,目前现有的解决方案通常为由人工测量响度进行手动调整或者简单地根据设备距离进行响度自动调节。In the co-broadcasting scenario, although the coordinated sound generation of the first device (such as a TV) and the second device (such as a sound bar) can bring a better listening experience, there is a problem of uneven loudness, which will lead to poor listening experience for users. To address the problem of uneven loudness, the current existing solutions are usually to manually measure the loudness and make manual adjustments, or simply automatically adjust the loudness according to the distance between the devices.
但是,目前的方式下,通常存在双设备共播场景下设备响度均衡效果较差的问题,用户体验较差。However, under the current method, there is usually a problem of poor device loudness balancing in the scenario of dual-device co-broadcasting, which leads to poor user experience.
发明内容Summary of the invention
本申请实施例提供一种方案,可以有效提升双设备共播场景下设备响度均衡效果,提升用户体验。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 improve the user experience.
本申请实施例提供以下技术方案:The present application provides the following technical solutions:
根据本申请的一个实施例,一种响度调节方法,其包括:检测第一设备中扬声器与麦克风之间的第一距离、所述第一设备中麦克风与第二设备之间的第二距离、所述第一设备的麦克风接收本端播放声音的第一响度及接收所述第二设备所播放声音的第二响度;根据所述第一距离与所述第二距离进行计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值;根据所述第一响度、所述第二响度及所述响度衰减值进行计算,得到所述第二设备中扬声器的响度调整值;根据所述响度调整值在共播场景中对所述第二设备进行响度均衡调整,其中,所述共播场景中所述第一设备与所述第二设备协同播放相同音频。According to an 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 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; calculating according to 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 according to 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 according to the loudness adjustment value, wherein the first device and the second device in the co-broadcasting scenario collaboratively play the same audio.
在本申请的一些实施例中,所述第一距离为按照以下方式检测得到的:获取所述第一设备对于第一测试噪声的第一噪声播放时间与第一噪声接收时间;对所述第一噪声播放时间与所述第一噪声接收时间求差,得到第一时间差;根据所述第一时间差进行计算,得到所述第一设备中扬声器与麦克风之间的第一距离。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 calculating based on the first time difference to obtain a first distance between the speaker and the microphone in the first device.
在本申请的一些实施例中,所述第二距离为按照以下方式检测得到的:获取所述第二设备对于第二测试噪声的第二噪声播放时间以及所述第一设备对于所述第二测试噪声的第二噪声接收时间;对所述第二噪声播放时间与所述第二噪声接收时间求差,得到第二时间差;根据所述第二时间差进行计算,得到所述第一设备中麦克风与所述第二设备之间的第二距离。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 calculating based on the second time difference to obtain a second distance between the microphone in the first device and the second device.
在本申请的一些实施例中,所述第一响度为按照以下方式检测得到的:获取所述第一设备中麦克风接收到的第一测试信号,所述第一测试信号为所述第一设备中扬声器播放第一测试噪声时接收的信号;根据所述第一测试信号,得到所述第一设备中麦克风处的第一响度。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.
在本申请的一些实施例中,所述第二响度为按照以下方式检测得到的:获取所述第一设备中麦克风接收到的第二测试信号,所述第二测试信号为所述第二设备中扬声器播放第二测试噪声时接收的信号;根据所述第二测试信号,得到所述第一设备中麦克风处的第二响度。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.
在本申请的一些实施例中,所述根据所述第一距离与所述第二距离进行计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值,包括:计算所述第一距离与所述第二距离之比,得到距离比;根据所述距离比进行响度衰减计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值。In some embodiments of the present application, the calculating 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 includes: calculating the ratio of the first distance to the second distance to obtain a distance ratio; and performing loudness attenuation calculation according to the distance ratio to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device.
在本申请的一些实施例中,所述根据所述距离比进行响度衰减计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值,包括:根据公式P′=20log10(K)进行计算得到所述响度衰减值,其中,P′指所述响度衰减值,K指所述距离比。In some embodiments of the present application, performing loudness attenuation calculation according to the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device includes: calculating the loudness attenuation value according to a formula P′ =20log10 (K), wherein P′ refers to the loudness attenuation value and K refers to the distance ratio.
在本申请的一些实施例中,所述根据所述第一响度、所述第二响度及所述响度衰减值进行计算,得到所述第二设备中扬声器的响度调整值,包括:计算所述第一响度与所述第二响度之差,得到响度差;计算所述响度差与所述响度衰减值之和,得到增益值;根据所述增益值,得到所述第二设备中扬声器的响度调整值。In some embodiments of the present application, the calculating 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 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 of the speaker in the second device according to the gain value.
在本申请的一些实施例中,所述根据所述增益值,得到所述第二设备中扬声器的响度调整值,包括:根据所述第一设备及所述第二设备的设备类型确定对应的增益分布范围;在所述增益值的所述增益分布范围内进行增益分布处理,得到多个增益分布值;将所述多个增益分布值作为所述第二设备中扬声器的响度调整值。In some embodiments of the present application, obtaining the loudness adjustment value of the speaker in the second device according to the gain value includes: determining a corresponding gain distribution range according to 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.
根据本申请的一个实施例,一种响度调节装置,所述装置包括:检测模块,用于检测第一设备中扬声器与麦克风之间的第一距离、所述第一设备中麦克风与第二设备之间的第二距离、所述第一设备的麦克风接收本端播放声音的第一响度及接收所述第二设备所播放声音的第二响度;第一计算模块,用于根据所述第一距离与所述第二距离进行计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值;第二计算模块,用于根据所述第一响度、所述第二响度及所述响度衰减值进行计算,得到所述第二设备中扬声器的响度调整值;调整模块,用于根据所述响度调整值在共播场景中对所述第二设备进行响度均衡调整,其中,所述共播场景中所述第一设备与所述第二设备协同播放相同音频。According to an embodiment of the present application, a loudness adjustment device includes: a detection module, which is used 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, which is used to calculate according to 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; a second calculation module, which is used to calculate according to 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 an adjustment module, which is used to perform loudness equalization adjustment on the second device in a co-broadcasting scenario according to the loudness adjustment value, wherein the first device and the second device in the co-broadcasting scenario jointly play the same audio.
在本申请的一些实施例中,所述检测模块,用于:获取所述第一设备对于第一测试噪声的第一噪声播放时间与第一噪声接收时间;对所述第一噪声播放时间与所述第一噪声接收时间求差,得到所述第一时间差;根据所述第一时间差进行计算,得到所述第一设备中扬声器与麦克风之间的第一距离。In some embodiments of the present application, the detection module is used to: obtain the first noise playback time and the first noise reception time of the first device for the 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 the first distance between the speaker and the microphone in the first device.
在本申请的一些实施例中,所述检测模块,用于:获取所述第二设备对于第二测试噪声的第二噪声播放时间以及所述第一设备对于所述第二测试噪声的第二噪声接收时间;对所述第二噪声播放时间与所述第二噪声接收时间求差,得到所述第二时间差;根据所述第二时间差进行计算,得到所述第一设备中麦克风与所述第二设备之间的第二距离。In some embodiments of the present application, the detection module is used to: obtain the second noise playback time of the second device for the second test noise and the 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 based on the second time difference to obtain the second distance between the microphone in the first device and the second device.
在本申请的一些实施例中,所述检测模块,用于:获取所述第一设备中麦克风接收到的第一测试信号,所述第一测试信号为所述第一设备中扬声器播放第一测试噪声时接收的信号;根据所述第一测试信号,得到所述第一设备中麦克风处的第一响度。In some embodiments of the present application, the detection module is used to: obtain 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 obtain a first loudness at the microphone in the first device based on the first test signal.
在本申请的一些实施例中,所述检测模块,用于:获取所述第一设备中麦克风接收到的第二测试信号,所述第二测试信号为所述第二设备中扬声器播放第二测试噪声时接收的信号;根据所述第二测试信号,得到所述第一设备中麦克风处的第二响度。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.
在本申请的一些实施例中,所述第一计算模块,用于:计算所述第一距离与所述第二距离之比,得到距离比;根据所述距离比进行响度衰减计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值。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; perform loudness attenuation calculation according to the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device.
在本申请的一些实施例中,所述第一计算模块,用于:根据公式P′=20log10(K)进行计算得到所述响度衰减值,其中,P′指所述响度衰减值,K指所述距离比。In some embodiments of the present application, the first calculation module is used to: calculate the loudness attenuation value according to the formula P′ =20log10 (K), wherein P′ refers to the loudness attenuation value, and K refers to the distance ratio.
在本申请的一些实施例中,所述第二计算模块,用于:计算所述第一响度与所述第二响度之差,得到响度差;计算所述响度差与所述响度衰减值之和,得到增益值;根据所述增益值,得到所述第二设备中扬声器的响度调整值。In some embodiments of the present application, the second calculation module is used to: calculate 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; and obtain a loudness adjustment value of the speaker in the second device according to the gain value.
在本申请的一些实施例中,所述第二计算模块,用于:根据所述第一设备及所述第二设备的设备类型确定对应的增益分布范围;在所述增益值的所述增益分布范围内进行增益分布处理,得到多个增益分布值;将所述多个增益分布值作为所述第二设备中扬声器的响度调整值。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.
根据本申请的另一实施例,一种存储介质,其上存储有计算机程序,当所述计算机程序被计算机的处理器执行时,使计算机执行本申请实施例所述的方法。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 executes the method described in the embodiment of the present application.
根据本申请的另一实施例,一种电子设备可以包括:存储器,存储有计算机程序;处理器,读取存储器存储的计算机程序,以执行本申请实施例所述的方法。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.
根据本申请的另一实施例,一种计算机程序产品或计算机程序,该计算机程序产品或计算机程序包括计算机指令,该计算机指令存储在计算机可读存储介质中。计算机设备的处理器从计算机可读存储介质读取该计算机指令,处理器执行该计算机指令,使得该计算机设备执行本申请实施例所述的各种可选实现方式中提供的方法。According to another embodiment of the present application, a computer program product or a computer program includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the method provided in various optional implementations described in the embodiments of the present application.
本申请实施例中,检测第一设备中扬声器与麦克风之间的第一距离、所述第一设备中麦克风与第二设备之间的第二距离、所述第一设备的麦克风接收本端播放声音的第一响度及接收所述第二设备所播放声音的第二响度;根据所述第一距离与所述第二距离进行计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值;根据所述第一响度、所述第二响度及所述响度衰减值进行计算,得到所述第二设备中扬声器的响度调整值;根据所述响度调整值在共播场景中对所述第二设备进行响度均衡调整,其中,所述共播场景中所述第一设备与所述第二设备协同播放相同音频。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 the microphone of the first device receiving a sound played locally, and a second loudness of 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 a loudness equalization adjustment is performed 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.
以这种方式,在双设备共播场景下,通过检测第一距离、第二距离、第一响度及第二响度,根据第一距离与第二距离计算第二设备中扬声器相对于第一设备中扬声器的响度衰减值,以及,根据第一响度、第二响度及响度衰减值计算得到第二设备中扬声器的响度调整值,来在共播场景中对第二设备进行响度均衡调整,可以使得双设备共播场景下第一设备和第二设备的响度有效均衡,有效提升双设备共播场景下设备响度均衡效果,提升用户体验。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 according to the first distance and the second distance, and calculating the loudness adjustment value of the speaker in the second device according to 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, so that the loudness of the first device and the second device in the dual-device co-broadcasting scenario can be effectively balanced, effectively improving the device loudness equalization effect in the dual-device co-broadcasting scenario, and improving the user experience.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请的一些实施例,对于本领域技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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.
图1示出了根据本申请的一个实施例的响度调节方法的流程图。FIG1 shows a flow chart of a loudness adjustment method according to an embodiment of the present application.
图2示出了根据本申请的一个实施例的响度衰减值计算流程图。FIG. 2 shows a flow chart of loudness attenuation value calculation according to an embodiment of the present application.
图3示出了根据本申请的一个实施例的响度调整值计算流程图。FIG. 3 shows a flow chart of loudness adjustment value calculation according to an embodiment of the present application.
图4示出了根据本申请的一个实施例的响度调节装置的框图。FIG. 4 shows a block diagram of a loudness adjustment device according to an embodiment of the present application.
图5示出了根据本申请的一个实施例的电子设备的框图。FIG5 shows a block diagram of an electronic device according to an embodiment of the present application.
具体实施方式Detailed ways
以下结合附图及实施例,对本公开进行进一步详细说明。应当理解,此处所提供的实施例仅仅用以解释本公开,并不用于限定本公开。另外,以下所提供的实施例是用于实施本公开的部分实施例,而非提供实施本公开的全部实施例,在不冲突的情况下,本公开实施例记载的技术方案可以任意组合的方式实施。The present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are only used to explain the present disclosure and are not intended to limit the present disclosure. In addition, the embodiments provided below are partial embodiments for implementing the present disclosure, rather than providing all embodiments for implementing the present disclosure. In the absence of conflict, the technical solutions recorded in the embodiments of the present disclosure can be implemented in any combination.
需要说明的是,在本公开实施例中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的方法或者装置不仅包括所明确记载的要素,而且还包括没有明确列出的其他要素,或者是还包括为实施方法或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的方法或者装置中还存在另外的相关要素(例如方法中的步骤或者装置中的单元,例如的单元可以是部分电路、部分处理器、部分程序或软件等等)。It should be noted that, in the embodiments of the present disclosure, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a method or apparatus including a series of elements includes not only the elements explicitly recorded, but also includes 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 "includes a ..." does not exclude the presence of other related elements (such as steps in a method or units in a device, for example, a unit may be a portion of a circuit, a portion of a processor, a portion of a program or software, etc.) in the method or apparatus including the element.
例如,本公开实施例提供的响度调节方法包含了一系列的步骤,但是本公开实施例提供的响度调节方法不限于所记载的步骤,同样地,本公开实施例提供的响度调节装置包括了一系列单元,但是本公开实施例提供的装置不限于包括所明确记载的单元,还可以包括为获取相关信息、或基于信息进行处理时所需要设置的单元。For example, the loudness adjustment method provided by the embodiment of the present disclosure includes a series of steps, but the loudness adjustment method provided by the embodiment of the present disclosure is not limited to the recorded steps. Similarly, the loudness adjustment device provided by the embodiment of the present disclosure includes a series of units, but the device provided by the embodiment of the present disclosure is not limited to including the units explicitly recorded, and may also include units required to obtain relevant information or perform processing based on the information.
除非另有定义,本文所使用的所有的技术和科学术语与属于本公开的技术领域的技术人员通常理解的含义相同。本文中所使用的术语只是为了描述具体的实施例的目的,不是旨在限制本公开。Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which the present disclosure belongs. The terms used herein are only for the purpose of describing specific embodiments and are not intended to limit the present disclosure.
图1示意性示出了根据本申请的一个实施例的响度调节方法的流程图。该响度调节方法的执行主体可以是任意具有处理能力的设备或服务器,设备例如电视、电脑、手机、智能手表以及家电设备等,服务器例如云端服务器或物理服务器等等。Fig. 1 schematically shows a flow chart of a loudness adjustment method according to an embodiment of the present application. The execution subject of the loudness adjustment method can be any device or server with processing capabilities, such as a TV, a computer, a mobile phone, a smart watch, and a home appliance, and the server is a cloud server or a physical server.
本申请的一种具体实施例中,该响度调节方法的执行主体具体为设备,该设备可以是第一设备或第二设备中一个,该设备也可以是第一设备或第二设备之外的其它设备(例如用户持有的手机等等)。In a specific embodiment of the present application, the execution subject of the loudness adjustment method is specifically a device, which can be one of the first device or the second device, or can be another device other than the first device or the second device (such as a mobile phone held by a user, etc.).
如图1所示,该响度调节方法可以包括步骤S110至步骤S140。As shown in FIG. 1 , the loudness adjustment method may include steps S110 to S140 .
步骤S110,检测第一设备中扬声器与麦克风之间的第一距离、所述第一设备中麦克风与第二设备之间的第二距离、所述第一设备的麦克风接收本端播放声音的第一响度及接收所述第二设备所播放声音的第二响度;步骤S120,根据所述第一距离与所述第二距离进行计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值;步骤S130,根据所述第一响度、所述第二响度及所述响度衰减值进行计算,得到所述第二设备中扬声器的响度调整值;步骤S140,根据所述响度调整值在共播场景中对所述第二设备进行响度均衡调整,其中,所述共播场景中所述第一设备与所述第二设备协同播放相同音频。Step S110, 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 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; Step S120, calculating according to 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, calculating according to 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, performing loudness equalization adjustment on the second device in a co-broadcasting scenario according to the loudness adjustment value, wherein the first device and the second device in the co-broadcasting scenario collaboratively play the same audio.
在双设备共播场景下,针对第一设备和第二设备可以进行相关检测,通过检测可以获得第一距离、第二距离、第一响度及第二响度。In a dual-device co-broadcasting scenario, relevant detection may be performed on the first device and the second device, and the first distance, the second distance, the first loudness, and the second loudness may be obtained through the detection.
第一距离为第一设备(例如电视)中扬声器与麦克风之间的距离,第二距离为第一设备(例如电视)中麦克风与第二设备(例如回音壁)之间的距离。The first distance is the distance between the speaker and the microphone in the first device (eg, a TV), and the second distance is the distance between the microphone in the first device (eg, a TV) and the second device (eg, a sound bar).
第一响度为第一设备的麦克风接收到本端播放声音(也即第一设备的扬声器播放声音)时第一设备的麦克风处的响度。第二响度为第一设备的麦克风接收到第二设备所播放声音时第一设备的麦克风处的响度。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.
根据第一距离与第二距离进行计算,可以得到第二设备中扬声器相对于第一设备中扬声器的响度衰减值,该响度衰减值可以反映第一设备和第二设备当前的位置分布下第二设备中扬声器相对于第一设备中扬声器的响度衰减程度。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 device and the second device.
根据第一响度、第二响度及响度衰减值进行计算,得到第二设备中扬声器的响度调整值,根据该响度调整值在共播场景中对第二设备进行响度均衡调整(具体可以将第二设备的响度增加响度调整值),即可有效实现双设备共播场景下设备响度均衡,该共播场景中第一设备与第二设备协同播放相同音频。A calculation is performed 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. The loudness equalization of the second device is adjusted based on the loudness adjustment value in the co-broadcasting scenario (specifically, the loudness of the second device can be increased by the loudness adjustment value). This can effectively achieve device loudness equalization in a dual-device co-broadcasting scenario, in which the first device and the second device collaboratively play the same audio.
以这种方式,基于步骤S110至步骤S140,在双设备共播场景下,通过检测第一距离、第二距离、第一响度及第二响度,根据第一距离与第二距离计算第二设备中扬声器相对于第一设备中扬声器的响度衰减值,以及,根据第一响度、第二响度及响度衰减值计算得到第二设备中扬声器的响度调整值,来在共播场景中对第二设备进行响度均衡调整,可以使得双设备共播场景下第一设备和第二设备的响度有效均衡,有效提升双设备共播场景下设备响度均衡效果,提升用户体验。In this way, 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 according to the first distance and the second distance, and calculating the loudness adjustment value of the speaker in the second device according to the first loudness, the second loudness, and the loudness attenuation value, the second device is adjusted for loudness balance in the co-broadcasting scenario, so that the loudness of the first device and the second device in the dual-device co-broadcasting scenario can be effectively balanced, effectively improving the device loudness balance effect in the dual-device co-broadcasting scenario, and improving the user experience.
下面描述图1实施例下进行响度调节时,所进行的各步骤下进一步可选的具体实施例。The following describes further optional specific embodiments of each step performed when loudness adjustment is performed in the embodiment of FIG. 1 .
一种实施例中,所述第一距离为按照以下方式检测得到的:获取所述第一设备对于第一测试噪声的第一噪声播放时间与第一噪声接收时间;对所述第一噪声播放时间与所述第一噪声接收时间求差,得到所述第一时间差;根据所述第一时间差进行计算,得到所述第一设备中扬声器与麦克风之间的第一距离。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; subtracting the first noise playback time from 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 a speaker and a microphone in the first device.
第一设备与第二设备可以通过有线或无线的方式连接,控制第一设备播放一段第一测试噪声同时第一设备的麦克风也接收声音,进而,可以检测得到第一设备对于第一测试噪声的播放起始时刻(也即第一噪声播放时间)。The first device and the second device can be connected via wired or wireless means, and the first device can be controlled to play a first test noise while the microphone of the first device also receives the sound. Thus, the start time of playing the first test noise by the first device (i.e., the first noise playing time) can be detected.
第一设备的麦克风可以接收播放的第一测试噪声得到接收到噪声信号S1,可以检测得到第一设备接收到的噪声信号S1的信号起始时刻(也即第一噪声接收时间)。对第一噪声播放时间t1与第一噪声接收时间t2求差,得到第一时间差Δt2。The microphone of the first device can receive the played first test noise to obtain the received noise signal S1, and can detect the signal start time of the noise signal S1 received by the first device (ie, the first noise receiving time). The first noise playing time t1 and the first noise receiving time t2 are subtracted to obtain the first time difference Δt2 .
进一步的,一些方式中,根据第一时间差Δt1,按照公式l2=c*Δt2(其中c表示声速)进行计算,得到第一设备中扬声器与麦克风之间的第一距离l1。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 l2 =c*Δt2 (where c represents the speed of sound).
进一步的,另一种方式中,按照公式l1=m1*c*Δt1(其中c表示声速)进行计算,得到第一设备中扬声器与麦克风之间的第一距离l1,这样可以进一步提升第一距离对于响度均衡调整的作用效果,整体上进一步提升响度均衡效果。Furthermore, in another manner, 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), which can further enhance the effect of the first distance on loudness equalization adjustment and further enhance the loudness equalization effect as a whole.
其中,m1可以是第一距离调整系数,m1可以与第一设备的设备放置特征一一对应的,第一设备的设备放置特征可以通过对包含第一设备的设备放置图像进行图像检测得到的,第一设备的设备放置特征可以反映第一设备在场所中的放置位置及周围环境等特性,第一设备的设备放置图像可以通过相机采集得到。Among them, m1 can be a first distance adjustment coefficient, m1 can correspond one-to-one to a 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 capturing with a camera.
一种实施例中,所述第二距离为按照以下方式检测得到的:获取所述第二设备对于第二测试噪声的第二噪声播放时间以及所述第一设备对于所述第二测试噪声的第二噪声接收时间;对所述第二噪声播放时间与所述第二噪声接收时间求差,得到所述第二时间差;根据所述第二时间差进行计算,得到所述第一设备中麦克风与所述第二设备之间的第二距离。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; subtracting the second noise playback time from the second noise reception time to obtain the 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.
控制第二设备播放一段第二测试噪声同时第一设备的麦克风也接收声音,进而,可以检测得到第二设备对于第二测试噪声的播放起始时刻(也即第二噪声播放时间)。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.
第一设备的麦克风可以接收播放的第二测试噪声得到接收到噪声信号S2,可以检测得到第一设备接收到的噪声信号S2的信号起始时刻(也即第二噪声接收时间)。对第二噪声播放时间t3与第二噪声接收时间t4求差,得到第二时间差Δt2。The microphone of the first device can receive the played second test noise to obtain the received noise signal S2, and can detect the signal start time of the noise signal S2 received by the first device (i.e., the second noise receiving time). The second noise playing time t3 and the second noise receiving time t4 are subtracted to obtain the second time difference Δt2 .
进一步的,一些方式中,根据第二时间差Δt2,按照公式l2=c*Δt2(其中c表示声速)进行计算,得到第一设备中麦克风与第二设备之间的第二距离l2。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).
进一步的,一些方式中,根据第二时间差Δt2,按照公式l2=m2*c*Δt2(其中c表示声速)进行计算,得到第一设备中扬声器与第二设备之间的第二距离l2,这样可以进一步提升第二距离对于响度均衡调整的作用效果,整体上进一步提升响度均衡效果。Furthermore, in some embodiments, the second distance l2 between the speaker in the first device and the second device is calculated according to the second time difference Δt2 according to the formula l2 =m2*c*Δt2 (where c represents the speed of sound), which can further enhance the effect of the second distance on loudness equalization adjustment and further enhance the loudness equalization effect as a whole.
其中,m2可以是第二距离调整系数,m2可以与第一设备及第二设备的组合设备放置特征一一对应的,第一设备及第二设备的组合设备放置特征可以通过对包含第一设备及第二设备的设备放置图像进行图像检测得到的,第一设备及第二设备的组合设备放置特征可以综合反映第一设备及第二设备在场所中的放置位置及周围环境等特性,包含第一设备及第二设备的设备放置图像可以通过相机采集得到。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 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.
一种实施例中,所述第一响度为按照以下方式检测得到的:获取所述第一设备中麦克风接收到的第一测试信号,所述第一测试信号为所述第一设备中扬声器播放第一测试噪声时接收的信号;根据所述第一测试信号,得到所述第一设备中麦克风处的第一响度。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.
控制第一设备播放一段第一测试噪声同时第一设备的麦克风也接收声音,进而,第一设备的麦克风可以接收播放的第一测试噪声得到接收到噪声信号S1,噪声信号S1即第一测试信号。The first device is controlled to play a first test noise while the microphone of the first device also receives 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.
根据第一测试信号即可计算得到第一设备中扬声器播放第一测试噪声时,第一设备中麦克风处的第一响度P1。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.
一种实施例中,所述第二响度为按照以下方式检测得到的:获取所述第一设备中麦克风接收到的第二测试信号,所述第二测试信号为所述第二设备中扬声器播放第二测试噪声时接收的信号;根据所述第二测试信号,得到所述第一设备中麦克风处的第二响度。In one embodiment, 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 a second loudness at the microphone in the first device based on the second test signal.
控制第二设备播放一段第二测试噪声同时第一设备的麦克风也接收声音,进而,第一设备的麦克风可以接收播放的第二测试噪声得到接收到噪声信号S2,噪声信号S2即第二测试信号。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.
根据第二测试信号即可计算得到第二设备中扬声器播放第二测试噪声时,第一设备中麦克风处的第一响度P2。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.
进一步的,本申请的一种实施例中,第一测试噪声及第二测试噪声使用粉噪声(pink noise):也被称为1/f噪声或分形噪声,是一种声音信号,其在频率上具有特定的功率谱特征。采用粉噪声(pink noise)作为第一测试噪声及第二测试噪声可以进一步提升响度均衡调整的效果。Furthermore, in one embodiment of the present application, the first test noise and the second test noise use pink noise: also known as 1/f noise or fractal noise, which is a sound signal having a specific power spectrum characteristic in frequency. Using pink noise as the first test noise and the second test noise can further enhance the effect of loudness equalization adjustment.
一种实施例中,参阅图2,所述根据所述第一距离与所述第二距离进行计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值,可以包括:步骤S210,计算所述第一距离与所述第二距离之比,得到距离比;步骤S220,根据所述距离比进行响度衰减计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值。In one embodiment, referring to FIG. 2 , the step of calculating according to 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 according to the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device.
计算第一距离与第二距离之比,得到距离比,该距离比可以反映第一设备中扬声器与第一设备中麦克风的距离相对于第一设备中麦克风与第二设备的距离的比例。The ratio of the first distance to the second distance is calculated to obtain a distance ratio, which may reflect the 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.
根据该距离比进行响度衰减计算,可以准确得到第二设备中扬声器相对于第一设备中扬声器的响度衰减值,该响度衰减值可以准确反映第一设备和第二设备当前的位置分布下第二设备中扬声器相对于第一设备中扬声器的响度衰减程度。By performing loudness attenuation calculation 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. The 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 device and the second device.
一种实施例中,所述根据所述距离比进行响度衰减计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值,具体可以包括:根据公式P′=20log10(K)进行计算得到所述响度衰减值,其中,P′指所述响度衰减值,K指所述距离比。In an embodiment, the performing loudness attenuation calculation according to the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device may specifically include: performing calculation according to a formula P′ =20log10 (K) to obtain the loudness attenuation value, wherein P′ refers to the loudness attenuation value, and K refers to the distance ratio.
根据公式P′=20log10(K)计算得到的响度衰减值P′用于响度均衡调整,可以有效保证响度均衡调整效果。The loudness attenuation value P′ calculated according to the formula P′ =20log10 (K) is used for loudness equalization adjustment, which can effectively ensure the loudness equalization adjustment effect.
可以理解,其它实施例中,根据所述距离比进行响度衰减计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值,可以根据其它公式(例如P′=15log10(K))计算得到。It is understandable 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 (eg, P′ =15log10 (K)).
一种实施例中,参阅图3,所述根据所述第一响度、所述第二响度及所述响度衰减值进行计算,得到所述第二设备中扬声器的响度调整值,可以包括:步骤S310,计算所述第一响度与所述第二响度之差,得到响度差;计算所述响度差与所述响度衰减值之和,得到增益值;步骤S320,根据所述增益值,得到所述第二设备中扬声器的响度调整值。In one embodiment, referring to FIG. 3 , the step of calculating 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 may include: step S310, calculating the difference between the first loudness and the second loudness to obtain the loudness difference; calculating the sum of the loudness difference and the loudness attenuation value to obtain a gain value; and step S320, obtaining the loudness adjustment value of the speaker in the second device according to the gain value.
计算第一响度P1与第二响度P2之差,得到响度差P1-P2,计算响度差P1-P2与所述响度衰减值P′之和,得到增益值P0=P1-P2+P′。根据增益值P0,可以得到第二设备中扬声器的响度调整值。The difference between the first loudness P1 and the second loudness P2 is calculated to obtain the loudness difference P1-P2, and the sum of the loudness difference P1-P2 and the loudness attenuation value P' is calculated to obtain the gain value P0=P1-P2+P' . According to the gain value P0, the loudness adjustment value of the speaker in the second device can be obtained.
一些方式中,根据增益值,得到第二设备中扬声器的响度调整值,具体可以是:将增益值作为得到的第二设备中扬声器的响度调整值。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.
一些方式中,所述根据所述增益值,得到所述第二设备中扬声器的响度调整值,可以包括:根据所述第一设备及所述第二设备的设备类型确定对应的增益分布范围;在所述增益值的所述增益分布范围内进行增益分布处理,得到多个增益分布值;将所述多个增益分布值作为所述第二设备中扬声器的响度调整值。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.
第一设备及第二设备的设备类型可以时第一设备与第二设备的设备型号,从预定范围表中可以查询第一设备及第二设备的设备类型确定对应的增益分布范围。The device types of the first device and the second device may be device models of the first device and the second device. The device types of the first device and the second device may be queried from the predetermined range table to determine the corresponding gain distribution range.
在增益值的所述增益分布范围内进行增益分布处理,得到多个增益分布值,例如,增益值为P0,增益分布范围-5至+5,增益值的增益分布范围即P0-5至P0+5,在P0-5至P0+5这一范围内按照预定间隔生成均匀分布的多个值(即多个增益分布值)。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 uniformly distributed values (i.e., multiple gain distribution values) are generated at predetermined intervals.
将该多个增益分布值作为第二设备中扬声器的响度调整值,可以在双设备共播场景下循环使用该多个增益分布值进行响度均衡调整,可以在设备在不同环境场所下放置时均具有良好的响度均衡效果。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.
为便于更好的实施本申请实施例提供的响度调节方法,本申请实施例还提供一种基于上述响度调节方法的响度调节装置。其中名词的含义与上述响度调节方法中相同,具体实现细节可以参考方法实施例中的说明。图4示出了根据本申请的一个实施例的响度调节装置的框图。In order to facilitate better implementation of the loudness adjustment method provided in the embodiment of the present application, the embodiment of the present application also provides a loudness adjustment device based on the above loudness adjustment method. The meanings of the terms are the same as those in the above loudness adjustment method, and the specific implementation details can refer to the description in the method embodiment. FIG4 shows a block diagram of a loudness adjustment device according to an embodiment of the present application.
如图4所示,响度调节装置400中可以包括:检测模块410可以用于检测第一设备中扬声器与麦克风之间的第一距离、所述第一设备中麦克风与第二设备之间的第二距离、所述第一设备的麦克风接收本端播放声音的第一响度及接收所述第二设备所播放声音的第二响度;第一计算模块420可以用于根据所述第一距离与所述第二距离进行计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值;第二计算模块430可以用于根据所述第一响度、所述第二响度及所述响度衰减值进行计算,得到所述第二设备中扬声器的响度调整值;调整模块440可以用于根据所述响度调整值在共播场景中对所述第二设备进行响度均衡调整,其中,所述共播场景中所述第一设备与所述第二设备协同播放相同音频。As shown in FIG. 4 , the loudness adjustment device 400 may include: a detection module 410 that may be used to detect a first distance between a speaker and a microphone in a first device, a second distance between a 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 that may be used to 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; a second calculation module 430 that may be used to 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; and an adjustment module 440 that may be used to 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 cooperatively play the same audio.
在本申请的一些实施例中,所述检测模块,用于:获取所述第一设备对于第一测试噪声的第一噪声播放时间与第一噪声接收时间;对所述第一噪声播放时间与所述第一噪声接收时间求差,得到所述第一时间差;根据所述第一时间差进行计算,得到所述第一设备中扬声器与麦克风之间的第一距离。In some embodiments of the present application, the detection module is used to: obtain the first noise playback time and the first noise reception time of the first device for the 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 the first distance between the speaker and the microphone in the first device.
在本申请的一些实施例中,所述检测模块,用于:获取所述第二设备对于第二测试噪声的第二噪声播放时间以及所述第一设备对于所述第二测试噪声的第二噪声接收时间;对所述第二噪声播放时间与所述第二噪声接收时间求差,得到所述第二时间差;根据所述第二时间差进行计算,得到所述第一设备中麦克风与所述第二设备之间的第二距离。In some embodiments of the present application, the detection module is used to: obtain the second noise playback time of the second device for the second test noise and the 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 based on the second time difference to obtain the second distance between the microphone in the first device and the second device.
在本申请的一些实施例中,所述检测模块,用于:获取所述第一设备中麦克风接收到的第一测试信号,所述第一测试信号为所述第一设备中扬声器播放第一测试噪声时接收的信号;根据所述第一测试信号,得到所述第一设备中麦克风处的第一响度。In some embodiments of the present application, the detection module is used to: obtain 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 obtain a first loudness at the microphone in the first device based on the first test signal.
在本申请的一些实施例中,所述检测模块,用于:获取所述第一设备中麦克风接收到的第二测试信号,所述第二测试信号为所述第二设备中扬声器播放第二测试噪声时接收的信号;根据所述第二测试信号,得到所述第一设备中麦克风处的第二响度。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.
在本申请的一些实施例中,所述第一计算模块,用于:计算所述第一距离与所述第二距离之比,得到距离比;根据所述距离比进行响度衰减计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值。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; perform loudness attenuation calculation according to the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device.
在本申请的一些实施例中,所述第一计算模块,用于:根据公式P′=20log10(K)进行计算得到所述响度衰减值,其中,P′指所述响度衰减值,K指所述距离比。In some embodiments of the present application, the first calculation module is used to: calculate the loudness attenuation value according to the formula P′ =20log10 (K), wherein P′ refers to the loudness attenuation value, and K refers to the distance ratio.
在本申请的一些实施例中,所述第二计算模块,用于:计算所述第一响度与所述第二响度之差,得到响度差;计算所述响度差与所述响度衰减值之和,得到增益值;根据所述增益值,得到所述第二设备中扬声器的响度调整值。In some embodiments of the present application, the second calculation module is used to: calculate 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; and obtain a loudness adjustment value of the speaker in the second device according to the gain value.
在本申请的一些实施例中,所述第二计算模块,用于:根据所述第一设备及所述第二设备的设备类型确定对应的增益分布范围;在所述增益值的所述增益分布范围内进行增益分布处理,得到多个增益分布值;将所述多个增益分布值作为所述第二设备中扬声器的响度调整值。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.
应当注意,尽管在上文详细描述中提及了用于动作执行的设备的若干模块或者单元,但是这种划分并非强制性的。实际上,根据本申请的实施方式,上文描述的两个或更多模块或者单元的特征和功能可以在一个模块或者单元中具体化。反之,上文描述的一个模块或者单元的特征和功能可以进一步划分为由多个模块或者单元来具体化。It should be noted that, although several modules or units of the equipment for action execution are mentioned in the above detailed description, this division is not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more modules or units described above can be embodied in one module or unit. On the contrary, the features and functions of one module or unit described above can be further divided into being embodied by multiple modules or units.
此外,本申请实施例还提供一种电子设备,如图5所示,图5示出了根据本申请的一个实施例的电子设备的框图,具体来讲:In addition, an embodiment of the present application further provides an electronic device, as shown in FIG5 , which shows a block diagram of an electronic device according to an embodiment of the present application, specifically:
该电子设备可以包括一个或者一个以上处理核心的处理器501、一个或一个以上计算机可读存储介质的存储器502、电源503和输入单元504等部件。本领域技术人员可以理解,图5中示出的电子设备结构并不构成对电子设备的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。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 in the figure, or combine certain components, or arrange the components differently.
其中:in:
处理器501是该电子设备的控制中心,利用各种接口和线路连接整个计算机设备的各个部分,通过运行或执行存储在存储器502内的软件程序和/或模块,以及调用存储在存储器502内的数据,执行计算机设备的各种功能和处理数据,从而对电子设备进行整体监控。可选的,处理器501可包括一个或多个处理核心;优选的,处理器501可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户页面和应用程序等,调制解调处理器主要处理无线通讯。可以理解的是,上述调制解调处理器也可以不集成到处理器501中。The processor 501 is the control center of the electronic device. It uses various interfaces and lines to connect various parts of the entire computer device. By running or executing software programs and/or modules stored in the memory 502 and calling data stored in the memory 502, it executes various functions of the computer device and processes data, thereby monitoring the electronic device as a whole. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user pages and application programs, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 501.
存储器502可用于存储软件程序以及模块,处理器501通过运行存储在存储器502的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器502可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据计算机设备的使用所创建的数据等。此外,存储器502可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。相应地,存储器502还可以包括存储器控制器,以提供处理器501对存储器502的访问。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, an application required for at least one function (such as a sound playback function, an image playback function, etc.), 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 devices. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.
电子设备还包括给各个部件供电的电源503,优选的,电源503可以通过电源管理系统与处理器501逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。电源503还可以包括一个或一个以上的直流或交流电源、再充电系统、电源故障检测电路、电源转换器或者逆变器、电源状态指示器等任意组件。The electronic device also includes a power supply 503 for supplying power to each component. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, so that the power management system can manage charging, discharging, power consumption and other functions. The power supply 503 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators and other arbitrary components.
该电子设备还可包括输入单元504,该输入单元504可用于接收输入的数字或字符信息,以及产生与用户设置以及功能控制有关的键盘、鼠标、操作杆、光学或者轨迹球信号输入。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.
尽管未示出,电子设备还可以包括显示单元等,在此不再赘述。具体在本实施例中,电子设备中的处理器501会按照如下的指令,将一个或一个以上的计算机程序的进程对应的可执行文件加载到存储器502中,并由处理器501来运行存储在存储器502中的计算机程序,从而实现本申请前述实施例中各种功能,如处理器501可以执行下述步骤:Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 501 in the electronic device will load the executable files corresponding to the processes of one or more computer programs 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 various functions in the aforementioned embodiments of the present application, such as the processor 501 may perform the following steps:
检测第一设备中扬声器与麦克风之间的第一距离、所述第一设备中麦克风与第二设备之间的第二距离、所述第一设备的麦克风接收本端播放声音的第一响度及接收所述第二设备所播放声音的第二响度;根据所述第一距离与所述第二距离进行计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值;根据所述第一响度、所述第二响度及所述响度衰减值进行计算,得到所述第二设备中扬声器的响度调整值;根据所述响度调整值在共播场景中对所述第二设备进行响度均衡调整,其中,所述共播场景中所述第一设备与所述第二设备协同播放相同音频。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; calculate according to 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; calculate according to 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 perform loudness equalization adjustment on the second device in a co-broadcasting scenario according to the loudness adjustment value, wherein the first device and the second device in the co-broadcasting scenario collaboratively play the same audio.
在本申请的一些实施例中,还包括:获取所述第一设备对于第一测试噪声的第一噪声播放时间与第一噪声接收时间;对所述第一噪声播放时间与所述第一噪声接收时间求差,得到所述第一时间差;根据所述第一时间差进行计算,得到所述第一设备中扬声器与麦克风之间的第一距离。In some embodiments of the present application, it also includes: obtaining a first noise playing time and a first noise receiving time of the first device for a first test noise; subtracting the first noise playing time from the first noise receiving time to obtain the first time difference; and calculating according to the first time difference to obtain a first distance between a speaker and a microphone in the first device.
在本申请的一些实施例中,还包括:获取所述第二设备对于第二测试噪声的第二噪声播放时间以及所述第一设备对于所述第二测试噪声的第二噪声接收时间;对所述第二噪声播放时间与所述第二噪声接收时间求差,得到所述第二时间差;根据所述第二时间差进行计算,得到所述第一设备中麦克风与所述第二设备之间的第二距离。In some embodiments of the present application, it also 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; subtracting the second noise playback time from the second noise reception time to obtain the second time difference; and calculating according to the second time difference to obtain a second distance between the microphone in the first device and the second device.
在本申请的一些实施例中,还包括:获取所述第一设备中麦克风接收到的第一测试信号,所述第一测试信号为所述第一设备中扬声器播放第一测试噪声时接收的信号;根据所述第一测试信号,得到所述第一设备中麦克风处的第一响度。In some embodiments of the present application, it also includes: obtaining a first test signal received by a microphone in the first device, the first test signal being 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.
在本申请的一些实施例中,还包括:获取所述第一设备中麦克风接收到的第二测试信号,所述第二测试信号为所述第二设备中扬声器播放第二测试噪声时接收的信号;根据所述第二测试信号,得到所述第一设备中麦克风处的第二响度。In some embodiments of the present application, it also includes: obtaining a second test signal received by the microphone in the first device, the second test signal being 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.
在本申请的一些实施例中,所述根据所述第一距离与所述第二距离进行计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值,包括:计算所述第一距离与所述第二距离之比,得到距离比;根据所述距离比进行响度衰减计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值。In some embodiments of the present application, the calculating 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 includes: calculating the ratio of the first distance to the second distance to obtain a distance ratio; and performing loudness attenuation calculation according to the distance ratio to obtain the loudness attenuation value of the speaker in the second device relative to the speaker in the first device.
在本申请的一些实施例中,所述根据所述距离比进行响度衰减计算,得到所述第二设备中扬声器相对于所述第一设备中扬声器的响度衰减值,包括:根据公式P′=20log10(K)进行计算得到所述响度衰减值,其中,P′指所述响度衰减值,K指所述距离比。In some embodiments of the present application, performing loudness attenuation calculation according to the distance ratio to obtain a loudness attenuation value of the speaker in the second device relative to the speaker in the first device includes: calculating the loudness attenuation value according to a formula P′ =20log10 (K), wherein P′ refers to the loudness attenuation value and K refers to the distance ratio.
在本申请的一些实施例中,所述根据所述第一响度、所述第二响度及所述响度衰减值进行计算,得到所述第二设备中扬声器的响度调整值,包括:计算所述第一响度与所述第二响度之差,得到响度差;计算所述响度差与所述响度衰减值之和,得到增益值;根据所述增益值,得到所述第二设备中扬声器的响度调整值。In some embodiments of the present application, the calculating 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 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 of the speaker in the second device according to the gain value.
在本申请的一些实施例中,所述根据所述增益值,得到所述第二设备中扬声器的响度调整值,包括:根据所述第一设备及所述第二设备的设备类型确定对应的增益分布范围;在所述增益值的所述增益分布范围内进行增益分布处理,得到多个增益分布值;将所述多个增益分布值作为所述第二设备中扬声器的响度调整值。In some embodiments of the present application, obtaining the loudness adjustment value of the speaker in the second device according to the gain value includes: determining a corresponding gain distribution range according to 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.
本领域普通技术人员可以理解,上述实施例的各种方法中的全部或部分步骤可以通过计算机程序来完成,或通过计算机程序控制相关的硬件来完成,该计算机程序可以存储于一计算机可读存储介质中,并由处理器进行加载和执行。A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed 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.
为此,本申请实施例还提供一种存储介质,其中存储有计算机程序,该计算机程序能够被处理器进行加载,以执行本申请实施例所提供的任一种方法中的步骤。To this end, an embodiment of the present application further provides a storage medium, in which a computer program is stored. The computer program can be loaded by a processor to execute the steps in any method provided in the embodiment of the present application.
其中,该存储介质可以是计算机可读存储介质,该存储介质可以包括:只读存储器(ROM,Read Only Memory)、随机存取记忆体(RAM,Random Access Memory)、磁盘或光盘等。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 disk or an optical disk, etc.
由于该存储介质中所存储的计算机程序,可以执行本申请实施例所提供的任一种方法中的步骤,因此,可以实现本申请实施例所提供的方法所能实现的有益效果,详见前面的实施例,在此不再赘述。Since the computer program stored in the storage medium can execute the steps in 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.
本领域技术人员在考虑说明书及实践这里公开的实施方式后,将容易想到本申请的其它实施方案。本申请旨在涵盖本申请的任何变型、用途或者适应性变化,这些变型、用途或者适应性变化遵循本申请的一般性原理并包括本申请未公开的本技术领域中的公知常识或惯用技术手段。Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the embodiments disclosed herein. The present application is intended to cover any variations, uses or adaptations of the present application, which follow the general principles of the present application and include common knowledge or customary technical means in the art that are not disclosed in the present application.
应当理解的是,本申请并不局限于上面已经描述并在附图中示出的实施例,而可以在不脱离其范围的情况下进行各种修改和改变。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.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410028841.7ACN117873177A (en) | 2024-01-08 | 2024-01-08 | Loudness adjustment method, device, storage medium and electronic device |
| PCT/CN2024/132881WO2025148524A1 (en) | 2024-01-08 | 2024-11-19 | Loudness adjustment method and apparatus, and storage medium and electronic device |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202410028841.7ACN117873177A (en) | 2024-01-08 | 2024-01-08 | Loudness adjustment method, device, storage medium and electronic device |
| Publication Number | Publication Date |
|---|---|
| CN117873177Atrue CN117873177A (en) | 2024-04-12 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202410028841.7APendingCN117873177A (en) | 2024-01-08 | 2024-01-08 | Loudness adjustment method, device, storage medium and electronic device |
| Country | Link |
|---|---|
| CN (1) | CN117873177A (en) |
| WO (1) | WO2025148524A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025148524A1 (en)* | 2024-01-08 | 2025-07-17 | 惠州视维新技术有限公司 | Loudness adjustment method and apparatus, and storage medium and electronic device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US8699723B2 (en)* | 2010-07-20 | 2014-04-15 | International Business Machines Corporation | Audio device volume manager using measured volume perceived at a first audio device to control volume generation by a second audio device |
| US20120020487A1 (en)* | 2010-07-20 | 2012-01-26 | International Business Machines Corporation | Audio device volume manager using measured distance between first and second audio devices to control volume generation by the second audio device |
| CN115002644B (en)* | 2018-01-09 | 2025-02-07 | 杜比实验室特许公司 | Method and apparatus for reducing unwanted sound transmission |
| TWI757600B (en)* | 2019-05-07 | 2022-03-11 | 宏碁股份有限公司 | Speaker adjustment method and electronic device using the same |
| CN111970607B (en)* | 2019-05-20 | 2022-07-05 | 宏碁股份有限公司 | Loudspeaker adjusting method and electronic device using same |
| CN114615599B (en)* | 2022-03-11 | 2024-12-03 | 游密科技(深圳)有限公司 | Audio processing method, device, computer equipment, storage medium and program product |
| CN114928785B (en)* | 2022-04-28 | 2025-01-21 | 歌尔股份有限公司 | Feedback noise reduction method and device for earphone device, earphone device and storage medium |
| CN117873177A (en)* | 2024-01-08 | 2024-04-12 | 惠州视维新技术有限公司 | Loudness adjustment method, device, storage medium and electronic device |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025148524A1 (en)* | 2024-01-08 | 2025-07-17 | 惠州视维新技术有限公司 | Loudness adjustment method and apparatus, and storage medium and electronic device |
| Publication number | Publication date |
|---|---|
| WO2025148524A1 (en) | 2025-07-17 |
| Publication | Publication Date | Title |
|---|---|---|
| US11134353B2 (en) | Customized audio processing based on user-specific and hardware-specific audio information | |
| US20180260188A1 (en) | Volume control | |
| CN106302997B (en) | Output control method, electronic equipment and system | |
| WO2025148524A1 (en) | Loudness adjustment method and apparatus, and storage medium and electronic device | |
| WO2024051820A1 (en) | Abnormality-based paging method and related apparatus | |
| CN110677717A (en) | Audio compensation method, smart television and storage medium | |
| CN110799936B (en) | Volume adjusting method, volume adjusting device, terminal equipment and storage medium | |
| US20190221226A1 (en) | Electronic apparatus and echo cancellation method applied to electronic apparatus | |
| CN106488363B (en) | Sound channel distribution method and device of audio output system | |
| CN103929692B (en) | Audio information processing method and electronic equipment | |
| CN112118472A (en) | Method and apparatus for playing multimedia | |
| CN107547732A (en) | A kind of media play volume adjusting method, device, terminal and storage medium | |
| CN112188342B (en) | Equalization parameter determining method, apparatus, electronic device and storage medium | |
| CN117369765A (en) | Equalizer self-adaptive adjusting method and related equipment | |
| CN112073879B (en) | Audio synchronous playing method and device, video playing equipment and readable storage medium | |
| TW202020652A (en) | Voice processing method and apparatus | |
| WO2025148528A1 (en) | Loudness adjustment method and apparatus, storage medium and electronic device | |
| CN118972746A (en) | Sound adjustment method, device, storage medium and electronic device for sound system | |
| CN114253503B (en) | Audio data processing method and electronic equipment | |
| CN113225574B (en) | Signal processing method and device | |
| WO2025086902A1 (en) | Playback control method and apparatus, storage medium and terminal device | |
| CN110753919B (en) | Volume adjustment method, device, storage medium and mobile terminal | |
| JP5970125B2 (en) | Control device, control method and program | |
| CN112883222B (en) | Suggested playback method of song, electronic device and computer readable storage medium | |
| RU2365030C1 (en) | Method and device for loudness level regulation |
| Date | Code | Title | Description |
|---|---|---|---|
| PB01 | Publication | ||
| PB01 | Publication | ||
| SE01 | Entry into force of request for substantive examination | ||
| SE01 | Entry into force of request for substantive examination |