Audio playing method and device, electronic equipment and storage medium
By receiving detection wave signals of the same type but different frequencies, the device position and audio parameters are determined, and the built-in and external device synchronization problems in the audio playback method are solved, and high-precision audio data synchronization and automated parameter configuration are realized, which is suitable for a variety of devices. and scenes, providing a coordinated auditory experience.
Patent Information
- Application Number
- CN202411047841.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-31
- Publication Date
- 2024-12-17
AI Technical Summary
In the existing audio playback methods, there is a synchronization problem with the audio output of the built-in and external sound systems, and the external sound system cannot independently configure the audio parameters, resulting in the inability of each sound system to work together.
By receiving detection wave signals of the same type but different frequencies, the relative position relationship and audio parameters between devices are determined, so as to synchronously adjust the playback of audio data, ensure that the audio data of built-in and external devices are played synchronously, and the external devices are automatically configured. audio parameters.
It realizes high-precision synchronous playback of multi-device audio data, improves the efficiency of audio parameter configuration, ensures user-free automated configuration, is suitable for a variety of devices and scenarios, and provides a coordinated auditory experience.
Smart Images

Figure CN119155592A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio playback technology, and in particular to an audio playback method, device, electronic device and storage medium. Background Art
[0002] In the current audio playback method, audio data is sent to the built-in and external sound systems through different transmission paths. Due to the inherent delay of the transmission path, the audio outputs of the various sound systems are out of sync, and the external sound system can only output the same audio data as the built-in sound system. The audio parameters of the external sound system cannot be configured, and the various sound systems cannot work together. Summary of the invention
[0003] Embodiments of the present application provide an audio playback method, device, electronic device, and storage medium.
[0004] According to the first aspect of the present application, there is provided an audio playback method, the method comprising: determining audio parameters of the first device based on a received first detection wave signal and a second detection wave signal; the first detection wave signal is emitted by the first device, the second detection wave signal is emitted by the second device, the first detection wave signal and the second detection wave signal are detection wave signals of the same type but with different frequencies; in response to receiving the second detection wave signal at different time nodes, determining a relative position relationship between the second device and the first device; based on the relative position relationship, determining the audio parameters of the second device; based on the audio parameters of the first device and the audio parameters of the second device, controlling the first device and the second device to play the audio data to be played.
[0005] According to one embodiment of the present application, the method also includes: in response to receiving a first sound wave signal sent by a first device and a second sound wave signal sent by the second device, determining a delay time of the audio data played by the second device relative to the audio data played by the first device; and adjusting the audio parameters of the first device based on the delay time so that the first device plays audio synchronously with the second device.
[0006] According to an embodiment of the present application, in response to receiving a first sound wave signal sent by a first device and a second sound wave signal sent by the second device, determining the delay time of the audio data played by the second device relative to the audio data played by the first device includes: determining multiple first time nodes when the first sound wave signal is received; the frequencies of the first sound wave signal and the second sound wave signal are different; performing time analysis on the multiple first time nodes to determine the first reference time nodes corresponding to the multiple first time nodes; determining multiple second time nodes when the second sound wave signal is received; performing time analysis on the multiple second time nodes to determine the second reference time nodes corresponding to the multiple second time nodes; calculating the difference between the second reference time node and the first reference time node to obtain the delay time.
[0007] According to one embodiment of the present application, the method also includes: in response to receiving a first sound wave signal sent by a first device and multiple second sound wave signals sent by multiple second devices, determining the maximum delay time of the audio data played by the multiple second devices relative to the audio data played by the first device; based on the maximum delay time, calculating the second delay time corresponding to each of the second devices; adjusting the audio parameters of the first device based on the maximum delay time, and adjusting the audio parameters of each of the second devices based on the second delay time, so that the first device plays audio synchronously with the multiple second devices.
[0008] According to one embodiment of the present application, determining the audio parameters of the second device based on the relative position relationship includes: determining the relative angle and relative position of the second device relative to the center of the first device based on the relative position relationship; determining the audio parameters of the second device based on the relative angle and the relative position; the audio parameters of the second device include audio frequency parameters and / or channel configuration parameters.
[0009] According to one embodiment of the present application, the method also includes: determining the audio frequency parameters of the second device based on the relative angle and the relative position; filtering the audio data based on the audio frequency parameters to obtain filtered audio data; transmitting the filtered audio data to the corresponding second device, so that the second device plays the filtered audio data based on the frequency corresponding to the audio frequency parameters.
[0010] According to one embodiment of the present application, the method also includes: determining the channel configuration parameters of the second device based on the relative angle and the relative position; determining the channel audio data of the channel corresponding to the channel configuration parameters in the audio data; and transmitting the channel audio data to the corresponding second device, so that the second device plays the channel audio data based on the channel corresponding to the channel configuration parameters.
[0011] According to a second aspect of the present application, an audio playback device is provided, comprising: a first parameter determination module, used to determine the audio parameters of a first device based on a received first detection wave signal and a second detection wave signal; the first detection wave signal is emitted by the first device, and the second detection wave signal is emitted by the second device, and the first detection wave signal and the second detection wave signal are detection wave signals of the same type but with different frequencies; a position determination module, used to determine the relative position relationship between the second device and the first device in response to receiving the second detection wave signal at different time nodes; a second parameter determination module, used to determine the audio parameters of the second device based on the relative position relationship; and a playback module, used to control the first device and the second device to play the audio data to be played based on the audio parameters of the first device and the audio parameters of the second device.
[0012] According to a third aspect of the present application, an electronic device is provided, including:
[0013] at least one processor; and
[0014] a memory communicatively connected to the at least one processor; wherein,
[0015] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the present application.
[0016] According to a fourth aspect of the present application, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable the computer to execute the method described in the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] By reading the detailed description below with reference to the accompanying drawings, the above and other purposes, features and advantages of the exemplary embodiments of the present application will become easily understood. In the accompanying drawings, several embodiments of the present application are shown in an exemplary and non-limiting manner, wherein:
[0018] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts.
[0019] Figure 1The processing flow diagram of the audio playback method provided in the embodiment of the present application is shown as follows Figure 1 ;
[0020] Figure 2 The processing flow diagram of the audio playback method provided in the embodiment of the present application is shown as follows Figure 2 ;
[0021] Figure 3 The processing flow diagram of the audio playback method provided in the embodiment of the present application is shown as follows Figure 3 ;
[0022] Figure 4 The processing flow diagram of the audio playback method provided in the embodiment of the present application is shown as follows Figure 4 ;
[0023] Figure 5 The processing flow diagram of the audio playback method provided in the embodiment of the present application is shown as follows Figure 5 ;
[0024] Figure 6 The processing flow diagram of the audio playback method provided in the embodiment of the present application is shown as follows Figure 6 ;
[0025] Figure 7 The processing flow diagram of the audio playback method provided in the embodiment of the present application is shown as follows Figure 7 ;
[0026] Figure 8 An application scenario diagram of the audio playback method provided in an embodiment of the present application is shown;
[0027] Fig. 9 Another application scenario diagram of the audio playback method provided in an embodiment of the present application is shown;
[0028] Fig.10 An optional schematic diagram of an audio playback device provided in an embodiment of the present application is shown;
[0029] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] In order to make the purpose, features, and advantages of the present application more obvious and easy to understand, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.
[0031] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0032] In the following description, the terms "first\second" involved are merely used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second" can be interchanged with a specific order or sequence where permitted, so that the embodiments of the present application described herein can be implemented in an order other than that illustrated or described herein.
[0033] 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 this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0034] The processing flow of the audio playback method provided in the embodiment of the present application is described. Figure 1 , Figure 1 The processing flow diagram of the audio playback method provided in the embodiment of the present application is as follows Figure 1 , will combine Figure 1 Steps S101-S104 are shown for explanation.
[0035] Step S101, determining the audio parameters of the first device based on the received first detection wave signal and the second detection wave signal; the first detection wave signal is sent by the first device, and the second detection wave signal is sent by the second device, and the first detection wave signal and the second detection wave signal are detection wave signals of the same type but different frequencies.
[0036] In some embodiments, the first device may include: a main device in an audio playback system. The first device may include: devices such as a smart phone, a tablet computer, a laptop computer, and a dedicated audio system. The first device may also include other audio devices, which are not limited in the embodiments of the present application. The second device may include: an auxiliary device that interacts with the first device in the audio playback system. The second device may include: audio devices such as Bluetooth speakers, headphones, and speakers. The second device may also include other audio devices, which are not limited in the embodiments of the present application. The second device may be a smart phone, a tablet computer, a laptop computer, and other devices with an audio playback system. The first detection wave signal and the second detection wave signal may be detection wave signals of the same type and different frequencies. The first detection wave signal and the second detection wave signal may include: signals such as sound waves, electromagnetic waves, remote sensing signals, and ultrasonic waves. The first detection wave signal and the second detection wave signal may also include other types of signals, which are not limited in the embodiments of the present application. The first detection wave signal and the second detection wave signal may be used for spatial positioning and audio synchronization between the first device and the second device. The audio parameters of the first device may include: volume, audio frequency parameters, channel configuration parameters, and delay compensation. The audio parameters of the first device may also include other audio parameters, which are not limited in the embodiments of the present application.
[0037] Step S102: in response to receiving the second detection wave signal at different time points, determining the relative position relationship between the second device and the first device.
[0038] In some embodiments, the relative position relationship may include the spatial position of the second device relative to the first device. The relative position relationship may be determined by analyzing parameters such as the time node, signal strength, and phase difference corresponding to the second detection wave signal. The relative position relationship may specifically include: relative angle and relative position.
[0039] As an example, the microphone array of the first device includes a microphone L and a microphone R. The distance between the microphone L and the microphone R is D. At time node tR, the microphone R receives a second detection wave signal. At time node tL, the microphone L receives the same second detection wave signal. The distance d corresponding to the time difference is calculated based on the time difference between the time nodes. The relative position relationship between the second device and the first device is determined based on the distance d corresponding to the time difference and the distance D between the two microphones.
[0040] The distance d corresponding to the time difference calculated according to the time difference between the time nodes can be expressed by the following formula (1).
[0041] d=v*(tL-tR)(1)
[0042] Wherein, (tL-tR) is the time difference between the time nodes, and v is the propagation speed of the second detection wave signal in the air.
[0043] According to the distance d corresponding to the time difference and the distance D between the two microphones, the relative position relationship between the second device and the first device can be determined by the following formula (2).
[0044] Angle α = arccos(d / D)(2)
[0045] Here, Angleα is the relative position relationship between the second device and the first device.
[0046] Step S103: determining the audio parameters of the second device based on the relative position relationship.
[0047] Step S104: Based on the audio parameters of the first device and the audio parameters of the second device, the first device and the second device are controlled to play the audio data to be played.
[0048] In some embodiments, the audio parameters of the second device may include: volume, audio frequency parameters, channel configuration parameters and delay compensation. The audio parameters of the second device may also include other audio parameters, which are not limited in the embodiments of the present application. Based on the relative angle and relative position of the second device relative to the first device, the audio parameters of the second device can be determined. The first device plays the audio data to be played based on the determined audio parameters of the first device. The first device transmits the audio data corresponding to the determined audio parameters of the second device to the second device through interaction with the second device, so that the second device plays the corresponding audio data based on the determined audio parameters of the second device.
[0049] The method of the embodiment of the present application determines the audio parameters of each audio device through the first detection wave signal and the second detection wave signal, and can synchronously play the audio data played by the first device and the second device, while improving the synchronization accuracy. Based on the relative position relationship, the audio parameters of the second device are determined, and the audio parameters of the external sound system can be configured, and the configuration process of the audio parameters is an automated process without user intervention, thereby improving the configuration efficiency of the audio parameters. The audio playback method can be applied to a variety of devices and scenarios, and the audio playback method is highly flexible. The first device and the second device can work together to provide a coordinated auditory experience.
[0050] In some embodiments, the processing flow of the audio playback method is shown as follows: Figure 2 ,like Figure 2 As shown, the audio playing method may further include:
[0051] Step S201, in response to receiving a first sound wave signal sent by a first device and a second sound wave signal sent by a second device, determining a delay time of audio data played by the second device relative to audio data played by the first device.
[0052] Step S202: adjusting the audio parameters of the first device based on the delay time so that the first device and the second device play audio synchronously.
[0053] In this embodiment, the frequencies of the first sound wave signal and the second sound wave signal are different. The first sound wave signal and the second sound wave signal can be sound wave signals of the same type. The first sound wave signal and the second sound wave signal can specifically include: an ultrasonic wave signal and an infrasonic wave signal. The first sound wave signal and the second sound wave signal can also include other sound wave signals whose frequencies are not within the range of the human ear, which is not limited in the embodiment of the present application.
[0054] As an example, the ultrasound system of the first device simultaneously sends control instructions to the built-in sound path of the first device and the audio path of the second device through the APO (audio processing object) architecture, and the first device plays the first sound wave signal at a frequency of f1, and the second device plays the second sound wave signal at a frequency of f2. In response to the microphone of the first device receiving the first sound wave signal sent by the first device and the second sound wave signal sent by the second device, the delay time of the audio data played by the second device relative to the audio data played by the first device is determined. The audio parameters of the first device are adjusted through the APO algorithm, and the delay time is added to the built-in sound path of the first device so that the first device and the second device play audio synchronously.
[0055] The method of the embodiment of the present application detects the sound wave signal sent between the first device and the second device, calculates and compensates for the playback delay of the first device, and automatically adjusts the audio parameters of the first device. It can synchronously play the audio data played by the first device and the second device, while improving the synchronization accuracy. The automatic synchronization compensation mechanism based on the sound wave signal does not require human intervention, and uses ultrasonic frequencies that are imperceptible to the human ear to configure the audio parameters, ensuring that the user configures the audio parameters in an unaware state without user intervention, thereby improving the configuration efficiency of the audio parameters. The audio playback method can be applied to a variety of devices and scenarios, and the audio playback method is highly flexible.
[0056] In some embodiments, the processing flow of the audio playback method is shown as follows: Figure 3 ,like Figure 3 As shown, including:
[0057] like Figure 3 As shown, in response to receiving a first sound wave signal sent by a first device and a second sound wave signal sent by a second device, determining a delay time of audio data played by the second device relative to audio data played by the first device in step S201 may specifically include:
[0058] Step S301, determining a plurality of first time nodes at which a first sound wave signal is received.
[0059] Step S302: Perform time analysis on the multiple first time nodes to determine the first reference time nodes corresponding to the multiple first time nodes.
[0060] In this embodiment, the audio receiving device of the first device may include a microphone array, and the microphone array may include an array composed of multiple microphones. The microphone array of the first device can receive the same first sound wave signal at multiple time nodes. Time analysis may include analysis methods such as time series analysis, average time determination, and time domain feature extraction. Time analysis may also include other analysis methods, which are not limited in the embodiments of the present application. The first reference time node may include: the average arrival time of multiple first time nodes. The first reference time node may represent the overall reception time of the first sound wave signal on the first device.
[0061] Step S303: determine a plurality of second time nodes at which the second sound wave signal is received.
[0062] Step S304: perform time analysis on the multiple second time nodes to determine second reference time nodes corresponding to the multiple second time nodes.
[0063] In this embodiment, the audio receiving device of the first device may include a microphone array, and the microphone array may include an array composed of multiple microphones. The microphone array of the first device may receive the same second sound wave signal at multiple time nodes. Time analysis may include analysis methods such as time series analysis, average time determination, and time domain feature extraction. Time analysis may also include other analysis methods, which are not limited in the embodiments of the present application. The second reference time node may include: the average arrival time of multiple second time nodes. The second reference time node may characterize the overall reception time of the second sound wave signal on the first device.
[0064] Step S305, calculating the difference between the second reference time node and the first reference time node to obtain the delay time.
[0065] In this embodiment, the first reference time node and the second reference time node are input as input parameters to the audio synchronization algorithm. The audio synchronization algorithm can calculate the difference between the second reference time node and the first reference time node to obtain the delay time.
[0066] The method of the embodiment of the present application detects the sound wave signal sent between the first device and the second device, calculates the delay time of the first device, and automatically adjusts the audio parameters of the first device according to the delay time, so as to synchronously play the audio data played by the first device and the second device, while improving the synchronization accuracy. The automatic synchronization compensation mechanism based on the sound wave signal does not require human intervention, and uses ultrasonic frequencies that are imperceptible to the human ear to configure the audio parameters, ensuring that the user configures the audio parameters in an unaware state without user intervention, thereby improving the configuration efficiency of the audio parameters. The audio playback method can be applied to a variety of devices and scenarios, and the audio playback method is highly flexible.
[0067] In some embodiments, the processing flow of the audio playback method is shown as follows: Figure 4 ,like Figure 4 As shown, including:
[0068] like Figure 4 As shown, the audio playing method may further include:
[0069] Step S401, in response to receiving a first sound wave signal sent by a first device and a plurality of second sound wave signals sent by a plurality of second devices, determining a maximum delay time of audio data played by the plurality of second devices relative to audio data played by the first device.
[0070] Step S402: Calculate the second delay time corresponding to each second device based on the maximum delay time.
[0071] Step S403: adjusting the audio parameters of the first device based on the maximum delay time, and adjusting the audio parameters of each second device based on the second delay time, so that the first device and the plurality of second devices play audio synchronously.
[0072] In this embodiment, the second sound wave signals sent by the plurality of second devices are of the same type but with different frequencies. The maximum delay time may include the maximum delay time of all the second devices relative to the first device playing the audio data. The second delay time may be less than or equal to the maximum delay time.
[0073] As an example, the first device establishes device interconnection with the second device 1, the second device 2, and the second device 3. The first device responds to receiving the first sound wave signal sent by the first device and the second sound wave signal 1, the second sound wave signal 2, and the second sound wave signal 3 sent by the three second devices respectively. It is determined that the delay time between the audio data played by the second device 1 and the audio data played by the first device is 50ms, the delay time between the audio data played by the second device 2 and the audio data played by the first device is 40ms, and the delay time between the audio data played by the second device 3 and the audio data played by the first device is 45ms. It is determined that the maximum delay time of the audio data played by multiple second devices relative to the audio data played by the first device is 50ms. Based on the maximum delay time, the second delay time corresponding to the second device 1 is calculated to be 0, the second delay time corresponding to the second device 2 is 10ms, and the second delay time corresponding to the second device 3 is 5ms. The audio parameters of the first device are adjusted based on the maximum delay time, and the delay time in the audio parameters of the first device is adjusted to 50ms. The audio parameters of each second device are adjusted based on the second delay time, and the delay time in the audio parameters of the second device 2 is adjusted to 10ms, and the delay time in the audio parameters of the second device 3 is adjusted to 5ms, so that the first device plays audio synchronously with the second device 1, the second device 2, and the second device 3.
[0074] The method of the embodiment of the present application detects the sound wave signal sent between the first device and multiple second devices, calculates the delay time of the first device and the corresponding delay time of the second device, and automatically adjusts the audio parameters of the first device and the audio parameters of the second device according to the delay time of each device, so as to synchronously play the audio data played by the first device and multiple second devices, and improve the synchronization accuracy. The automatic synchronization compensation mechanism based on the sound wave signal does not require human intervention, and uses ultrasonic frequencies that are imperceptible to the human ear to configure the audio parameters, ensuring that the user configures the audio parameters in an unaware state without user intervention, thereby improving the configuration efficiency of the audio parameters. The audio playback method can be applied to a variety of devices and scenarios, and the audio playback method has high flexibility.
[0075] In some embodiments, the processing flow of the audio playback method is shown as follows: Figure 5 ,like Figure 5 As shown, including:
[0076] like Figure 5 As shown, determining the audio parameters of the second device based on the relative position relationship in step S103 may include:
[0077] Step S501: Determine the relative angle and relative position of the second device relative to the center of the first device based on the relative position relationship.
[0078] Step S502: determining audio parameters of the second device based on the relative angle and the relative position.
[0079] In this embodiment, the audio parameters of the second device may include one or more of an audio frequency parameter and a channel configuration parameter. The audio frequency parameter may be used to configure the frequency of the audio played by the second device. The channel configuration parameter may be used by the second device to adjust the audio output channel of the second device according to the channel type. The channel type may include: 2.1 channel type, 3 channel type, 4 channel type, 5.1 channel type and 7.1 channel type and other channel types. The channel type may also include other channel types, which are not limited in the embodiments of the present application. The first device may obtain the audio data corresponding to the audio frequency parameter and / or channel configuration parameter of the second device through the APO algorithm, and transmit the obtained audio data to the second device, so that the second device plays the corresponding audio data based on the audio parameters.
[0080] In some embodiments, the audio playback method further includes: determining the placement position of the first device based on the relative position relationship. According to the placement position of the first device, adjusting the audio parameters of the first device. Among them, the audio parameters may include audio frequency parameters and / or channel configuration parameters. For example, the first device is interconnected with multiple second devices, and based on the relative position relationship, the relative angle and relative position of the second device relative to the center of the first device are determined, and based on the relative angle and relative position, the channel configuration parameters of each second device are determined to include a subwoofer channel, a left front channel, a right front channel, a left surround channel, and a right surround channel of a 5.1 channel type. According to the placement position of the first device, it is determined that the channel configuration parameters of the first device include a central channel of a 5.1 channel type. The channel configuration parameters of the first device are adjusted to the central channel. Each second device plays the channel audio data corresponding to the channel based on the channel configuration parameter, and the first device plays the channel audio data corresponding to the central channel based on the central channel, so as to achieve a 5.1 surround sound audio playback effect through the first device and multiple second devices.
[0081] In some embodiments, the audio playback method further includes: adjusting the audio parameters of the first device and the audio parameters of the second device according to the performance parameters of the first device. The audio parameters may include audio frequency parameters and / or channel configuration parameters. The performance parameters may characterize the number of channels of the audio output of the first device. For example, the first device is interconnected with a plurality of second devices, and the first device may include a dedicated sound system. The performance parameters of the first device are obtained, and based on the performance parameters of the first device, the channel configuration parameters of the first device are determined to include a subwoofer channel, a center channel, a left front channel, and a right front channel of a 5.1-channel type. Based on the performance parameters of the first device, it is determined that the channel configuration parameters of the second device include a left surround channel and a right surround channel of a 5.1-channel type. The channel configuration parameters of the first device are adjusted to a subwoofer channel, a center channel, a left front channel, and a right front channel. The second device plays the channel audio data corresponding to the left surround channel and the right surround channel based on the left surround channel and the right surround channel corresponding to the channel configuration parameters. At the same time, the first device plays the channel audio data corresponding to the channel based on the subwoofer channel, the center channel, the left front channel and the right front channel, so as to achieve a 5.1 surround sound audio playback effect through the first device and the second device.
[0082] The method of the embodiment of the present application determines the audio parameters of the second device based on the relative position relationship, and can configure the audio parameters of the external sound system, and the configuration process of the audio parameters is an automated process, without user intervention, which improves the configuration efficiency of the audio parameters. The first device can automatically configure the second device into a bass enhancement system or a surround sound system based on the relative position relationship, and the audio playback method can be applied to a variety of devices and scenarios. The audio playback method is highly flexible, and the first device and the second device can work together to provide a coordinated auditory experience.
[0083] In some embodiments, the processing flow of the audio playback method is shown as follows: Figure 6 ,like Figure 6 As shown, the audio playing method further includes:
[0084] Step S601: determining the audio frequency parameters of the second device based on the relative angle and the relative position.
[0085] Step S602: filtering the audio data based on the audio frequency parameter to obtain filtered audio data.
[0086] Step S603: Transmit the filtered audio data to the corresponding second device, so that the second device plays the filtered audio data based on the frequency corresponding to the audio frequency parameter.
[0087] In this embodiment, the relative angle may include: the angular position of the second device relative to the first device. The relative position may include: the specific position of the second device in space relative to the first device. The relative position may specifically include the distance and orientation of the second device relative to the first device. The filtering process may include: removing or retaining the signal of the set frequency range corresponding to the audio frequency parameter through a filter. The filter may include filters such as a low-pass filter, a high-pass filter, a band-pass filter, and a band-stop filter. The filter may also include other filters, which are not limited in the embodiments of the present application. The frequency corresponding to the audio frequency parameter may include: a set frequency value and a set frequency range.
[0088] As an example, the first device determines that the deflection angle of the second device relative to the center position of the first device is 90°. It is determined that the distance between the second device and the first device is 50cm, and the orientation is to the right of the first device. The relative angle of 90° is greater than the set angle threshold of 30°, and the distance of 50cm of the second device relative to the first device is within the set distance threshold of 2m. It is determined that the audio frequency parameters of the second device include a frequency of 300Hz. The first device filters the audio data based on the frequency of 300Hz to obtain the filtered audio data. The filtered audio data is transmitted to the corresponding second device through the APO algorithm, so that the second device plays the filtered audio data based on the frequency of 300Hz. Among them, the angle threshold and the distance threshold can be set in advance.
[0089] The method of the embodiment of the present application determines the audio frequency parameters of the second device based on the relative position relationship, and can configure the audio frequency parameters of the external sound system, and the configuration process of the audio frequency parameters is an automated process, without user intervention, thereby improving the configuration efficiency of the audio frequency parameters. The first device can automatically configure the second device into a bass enhancement system or a surround sound system based on the relative position relationship, and the audio playback method can be applied to a variety of devices and scenarios. The audio playback method is highly flexible, and the first device and the second device can work together to provide a coordinated auditory experience.
[0090] In some embodiments, the processing flow of the audio playback method is shown as follows: Figure 7 ,like Figure 7 As shown, the audio playing method may further include:
[0091] Step S701: determining channel configuration parameters of the second device based on the relative angle and the relative position.
[0092] Step S702: determining the channel audio data of the channel corresponding to the channel configuration parameter in the audio data.
[0093] Step S703: Transmit the channel audio data to the corresponding second device, so that the second device plays the channel audio data based on the channel corresponding to the channel configuration parameter.
[0094] In this embodiment, the channels corresponding to the channel configuration parameters may include: channels corresponding to the channel types. The channel types may include: 2.1 channel types, 3 channel types, 4 channel types, 5.1 channel types, and 7.1 channel types. Taking 3 channels as an example, the channels corresponding to the channel configuration parameters may specifically include: a left rear channel of a 3-channel type, a right rear channel of a 3-channel type, and left rear and right rear channels of a 3-channel type. The channels corresponding to the channel configuration parameters may also include channels corresponding to other channel types, which is not limited in the embodiments of the present application.
[0095] As an example, the first device determines that the deflection angle of the second device relative to the center position of the first device is 30°. It is determined that the distance between the second device and the first device is 50cm, and the orientation is the right side of the first device. The relative angle of 30° is equal to the set angle threshold of 30°, and the distance of 50cm of the second device relative to the first device is within the set distance threshold of 2m. It is determined that the channel configuration parameters of the second device include a right rear channel of a 3-channel type. The first device determines the channel audio data of the right rear channel of the 3-channel type. The channel audio data of the right rear channel is transmitted to the corresponding second device through the APO algorithm, so that the second device plays the channel audio data based on the right rear channel of the 3-channel type. Among them, the angle threshold and the distance threshold can be set in advance.
[0096] The method of the embodiment of the present application determines the channel configuration parameters of the second device based on the relative position relationship, and can configure the channel configuration parameters of the external sound system, and the configuration process of the channel configuration parameters is an automated process, without user intervention, which improves the configuration efficiency of the channel configuration parameters. The first device can automatically configure the second device into a bass enhancement system or a surround sound system based on the relative position relationship, and the audio playback method can be applied to a variety of devices and scenarios. The audio playback method is highly flexible, and the first device and the second device can work together to provide a coordinated auditory experience.
[0097] refer to Figure 8, an application scenario diagram of the audio playback method provided in an embodiment of the present application, which is applied to the audio synchronization of a laptop computer and a Bluetooth speaker. Among them, the laptop computer may include: an ultrasonic system A1, a platform audio controller port A2, an audio codec A3, an audio signal amplifier A4, a built-in sound system A5 and a microphone array A6. The Bluetooth speaker may include: a Bluetooth module B1, a Bluetooth receiver B2 and a Bluetooth speaker B3. The ultrasonic system A1 of the laptop computer sends control instructions from the platform audio controller port A2 to the built-in sound path of the laptop computer and the audio path of the Bluetooth speaker at the same time through the APO architecture. The built-in sound path of the laptop computer includes: an audio codec A3, an audio signal amplifier A4 and a built-in sound system A5. The audio path of the Bluetooth speaker includes a Bluetooth module B1, a Bluetooth receiver B2 and a Bluetooth speaker B3. The control instruction is used for the built-in sound system A5 to play a first ultrasonic signal at a frequency f1, and the Bluetooth speaker B3 to play a second ultrasonic signal at a frequency f2. In response to the microphone array A6 of the laptop receiving the first ultrasonic signal sent by the built-in sound system A5 and the second ultrasonic signal sent by the Bluetooth speaker B3, the delay time of the audio data played by the Bluetooth speaker relative to the audio data played by the laptop is determined. The delay time is added to the built-in sound path of the laptop through the APO algorithm so that the laptop and the Bluetooth speaker play audio synchronously.
[0098] refer to Fig. 9 , another application scenario diagram of the audio playback method provided in an embodiment of the present application is applied to the audio parameter configuration of a laptop computer and a Bluetooth speaker.
[0099] For the 2.1 channel system, the laptop computer C1 determines that the deflection angle of the Bluetooth speaker D1 relative to the center position of the laptop computer C1 is 90°. It is determined that the distance from the Bluetooth speaker D1 to the laptop computer C1 is 50 cm, and the orientation is the right side of the laptop computer C1. The relative angle of 90° is greater than the set angle threshold of 30°, and the distance of 50 cm from the Bluetooth speaker D1 to the laptop computer C1 is within the set distance threshold of 2 m. It is determined that the audio frequency parameters of the Bluetooth speaker D1 include a frequency of 300 Hz. The laptop computer C1 performs filtering processing on the audio data based on the frequency of 300 Hz to obtain the filtered audio data. The filtered audio data is transmitted to the corresponding Bluetooth speaker D1 through the APO algorithm. According to the relative angle and relative position of the Bluetooth speaker D1 and the laptop computer C1, it is determined that the channel configuration parameters of the Bluetooth speaker D1 include a subwoofer channel of the 2.1 channel type. It is determined that the channel configuration parameters of the laptop computer C1 include a left channel and a right channel. Based on the audio parameters of the laptop computer C1 and the audio parameters of the Bluetooth speaker D1, the laptop computer C1 is controlled to play the channel audio data corresponding to the left channel and the right channel based on the left channel and the right channel corresponding to the channel configuration parameters. At the same time, the Bluetooth speaker D1 plays the channel audio data of a frequency of 300Hz based on the subwoofer channel, so as to realize the audio playback effect of the 2.1 channel system through the laptop computer C1 and the Bluetooth speaker D1.
[0100] For the 3-channel system, the laptop computer C2 determines that the deflection angle of the Bluetooth speaker D2 relative to the center position of the laptop computer C2 is 0°. The distance from the Bluetooth speaker D2 to the laptop computer C2 is determined to be 70 cm, and the orientation is the back side of the laptop computer C2. The relative angle of 0° is within the set angle range of ±30°, and the distance of 70 cm from the Bluetooth speaker D2 to the laptop computer C2 is within the set distance threshold of 2m. It is determined that the channel configuration parameters of the Bluetooth speaker D2 include the left rear channel and the right rear channel of the 3-channel type. The laptop computer C2 determines the channel audio data of the left rear channel and the right rear channel of the 3-channel type. The channel audio data of the left rear channel and the right rear channel are transmitted to the corresponding Bluetooth speaker D2 through the APO algorithm. It is determined that the channel configuration parameters of the laptop computer C2 include the left front channel and the right front channel. Based on the audio parameters of the laptop computer C2 and the audio parameters of the Bluetooth speaker D2, the laptop computer C2 is controlled to play the channel audio data corresponding to the left front channel and the right front channel based on the left front channel and the right front channel corresponding to the channel configuration parameters. At the same time, the Bluetooth speaker D2 plays the channel audio data of the left rear channel and the right rear channel based on the left rear channel and the right rear channel corresponding to the channel configuration parameters, so as to achieve the audio playback effect of the 3-channel system through the laptop computer C2 and the Bluetooth speaker D2.
[0101] The following is a description of an exemplary structure of a software module included in the audio playback device 90 provided in an embodiment of the present application. In some embodiments, for example, Fig.10 As shown, the audio playback device 90 may include: a first parameter determination module 901, used to determine the audio parameters of the first device based on the received first detection wave signal and the second detection wave signal; the first detection wave signal is emitted by the first device, and the second detection wave signal is emitted by the second device, and the first detection wave signal and the second detection wave signal are detection wave signals of the same type but with different frequencies; a position determination module 902, used to determine the relative position relationship between the second device and the first device in response to receiving the second detection wave signal at different time nodes; a second parameter determination module 903, used to determine the audio parameters of the second device based on the relative position relationship; a playback module 904, used to control the first device and the second device to play the audio data to be played based on the audio parameters of the first device and the audio parameters of the second device.
[0102] In some embodiments, the first parameter determination module 901 can also be used to: determine the delay time of the audio data played by the second device relative to the audio data played by the first device in response to receiving a first sound wave signal sent by the first device and a second sound wave signal sent by the second device; and adjust the audio parameters of the first device based on the delay time so that the first device and the second device play audio synchronously.
[0103] In some embodiments, the first parameter determination module 901 can also be used to: determine multiple first time nodes when the first sound wave signal is received; the frequencies of the first sound wave signal and the second sound wave signal are different; perform time analysis on the multiple first time nodes to determine the first reference time nodes corresponding to the multiple first time nodes; determine multiple second time nodes when the second sound wave signal is received; perform time analysis on the multiple second time nodes to determine the second reference time nodes corresponding to the multiple second time nodes; calculate the difference between the second reference time node and the first reference time node to obtain the delay time.
[0104] In some embodiments, the audio playback device 90 may further include an adjustment module, which may be used to: determine the maximum delay time of the audio data played by the multiple second devices relative to the audio data played by the first device in response to receiving a first sound wave signal sent by the first device and multiple second sound wave signals sent by multiple second devices; calculate the second delay time corresponding to each second device based on the maximum delay time; adjust the audio parameters of the first device based on the maximum delay time, and adjust the audio parameters of each second device based on the second delay time, so that the first device plays audio synchronously with the multiple second devices.
[0105] In some embodiments, the second parameter determination module 903 can be used to: determine the relative angle and relative position of the second device relative to the center of the first device based on the relative position relationship; determine the audio parameters of the second device based on the relative angle and relative position; the audio parameters of the second device include audio frequency parameters and / or channel configuration parameters.
[0106] In some embodiments, the second parameter determination module 903 can also be used to: determine the audio frequency parameters of the second device based on the relative angle and relative position; filter the audio data based on the audio frequency parameters to obtain filtered audio data; transmit the filtered audio data to the corresponding second device, so that the second device plays the filtered audio data based on the frequency corresponding to the audio frequency parameters.
[0107] In some embodiments, the second parameter determination module 903 can also be used to: determine the channel configuration parameters of the second device based on the relative angle and relative position; determine the channel audio data of the channel corresponding to the channel configuration parameters in the audio data; and transmit the channel audio data to the corresponding second device so that the second device plays the channel audio data based on the channel corresponding to the channel configuration parameters.
[0108] It should be noted that the description of the device in the embodiment of the present application is similar to the description of the method embodiment described above, and has similar beneficial effects as the method embodiment, so it will not be repeated. Figures 1 to 9 The present invention can be understood by referring to the description of any one of the accompanying drawings.
[0109] According to an embodiment of the present application, the present application also provides an electronic device and a non-transitory computer-readable storage medium.
[0110] Fig.11 A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.
[0111] like Fig.11As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0112] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, etc.; an output unit 807, such as various types of displays, speakers, etc.; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0113] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as an audio playback method. For example, in some embodiments, the audio playback method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via ROM 802 and / or communication unit 809. When the computer program is loaded into RAM 803 and executed by the computing unit 801, one or more steps of the audio playback method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to perform the audio playback method in any other appropriate manner (e.g., by means of firmware).
[0114] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0115] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0116] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0117] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0118] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0119] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0120] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.
[0121] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. An audio playback method, applied to a first device, include: determining an audio parameter of the first device based on the received first detection wave signal and the second detection wave signal; The first detection wave signal is sent by the first device, and the second detection wave signal is sent by the second device, and the first detection wave signal and the second detection wave signal are detection wave signals of the same type but with different frequencies; In response to receiving the second detection wave signal at different time points, determining a relative position relationship between the second device and the first device; Based on the relative position relationship, determining an audio parameter of the second device; Based on the audio parameters of the first device and the audio parameters of the second device, the first device and the second device are controlled to play the audio data to be played.
2. The method according to claim 1, further comprising: include: In response to receiving a first sound wave signal sent by the first device and a second sound wave signal sent by the second device, determining a delay time of audio data played by the second device relative to audio data played by the first device; An audio parameter of the first device is adjusted based on the delay time so that the first device and the second device play audio synchronously.
3. The method according to claim 2, wherein in response to receiving a first sound wave signal sent by the first device and a second sound wave signal sent by the second device, determining a delay time of the audio data played by the second device relative to the audio data played by the first device, include: Determining a plurality of first time nodes at which the first sound wave signal is received; The first sound wave signal and the second sound wave signal have different frequencies; Performing time analysis on the multiple first time nodes to determine first reference time nodes corresponding to the multiple first time nodes; Determining a plurality of second time nodes at which the second sound wave signal is received; Performing time analysis on the multiple second time nodes to determine second reference time nodes corresponding to the multiple second time nodes; The difference between the second reference time node and the first reference time node is calculated to obtain the delay time.
4. The method according to claim 1, further comprising: include: In response to receiving a first sound wave signal sent by a first device and a plurality of second sound wave signals sent by a plurality of second devices, determining a maximum delay time of audio data played by the plurality of second devices relative to the audio data played by the first device; Based on the maximum delay time, calculating the second delay time corresponding to each of the second devices; The audio parameters of the first device are adjusted based on the maximum delay time, and the audio parameters of each of the second devices are adjusted based on the second delay time, so that the first device and multiple second devices play audio synchronously.
5. The method according to claim 1, wherein the audio parameters of the second device are determined based on the relative position relationship. include: Based on the relative position relationship, determining a relative angle and a relative position of the second device relative to a center of the first device; determining an audio parameter of the second device based on the relative angle and the relative position; The audio parameters of the second device include audio frequency parameters and / or channel configuration parameters.
6. The method according to claim 5, further comprising: include: determining an audio frequency parameter of the second device based on the relative angle and the relative position; Performing filtering on the audio data based on the audio frequency parameter to obtain filtered audio data; The filtered audio data is transmitted to the corresponding second device, so that the second device plays the filtered audio data based on the frequency corresponding to the audio frequency parameter.
7. The method according to claim 5, further comprising: include: Determining channel configuration parameters of the second device based on the relative angle and the relative position; Determine channel audio data of a channel corresponding to the channel configuration parameter in the audio data; The channel audio data is transmitted to the corresponding second device, so that the second device plays the channel audio data based on the channel corresponding to the channel configuration parameter.
8. An audio playback device, include: A first parameter determination module, configured to determine an audio parameter of a first device based on the received first detection wave signal and the second detection wave signal; The first detection wave signal is sent by the first device, and the second detection wave signal is sent by the second device, and the first detection wave signal and the second detection wave signal are detection wave signals of the same type but with different frequencies; a position determination module, configured to determine a relative position relationship between the second device and the first device in response to receiving the second detection wave signal at different time nodes; A second parameter determination module, used to determine the audio parameters of the second device based on the relative position relationship; The playing module is used to control the first device and the second device to play the audio data to be played based on the audio parameters of the first device and the audio parameters of the second device.
9. An electronic device, include: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 7.
10. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method according to any one of claims 1 to 7.
