Audio signal output method, electronic device, storage medium and program product
By identifying the location information of the usage object and dynamically adjusting the channel allocation of the speaker, the directional output of the audio signal is realized, improving the audio experience effect, and solving the problem that the audio signal output in the prior art is not suitable for the user's location.
Patent Information
- Application Number
- CN202411251107.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-06
- Publication Date
- 2024-12-13
- Estimated Expiration
- 2044-09-06
AI Technical Summary
Existing audio technologies are difficult to adjust the audio signal output in real time according to the location of the object used, resulting in poor audio experience.
By determining the position information of the usage object relative to the target position, dynamically determine the proportion of the target speaker and its left and right channels, and identify the left and right channels of the left and right speakers and surround channels in the left and right speakers according to the influence angle range. Speaker, implementing position-based directional audio output.
It significantly improves the accuracy of audio positioning and the audience's immersive auditory experience, provides personalized audio output, and solves the problem of fixed channel allocation in traditional audio systems.
Smart Images

Figure CN119136105A_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, electronic equipment, storage medium and program product. Background Art
[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 a more immersive and personalized listening experience. Therefore, audio technology is developing in a smarter and more interactive direction to meet the increasingly diverse market needs.
[0003] The speaker products on the current market are mainly divided into mono and stereo systems. The mono audio system plays sound through a single speaker, while the stereo system simulates a stereo field through two left and right speakers, enhancing the depth and direction of the sound, providing users with a richer auditory enjoyment.
[0004] In the prior art, audio technology has problems in adjusting the output of audio signals according to the position of the user in real time. Summary of the invention
[0005] The embodiments of the present application provide an audio signal output method, an electronic device, a storage medium, and a program product, which are used to adjust and output multi-channel audio signals in real time according to the position of the user, thereby improving the audio experience.
[0006] In a first aspect, an embodiment of the present application provides an audio signal output method, comprising:
[0007] Determining the position information of the use object relative to the target position;
[0008] Determine, according to the position information of the user object relative to the target position, a target speaker among the speakers, a left speaker and a right speaker of the target speaker, and a proportion of a target left channel and a proportion of a target right channel among the target speakers, wherein the speaker is located between the user object and the target position;
[0009] Determine a left channel speaker and a left surround channel speaker among the left speakers according to the position information of the object relative to the target position and the influence angle range of the left speaker relative to the target position;
[0010] Determine a right channel speaker and a right surround channel speaker among the right speakers according to the position information of the 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 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.
[0012] In a possible implementation, determining the position information of the use object relative to the target position includes:
[0013] determining a reference position set relative to the target position, and an azimuth angle formed between the object, the target position and the reference position;
[0014] The position information is determined based on the azimuth angle formed between the object, the target position and the reference position.
[0015] In a possible implementation, determining a target speaker, a left speaker and a right speaker of the target speaker, and a proportion of a target left channel and a proportion of a target right channel in the target speaker according to position information of the object relative to the target position includes:
[0016] Determine the angular range of influence of the loudspeaker relative to the target position;
[0017] Determine a target speaker among the speakers, and a proportion of a target left channel and a proportion of a target right channel among the target speakers according to position information of the object relative to the target position and an influence angle range of the speaker relative to the target position;
[0018] A left speaker and a right speaker of the target speaker are determined according to a position of the 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.
[0019] In a possible implementation, determining the influence angle range of the speaker relative to the target position includes:
[0020] Determine the angle between the target position and the two ends of the speaker;
[0021] The influence angle range of the loudspeaker relative to the target position is determined according to the angle formed between the target position and two ends of the loudspeaker, and a reference position set relative to the target position.
[0022] In a possible implementation, when the speakers are arranged around the target position,
[0023] According to the position information of the object relative to the target position and the influence angle range of the speaker relative to the target position, a target speaker among the speakers, and a proportion of a target left channel and a proportion of a target right channel among the target speakers are determined, including:
[0024] Determine a target speaker among the speakers according to the azimuth representing the position information and the influence area;
[0025] According to the azimuth representing the position information and the angle formed between the target position and two ends of the loudspeaker, a first proportional result and a second proportional result are obtained, wherein the second proportional result is a result of rounding down the first proportional result;
[0026] According to the first ratio result and the second ratio result, the proportion of the target left channel and the proportion of the target right channel in the target speaker are obtained.
[0027] In a possible implementation, determining a left speaker and a right speaker of a target speaker according to a position of the 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, includes: determining an initial left speaker and an initial right speaker of the target speaker according to the position of the 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;
[0028] Determine a left speaker among the initial left speakers according to the azimuth relationship between the initial left speaker and the target speaker;
[0029] The right speaker among the initial right speakers is determined according to the azimuth relationship between the initial right speaker and the target speaker.
[0030] In a possible implementation, when the speakers are arranged around the target position,
[0031] According to the position information of the object relative to the target position and the influence angle range of the left speaker relative to the target position, a left channel speaker and a left surround channel speaker in the left speaker are determined, including:
[0032] A target angle is obtained according to the azimuth angle representing the position information and the channel parameter angle, wherein the channel parameter angle is determined according to the influence angle range of the left speaker relative to the target position;
[0033] Obtaining a third proportional result according to the target angle and the influence angle range of the left speaker relative to the target position;
[0034] The third ratio result is rounded down to obtain an initial target value;
[0035] According to the preset value, the initial target value is updated to obtain the target value;
[0036] A left channel speaker and a left surround channel speaker in the left speaker are determined according to the target value and the position of the target speaker in the speaker.
[0037] In a possible implementation, outputting an audio signal to a user according to a target left channel and a target right channel in a target speaker, a left channel speaker and a left surround channel speaker in a left speaker, and a right channel speaker and a right surround channel speaker in a right speaker includes:
[0038] Performing logarithmic processing on the proportion of the target left channel and the proportion of the target right channel in the target speaker, respectively, to obtain an initial signal value of the target left channel and an initial signal value of the target right channel;
[0039] According to the preset signal parameters and the initial signal value of the target left channel, a left channel signal gain is obtained, and according to the preset signal parameters and the initial signal value of the target right channel, a right channel signal gain is obtained;
[0040] According to the left channel signal gain, controlling 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] According to the right channel signal gain, a right channel speaker and a right surround channel speaker among right speakers are controlled to output a second signal among the audio signals to a user.
[0042] In a second aspect, an embodiment of the present application provides an audio signal output device, comprising:
[0043] A first determining module, used to determine the position information of the use object relative to the target position;
[0044] A second determination module is used to determine a target speaker, a left speaker and a right speaker of the target speaker, and a proportion of a target left channel and a proportion of a target right channel in the target speaker according to 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] A third determination module is used to determine a left channel speaker and a left surround channel speaker in the left speaker according to the position information of the use object relative to the target position and the influence angle range of the left speaker relative to the target position;
[0046] a fourth determination module, configured to determine a right channel speaker and a right surround channel speaker among the right speakers according to the position information of the use object 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 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.
[0048] In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor;
[0049] Memory stores computer-executable instructions;
[0050] The processor executes the computer-executable instructions stored in the memory, so that the processor executes the above first aspect and / or various possible implementations of the first aspect.
[0051] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the first aspect above and / or various possible implementations of the first aspect.
[0052] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the above first aspect and / or various possible implementation methods of the first aspect.
[0053] An audio signal output method, electronic device, storage medium and program product provided by the embodiments of the present application determine a target speaker matching the user object and the output ratio of the left channel and the right channel in the target speaker by locating the position information of the user object relative to the target position, and then determine the left speaker and the right speaker according to the target speaker and the output ratio of the left channel and the right channel in the target speaker. After determining the left speaker and the right speaker, in order to enhance the stereo experience, 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 can be determined according to the azimuth of the user object relative to the target position and the influence angle range of the left speaker, so that when the audio signal is output to the user object, position-based directional audio output can be achieved, thereby achieving the effect of adjusting and outputting multi-channel audio signals in real time according to the position of the user object, thereby improving the audio experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0055] Figure 1 A schematic diagram of a scenario of an audio signal output method provided in an embodiment of the present application;
[0056] Figure 2 A schematic diagram of a method for outputting an audio signal provided in an embodiment of the present application Figure 1 ;
[0057] Figure 3A schematic diagram of a method for outputting an audio signal provided in an embodiment of the present application Figure 2 ;
[0058] Figure 4 A schematic diagram of a scene of a speaker and a target position provided in an embodiment of the present application;
[0059] Figure 5 A structural diagram of a method for outputting an audio signal provided in an embodiment of the present application;
[0060] Figure 6a A schematic diagram of an audio signal output method is provided for an embodiment of the present application Figure 1 ;
[0061] Figure 6b A schematic diagram of an audio signal output method is provided for an embodiment of the present application Figure 2 ;
[0062] Figure 7 A schematic diagram of the structure of an audio signal output device provided in an embodiment of the present application;
[0063] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0064] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0065] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0066] First, the terms involved in this application are explained:
[0067] Audio field: refers to the technologies, equipment and disciplines related to the generation, capture, processing, transmission and reproduction of sound;
[0068] Audio technology: not only includes traditional recording and playback equipment, but also involves modern digital audio workstations, audio coding formats, sound recognition and processing algorithms, etc.;
[0069] Time difference estimation method: a technique to estimate the location of a signal source by using the time difference between signals arriving at different receiving points;
[0070] Triangulation algorithm: A method of determining a location by measuring the distance or angle from two or more observation points at a known location to that location.
[0071] In the prior art, audio technology has problems in adjusting the output of audio signals according to the position of the user in real time.
[0072] The present application provides an audio signal output method, which dynamically determines the target speaker and the proportion of the left and right channels by accurately measuring the position information of the object relative to the target position and combining the influence angle range of the speaker relative to the target position, and then intelligently identifies and allocates the audio signal to the left and right channel speakers and surround channel speakers in the corresponding left and right speakers. This process not only solves the problem of fixed channel allocation in traditional audio systems, but also realizes personalized audio output based on the actual position of the user, significantly improving the accuracy of audio positioning and the immersive listening experience of the audience.
[0073] Figure 1 A schematic diagram of a scenario of an audio signal output method provided in an embodiment of the present application, such as Figure 1 As shown, an audio signal output method provided in an embodiment of the present application can be applied to audio equipment. The scenario of the embodiment of the present application includes: a position detection unit, a loudspeaker and an audio output unit, wherein the position detection unit is arranged at a target position, the loudspeaker is arranged around the position detection unit, and is connected to the audio output unit signal.
[0074] The position detection unit is used to detect the position information of the object of use and send the detected position information to the audio output unit. The audio output unit is used to receive the position information of the object of use and determine the target speaker among the speakers according to the position information of the object of use, and determine the left channel speaker and the left surround channel speaker among the left speakers, and the right channel speaker and the right surround channel speaker among the right speakers according to the target speaker and the output ratio of the left channel and the right channel speaker among the target speakers, and send the audio signal to the left channel speaker and the left surround channel speaker among the left speakers, and the right channel speaker and the right surround channel speaker among the right speakers to play the object of use at the target detection position.
[0075] The execution subject of an audio signal output method provided in an embodiment of the present application can be a device with a speaker, and the embodiment of the present application does not limit the device with a speaker. As long as the device can determine the position information of the user object relative to the target position, and can determine the target speaker in the 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 and the influence angle range of the left speaker relative to the target position, the left channel speaker and the left surround channel speaker in the left speaker can be determined 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, and the right channel speaker and the right surround channel speaker in the right speaker can be determined 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, and the audio signal can be output 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.
[0076] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0077] Figure 2 A schematic diagram of a method for outputting an audio signal provided in an embodiment of the present application Figure 1 ,like Figure 2 As shown, the method includes:
[0078] S201: Determine the position information of the use object relative to the target position.
[0079] The user object may refer to an object that is in front of the speaker and is ready to use the speaker, and the object may be a person, an animal, or an electronic device.
[0080] The target position may refer to a position used to determine the position of an object to be used. The target position may be arbitrarily set as needed. For example, the position may be set behind a speaker. In some embodiments, the target position may be a coordinate point. By determining the distance and direction of the object to be used relative to the coordinate point represented by the target position, the position information of the object to be used may be determined. In an embodiment of the present application, the target position may also refer to the position of a position detection device.
[0081] The position information may refer to the position of the object relative to the target position, and the position information may be expressed by means of an azimuth angle, etc. In some embodiments, the position information may be determined by the position of the position information in the target coordinate system. After the position information is determined, the azimuth angle of the object relative to the target position may be determined by the coordinate point information. The target coordinate system may be constructed with the target position as the origin.
[0082] Wherein, when the position information is an azimuth, in the embodiment of the present application, the method for determining the position information of the object relative to the target position may further include:
[0083] determining a reference position set relative to the target position, and an azimuth angle formed between the object, the target position and the reference position;
[0084] The position information is determined based on the azimuth angle formed between the object, the target position and the reference position.
[0085] The reference position may represent any preset direction, and a reference line may be determined by the target position and the reference position. For example, when the reference position is on the left side of the target position, the reference line extends to the left starting from the target position.
[0086] After determining the reference position, the azimuth can be determined based on the first direction of the object relative to the target position and the second direction of the reference position relative to the target position, that is, the target position is used as the reference point, and the angle between the first direction and the second direction is the azimuth. In some embodiments, the azimuth can be determined by a time difference estimation method (TDOA, Time Difference of Arrival) and a triangulation algorithm.
[0087] In an embodiment of the present application, due east can be selected as a fixed reference direction as the reference position, and multiple microphones can be arranged to capture the ultrasonic signals emitted by the speaker. These signals are received by the microphones after contacting the object and being reflected back. The distance between the object and each microphone is obtained based on the time difference between the signals reaching different microphones and the speed of sound wave propagation. Then, the position of the object can be accurately determined using this distance information, and finally the azimuth can be obtained based on the position of the object relative to the speaker, thereby effectively improving the accuracy and efficiency of positioning.
[0088] S202. Determine a target speaker, a left speaker and a right speaker of the target speaker, and a proportion of a target left channel and a proportion of a target right channel in the target speaker according to position information of the user object relative to the target position, wherein the speaker is located between the user object and the target position.
[0089] There may be multiple speakers, and the arrangement of the multiple speakers may be arbitrary, for example, the multiple speakers may be arranged side by side on one or more sides of the target position, or may be arranged in a fan shape on one or more sides of the target position. In an embodiment of the present application, the multiple speakers may be arranged in a circle around the target position.
[0090] The target speaker may refer to a speaker facing the user, that is, a speaker closest to the user in a straight line. The left speaker may refer to a speaker in a left area of the target speaker, and the right speaker may refer to a speaker in a right area of the target speaker.
[0091] The target left channel and the target right channel of the target speaker can be determined according to the positional relationship between the user object and the target speaker. For example, the portion of the target speaker corresponding to the left side of the user object is the target left channel, and the portion of the target speaker corresponding to the right side of the user object is the target right channel. In an embodiment of the present application, since the position information of the user object is an azimuth, the target left channel and the target right channel of the target speaker can be determined according to the angle and azimuth of a third direction, wherein the third direction can be determined according to the direction of the position of the target speaker relative to the target position, and a second direction formed by the reference position and the target position.
[0092] In the embodiment of the present application, the azimuth of the user object relative to the target position is first determined, and then based on the azimuth, the target speaker number located between the user object and the target position is identified. Then, according to the number of the target speaker, the left speaker number and the right speaker number of the target speaker are determined. Finally, according to the azimuth of the user object relative to the target speaker, the output ratio of the audio signal of the target left channel and the target right channel is obtained to optimize the stereo effect.
[0093] S203, determining a left channel speaker and a left surround channel speaker among the left speakers according to the position information of the object relative to the target position and the influence angle range of the left speaker relative to the target position;
[0094] S204: Determine a right channel speaker and a right surround channel speaker in the right speakers according to the position information of the object relative to the target position and the influence angle range of the right speaker relative to the target position.
[0095] Among them, the influence angle range can refer to the signal output range of a speaker relative to the target position. For example, when there are eight speakers and they are arranged around the target position, the influence angle range of each speaker can be 360° / 8=45°. If the side of any one of the eight speakers is taken as the reference position, then in the clockwise direction, the influence angle range of the first speaker is 0~45°, the influence angle range of the second speaker is 45~90°, the influence angle range of the third speaker is 90~135°, and so on, until the influence angle range of the eighth speaker is 315~360°, wherein the direction of 0° is the same as the direction of 360°.
[0096] The left channel speaker in the left speaker may refer to a speaker located on the left side of the user object, which is used to play the audio signal of the left channel, and the left surround channel speaker may refer to a speaker located on the left side of the user object, which is responsible for playing the audio signal of the left surround channel, and is usually placed at the left rear of the listening area.
[0097] The right channel speaker in the right speaker may refer to the speaker located on the right side of the user, which is responsible for playing the audio signal of the right channel, and the right surround channel speaker may refer to the speaker located on the right side of the user, which is responsible for playing the audio signal of the right surround channel, and is usually placed at the rear right side of the listening area.
[0098] Among them, in the embodiment of the present application, when the speakers are arranged around the target position,
[0099] According to the position information of the object relative to the target position and the influence angle range of the left speaker relative to the target position, a left channel speaker and a left surround channel speaker in the left speaker are determined, including:
[0100] A target angle is obtained according to the azimuth angle representing the position information and the channel parameter angle, wherein the channel parameter angle is determined according to the influence angle range of the left speaker relative to the target position;
[0101] Obtaining a third proportional result according to the target angle and the influence angle range of the left speaker relative to the target position;
[0102] The third ratio result is rounded down to obtain an initial target value;
[0103] According to the preset value, the initial target value is updated to obtain the target value;
[0104] A left channel speaker and a left surround channel speaker in the left speaker are determined according to the target value and the position of the target speaker in the speaker.
[0105] The channel parameter angle may refer to the signal output range of the left speaker. In the embodiment of the present application, when the influence angle range of each speaker is α=45° and the left surround channel speaker is determined, the channel parameter angle is 2α, and rounding down may refer to discarding the decimal part of a number and retaining only the integer part, and the integer is not greater than the original number.
[0106] The preset value may refer to a preset parameter. For example, when the target speaker is speaker No. 3, if starting from the left side, it may be concluded that the target speaker is speaker No. 1. To exclude this situation, adding 1 can ensure that the result correctly reflects the position of the speaker. The initial target value is updated and the preset value is added to obtain the target value. The target value satisfies the following formula:
[0107] n"=[(θ±90°) / α]+1;
[0108] Where n" in the formula 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 impact angle range of the target position, and [] is rounded down.
[0109] In the embodiment of the present application, when determining the left channel speaker and the left surround channel speaker in the left speaker, the target angle is determined according to the azimuth angle and the channel parameter angle of the object being used, and then the proportional result is obtained according to the target angle and the influence range of the speaker. The proportional result is rounded down to obtain the initial target value, and then adjusted according to the preset value to obtain the final target value. In this way, the channel speakers and the surround channel speakers in the left and right speakers can be determined to ensure that the audio signals are correctly distributed and provide a surround sound experience.
[0110] S205: Output audio signals 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.
[0111] The audio signal may refer to the audio played by speakers or musical instruments, or may refer to abnormal noise from broadcasting, telephone communications, or machines.
[0112] Among them, in the embodiment of the present application, 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, the audio signal is output to the user, including:
[0113] Performing logarithmic processing on the proportion of the target left channel and the proportion of the target right channel in the target speaker, respectively, to obtain an initial signal value of the target left channel and an initial signal value of the target right channel;
[0114] According to the preset signal parameters and the initial signal value of the target left channel, a left channel signal gain is obtained, and according to the preset signal parameters and the initial signal value of the target right channel, a right channel signal gain is obtained;
[0115] According to the left channel signal gain, controlling 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] According to the right channel signal gain, a right channel speaker and a right surround channel speaker among right speakers are controlled to output a second signal among the audio signals to a user.
[0117] The initial signal value may refer to a value obtained by logarithmically processing the proportion of the target left channel and the target right channel in the target speaker;
[0118] The left channel signal gain may refer to adjusting the intensity of the audio signal output by the left channel speaker;
[0119] The right channel signal gain may refer to adjusting the intensity of the audio signal output by the right channel speaker;
[0120] The first signal may refer to an audio signal output to the user object by a left channel speaker and a left surround channel speaker in the left speaker after gain adjustment according to the left channel signal;
[0121] The second signal may refer to an audio signal output to the user by the right channel speaker and the right surround channel speaker in the right speaker after gain adjustment according to the right channel signal.
[0122] An audio signal output method provided by an embodiment of the present application determines the specific position information of the user object relative to the target position by precise measurement. Then, based on this position information, the target speaker, that is, the speaker most directly facing the user object, and the left and right speakers of the target speaker are identified. Next, the proportion of the target left channel and the target right channel in the target speaker is obtained, which determines the distribution ratio of the audio signal in the left and right channels. Further, according to the position of the user object and the influence angle range of the left speaker, the role and importance of the left channel speaker and the left surround channel speaker in the left speaker are determined, and the same method is also applicable to the right channel speaker and the right surround channel speaker in the right speaker. Finally, the precisely adjusted audio signal is output to the user object to ensure that the audio signals of the left and right channels are appropriately amplified or weakened according to their positions in the speaker array and the relative positions of the user object. This process realizes the directional output of the audio signal, optimizes the stereo effect, and provides a richer and more accurate auditory experience, thereby achieving consistent sound quality and sound field effects at different positions, greatly improving the adaptability and user experience of the audio system.
[0123] Figure 3 A schematic diagram of a method for outputting an audio signal provided in an embodiment of the present application Figure 2 ,like Figure 3 As shown, in this embodiment Figure 2 Based on the embodiment, a method for outputting an audio signal is described in detail for determining a target speaker, a left speaker and a right speaker of the target speaker, and a proportion of a target left channel and a target right channel in the target speaker according to position information of a user object relative to a target position. The method includes:
[0124] S301: Determine the angle between the target position and two ends of the speaker.
[0125] Among them, the two ends of the speaker can refer to the positions of two receivers on the speaker for receiving signals. The positions of the 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~45°, the position of one of the receivers is at 0° and the position of the other receiver is at 45°.
[0126] S302 determines the influence angle range of the speaker relative to the target position according to the angle formed between the target position and two ends of the speaker and a reference position set relative to the target position;
[0127] S303: Determine a target speaker among the speakers, and a proportion of a target left channel and a proportion of a target right channel among the target speakers according to the position information of the object relative to the target position and the influence angle range of the speaker relative to the target position.
[0128] Among them, the proportion of the target right channel in the target speaker satisfies:
[0129] τ = θ / α - [θ / α];
[0130] Wherein, τ refers to the proportion of the target right channel in the target speaker, θ is the azimuth angle, α is the influence angle range of the speaker relative to the target position, and [] is rounded down.
[0131] The proportion of the target left channel in the target speaker is 1-τ.
[0132] S304, determining an initial left speaker and an initial right speaker of the target speaker according to a position of the target speaker in the speaker and a proportion of a target left channel and a target right channel in the target speaker;
[0133] S305, determining a left speaker among the initial left speakers according to the azimuth relationship between the initial left speaker and the target speaker;
[0134] S306: Determine the right speaker among the initial right speakers according to the azimuth relationship between the initial right speaker and the target speaker.
[0135] Among them, the azimuth relationship between the initial left speaker and the target speaker can refer to the direction of the audio output and the direction of the target speaker output. For example, when the azimuths of the initial right speaker and the target speaker are consistent, the initial right speaker is within the range of the right speaker. When the azimuths of the initial right speaker and the target speaker are opposite, the initial right speaker is not within the range of the right speaker.
[0136] Among them, in the embodiment of the present application, when the speakers are arranged around the target position,
[0137] According to the position information of the object relative to the target position and the influence angle range of the speaker relative to the target position, a target speaker among the speakers and a proportion of a target left channel and a target right channel among the target speakers are determined, including:
[0138] Determine a target speaker among the speakers according to the azimuth representing the position information and the influence area;
[0139] According to the azimuth representing the position information and the angle formed between the target position and two ends of the loudspeaker, a first proportional result and a second proportional result are obtained, wherein the second proportional result is a result of rounding down the first proportional result;
[0140] According to the first ratio result and the second ratio result, the proportion of the target left channel and the proportion of the target right channel in the target speaker are obtained.
[0141] Among them, the first proportional result can refer to the influence of the azimuth angle on the speaker output. In the embodiment of the present application, 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 proportional result is the result of rounding down the first proportional result.
[0142] The target speaker meets the following requirements:
[0143] n=[θ / α]+1;
[0144] Wherein, n may refer to a target speaker, θ / α may refer to a first ratio result, [] denotes rounding down, and [θ / α] may refer to a second ratio result.
[0145] An audio signal output method provided in an embodiment of the present application can accurately identify the target speaker and the audio ratio of the target left channel and the target right channel therein by measuring the angle formed by the target position and the two ends of the speaker and determining the influence angle range of the speaker relative to the target position, combined with the specific position information of the object relative to the target position. Furthermore, according to the position of the target speaker and the ratio of the left channel to the right channel, the initial left speaker and right speaker are determined, and the left channel speaker in the left speaker and the right channel speaker in the right speaker are accurately divided according to their azimuth relationship with the target speaker. This process not only optimizes the directional output of the audio signal, but also realizes the precise control of the stereo effect, thereby providing an intelligent system that dynamically adjusts the audio output according to the position of the audience, significantly improving the accuracy of audio positioning and the audience's auditory experience.
[0146] Figure 4 A schematic diagram of a scene of a speaker and a target position provided in an embodiment of the present application, such as Figure 4 As shown, the scene includes eight arcs, each arc corresponds to a loudspeaker, and each loudspeaker has a corresponding number, which are 1 to 8. In the embodiment of the present application, 8 loudspeakers are selected to be placed in a circle, and due east is selected as a fixed reference direction as the reference position. The azimuth corresponding to due east is 0°, loudspeaker No. 1 corresponds to 0 to 45°, loudspeaker No. 2 corresponds to 45 to 90°, loudspeaker No. 3 corresponds to 90 to 135°, and so on, until loudspeaker No. 8 corresponds to 315 to 360°, wherein the direction at 0° is the same as the direction at 360°. The user stands facing speaker No. 3, α is the area occupied by each speaker, θ is the angle of the user's position, and in this example it is assumed that θ is 120°. The left channel speaker includes the left channel speaker of speaker No. 3 and speaker No. 4, the left surround channel speaker includes speaker No. 5, the right channel speaker includes the right channel speaker of speaker No. 3 and speaker No. 2, and the right surround channel speaker includes speaker No. 1. Speakers No. 6, No. 7 and No. 8 are not used because they are facing away from the user, thereby avoiding waste of resources.
[0147] Figure 5 A schematic diagram of a structure of a method for outputting an audio signal provided in an embodiment of the present application, such as Figure 5As shown, the structure includes: taking dual channels as an example, multiple microphones are set, and the multiple microphones are represented as MIC1, MIC2, MIC3, etc., which are used to capture the ultrasonic signal emitted by the speaker and then contacted with the object and reflected back. SOC (System on Chip), as a central control unit, receives the data from each microphone processed by the Codec, and performs position recognition through time difference estimation (TDOA) and triangulation algorithm to accurately calculate the position of the listener. The position information is obtained and sent to the audio output unit through communication protocols such as I2S (L&R) and I2C, and then the left and right channels are divided and output to multiple speakers, which are represented as SPK1, SPK2, SPK3, etc., so that the speakers can make sounds.
[0148] Figure 6a A schematic diagram of an audio signal output method is provided for an embodiment of the present application Figure 1 ,like Figure 6a As shown, taking the left and right channels as an example, they are represented as Left Channer and Right Channer respectively, SPK1 and SPK2 represent speakers No. 1 and No. 2. By setting the gain value to adjust the left and right channel signals, it can be seen that speakers No. 1 and No. 2 are right channels. Therefore, the left channel signals input to these two speakers are shielded and given a gain value of -110dB, while the left channel signal is set to 0dB to make the signal pass directly.
[0149] Figure 6b A schematic diagram of an audio signal output method is provided for an embodiment of the present application Figure 2 ,like Figure 6b As shown, taking the left and right dual channels as an example, they are represented as Left Channer and Right Channer respectively, SPK3 and SPK4 represent speakers No. 3 and No. 4, speakers No. 3 is the speaker facing the user, the left channel signal accounts for 1 / 3, and the right channel signal accounts for 2 / 3, so the left channel signal gain is 20lg (1 / 3) = -9.5dB, and the right channel signal gain value is 20lg (2 / 3) = -3.5dB, speakers No. 4 belongs to the left channel, the left channel signal gain is 0dB, so that the signal is passed directly, and the right channel signal is given a gain value of -110dB for shielding. The embodiment of the present application first performs logarithmic processing on the target left and right channels to obtain the initial signal value to reflect the relative strength of the channel. Then, the gains of the left and right channels are calculated based on the preset parameters and the initial values, and the output intensity of the corresponding speakers is adjusted. Finally, the speaker is controlled to output the left and right channel signals according to the gain value to ensure the directional output of the audio signal and provide an optimized auditory experience. This process achieves the audio positioning effect through precise adjustment.
[0150] Figure 7A schematic diagram of the structure of the audio signal output device provided in the embodiment of the present application, such as Figure 7 As shown, the audio signal output device 70 provided in this embodiment includes:
[0151] A first determination module 701 is used to determine the position information of the object relative to the target position;
[0152] A second determination module 702 is used to determine a target speaker, a left speaker and a right speaker of the target 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, wherein the speaker is located between the user and the target position;
[0153] A third determination module 703 is used to determine a left channel speaker and a left surround channel speaker in the left speaker according to the position information of the object relative to the target position and the influence angle range of the left speaker relative to the target position;
[0154] A fourth determining module 704 is used to determine a right channel speaker and a right surround channel speaker in the right speaker according to the position information of the 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 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.
[0156] In a possible implementation manner, the first determining module 701 may also be specifically configured to:
[0157] determining a reference position set relative to the target position, and an azimuth angle formed between the object, the target position and the reference position;
[0158] The position information is determined based on the azimuth angle formed between the object, the target position and the reference position.
[0159] In a possible implementation manner, the second determining module 702 may also be specifically configured to:
[0160] Determine the angular range of influence of the loudspeaker relative to the target position;
[0161] Determine a target speaker among the speakers, and a proportion of a target left channel and a proportion of a target right channel among the target speakers according to position information of the object relative to the target position and an influence angle range of the speaker relative to the target position;
[0162] A left speaker and a right speaker of the target speaker are determined according to a position of the 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.
[0163] In a possible implementation, the second determining module 702 may also be specifically configured to: determine an angle formed between the target position and two ends of the speaker;
[0164] The influence angle range of the loudspeaker relative to the target position is determined according to the angle formed between the target position and two ends of the loudspeaker, and a reference position set relative to the target position.
[0165] In a possible implementation, when the speakers are arranged around the target position, the second determining module 702 may also be specifically configured to:
[0166] Determine a target speaker among the speakers according to the azimuth representing the position information and the influence area;
[0167] According to the azimuth representing the position information and the angle formed between the target position and two ends of the loudspeaker, a first proportional result and a second proportional result are obtained, wherein the second proportional result is a result of rounding down the first proportional result;
[0168] According to the first ratio result and the second ratio result, the proportion of the target left channel and the proportion of the target right channel in the target speaker are obtained.
[0169] In a possible implementation manner, the second determining module 702 may also be specifically configured to:
[0170] Determine an initial left speaker and an initial right speaker of the target speaker according to a position of the target speaker in the speaker and a proportion of a target left channel and a target right channel in the target speaker;
[0171] Determine a left speaker among the initial left speakers according to the azimuth relationship between the initial left speaker and the target speaker;
[0172] The right speaker among the initial right speakers is determined according to the azimuth relationship between the initial right speaker and the target speaker.
[0173] In a possible implementation, when the speakers are arranged around the target position, the third determining module 703 may also be specifically configured to:
[0174] A target angle is obtained according to the azimuth angle representing the position information and the channel parameter angle, wherein the channel parameter angle is determined according to the influence angle range of the left speaker relative to the target position;
[0175] Obtaining a third proportional result according to the target angle and the influence angle range of the left speaker relative to the target position;
[0176] The third ratio result is rounded down to obtain an initial target value;
[0177] According to the preset value, the initial target value is updated to obtain the target value;
[0178] A left channel speaker and a left surround channel speaker in the left speaker are determined according to the target value and the position of the target speaker in the speaker.
[0179] In a possible implementation, the output module 705 may also be specifically configured to:
[0180] Performing logarithmic processing on the proportion of the target left channel and the proportion of the target right channel in the target speaker to obtain an initial signal value;
[0181] According to the preset signal parameters and the initial signal value of the left channel, the signal gain of the left channel is obtained, and according to the preset signal parameters and the initial signal value of the right channel, the signal gain of the right channel is obtained;
[0182] According to the left channel signal gain, controlling 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] According to the right channel signal gain, a right channel speaker and a right surround channel speaker among right speakers are controlled to output a second signal among the audio signals to a user.
[0184] The audio signal output device provided in this embodiment can execute the method provided in the above method embodiment, and its implementation principle and technical effect are similar, which will not be described in detail in this embodiment.
[0185] Figure 8 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present 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 also includes a communication component 803. The processor 801, the memory 802 and the communication component 803 are connected via a bus 804.
[0186] In a specific implementation process, at least one processor 801 executes the computer-executable instructions stored in the memory 802, so that at least one processor 801 executes the above method.
[0187] The specific implementation process of the processor 801 can be found in the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.
[0188] In the above embodiments, it should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. A general-purpose processor may be a microprocessor or any conventional processor. The steps of the method disclosed in the invention may be directly implemented as being executed by a hardware processor, or may be executed by a combination of hardware and software modules in the processor.
[0189] The memory may include a high-speed memory (Random Access Memory, RAM), and may also include a non-volatile memory (Non-volatile Memory, NVM), such as at least one disk memory.
[0190] The bus may be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, the bus in the drawings of the present application is not limited to only one bus or one type of bus.
[0191] The present application also provides a computer program product, including a computer program, which implements the above method when executed by a processor.
[0192] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the above method is implemented.
[0193] The above-mentioned 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 memory, flash memory, magnetic disk or optical disk. The readable storage medium can be any available medium that can be accessed by a general or special-purpose computer.
[0194] An exemplary readable storage medium is coupled to a processor so that the processor can read information from the readable storage medium 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 be located in an application specific integrated circuit (Application Specific Integrated Circuits, referred to as: ASIC). Of course, the processor and the readable storage medium can also exist in the device as discrete components.
[0195] The division of units is only a logical function division, and there may be other divisions in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interface, device or unit, which can be electrical, mechanical or other forms.
[0196] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0197] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0198] If the function is implemented in the form of 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 the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0199] Those skilled in the art can understand that all or part of the steps of implementing the above-mentioned method embodiments can be completed by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, the steps of the above-mentioned method embodiments are executed; and the aforementioned storage medium includes: ROM, RAM, disk or optical disk and other media that can store program codes.
[0200] Finally, it should be noted that those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. The present invention is intended to cover any variations, uses or adaptations of the present invention, which follow the general principles of the present invention and include common knowledge or customary technical means in the art not disclosed by the present invention, are not limited to the precise structure described above and shown in the drawings, and may be modified and changed in various ways without departing from the scope thereof. The scope of the present invention is limited only by the appended claims.
Claims
1. A method for outputting an audio signal, It is characterized in that include: Determining the position information of the use object relative to the target position; Determining a target speaker among the speakers, a left speaker and a right speaker of the target speaker, and a proportion of a target left channel and a proportion of a target right channel among the target speakers 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; Determine a left channel speaker and a left surround channel speaker among the left speakers 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; Determine 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; Audio signals are output to the user according to the target left channel and the target right channel of the target speaker, the left channel speaker and the left surround channel speaker of the left speaker, and the right channel speaker and the right surround channel speaker of the right speaker.
2. The method according to claim 1, It is characterized in that The determining of the position information of the object relative to the target position includes: Determining a reference position arranged relative to the target position, and an azimuth angle formed by the object, the target position and the reference position; The position information is determined based on an azimuth angle formed by the object, the target position, and the reference position.
3. The method according to claim 1, It is characterized in that The determining, according to the position information of the user object relative to the target position, a target speaker in the speaker, a left speaker and a right speaker of the target speaker, and a proportion of a target left channel and a proportion of a target right channel in the target speaker, comprises: Determining an angular range of influence of the loudspeaker relative to the target position; Determining a target speaker among the speakers, and a proportion of a target left channel and a proportion of a target right channel among the target speakers according to 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; A left speaker and a right speaker of the target speaker are determined according to a position of the target speaker among the speakers and a proportion of a target left channel and a proportion of a target right channel in the target speaker.
4. The method according to claim 3, It is characterized in that The determining the influence angle range of the loudspeaker relative to the target position includes: Determining an angle formed between the target position and two ends of the speaker; The influence angle range of the speaker relative to the target position is determined according to the angle formed between the target position and two ends of the speaker, and a reference position set relative to the target position.
5. The method according to claim 3, It is characterized in that When the speakers are arranged around the target position, The determining, according to the position information of the use object relative to the target position and the influence angle range of the speaker relative to the target position, a target speaker among the speakers, and a proportion of a target left channel and a proportion of a target right channel among the target speakers, comprises: determining a target speaker among the speakers according to an azimuth angle representing the position information and an influence area; Obtain a first proportional result and a second proportional result according to the azimuth representing the position information and the angle formed between the target position and two ends of the speaker, wherein the second proportional result is a result of rounding down the first proportional result; According to the first ratio result and the second ratio result, the proportion of the target left channel and the proportion of the target right channel in the target speaker are obtained.
6. The method according to claim 3, It is characterized in that The step of determining a left speaker and a right speaker of the target speaker according to a position of the 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 comprises: Determine an initial left speaker and an initial right speaker of the target speaker according to a position of the 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; Determining a left speaker among the initial left speakers according to the azimuth relationship between the initial left speaker and the target speaker; A right speaker among the initial right speakers is determined according to the azimuth relationship between the initial right speaker and the target speaker.
7. The method according to claim 1, It is characterized in that When the speakers are arranged around the target position, The determining, according to the position information of the use object relative to the target position and the influence angle range of the left speaker relative to the target position, a left channel speaker and a left surround channel speaker in the left speaker comprises: Obtaining a target angle according to an azimuth angle and a channel parameter angle representing the position information, wherein the channel parameter angle is determined according to an influence angle range of the left speaker relative to the target position; Obtaining a third ratio result according to the target angle and the influence angle range of the left speaker relative to the target position; Rounding down the third ratio result to obtain an initial target value; According to a preset value, the initial target value is updated to obtain a target value; A left channel speaker and a left surround channel speaker in the left speaker are determined according to the target value and the position of the target speaker in the speaker.
8. The method according to claim 1, It is characterized in that The method outputting an audio signal to the user according to a target left channel and a target right channel in the target speaker, a left channel speaker and a left surround channel speaker in the left speaker, and a right channel speaker and a right surround channel speaker in the right speaker comprises: Performing logarithmic processing on the proportion of the target left channel and the proportion of the target right channel in the target speaker to obtain an initial signal value of the target left channel and an initial signal value of the target right channel; Obtaining a left channel signal gain according to a preset signal parameter and an initial signal value of the target left channel, and obtaining a right channel signal gain according to a preset signal parameter and an initial signal value of the target right channel; According to the left channel signal gain, controlling 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; According to the right channel signal gain, a right channel speaker and a right surround channel speaker in the right speakers are controlled to output a second signal in the audio signal to the user.
9. An electronic device, It is characterized in that include: Memory, processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the method according to any one of claims 1 to 8.
10. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 8 when executed by a processor.
Citation Information
Patent Citations
Method for controlling audio signal transmission based on sound channels, and user terminal
CN107484082A
Intelligent perception radar interaction method and system applied to television
CN115103143A
Bar sound box and method for automatic surround sound pairing and calibration
CN115499762A
Sound playback method and device based on audio object, equipment and storage medium
CN115696176A
Audio processing method and device, target equipment and storage medium
CN117241175A
