Audio signal output method, electronic device, storage medium, and program product
By accurately measuring the location of the user and dynamically adjusting the speaker and channel ratio, directional output of multi-channel audio signals is achieved, solving the problem of insufficient audio signal output in existing technologies and improving the audio experience.
Patent Information
- Application Number
- CN202411251107.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2044-09-06
AI Technical Summary
Existing audio technologies are inadequate in adjusting audio signal output in real time based on the user's location, resulting in a poor audio experience.
By accurately measuring the position information of the user object relative to the target position, the proportion of the target speaker and its channels is dynamically determined, and the audio signal is intelligently identified and allocated to the corresponding speaker according to the influence angle range of the speaker, so as to realize the directional output of multi-channel audio signals.
It enables personalized audio output based on the location of the user, improving audio positioning accuracy and the listener's immersive listening experience.
Smart Images

Figure CN119136105B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of audio technology, and in particular to an audio signal output method, an electronic device, a storage medium and a program product. BACKGROUND
[0002] The audio technology industry has undergone significant changes with the advent of the digital age. With the popularity of smart homes, virtual reality and mobile devices, the demand for high-quality audio is growing. Consumers not only pursue clear sound quality, but also expect more immersive and personalized listening experiences. Therefore, audio technology is developing towards more intelligent and interactive directions to meet the increasingly diverse market needs.
[0003] The current market audio products are mainly divided into single-channel and stereo systems. The single-channel audio system plays sound through a single speaker, while the stereo system simulates a stereo sound field through left and right speakers, enhancing the depth and direction of the sound, providing users with a more rich listening experience.
[0004] In the prior art, there are problems in adjusting the output of the audio signal in real time according to the position of the user object. SUMMARY
[0005] The embodiments of the present application provide an audio signal output method, an electronic device, a storage medium and a program product, so as to adjust the multi-channel audio signal and output in real time according to the position of the user object, thereby improving the effect of audio experience.
[0006] In a first aspect, the embodiments of the present application provide an audio signal output method, comprising:
[0007] determining position information of a user object relative to a target position;
[0008] determining a target speaker among the speakers, left and right speakers of the target speaker, and the proportion of the target left channel and the proportion of the target right channel in the target speaker according to the position information of the user object relative to the target position, wherein the speakers are located between the user object and the target position;
[0009] determining a left channel speaker and a left surround channel speaker in the left speaker according to the position information of the user object relative to the target position and the influence angle range of the left speaker relative to the target position;
[0010] determining a right channel speaker and a right surround channel speaker in the right speaker according to the position information of the user object relative to the target position and the influence angle range of the right speaker relative to the target position;
[0011] Audio signals are output to the user based on the target left and target right channels in the target speaker, the left channel speaker and left surround channel speaker in the left speaker, and the right channel speaker and right surround channel speaker in the right speaker.
[0012] In one possible implementation, determining the position information of the object relative to the target location includes:
[0013] Determine the reference position relative to the target position, and the azimuth angle formed between the object being used, the target position, and the reference position;
[0014] The location information is determined based on the azimuth angle formed between the object being used, the target location, and the reference location.
[0015] In one possible implementation, based on the position information of the user object relative to the target position, determining the target speaker, the left and right speakers of the target speaker, and the proportion of the target left channel and the proportion of the target right channel in the target speaker, includes:
[0016] Determine the range of the speaker's influence angle relative to the target position;
[0017] Based on the position information of the user relative to the target position and the influence angle range of the speaker relative to the target position, determine the target speaker in the speaker, as well as the proportion of the target left channel and the proportion of the target right channel in the target speaker;
[0018] Based on the position of the target loudspeaker in the loudspeaker, and the proportion of the target left channel and the target right channel in the target loudspeaker, determine the left and right loudspeakers of the target loudspeaker.
[0019] In one possible implementation, determining the range of the speaker's influence angle relative to the target position includes:
[0020] Determine the angle formed between the target location and the two ends of the speaker;
[0021] The range of the speaker's influence angle relative to the target position is determined based on the angle formed between the target position and the two ends of the speaker, and the reference position set relative to the target position.
[0022] In one possible implementation, when the speaker is positioned around the target location,
[0023] Based on the positional information of the user relative to the target location and the influence angle range of the loudspeaker relative to the target location, determine the target loudspeaker, and the proportion of the target left channel and the target right channel within the target loudspeaker, including:
[0024] The target loudspeaker in the loudspeaker is determined based on the azimuth angle representing the location information and the area of influence.
[0025] Based on the azimuth angle representing the location information and the angle formed between the target position and the two ends of the speaker, a first proportional result and a second proportional result are obtained, wherein the second proportional result is the rounded-down result of the first proportional result.
[0026] Based on the first and second ratio results, the proportion of the target left channel and the proportion of the target right channel in the target loudspeaker are obtained.
[0027] In one possible implementation, determining the left and right speakers of the target speaker based on the position of the target speaker in the speaker and the proportion of the target left channel and the proportion of the target right channel in the target speaker includes: determining the initial left and initial right speakers of the target speaker based on the position of the target speaker in the speaker and the proportion of the target left channel and the proportion of the target right channel in the target speaker.
[0028] Based on the orientation relationship between the initial left speaker and the target speaker, determine the left speaker in the initial left speaker;
[0029] Based on the orientation relationship between the initial right speaker and the target speaker, determine the right speaker in the initial right speaker.
[0030] In one possible implementation, when the speaker is positioned around the target location,
[0031] Based on the positional information of the user relative to the target location and the influence angle range of the left speaker relative to the target location, the left channel speaker and the left surround channel speaker in the left speaker are determined, including:
[0032] The target angle is obtained based on the azimuth angle and channel parameter angle representing the position information. The channel parameter angle is determined based on the influence angle range of the left speaker relative to the target position.
[0033] The third proportional result is obtained based on the target angle and the range of influence angles of the left speaker relative to the target position;
[0034] The third ratio result is rounded down to obtain the initial target value;
[0035] The initial target value is updated based on the preset value to obtain the target value;
[0036] Based on the target value and the position of the target speaker in the speaker, determine the left channel speaker and the left surround channel speaker in the left speaker.
[0037] In one possible implementation, an audio signal is output to the user based on the target left and right channels in the target loudspeaker, the left channel speaker and the left surround channel speaker in the left loudspeaker, and the right channel speaker and the right surround channel speaker in the right loudspeaker, including:
[0038] Logarithmic processing is performed on the proportions of the left and right channels of the target loudspeaker to obtain the initial signal values of the left and right channels of the target.
[0039] The left channel signal gain is obtained based on the preset signal parameters and the initial signal value of the target left channel; the right channel signal gain is obtained based on the preset signal parameters and the initial signal value of the target right channel.
[0040] Based on the left channel signal gain, control the left channel speaker and the left surround channel speaker in the left speaker to output the first signal in the audio signal to the user;
[0041] Based on the right channel signal gain, control the right channel speaker and the right surround channel speaker in the right speaker to output the second signal in the audio signal to the user.
[0042] Secondly, embodiments of this application provide an audio signal output device, comprising:
[0043] The first determining module is used to determine the position information of the object relative to the target position;
[0044] The second determining module is used to determine the target speaker, the left speaker and the right speaker of the target speaker, and the proportion of the target left channel and the proportion of the target right channel in the target speaker based on the position information of the user object relative to the target position, wherein the speaker is located between the user object and the target position.
[0045] The third determining module is used to determine the left channel speaker and the left surround channel speaker in the left speaker based on the position information of the user object relative to the target position and the influence angle range of the left speaker relative to the target position.
[0046] The fourth determining module is used to determine the right channel speaker and the right surround channel speaker in the right speaker based on the position information of the user relative to the target position and the influence angle range of the right speaker relative to the target position.
[0047] The output module is used to output audio signals to the user based on the target left and target right channels in the target speaker, the left channel speaker and left surround channel speaker in the left speaker, and the right channel speaker and right surround channel speaker in the right speaker.
[0048] Thirdly, embodiments of this application provide an electronic device, including: a memory and a processor;
[0049] The memory stores instructions that the computer executes;
[0050] The processor executes computer execution instructions stored in memory, causing the processor to perform the first aspect and / or various possible implementations of the first aspect as described above.
[0051] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the first aspect and / or various possible implementations of the first aspect.
[0052] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed by a processor, implements the first aspect and / or various possible implementations of the first aspect.
[0053] This application provides an audio signal output method, electronic device, storage medium, and program product. By locating the position information of the user relative to a target position, it determines a target speaker that matches the user, and the output ratio of the left and right channels of the target speaker. Then, based on the target speaker and the output ratio of the left and right channels of the target speaker, it determines the left and right speakers. After determining the left and right speakers, in order to enhance the stereo experience, it can determine the left channel speaker and left surround channel speaker of the left speaker, and the right channel speaker and right surround channel speaker of the right speaker, based on the azimuth angle of the user relative to the target position and the influence angle range of the left speaker. This enables position-based directional audio output when outputting audio signals to the user, thereby achieving the effect of adjusting and outputting multi-channel audio signals in real time according to the position of the user, thus improving the audio experience. Attached Figure Description
[0054] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.
[0055] Figure 1 A schematic diagram illustrating a scenario for an audio signal output method provided in an embodiment of this application;
[0056] Figure 2 A flowchart illustrating an audio signal output method provided in this application embodiment. Figure 1 ;
[0057] Figure 3A flowchart illustrating an audio signal output method provided in this application embodiment. Figure 2 ;
[0058] Figure 4 A schematic diagram of the scene between the speaker and the target position provided in an embodiment of this application;
[0059] Figure 5 This is a schematic diagram of the structure of the method for outputting audio signals provided in the embodiments of this application;
[0060] Figure 6a This application provides an illustration of an audio signal output method. Figure 1 ;
[0061] Figure 6b This application provides an illustration of an audio signal output method. Figure 2 ;
[0062] Figure 7 This is a schematic diagram of the structure of the audio signal output device provided in the embodiments of this application;
[0063] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application.
[0064] The accompanying drawings illustrate specific embodiments of this application, which will be described in more detail below. These drawings and descriptions are not intended to limit the scope of the concept in any way, but rather to illustrate the concept of this application to those skilled in the art through reference to particular embodiments. Detailed Implementation
[0065] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numbers in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0066] First, let me explain the terms used in this application:
[0067] The audio field refers to the technologies, equipment, and disciplines related to the generation, capture, processing, transmission, and reproduction of sound.
[0068] Audio technology includes not only traditional recording and playback equipment, but also modern digital audio workstations, audio encoding formats, sound recognition and processing algorithms, etc.
[0069] Time difference estimation method: a technique that uses the time difference of a signal arriving at different receiving points to estimate the location of a signal source;
[0070] Triangulation algorithm: A method of determining an unknown location by measuring the distance or angle from two or more observation points at a known location to that unknown location.
[0071] In existing technologies, audio technology has problems in adjusting the audio signal output in real time according to the location of the user.
[0072] This application provides an audio signal output method that dynamically determines the target speaker and the proportion of left and right channels by accurately measuring the position information of the user relative to the target position and combining it with the influence angle range of the speaker relative to the target position. It then intelligently identifies and distributes audio signals to the left and right channel speakers and surround channel speakers in the corresponding left and right speakers. This process not only solves the fixed channel allocation problem in traditional audio systems but also achieves personalized audio output based on the user's actual position, significantly improving the accuracy of audio positioning and the listener's immersive listening experience.
[0073] Figure 1 This is a schematic diagram of a scenario for an audio signal output method provided in an embodiment of this application, such as... Figure 1 As shown in the figure, the audio signal output method provided in this application embodiment can be applied to a speaker. The scenario of this application embodiment includes: a position detection unit, a speaker and an audio output unit, wherein the position detection unit is located at the target position, the speaker is arranged around the position detection unit and is signal-connected to the audio output unit.
[0074] The position detection unit is used to detect the position information of the user object and send the detected position information to the audio output unit. The audio output unit is used to receive the position information of the user object and, based on the position information of the user object, determine the target speaker in the speaker, and, based on the target speaker and the output ratio of the left and right channels in the target speaker, determine the left channel speaker and left surround channel speaker in the left speaker, and the right channel speaker and right surround channel speaker in the right speaker, and send the audio signal to the left channel speaker and left surround channel speaker in the left speaker, and the right channel speaker and right surround channel speaker in the right speaker, so as to play for the user object at the target detection position.
[0075] The execution subject of the audio signal output method provided in this application embodiment can be a device with speakers, and this application embodiment does not limit the device with speakers. As long as the device can determine the position information of the user relative to the target position, and can determine the target speaker, the left speaker and the right speaker of the target speaker, and the proportion of the target left channel and the proportion of the target right channel in the target speaker based on the position information of the user relative to the target position, and can also determine the left channel speaker and the left surround channel speaker in the left speaker based on the position information of the user relative to the target position and the influence angle range of the left speaker relative to the target position, and can determine the right channel speaker and the right surround channel speaker in the right speaker based on the position information of the user relative to the target position and the influence angle range of the right speaker relative to the target position, and can also output audio signals to the user based on the target left channel and the target right channel, the left channel speaker and the left surround channel speaker in the left speaker, and the right channel speaker and the right surround channel speaker in the right speaker, it is sufficient.
[0076] The technical solution of this application and how the technical solution of this application solves the above-mentioned technical problems are described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be described again in some embodiments. The embodiments of this application will now be described with reference to the accompanying drawings.
[0077] Figure 2 A flowchart illustrating an audio signal output method provided in this application embodiment. Figure 1 ,like Figure 2 As shown, the method includes:
[0078] S201. Determine the position information of the object relative to the target position.
[0079] The user can refer to the object in front of the speaker, which is ready to use the speaker. This object can be a person, an animal, or an electronic device.
[0080] The target location can refer to the location used to determine the location of the object being used. The target location can be arbitrarily set as needed. For example, the location can be set behind the speaker. In some embodiments, the target location can be a coordinate point. By determining the distance and direction of the object being used relative to the coordinate point represented by the target location, the location information of the object being used can be determined. In the embodiments of this application, the target location can also refer to the location of the location detection device.
[0081] Location information refers to the position of the object relative to the target location. This location information can be represented by methods such as azimuth. In some embodiments, the location information can be determined by its position in the target coordinate system. After determining the location information, the azimuth of the object relative to the target location can be determined using the coordinate point information. The target coordinate system can be constructed with the target location as its origin.
[0082] Wherein, when the location information is an azimuth angle, in this embodiment of the application, the method for determining the location information of the object relative to the target location may further include:
[0083] Determine the reference position relative to the target position, and the azimuth angle formed between the object being used, the target position, and the reference position;
[0084] The location information is determined based on the azimuth angle formed between the object being used, the target location, and the reference location.
[0085] The reference position can represent any pre-defined direction. A baseline can be determined by the target position and the reference position. For example, when the reference position is to the left of the target position, the baseline extends to the left from the target position.
[0086] After determining the reference position, the azimuth angle can be determined based on a first direction of the object relative to the target position and a second direction of the reference position relative to the target position. That is, the azimuth angle is the angle between the first and second directions, with the target position as the reference point. In some embodiments, the azimuth angle can be determined using the Time Difference of Arrival (TDOA) estimation method and triangulation algorithms.
[0087] In this embodiment, due east can be selected as a fixed reference direction as the reference position. Multiple microphones are arranged to capture ultrasonic signals emitted by the speaker. These signals are received by the microphones after they come into contact with the object and are reflected back. Based on the time difference of the signal reaching different microphones and the speed of sound wave propagation, the distance between the object and each microphone is obtained. Then, using this distance information, the position of the object is accurately determined. Finally, the azimuth angle is obtained based on the position of the object relative to the speaker, which effectively improves the accuracy and efficiency of positioning.
[0088] S202. Based on the position information of the user object relative to the target position, determine the target speaker, the left speaker and the right speaker of the target speaker, and the proportion of the target left channel and the proportion of the target right channel in the target speaker, wherein the speaker is located between the user object and the target position.
[0089] The system can include multiple speakers, and their arrangement can be arbitrary. For example, multiple speakers can be arranged side-by-side on one or more sides of the target location, or they can be arranged in a fan shape on one or more sides of the target location. In this embodiment, multiple speakers can be arranged in a circle around the perimeter of the target location.
[0090] The target speaker can refer to the speaker directly opposite the user, that is, the speaker that is closest to the user in a straight line. The left speaker can refer to the speaker in the area to the left of the target speaker, and the right speaker can refer to the speaker in the area to the right of the target speaker.
[0091] The target left and target right channels of the target loudspeaker can be determined based on the positional relationship between the user and the target loudspeaker. For example, the portion of the target loudspeaker corresponding to the left side of the user is the target left channel, and the portion corresponding to the right side of the user is the target right channel. In this embodiment, since the position information of the user is an azimuth angle, the target left and target right channels of the target loudspeaker can be determined based on the angle and azimuth angle of a third direction. The third direction can be determined based on the direction of the target loudspeaker's location relative to the target position, and the second direction formed by the reference position and the target position.
[0092] In this embodiment, the azimuth angle of the object relative to the target position is first determined. Then, based on the azimuth angle, the target speaker label located between the object and the target position is identified. Next, based on the target speaker label, the left and right speaker labels of the target speaker are determined. Finally, based on the azimuth angle of the object relative to the target speaker, the output ratio of the target left and right audio channels is obtained to optimize the stereo effect.
[0093] S203. Based on the position information of the user relative to the target position and the influence angle range of the left speaker relative to the target position, determine the left channel speaker and the left surround channel speaker in the left speaker;
[0094] S204. Based on the position information of the user relative to the target position and the influence angle range of the right speaker relative to the target position, determine the right channel speaker and the right surround channel speaker in the right speaker.
[0095] The influence angle range refers to the signal output range of a loudspeaker relative to the target position. For example, when there are eight loudspeakers arranged around the target position, the influence angle range of each loudspeaker can be 360° / 8 = 45°. If the side of any one of the eight loudspeakers is taken as the reference position, then in a clockwise direction, the influence angle range of the first loudspeaker is 0 to 45°, the influence angle range of the second loudspeaker is 45 to 90°, the influence angle range of the third loudspeaker is 90 to 135°, and so on, until the influence angle range of the eighth loudspeaker is 315 to 360°. The direction of 0° is the same as the direction of 360°.
[0096] The left channel speaker in the left speaker can refer to the speaker located to the left of the user and is used to play the left channel audio signal, while the left surround channel speaker can refer to the speaker located to the left of the user and is responsible for playing the left surround channel audio signal. It is usually placed on the left rear of the listening area.
[0097] The right channel speaker in the right speaker refers to the speaker located to the right of the user, which is responsible for playing the right channel audio signal. The right surround channel speaker refers to the speaker located to the right of the user, which is responsible for playing the right surround channel audio signal. It is usually placed to the right rear of the listening area.
[0098] In this embodiment of the application, when the speaker is positioned around the target location...
[0099] Based on the positional information of the user relative to the target location and the influence angle range of the left speaker relative to the target location, the left channel speaker and the left surround channel speaker in the left speaker are determined, including:
[0100] The target angle is obtained based on the azimuth angle and channel parameter angle representing the position information. The channel parameter angle is determined based on the influence angle range of the left speaker relative to the target position.
[0101] The third proportional result is obtained based on the target angle and the range of influence angles of the left speaker relative to the target position;
[0102] The third ratio result is rounded down to obtain the initial target value;
[0103] The initial target value is updated based on the preset value to obtain the target value;
[0104] Based on the target value and the position of the target speaker in the speaker, determine the left channel speaker and the left surround channel speaker in the left speaker.
[0105] The channel parameter angle can refer to the signal output range of the left speaker. In this embodiment, when the influence angle range of each speaker is α = 45° and the left surround channel speaker is determined, the channel parameter angle is 2α. Rounding down can refer to discarding the decimal part of a number and keeping only the integer part, and the integer part is not greater than the original number.
[0106] The preset value can refer to a preset parameter. For example, if the target speaker is speaker number 3, starting from the left would lead to the conclusion that the target speaker is speaker number 1. To eliminate this possibility, adding 1 ensures that the result correctly reflects the speaker's position. The initial target value is updated by summing it with the preset value to obtain the target value. The target value satisfies the following formula:
[0107] n" = [(θ±90°) / α]+1;
[0108] In the formula, n" refers to the speakers corresponding to the left and right surround channels, θ is the azimuth angle of the object being used, 90° is the channel parameter angle at this time, α is the range of the influence angle of the target position, and [] is rounded down.
[0109] In this embodiment, when determining the left channel speaker and left surround channel speaker in the left speaker, the target angle is determined based on the azimuth angle of the user and the channel parameter angle. Then, a proportional result is obtained based on the target angle and the influence range of the speakers. This proportional result is rounded down to obtain the initial target value, and then adjusted according to a preset value to obtain the final target value. Thus, the channel speakers and surround channel speakers in the left and right speakers can be determined, ensuring correct audio signal distribution and providing a surround sound experience.
[0110] S205. Based on the target left and target right channels in the target speaker, the left channel speaker and left surround channel speaker in the left speaker, and the right channel speaker and right surround channel speaker in the right speaker, output an audio signal to the user.
[0111] Audio signals can refer to audio played by speakers or musical instruments, or to abnormal noise from broadcasts, telephone communications, or machines.
[0112] In this embodiment of the application, the audio signal is output to the user based on the target left and right channels of the target loudspeaker, the left channel speaker and the left surround channel speaker of the left loudspeaker, and the right channel speaker and the right surround channel speaker of the right loudspeaker, including:
[0113] Logarithmic processing is performed on the proportions of the left and right channels of the target loudspeaker to obtain the initial signal values of the left and right channels of the target.
[0114] The left channel signal gain is obtained based on the preset signal parameters and the initial signal value of the target left channel; the right channel signal gain is obtained based on the preset signal parameters and the initial signal value of the target right channel.
[0115] Based on the left channel signal gain, control the left channel speaker and the left surround channel speaker in the left speaker to output the first signal in the audio signal to the user;
[0116] Based on the right channel signal gain, control the right channel speaker and the right surround channel speaker in the right speaker to output the second signal in the audio signal to the user.
[0117] The initial signal value can refer to the value obtained by logarithmically processing the proportions of the left and right channels of the target loudspeaker.
[0118] Left channel signal gain refers to adjusting the intensity of the audio signal output by the left channel speaker;
[0119] Right channel signal gain refers to adjusting the strength of the audio signal output by the right channel speaker;
[0120] The first signal can refer to the audio signal output to the user by the left channel speaker and the left surround channel speaker in the left speaker after the gain of the left channel signal is adjusted.
[0121] The second signal can refer to the audio signal output to the user by the right channel speaker and the right surround channel speaker in the right speaker after the right channel signal gain is adjusted.
[0122] This application provides an audio signal output method that determines the specific position information of the user relative to a target location through precise measurement. Then, based on this position information, the target speaker—the speaker most directly facing the user—and its left and right speakers are identified. Next, the proportions of the target left and right channels in the target speaker are obtained, which determines the distribution ratio of the audio signal in the left and right channels. Further, based on the user's position and the influence angle range of the left speaker, the roles and importance of the left channel speaker and the left surround channel speaker in the left speaker are determined; the same method applies to the right channel speaker and the right surround channel speaker in the right speaker. Finally, a precisely adjusted audio signal is output to the user, ensuring that the audio signals of the left and right channels are appropriately amplified or attenuated according to their positions in the speaker array and their relative position to the user. This process achieves directional output of the audio signal, optimizes the stereo effect, provides a richer and more accurate auditory experience, and achieves consistent sound quality and sound field effects across different locations, greatly improving the adaptability of the audio system and the user experience.
[0123] Figure 3 A flowchart illustrating an audio signal output method provided in this application embodiment. Figure 2 ,like Figure 3 As shown, in this embodiment... Figure 2 Based on the embodiments, a detailed description is provided of an audio signal output method that determines, according to the position information of the user relative to the target position, the target speaker, the left and right speakers of the target speaker, and the proportions of the target left and right channels in the target speaker. The method includes:
[0124] S301. Determine the angle formed between the target position and the two ends of the speaker.
[0125] The two ends of the speaker can refer to the positions of the two receivers on the speaker used to receive signals. The positions of these receivers can be set on both sides of the speaker to characterize the influence angle range of the speaker. That is, when the influence angle range is 0 to 45°, one receiver is located at 0° and the other receiver is located at 45°.
[0126] S302 determines the range of the speaker's influence angle relative to the target position based on the angle formed between the target position and the two ends of the speaker, and the reference position set relative to the target position;
[0127] S303. Based on the position information of the user object relative to the target position and the influence angle range of the speaker relative to the target position, determine the target speaker in the speaker, as well as the proportion of the target left channel and the proportion of the target right channel in the target speaker.
[0128] Among them, the proportion of the target right channel in the target loudspeaker satisfies:
[0129] τ = θ / α - [θ / α];
[0130] Where τ refers to the proportion of the target right channel in the target loudspeaker, θ is the azimuth angle, α is the range of the influence angle of the loudspeaker relative to the target position, and [] is rounded down.
[0131] The target left channel accounts for 1-τ of the target loudspeaker.
[0132] S304. Based on the position of the target loudspeaker in the loudspeaker and the proportion of the target left channel and the target right channel in the target loudspeaker, determine the initial left loudspeaker and the initial right loudspeaker of the target loudspeaker.
[0133] S305. Based on the orientation relationship between the initial left speaker and the target speaker, determine the left speaker in the initial left speaker;
[0134] S306. Based on the orientation relationship between the initial right speaker and the target speaker, determine the right speaker in the initial right speaker.
[0135] The orientation relationship between the initial left speaker and the target speaker can refer to the relationship between the direction of audio output and the direction of output of the target speaker. For example, when the initial right speaker and the target speaker are in the same orientation, the initial right speaker is within the range of the right speaker. When the initial right speaker and the target speaker are in opposite orientations, the initial right speaker is not within the range of the right speaker.
[0136] In this embodiment of the application, when the speaker is positioned around the target location...
[0137] Based on the positional information of the user relative to the target location and the influence angle range of the loudspeaker relative to the target location, determine the target loudspeaker within the loudspeaker, and the proportions of the target left and right channels within the target loudspeaker, including:
[0138] The target loudspeaker in the loudspeaker is determined based on the azimuth angle representing the location information and the area of influence.
[0139] Based on the azimuth angle representing the location information and the angle formed between the target position and the two ends of the speaker, a first proportional result and a second proportional result are obtained, wherein the second proportional result is the rounded-down result of the first proportional result.
[0140] Based on the first and second ratio results, the proportion of the target left channel and the proportion of the target right channel in the target loudspeaker are obtained.
[0141] The first ratio result can refer to the influence of the azimuth angle on the speaker output. In this embodiment, it is obtained by using the ratio of the azimuth angle and the angle formed between the target position and the two ends of the speaker. The second ratio result is the result of the first ratio result after rounding down.
[0142] The target loudspeaker satisfies:
[0143] n = [θ / α] + 1;
[0144] Where n can refer to the target loudspeaker, θ / α can refer to the first proportional result, [] represents rounding down, and [θ / α] can refer to the second proportional result.
[0145] This application provides an audio signal output method that, by measuring the angle formed by the target position and the two ends of the speaker and determining the range of the speaker's influence angle relative to the target position, and combining this with the specific positional information of the user relative to the target position, can accurately identify the target speaker and the audio proportions of the target left and right channels within it. Furthermore, based on the position of the target speaker and the proportion of the left and right channels, initial left and right speakers are determined, and through their positional relationship with the target speaker, the left channel speaker in the left speaker and the right channel speaker in the right speaker are precisely identified. This process not only optimizes the directional output of the audio signal but also achieves precise control of the stereo effect, thereby providing an intelligent system that dynamically adjusts the audio output according to the listener's position, significantly improving the accuracy of audio positioning and the listener's auditory experience.
[0146] Figure 4 This is a schematic diagram of the scene between the speaker and the target position provided in an embodiment of this application, such as... Figure 4 As shown, the scene includes eight arcs, each arc corresponding to a speaker. Each speaker has a corresponding number, from 1 to 8. In this embodiment, eight speakers are arranged in a ring, with due east as the fixed reference direction and the azimuth angle corresponding to due east being 0°. Speaker 1 corresponds to 0-45°, speaker 2 corresponds to 45-90°, speaker 3 corresponds to 90-135°, and so on, until speaker 8 corresponds to 315-360°. The direction of 0° is the same as the direction of 360°. The user is standing facing speaker #3. α represents the area occupied by each speaker, and θ is the angle of the user's position. In this example, θ is assumed to be 120°. The left channel speaker includes the left channel speaker of speaker #3 and speaker #4. The left surround channel speaker includes speaker #5. The right channel speaker includes the right channel speaker of speaker #3 and speaker #2. The right surround channel speaker includes speaker #1. Speakers #6, #7, and #8 are not used because they are facing away from the user, thus avoiding resource waste.
[0147] Figure 5 This is a schematic diagram of the structure of the method for outputting audio signals provided in the embodiments of this application, as shown below. Figure 5As shown, the structure includes: taking a two-channel setup as an example, multiple microphones are provided, denoted as MIC1, MIC2, MIC3, etc., to capture ultrasonic signals emitted by the speakers, which then come into contact with objects and are reflected back. The SOC (System on Chip), acting as the central control unit, receives data from each microphone after it has been processed by the codec. It then uses Time Difference of Occurrence (TDOA) estimation and triangulation algorithms to perform position identification, accurately calculating the listener's position. The obtained position information is then sent to the audio output unit via communication protocols such as I2S (L&R) and I2C. The left and right channels are then divided and output to multiple speakers, denoted as SPK1, SPK2, SPK3, etc., enabling the speakers to produce sound.
[0148] Figure 6a This application provides an illustration of an audio signal output method. Figure 1 ,like Figure 6a As shown, taking left and right channels as an example, they are represented as Left Channel and Right Channel respectively. SPK1 and SPK2 represent speaker 1 and speaker 2. By setting the gain value to adjust the left and right channel signals, it can be seen that speakers 1 and 2 are the right channels. Therefore, the left channel signal input to these two speakers is shielded and given a gain value of -110dB, while the left channel signal is set to 0dB to make the signal pass through.
[0149] Figure 6b This application provides an illustration of an audio signal output method. Figure 2 ,like Figure 6b As shown, taking left and right channels as an example, they are represented as Left Channel and Right Channel respectively. SPK3 and SPK4 represent speakers 3 and 4. Speaker 3 is the speaker directly in front of the user. The left channel signal accounts for 1 / 3, and the right channel signal accounts for 2 / 3. Therefore, a gain of 20lg(1 / 3) = -9.5dB is given to the left channel signal, while the gain of the right channel signal is 20lg(2 / 3) = -3.5dB. Speaker 4 belongs to the left channel, and a gain of 0dB is given to the left channel signal to allow the signal to pass through, while a gain of -110dB is given to the right channel signal for shielding. In this embodiment, the target left and right channels are first logarithmically processed to obtain initial signal values, reflecting the relative intensity of the channels. Then, the gain of the left and right channels is calculated based on preset parameters and initial values, and the output intensity of the corresponding speakers is adjusted. Finally, the left and right channel signals are controlled according to the gain values to ensure directional output of the audio signal and provide an optimized listening experience. This process achieves audio positioning effect through precise adjustment.
[0150] Figure 7This is a schematic diagram of the structure of the audio signal output device provided in the embodiments of this application, as shown below. Figure 7 As shown, the audio signal output device 70 provided in this embodiment includes:
[0151] The first determining module 701 is used to determine the position information of the object relative to the target position;
[0152] The second determining module 702 is used to determine the target speaker, the left speaker and the right speaker of the target speaker, and the proportion of the target left channel and the proportion of the target right channel in the target speaker according to the position information of the user object relative to the target position, wherein the speaker is located between the user object and the target position.
[0153] The third determining module 703 is used to determine the left channel speaker and the left surround channel speaker in the left speaker based on the position information of the user object relative to the target position and the influence angle range of the left speaker relative to the target position.
[0154] The fourth determining module 704 is used to determine the right channel speaker and the right surround channel speaker in the right speaker based on the position information of the user object relative to the target position and the influence angle range of the right speaker relative to the target position.
[0155] The output module 705 is used to output audio signals to the user based on the target left and target right channels in the target speaker, the left channel speaker and the left surround channel speaker in the left speaker, and the right channel speaker and the right surround channel speaker in the right speaker.
[0156] In one possible implementation, the first determining module 701 can also be specifically used for:
[0157] Determine the reference position relative to the target position, and the azimuth angle formed between the object being used, the target position, and the reference position;
[0158] The location information is determined based on the azimuth angle formed between the object being used, the target location, and the reference location.
[0159] In one possible implementation, the second determining module 702 can also be specifically used for:
[0160] Determine the range of the speaker's influence angle relative to the target position;
[0161] Based on the position information of the user relative to the target position and the influence angle range of the speaker relative to the target position, determine the target speaker in the speaker, as well as the proportion of the target left channel and the proportion of the target right channel in the target speaker;
[0162] Based on the position of the target loudspeaker in the loudspeaker, and the proportion of the target left channel and the target right channel in the target loudspeaker, determine the left and right loudspeakers of the target loudspeaker.
[0163] In one possible implementation, the second determining module 702 may also be specifically used to: determine the angle formed between the target position and the two ends of the speaker;
[0164] The range of the speaker's influence angle relative to the target position is determined based on the angle formed between the target position and the two ends of the speaker, and the reference position set relative to the target position.
[0165] In one possible implementation, when the speaker is positioned around the target location, the second determining module 702 can also be specifically used for:
[0166] The target loudspeaker in the loudspeaker is determined based on the azimuth angle representing the location information and the area of influence.
[0167] Based on the azimuth angle representing the location information and the angle formed between the target position and the two ends of the speaker, a first proportional result and a second proportional result are obtained, wherein the second proportional result is the rounded-down result of the first proportional result.
[0168] Based on the first and second ratio results, the proportion of the target left channel and the proportion of the target right channel in the target loudspeaker are obtained.
[0169] In one possible implementation, the second determining module 702 can also be specifically used for:
[0170] Based on the position of the target loudspeaker in the loudspeaker and the proportion of the target left channel and the target right channel in the target loudspeaker, determine the initial left loudspeaker and the initial right loudspeaker of the target loudspeaker.
[0171] Based on the orientation relationship between the initial left speaker and the target speaker, determine the left speaker in the initial left speaker;
[0172] Based on the orientation relationship between the initial right speaker and the target speaker, determine the right speaker in the initial right speaker.
[0173] In one possible implementation, when the speaker is positioned around the target location, the third determining module 703 can also be specifically used for:
[0174] The target angle is obtained based on the azimuth angle and channel parameter angle representing the position information. The channel parameter angle is determined based on the influence angle range of the left speaker relative to the target position.
[0175] The third proportional result is obtained based on the target angle and the range of influence angles of the left speaker relative to the target position;
[0176] The third ratio result is rounded down to obtain the initial target value;
[0177] The initial target value is updated based on the preset value to obtain the target value;
[0178] Based on the target value and the position of the target speaker in the speaker, determine the left channel speaker and the left surround channel speaker in the left speaker.
[0179] In one possible implementation, the output module 705 can also be specifically used for:
[0180] Logarithmic processing is performed on the proportions of the left and right channels of the target loudspeaker to obtain the initial signal values;
[0181] The signal gain of the left channel is obtained based on the preset signal parameters and the initial signal value of the left channel; the signal gain of the right channel is obtained based on the preset signal parameters and the initial signal value of the right channel.
[0182] Based on the left channel signal gain, control the left channel speaker and the left surround channel speaker in the left speaker to output the first signal in the audio signal to the user;
[0183] Based on the right channel signal gain, control the right channel speaker and the right surround channel speaker in the right speaker to output the second signal in the audio signal to the user.
[0184] The audio signal output device provided in this embodiment can execute the method provided in the above method embodiment. Its implementation principle and technical effect are similar, and will not be described in detail here.
[0185] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Figure 8 As shown, the electronic device 80 provided in this embodiment includes at least one processor 801 and a memory 802. Optionally, the device 80 further includes a communication component 803. The processor 801, memory 802, and communication component 803 are connected via a bus 804.
[0186] In a specific implementation, at least one processor 801 executes computer execution instructions stored in memory 802, causing at least one processor 801 to perform the above-described method.
[0187] The specific implementation process of processor 801 can be found in the above method embodiments, and its implementation principle and technical effect are similar. It will not be repeated here.
[0188] In the above embodiments, it should be understood that the processor can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), etc. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the method disclosed in this invention can be directly implemented by a hardware processor, or implemented by a combination of hardware and software modules within the processor.
[0189] The memory may include random access memory (RAM) and may also include non-volatile memory (NVM), such as at least one disk storage device.
[0190] The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. Buses can be categorized as address buses, data buses, control buses, etc. For ease of illustration, the buses shown in the accompanying drawings are not limited to a single bus or a single type of bus.
[0191] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the above-described method.
[0192] This application also provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the above-described method.
[0193] The aforementioned readable storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk. The readable storage medium can be any available medium accessible to a general-purpose or special-purpose computer.
[0194] An exemplary readable storage medium is coupled to a processor, enabling the processor to read information from and write information to the readable storage medium. Of course, the readable storage medium can also be a component of the processor. The processor and the readable storage medium can reside in an Application Specific Integrated Circuit (ASIC). Alternatively, the processor and the readable storage medium can exist as discrete components in the device.
[0195] The division of units is merely a logical functional division; in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0196] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0197] In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0198] If a function is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0199] Those skilled in the art will understand that all or part of the steps of the above-described method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When executed, the program performs the steps of the above-described method embodiments; and the aforementioned storage medium includes various media capable of storing program code, such as ROM, RAM, magnetic disks, or optical disks.
[0200] Finally, it should be noted that other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not disclosed herein, and is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
Claims
1. An audio signal output method characterized by, The method comprises: determining position information of a user relative to a target position; the position information is an azimuth angle of the user relative to the target position; determining an influencing angle range of a speaker relative to the target position; determining a target speaker in the speaker, and a proportion of a target left channel and a proportion of a target right channel in the target speaker according to the position information of the user relative to the target position and the influencing angle range of the speaker relative to the target position, determining a left speaker and a right speaker of the target speaker according to a position of the target speaker in the speaker and the proportion of the target left channel and the proportion of the target right channel in the target speaker, wherein the speaker is located between the user and the target position, and the target speaker refers to a speaker directly facing the user; determining a left channel speaker and a left surround channel speaker in the left speaker according to the position information of the user relative to the target position and an influencing angle range of the left speaker relative to the target position; determining a right channel speaker and a right surround channel speaker in the right speaker according to the position information of the user relative to the target position and an influencing angle range of the right speaker relative to the target position; outputting an audio signal to the user according to the target left channel and the target right channel in the target speaker, the left channel speaker and the left surround channel speaker in the left speaker, and the right channel speaker and the right surround channel speaker in the right speaker.
2. The method of claim 1, wherein, The method comprises: determining a reference position opposite to the target position, and an azimuth angle formed by the user, the target position and the reference position; determining the position information according to the azimuth angle formed by the user, the target position and the reference position.
3. The method of claim 1, wherein, The method comprises: determining an included angle formed by the target position and two ends of the speaker; determining the influencing angle range of the speaker relative to the target position according to the included angle formed by the target position and two ends of the speaker, and a reference position opposite to the target position.
4. The method of claim 1, wherein, When the speaker is arranged around the target position, the method comprises: determining the target speaker in the speaker according to the azimuth angle representing the position information and an influencing area of the speaker; obtaining a first proportion result and a second proportion result according to the azimuth angle representing the position information and the included angle formed by the target position and two ends of the speaker, wherein the second proportion result is a downward integer result of the first proportion result. According to the first proportion result and the second proportion result, a proportion of a target left channel and a proportion of a target right channel in the target speaker are obtained.
5. The method of claim 1, wherein, The determining the left side speaker and the right side speaker of the target speaker according to the position of the target speaker in the speaker and the proportion of the target left channel and the proportion of the target right channel in the target speaker comprises: The determining the initial left side speaker and the initial right side speaker of the target speaker according to the position of the target speaker in the speaker and the proportion of the target left channel and the proportion of the target right channel in the target speaker comprises: The determining the left side speaker in the initial left side speaker according to the positional relationship between the initial left side speaker and the target speaker comprises: The determining the right side speaker in the initial right side speaker according to the positional relationship between the initial right side speaker and the target speaker comprises:
6. The method of claim 1, wherein, When the speaker is arranged around the target position, The determining the left channel speaker and the left surround channel speaker in the left side speaker according to the position information of the use object relative to the target position and the influence angle range of the left side speaker relative to the target position comprises: According to an azimuth angle and a channel parameter angle representing the position information, a target angle is obtained, and the channel parameter angle is determined according to the influence angle range of the left side speaker relative to the target position. According to the target angle and the influence angle range of the left side speaker relative to the target position, a third proportion result is obtained. The third proportion result is subjected to a down-round processing to obtain an initial target value. The initial target value is updated according to a preset value to obtain a target value. The left channel speaker and the left surround channel speaker in the left side speaker are determined according to the target value and the position of the target speaker in the speaker.
7. The method of claim 1, wherein, The outputting the audio signal to the use object according to the target left channel and the target right channel in the target speaker, the left channel speaker and the left surround channel speaker in the left side speaker, and the right channel speaker and the right surround channel speaker in the right side speaker comprises: The proportion of the target left channel and the proportion of the target right channel in the target speaker are subjected to logarithmic processing respectively to obtain an initial signal value of the target left channel and an initial signal value of the target right channel. According to a preset signal parameter and the initial signal value of the target left channel, a left channel signal gain is obtained, and according to a preset signal parameter and the initial signal value of the target right channel, a right channel signal gain is obtained. The left channel speaker and the left surround channel speaker in the left side speaker are controlled to output a first signal in the audio signal to the use object according to the left channel signal gain. The right channel speaker and the right surround channel speaker in the right side speaker are controlled to output a second signal in the audio signal to the use object according to the right channel signal gain.
8. An electronic device, comprising: comprise: a memory and a processor; the memory stores computer execution instructions; The processor executes computer-executable instructions stored in the memory such that the processor performs the method of any of claims 1-7.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions that, when executed by a processor, perform the method of any of claims 1-7.
Citation Information
Patent Citations
Intelligent perception radar interaction method and system applied to television
CN115103143A
Sound box control method and device, sound box and storage medium
CN118338201A