Linear eight-microphone directional sound pickup device and beam switching method

By pre-storing the weight matrix of the sound pickup direction and using an index control method, the problem of inconsistency between angle commands and audio block processing cycles in linear microphone arrays is solved, achieving consistent processing of parameters within the audio block and efficient execution of switching.

CN123185494APending Publication Date: 2026-11-27SHENZHEN HANJIEXIN TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611455826.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-18
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

In existing technologies for linear microphone arrays, when the angle command and the audio block processing cycle are inconsistent, it is difficult to determine from which audio block the target parameter takes effect. This leads to the mixing of parameters before and after the switch within the same audio block, and it is difficult to reproduce the switching process.

Method used

By pre-storing complete weight matrices corresponding to multiple sound receiving directions and keeping the current matrix index unchanged during audio block processing, the matrix index to be activated is set after receiving the angle command, and the active matrix index is updated after the audio block processing is completed, ensuring parameter consistency.

Benefits of technology

It achieves consistent parameter processing within the audio block, avoids matrix calculations and parameter writing during switching, reduces switching latency, and can accurately record beam switching completion information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123185494A_ABST
    Figure CN123185494A_ABST
Patent Text Reader

Abstract

The application discloses a linear eight-microphone directional sound collecting device and a beam switching method, relates to the technical field of audio signal processing, and comprises the following steps: acquiring a continuous eight-channel audio block, and prestoring complete weight matrices corresponding to a plurality of preset sound collecting directions; keeping the current block matrix index unchanged before the current audio block processing is completed; using the complete weight matrix corresponding to the current block matrix index to perform beam forming on the current audio block; receiving an angle instruction; if the to-be-validated effective identifier is effective and the complete weight matrix corresponding to the to-be-validated matrix index is in an effective state, then the to-be-validated matrix index is updated; otherwise, the active matrix index is kept unchanged; using the complete weight matrix corresponding to the updated active matrix index to perform beam forming on the next complete audio block, and outputting a directional audio block; and the current audio block is processed by the same complete weight matrix from a starting sampling point to an ending sampling point, so that the parameters before and after switching are not mixed in the same audio block.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of audio signal processing technology, specifically to a linear eight-microphone directional sound receiving device and a beam switching method. Background Technology

[0002] Linear microphone arrays can be used in scenarios requiring directional sound acquisition, such as conference terminals, recording equipment, and audio equipment. Multiple microphones collect audio signals from the same sound field, and the audio processor performs delay, filtering, phase adjustment, or amplitude weighting on the multiple audio signals based on the spatial position of each microphone and the target sound pickup direction, and then synthesizes them into a directional audio signal.

[0003] For directional radio receivers with fixed array positions but changing reception directions, the control unit can send an angle command containing a target angle identifier to the audio processor to select beamforming parameters corresponding to the target reception direction. One approach is to recalculate the parameters after receiving the angle command and write them to each channel, or to copy the target parameters to the current processing area. Another approach is to pre-store multiple parameter groups for reception directions and call the corresponding parameter group according to the angle identifier.

[0004] Continuous multi-channel audio signals are usually processed in audio blocks. However, the arrival time of the angle command is not necessarily consistent with the audio block processing cycle. If the angle command arrives during the audio block processing and directly changes the current parameters, the front and back of the audio block may use parameters with different sound reception directions. If the parameters of each channel are updated separately, there may be intermediate states where some channels have been updated while others have not. This makes it difficult to determine the unique and complete weight matrix belonging to the same audio block. Even if multiple parameter groups are stored in advance, if the state update relationship between the angle command and the audio block processing boundary is not clear, it is difficult to determine from which audio block the target parameter takes effect, and it is difficult to reproduce the switching process based on the angle command and the audio block number. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a linear eight-microphone directional sound receiving device and a beam switching method.

[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution: This invention provides a beam switching method for a linear eight-microphone directional sound receiving device, comprising: Obtain a continuous eight-channel audio block and pre-store complete weight matrices corresponding to multiple preset sound pickup directions. Each complete weight matrix contains beamforming parameters corresponding to eight microphone channels. When the current audio block begins processing, the active matrix index is read as the current block matrix index, and the current block matrix index is kept unchanged until the current audio block processing ends. Beamforming is performed on the current audio block using the complete weight matrix corresponding to the current block matrix index; Receive angle command, determine target matrix index according to angle command, set the matrix index to be activated as the target matrix index, set the valid flag to be activated as valid, and do not change the active matrix index; At the block boundary after the current audio block is processed, if the pending valid identifier is valid and the complete weight matrix corresponding to the pending valid matrix index is in a valid state, then the active matrix index is updated to the pending valid matrix index, and the pending valid identifier is set to invalid; otherwise, the active matrix index remains unchanged. Using the updated activity matrix index corresponding to the complete weight matrix, beamforming is performed on the next complete audio block to output a directional audio block.

[0007] In a preferred embodiment of the present invention, the pending-effective matrix index and the pending-effective valid identifier are set by the control task; the reading of the pending-effective valid identifier, the updating of the activity matrix index, and the invalidation setting of the pending-effective valid identifier are performed by the audio processing task at the block boundary; the control task does not directly modify the activity matrix index.

[0008] As a preferred embodiment of the present invention, the step of determining the target matrix index according to the angle command, setting the matrix index to be activated as the target matrix index, and setting the valid identifier to be activated as valid includes: Parse the angle command to obtain the target angle identifier; If the target angle identifier is valid, the target matrix index is determined according to the preset angle index mapping table; If the complete weight matrix corresponding to the target matrix index is in a valid state, and the target matrix index is different from the active matrix index, then the matrix index to be activated is first set to the target matrix index, and then the valid flag to be activated is set to valid. If the target angle identifier is invalid, the complete weight matrix corresponding to the target matrix index is invalid, or the target matrix index is the same as the active matrix index, then the matrix index to be activated and the valid identifier to be activated will not be set according to this angle instruction, and the active matrix index will remain unchanged.

[0009] As a preferred embodiment of the present invention, each complete weight matrix is ​​associated with a matrix valid state; after the beamforming parameters corresponding to the eight microphone channels in the complete weight matrix have been loaded and passed the integrity check, the matrix valid state is set to valid; when the beamforming parameters have not been loaded or have failed the integrity check, the matrix valid state is set to invalid.

[0010] As a preferred technical solution of the present invention, the acquisition of continuous eight-channel audio blocks includes: acquiring eight audio sample values ​​of a linear eight-microphone array according to a common time base and the same sampling sequence number, and forming the eight-channel audio block by combining eight audio sample values ​​within the same sampling sequence number range. The pre-stored complete weight matrices corresponding to multiple preset radio directions include: loading and storing each complete weight matrix in an internal memory or external mapped storage area accessible by the digital signal processor; The method further includes generating a block boundary indicating the completion of processing of the current audio block based on sample count, direct memory access completion event, or buffer swap event.

[0011] As a preferred technical solution of the present invention, after outputting the directional audio block, the first audio block that is processed by the complete weight matrix corresponding to the updated activity matrix index from the start sampling point to the end sampling point is determined, the audio block is determined as the first effective audio block, the block number of the first effective audio block is recorded, and the block number is used as beam switching completion information.

[0012] The present invention also provides a linear eight-microphone directional sound receiving device, comprising: A linear eight-microphone array is used to acquire sound field signals and convert them into eight microphone signals; A multi-channel audio acquisition unit, connected to the linear eight-microphone array, is used to sample and align the eight microphone signals to form a continuous eight-channel audio block. The weight matrix storage unit is used to pre-store complete weight matrices corresponding to multiple preset sound receiving directions, and each complete weight matrix contains beamforming parameters corresponding to eight microphone channels. The instruction receiving and parsing unit is used to receive angle instructions and parse them to obtain the target angle identifier. The index control unit, connected to the instruction receiving and parsing unit and the weight matrix storage unit, is used to determine the target matrix index according to the target angle identifier, set the matrix index to be activated as the target matrix index, set the valid identifier to be activated as valid, and not change the active matrix index. A beamforming processing unit, connected to the multi-channel audio acquisition unit, the weight matrix storage unit, and the index control unit, is used to read the active matrix index as the current block matrix index when the current audio block begins processing, keep the current block matrix index unchanged until the current audio block processing ends, and perform beamforming on the current audio block using the complete weight matrix corresponding to the current block matrix index; it is also used at the block boundary after the current audio block processing is completed, when the pending effective valid identifier is valid and the complete weight matrix corresponding to the pending effective matrix index is in a valid state, to update the active matrix index to the pending effective matrix index, set the pending effective valid identifier to invalid, and perform beamforming on the next complete audio block using the complete weight matrix corresponding to the updated active matrix index, outputting a directional audio block; The activity matrix index is updated only by the beamforming processing unit at the block boundary.

[0013] As a preferred embodiment of the present invention, the beamforming parameters include at least one of the following: a combination of delay parameters and amplitude weights, finite impulse response filter coefficients, or frequency domain complex weights; the same audio block is selected by the same current block matrix index to select a complete weight matrix.

[0014] As a preferred embodiment of the present invention, the index control unit is further configured to check the valid status of each complete weight matrix when the system starts, select the matrix index corresponding to the default reception direction as the initial active matrix index, and set the pending valid flag to invalid.

[0015] As a preferred embodiment of the present invention, it further includes an audio output unit, which is connected to the beamforming processing unit and is used to receive and buffer the directional audio blocks output by the beamforming processing unit in sequence according to the block number, and continuously output a directional audio stream composed of each of the directional audio blocks.

[0016] The beneficial effects of this invention are: This invention reads the active matrix index as the current block matrix index when the current audio block begins processing and keeps it unchanged until the current audio block processing ends. This ensures that the current audio block is processed by the same complete weight matrix from the start sampling point to the end sampling point, avoiding the mixing of parameters before and after switching within the same audio block. The matrix index to be activated and the active matrix index are separated. The control task sets the state to be activated, and the audio processing task updates the active matrix index at the processing block boundary, so that the target eight-channel parameters take effect from the unified audio block boundary, and the effective boundary can be determined according to the audio block number. Switching is achieved by pre-storing the complete weight matrix and updating the active matrix index, without the need to temporarily generate or write the entire set of parameters item by item, reducing matrix calculations and parameter writing during switching. By judging the matrix validity status, angle legality, and index difference, invalid matrices are prevented from becoming active matrices. In addition, the sequence number of the first audio block to be fully processed using the new active matrix index can be recorded as beam switching completion information. Attached Figure Description

[0017] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:

[0018] Figure 1 This is a structural block diagram of a linear eight-microphone directional sound receiving device provided in an embodiment of the present invention; Figure 2 A flowchart of the beam switching method provided in an embodiment of the present invention; Figure 3 A timing diagram illustrating the data block boundary, processing block boundary, and matrix index update relationship provided in an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating the complete weight matrix, angle index mapping relationship, and matrix index state relationship provided for embodiments of the present invention. Detailed Implementation

[0019] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this application, and not all embodiments. The components of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0020] It should be noted that similar reference numerals and letters in the following figures indicate similar items; therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. Furthermore, in the description of this application, terms such as "first," "second," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0021] like Figures 1-2 As shown, this embodiment uses a fixedly installed linear eight-microphone array to collect sound field signals. The eight microphone signals output by the linear eight-microphone array are sampled and aligned by a multi-channel audio acquisition unit and then sent to a digital signal processor. The digital signal processor can access a weight matrix storage unit used to store multiple complete weight matrices and perform beamforming processing and matrix index switching processing for the eight-channel audio blocks.

[0022] The linear eight-microphone directional sound receiving device includes a linear eight-microphone array, a multi-channel audio acquisition unit, a weight matrix storage unit, a command receiving and parsing unit, an index control unit, and a beamforming processing unit. Audio data transmission paths, weight matrix reading paths, and matrix index control paths are established between each unit. The index control unit and the beamforming processing unit can be executed by a digital signal processor.

[0023] The linear eight-microphone array includes eight microphones arranged in a straight line. Each microphone collects the sound field signal at its location and converts it into eight microphone signals. A multi-channel audio acquisition unit is connected to the linear eight-microphone array, samples the eight microphone signals according to a common time base, and aligns the audio sample values ​​of the eight microphone channels according to the sampling sequence number. The eight audio sample values ​​within the same sampling sequence number range are combined into an eight-channel audio block.

[0024] The weight matrix storage unit pre-stores complete weight matrices corresponding to multiple preset sound pickup directions. Each complete weight matrix has a corresponding matrix index and contains beamforming parameters corresponding to eight microphone channels. The weight matrix storage unit is connected to the index control unit and the beamforming processing unit respectively. The index control unit reads the matrix validity status of the corresponding complete weight matrix according to the matrix index, and the beamforming processing unit reads the eight-channel beamforming parameters in the corresponding complete weight matrix according to the current block matrix index.

[0025] The instruction receiving and parsing unit is used to receive externally input angle instructions, parse the target angle identifier from the angle instructions, and transmit the parsed target angle identifier to the index control unit. The index control unit queries the preset angle index mapping relationship according to the target angle identifier, determines the target matrix index corresponding to the target angle identifier, and reads the matrix validity status of the complete weight matrix corresponding to the target matrix index. When the complete weight matrix corresponding to the target matrix index can be used for beamforming processing, the index control unit first sets the matrix index to be activated as the target matrix index, and then sets the valid identifier to be activated as valid. The index control unit does not modify the active matrix index when setting the matrix index to be activated and the valid identifier to be activated.

[0026] Furthermore, such as Figure 3 As shown, the multi-channel audio acquisition unit acquires eight audio sample values ​​according to a common time base. The eight audio sample values ​​corresponding to the same sampling number form an eight-channel sampling vector. Multiple consecutive eight-channel sampling vectors form an eight-channel audio block. Each audio block is configured with a block number according to the generation order and serves as the basic data unit for beamforming processing.

[0027] Suppose that each eight-channel audio block contains L consecutive eight-channel sample vectors, and the starting sample number of the b-th audio block is n. b The audio block contains samples from sample number n. b The initial L consecutive eight-channel sampling vectors, the specific value of L can be determined based on the processing power of the digital signal processor, the capacity of the audio acquisition buffer, and the allowed processing cycle.

[0028] When forming an eight-channel audio block, data belonging to the same sampling number range are selected from a continuously arranged multi-channel sampling group. The audio sample values ​​of the eight microphone channels within the sampling number range are combined to form an eight-channel audio block, so that each channel in the audio block has the same starting sampling number, the same ending sampling number, and the same number of sampling points. If the sampling number ranges corresponding to the eight microphone channels are detected to be inconsistent, the audio sample values ​​with different sampling numbers are not combined into the same eight-channel audio block.

[0029] In this embodiment, sampling count, direct memory access completion event, or buffer swapping event are used to determine the data boundary of audio blocks in continuous audio data. After the data of the corresponding audio block has been formed, the audio processing task performs beamforming processing on the audio block and generates a processing block boundary after the beamforming processing of the audio block is completed. The processing block boundary is the point in time when the pending effective identifier, pending effective matrix index, and updated activity matrix index are read. That is, the data block boundary is used to indicate that the audio block data has been collected or transferred, and the processing block boundary is used to indicate that the audio processing task has completed the beamforming processing of the audio block and allows the index status update to be performed.

[0030] In one method of generating data block boundaries, the multi-channel sampling groups that have already formed the current eight-channel audio block are sampled and counted. When the sample count reaches the number of sampling points contained in an audio block, it is determined that the data range of the current audio block has ended. In another method, the eight audio sample values ​​are transferred to the audio block buffer through direct memory access. When the direct memory access completion event indicates that all the data required for the current eight-channel audio block has been written to the corresponding buffer, it is determined that the data range of the current audio block has ended. In the method of using alternating buffers, one buffer is used to receive the currently acquired eight audio sample values, and another buffer is used to store the eight-channel audio block to be processed or being processed. After the audio block data reception is completed in one buffer, buffer swapping is performed, and the data range of the current audio block is determined to have ended by the buffer swapping event.

[0031] The audio processing task completes beamforming processing of the current audio block after the data block boundary, and generates a processing block boundary after the beamforming processing is completed. At the processing block boundary, the audio processing task reads the pending valid identifier and the pending matrix index, and performs an active matrix index update. After the active matrix index update is completed at the processing block boundary, the eight-channel audio block corresponding to the next sampling sequence number range reads the updated active matrix index as the current block matrix index.

[0032] Furthermore, such as Figure 4 As shown, the storage unit pre-stores complete weight matrices corresponding to multiple preset sound pickup directions. Each complete weight matrix contains the parameters required for beamforming of eight microphone channels. The parameters of the eight channels corresponding to the same preset sound pickup direction are stored as a complete parameter set and identified and selected through a matrix index.

[0033] The complete weight matrix can be generated offline and written to the storage unit before device initialization, or it can be loaded into the storage area accessible by the digital signal processor when the device starts up. Each complete weight matrix is ​​associated with a matrix validity state. The complete weight matrix is ​​only valid after all the necessary parameters corresponding to the eight microphone channels have been loaded and passed the integrity check.

[0034] The storage unit records the correspondence between the matrix index, preset sound reception direction, beamforming parameter storage location, and matrix validity status. When the system starts and loads the complete weight matrix, it first sets the matrix validity status of the corresponding complete weight matrix to invalid, and then loads the beamforming parameters corresponding to the eight microphone channels into the storage area corresponding to the complete weight matrix according to the matrix index.

[0035] The integrity check takes a complete weight matrix as the verification object and includes at least the following: checking whether the beamforming parameters corresponding to the eight microphone channels in the complete weight matrix have been loaded; checking whether the loaded beamforming parameters of each channel belong to the complete weight matrix and its corresponding matrix index; checking whether the number or data length of the loaded parameters conforms to the configuration record of the complete weight matrix; and checking whether the loading completion status of the complete weight matrix is ​​valid.

[0036] When the beamforming parameters corresponding to all eight microphone channels have been loaded and passed the integrity check, the matrix validity status of the complete weight matrix is ​​set to valid. When the beamforming parameters corresponding to any microphone channel have not been loaded, or the integrity check indicates that the loaded beamforming parameters are incomplete, do not correspond to the corresponding matrix index, or the number of parameters or the data length does not conform to the configuration record, the matrix validity status of the complete weight matrix is ​​kept as invalid or set to invalid, and setting the pending matrix index and pending validity identifier based on the complete weight matrix is ​​prohibited.

[0037] In this embodiment, the matrix validity state is determined after the system startup loading and integrity verification phase, and is not concurrently modified during device operation. If the device supports reloading or updating the complete weight matrix during operation, the reloading or updating process should be completed after the complete weight matrix is ​​no longer used or after a separate update process is completed, and then the matrix validity state is set to valid.

[0038] Furthermore, such as Figure 4 As shown, the digital signal processor maintains an active matrix index, a target matrix index to be activated, and a target valid identifier. The active matrix index is used to determine the complete weight matrix that is currently allowed to be used. The target matrix index to be activated is used to store the target matrix index that has been determined according to the angle command but has not yet been updated to an active state. The target valid identifier is used to indicate whether the target matrix index to be activated contains a target matrix index that is allowed to be processed at the processing block boundary.

[0039] When the system starts up, the digital signal processor checks the matrix validity status of each complete weight matrix, selects the matrix index corresponding to the default reception direction from the complete weight matrices that are in a valid state as the initial active matrix index, and sets the pending valid flag to invalid.

[0040] When the b-th audio block begins processing, the audio processing unit reads the current activity matrix index and saves the reading result as the current block matrix index of the b-th audio block. The current block matrix index is formed when the b-th audio block begins processing and remains unchanged until the processing of the audio block ends. The beamforming processing unit reads the corresponding complete weight matrix from the storage unit according to the current block matrix index and applies the beamforming parameters corresponding to the eight microphone channels in the complete weight matrix to the eight audio data in the b-th audio block. The processed eight audio data are then synthesized to obtain a directional audio block.

[0041] Angle commands are generated by the host computer or device control terminal and sent to the digital signal processor. Angle commands must include at least a target angle identifier that can determine the preset sound reception direction. The reception and parsing of angle commands are performed independently of the processing cycle of the audio block. Therefore, angle commands do not need to be aligned with the start or end point of the audio block.

[0042] After receiving the angle command, the digital signal processor parses the target angle identifier and determines the target matrix index according to the preset correspondence between the target angle identifier and the matrix index. If the pending effective valid identifier is invalid, the complete weight matrix corresponding to the target matrix index is in a valid state, and the target matrix index is different from the active matrix index, the pending effective matrix index is first set to the target matrix index, and then the pending effective valid identifier is set to valid. If the pending effective valid identifier is already valid, it means that the previous pending effective request has not been processed by the audio processing task at the processing block boundary. The control task does not modify the pending effective matrix index and the pending effective valid identifier according to this angle command, that is, it rejects this angle command to enter the pending effective state.

[0043] The process of setting the pending matrix index and pending valid identifier does not modify the active matrix index, nor does it modify the current block matrix index that was formed when the b-th audio block started processing. Therefore, even if the angle command arrives during the processing of the b-th audio block, the b-th audio block still uses the current block matrix index obtained when it started processing.

[0044] The target angle identifier can be represented by an angle value, a direction number, or an instruction field that corresponds one-to-one with a preset reception direction. When parsing the angle instruction, the control task checks whether the angle instruction contains a complete target angle identifier and compares the parsed target angle identifier with a pre-configured set of allowed angle identifiers. If the target angle identifier can match one of the angle identifiers in the set of allowed angle identifiers, it is determined to be valid; if it cannot match, it is determined to be invalid. The digital signal processor pre-stores an angle index mapping table. Each mapping record in the angle index mapping table includes the angle identifier corresponding to the preset reception direction and the matrix index corresponding to the complete weight matrix.

[0045] After obtaining the target matrix index, the control task checks whether the target matrix index is within the allowed matrix index range and reads the matrix validity status of the complete weight matrix corresponding to the target matrix index. Only when the target matrix index is within the allowed range and the corresponding complete weight matrix is ​​in a valid state is the setting of the matrix index to be activated allowed to continue. The control task also compares the target matrix index with the current active matrix index. When the target matrix index and the active matrix index are different, it means that the preset sound receiving direction corresponding to the target angle identifier has not yet become the current active sound receiving direction; when they are the same, it means that the complete weight matrix corresponding to the target angle identifier is already in an active state, and there is no need to perform the same matrix index switching again.

[0046] When the target angle identifier is valid, the target matrix index is within the allowed range, the complete weight matrix corresponding to the target matrix index is in a valid state, the target matrix index is different from the active matrix index, and the pending effective valid identifier is invalid, the control task first sets the pending effective matrix index to the target matrix index, then sets the pending effective valid identifier to valid. The control task sets the pending effective matrix index to the target matrix index and then sets the pending effective valid identifier to valid, so that the pending effective matrix index has a definite value when the pending effective valid identifier is valid.

[0047] If the target angle identifier is invalid, the target matrix index cannot be determined from the angle index mapping table, the target matrix index is outside the allowed range, the complete weight matrix corresponding to the target matrix index is invalid, the target matrix index is the same as the active matrix index, or the pending valid identifier is already valid, then the control task will not change the pending matrix index and the pending valid identifier according to this angle instruction, nor will it change the active matrix index. The audio processing task will continue to use the complete weight matrix corresponding to the original active matrix index to process subsequent audio blocks.

[0048] Furthermore, such as Figure 4As shown, the digital signal processor executes control tasks and audio processing tasks respectively. The control task is used to process angle commands and set the index of the matrix to be activated and the valid flag to be activated. The audio processing task is used to process a continuous eight-channel audio block and update the active matrix index at the boundary of the processing block.

[0049] Control tasks can be implemented by the control thread, interrupt service routine, or instruction receiving callback in the digital signal processor, while audio processing tasks can be implemented by the periodic audio thread, a handler triggered by a direct memory access completion event, or a handler triggered by a buffer swap event.

[0050] To avoid inconsistencies arising from concurrent reading and writing of the pending matrix index and pending valid identifier by the control task and audio processing task, this embodiment employs atomic states, critical sections, or equivalent synchronous methods for overall writing and reading of the pending matrix index and pending valid identifier. The control task completes the setting of the pending matrix index and pending valid identifier within the critical section. The audio processing task enters the same critical section at the processing block boundary and completes the reading of the pending valid identifier, the reading of the pending matrix index, the reading of the matrix valid state corresponding to the pending matrix index, the updating of the active matrix index, and the clearing of the pending valid identifier within the same critical section operation. Since the matrix valid state is not concurrently modified during operation, the matrix valid state read by the audio processing task within the critical section remains unchanged during this critical section operation.

[0051] In one specific synchronization method, the control task first writes the pending-to-be-activated matrix index, and then writes the pending-to-be-activated valid identifier. Both writes are completed within the same critical section. The audio processing task reads the pending-to-be-activated valid identifier and the pending-to-be-activated matrix index at the processing block boundary, and completes the update of the active matrix index and the clearing of the pending-to-be-activated valid identifier within the same critical section. If the control task is writing the pending-to-be-activated state, the audio processing task waits for the critical section to end before reading. If the audio processing task is reading the pending-to-be-activated state and updating the active matrix index, the control task waits for the critical section to end before writing.

[0052] This implementation adopts the priority rule for pending requests. If the pending validity flag is already valid, it means that the previous pending request has not been processed by the audio processing task at the processing block boundary. The control task does not update the pending matrix index and pending validity flag for subsequent new angle commands, that is, it rejects the new angle command from entering the pending state.

[0053] When the audio processing task begins processing the current audio block, it reads the active matrix index and saves it as the current block matrix index. During the processing of the current audio block, the audio processing task only uses the current block matrix index to select the complete weight matrix. Only after the current audio block is processed does it enter the process of reading the pending state and updating the active matrix index.

[0054] At the boundary of the processing block after the current audio block is processed, the audio processing task reads the pending validity flag. When the reading result is valid, it reads the pending matrix index and checks the matrix validity status of the complete weight matrix corresponding to the pending matrix index. When the pending validity flag is valid and the corresponding complete weight matrix is ​​in a valid state, the active matrix index is updated to the pending matrix index, and the pending validity flag is set to invalid.

[0055] If the audio processing task reads an invalid pending validity flag at the processing block boundary, the active matrix index will not be updated, and the next audio block will continue to use the complete weight matrix corresponding to the original active matrix index for beamforming. If the pending validity flag is valid, but the complete weight matrix corresponding to the pending validity flag is invalid, the audio processing task will not update the active matrix index and will clear the pending validity flag to terminate this switching request and avoid the invalid request being checked repeatedly at the boundaries of subsequent processing blocks.

[0056] Furthermore, such as Figure 4 As shown, let t be the boundary of the processing block after the b-th audio block is processed. b I A (b) represents the activity matrix index used when processing the b-th audio block, I P (b) represents the index of the matrix to be activated read at the processing block boundary tb during the audio processing process, V P (b) indicates the pending valid identifier read at the processing block boundary tb, V IP (b) indicates the effective state of the complete weight matrix corresponding to the matrix index IP(b) to be effective. Both the effective identifier and the effective state of the matrix are represented by binary values, where the effective state is recorded as 1 and the invalid state is recorded as 0.

[0057] In processing block boundary t b Whether to submit the pending matrix index is determined by the matrix validity status of the complete weight matrix corresponding to the pending matrix index and the pending valid identifier. Submission condition C b Determined according to the following formula: ; Among them, when V P (b) and V IP (b) When both are 1, submission condition C b The condition is 1; when at least one of them is 0, the submission condition C is 0. b It is 0.

[0058] Activity matrix index based on submission condition C b Update according to the following formula: ; When submission condition C b When the value is 1, the audio processing process occurs at the processing block boundary t. b Update the activity matrix index to the pending matrix index, and set the pending validity flag to invalid, when submission condition C. b When the value is 0, the activity matrix index remains the same as the activity matrix index used when processing the b-th audio block; if the pending valid identifier is valid but the corresponding complete weight matrix is ​​invalid at this time, the pending valid identifier is cleared.

[0059] Let I b Let be the current block matrix index of the b-th audio block. Then, when the audio processing begins processing the b-th audio block, the current block matrix index is obtained according to the following formula: ; For any sample number n within the b-th audio block, the matrix index I(n) used when processing the eight audio sample values ​​corresponding to that sample number remains unchanged according to the following formula: ; Where, n b Let I represent the starting sample number of the b-th audio block, and L represent the number of sample points contained in the b-th audio block. Therefore, the b-th audio block uses I from the starting sample point to the ending sample point. b The corresponding complete weight matrix, the above-mentioned intra-block index preservation relationship ensures that the arrival of angle commands and the setting of the index of the matrix to be effective will not change the complete weight matrix used by the b-th audio block being processed.

[0060] The audio processing process occurs at the processing block boundary t b Read the pending valid identifiers and pending valid matrix indices. Only the pending valid matrix indices that are already valid during this read are used to calculate the commit condition. These are then set as valid pending valid matrix indices for subsequent processing block boundary reading and processing after this read is complete. When commit condition C... b When the activity matrix index is updated to 1 and processing of the (b+1)th audio block begins, the updated activity matrix index I is read. A (b+1) is saved as the current block matrix index of the b+1th audio block. The b+1th audio block uses the complete weight matrix corresponding to the target matrix index for beamforming from the starting sampling point to the ending sampling point. After beamforming is completed, the directional audio block corresponding to the target preset sound reception direction is output.

[0061] When submission condition C b When the value is 0, the activity matrix index remains unchanged, and the (b+1)th audio block continues to be read and uses the complete weight matrix corresponding to the original activity matrix index for beamforming.

[0062] Furthermore, such as Figure 4 As shown, the eight consecutive audio channels are assigned block numbers according to the processing order. When the angle command is received and the pending effective flag is set to effective, it only indicates that the target matrix index has entered the pending state. At this time, the current audio block still uses the current block matrix index read when it started processing. Therefore, the time point of receiving the angle command is not determined as the time point of beam switching completion.

[0063] The audio processing task reads the pending validity flag and pending matrix index at the processing block boundary after the current audio block is processed. When the active matrix index update condition is met, the active matrix index is updated to the pending matrix index, and the pending validity flag is set to invalid. When the active matrix index is updated at the processing block boundary, it only indicates that the new active matrix index is available for the next audio block to read. Since the next audio block has not yet completed beamforming processing, beam switching is not recorded as completed directly at the processing block boundary.

[0064] When the next audio block begins processing, the updated active matrix index is read as the current block matrix index of the audio block, and the current block matrix index remains unchanged during the processing of the audio block from the start sampling point to the end sampling point. After the audio block completes beamforming and outputs directional audio blocks, it is checked whether the current block matrix index read when the audio block began processing is the updated active matrix index, and whether the current block matrix index remains unchanged throughout the entire processing of the audio block.

[0065] When the audio block is processed using the complete weight matrix corresponding to the updated activity matrix index from the start sampling point to the end sampling point, the audio block is determined as the first effective audio block, and the block number corresponding to the audio block is read. If the audio block is not processed using the complete weight matrix corresponding to the updated activity matrix index, or if the activity matrix index does not meet the update condition at the boundary of the corresponding processing block, the audio block is not determined as the first effective audio block, and beam switching completion information is not generated based on the audio block.

[0066] After the first effective audio block is determined, the block number of the first effective audio block is written into the beam switching status record, and the block number is used as the beam switching completion information. The beam switching completion information indicates that the target complete weight matrix has been actually used for beamforming processing of a complete audio block, and its formation time is later than the angle command reception time and the activity matrix index update time.

[0067] Furthermore, such as Figure 4 As shown, each complete weight matrix corresponds to a preset sound pickup direction, and beamforming parameter groups are set for each of the eight microphone channels. The beamforming parameter groups of the eight channels together constitute a complete weight matrix capable of processing eight channels of audio data. Each complete weight matrix uses a combination of delay parameters and amplitude weights, finite impulse response filter coefficients, or frequency domain complex weights. The specific parameter type used corresponds to the beamforming method performed by the beamforming processing unit.

[0068] In the implementation method that combines delay parameters and amplitude weights, the beamforming parameter group corresponding to each microphone channel includes the delay parameter and amplitude weight of that channel. The delay parameter is used to adjust the time position of the audio sample value of that channel relative to the audio sample values ​​of other channels, and the amplitude weight is used to adjust the contribution of the audio sample value of that channel after delay processing in the directional audio output. The beamforming processing unit performs time alignment on the audio sample values ​​of each channel according to the delay parameters corresponding to the eight microphone channels, then processes the aligned audio sample values ​​of each channel according to the corresponding amplitude weights, and combines the processing results of the eight channels into a directional audio block.

[0069] In the implementation using finite impulse response (FIR) filter coefficients, the beamforming parameter set corresponding to each microphone channel includes a sequence of FIR filter coefficients for filtering the channel. The beamforming processing unit processes the continuous audio sample values ​​of the channel using the corresponding coefficient sequence and synthesizes the filtering results of the eight channels into a directional audio block. The eight sets of FIR filter coefficients in the same complete weight matrix correspond to the eight microphone channels respectively and together form an inter-channel filtering relationship corresponding to a preset sound reception direction.

[0070] In the implementation using frequency domain complex weights, the beamforming parameter set corresponding to each microphone channel includes the complex weights of that channel at each processing frequency position. The amplitude part of the complex weights is used to adjust the amplitude of the corresponding frequency components, and the phase part of the complex weights is used to adjust the phase relationship of the corresponding frequency components. The beamforming processing unit converts the eight-channel audio blocks into corresponding frequency domain data, processes the frequency domain data of each channel using the frequency domain complex weights corresponding to each microphone channel in the current complete weight matrix, synthesizes the processed eight-channel frequency domain data, and converts the synthesized result into directional audio blocks.

[0071] When a beamforming processing unit begins processing an audio block, it reads the active matrix index and saves it as the current block matrix index. Then, based on the current block matrix index, it determines the storage location of the complete weight matrix and reads all beamforming parameters corresponding to the eight microphone channels from this complete weight matrix. The current block matrix index remains unchanged until the current audio block processing ends. The beamforming processing unit uses the same complete weight matrix selected by the current block matrix index for all sampled values ​​in the audio block. It does not change the parameters corresponding to the pending matrix index during the processing of this audio block, nor does it combine channel parameters corresponding to different matrix indices. After updating the active matrix index to the pending matrix index at the processing block boundary, the beamforming processing unit reads the updated active matrix index starting from the next complete audio block and selects another complete weight matrix from the updated active matrix index.

[0072] Furthermore, such as Figure 1 As shown, when the beamforming processing unit starts processing an eight-channel audio block, it reads the active matrix index, saves the reading result as the current block matrix index of the audio block, and keeps the current block matrix index unchanged until the processing of the audio block ends. The beamforming processing unit reads the corresponding complete weight matrix from the weight matrix storage unit according to the current block matrix index, and uses the beamforming parameters corresponding to the eight microphone channels in the complete weight matrix to process the eight audio sampling values ​​in the current audio block, generating the directional audio block corresponding to the current audio block.

[0073] During the processing of the current audio block, even if the index control unit sets the pending matrix index and pending valid flag according to the newly received angle command, the beamforming processing unit continues to process the current audio block using the complete weight matrix corresponding to the current block matrix index until the end sampling point of the audio block is processed. After the beamforming processing unit completes the beamforming processing of the current audio block, it reads the pending valid flag at the boundary of the corresponding processing block. When the pending valid flag is valid, it continues to read the pending matrix index and checks the matrix validity status of the complete weight matrix corresponding to the pending matrix index.

[0074] When the pending valid identifier is valid and the complete weight matrix corresponding to the pending valid matrix index is in a valid state, the beamforming processing unit updates the active matrix index to the pending valid matrix index and sets the pending valid identifier to invalid. When the pending valid identifier is valid but the complete weight matrix corresponding to the pending valid matrix index is in an invalid state, the beamforming processing unit does not update the active matrix index and clears the pending valid identifier to terminate the current handover request. When the pending valid identifier is invalid, the beamforming processing unit does not update the active matrix index and allows the next audio block to continue using the complete weight matrix corresponding to the original active matrix index.

[0075] After completing the processing block boundary processing, the beamforming processing unit rereads the active matrix index when the next complete audio block begins processing. If the active matrix index has been updated, the updated active matrix index is saved as the current block matrix index for the next complete audio block, and the audio block is processed using its corresponding complete weight matrix. During operation, the active matrix index is saved and maintained by the beamforming processing unit, and updates are only performed by the beamforming processing unit at the processing block boundary. The index control unit is only responsible for setting the matrix index to be activated and the valid identifier to be activated.

[0076] When the system starts, the index control unit performs initialization processing before processing the first eight-channel audio block. The initialization processing includes checking the valid status of each complete weight matrix, determining the default matrix index, and setting the valid flag to be activated to invalid. The index control unit reads the valid status of the complete weight matrix corresponding to the default sound pickup direction. When the valid status of the matrix is ​​valid, the matrix index corresponding to the complete weight matrix is ​​determined as the default matrix index. The beamforming processing unit sets the default matrix index as the initial active matrix index during the startup initialization phase. The initialization settings at system startup are not part of the processing block boundary update during operation. If the valid status of the complete weight matrix corresponding to the default sound pickup direction is invalid, the matrix index is not set as the active matrix index that can be used by the beamforming processing.

[0077] When setting the initial active matrix index, the pending valid identifier is set to invalid. After the pending valid identifier is set to invalid, the original values ​​in the pending valid matrix index do not participate in the update of the active matrix index. After the system completes the matrix validity check, the initial active matrix index setting, and the invalidation setting of the pending valid identifier, the beamforming processing unit starts to receive eight consecutive audio blocks. When the first audio block starts processing, the initial active matrix index is read as the current block matrix index. The first audio block uses the complete weight matrix corresponding to the default sound receiving direction for beamforming from the start sampling point to the end sampling point. When angle commands are received subsequently, matrix switching is performed according to the processing block boundary update rules of the pending valid matrix index and the pending valid identifier.

[0078] The audio output unit is connected to the beamforming processing unit and is used to receive directional audio blocks generated by the beamforming processing unit and the block number associated with the directional audio blocks. The received directional audio blocks are temporarily stored in the output buffer. The block number of each directional audio block is inherited from the eight-channel audio blocks that generated the directional audio block. After the beamforming processing unit completes the beamforming of an eight-channel audio block, it transmits the generated directional audio block and its block number to the audio output unit. The audio output unit writes the directional audio block into the corresponding buffer position in the output buffer according to the block number, and reads the corresponding directional audio block from the output buffer sequentially according to the block number. The directional audio blocks in the output buffer are written and read in order of block number, and the arrangement order of each directional audio block in the directional audio stream is not changed by the time the directional audio block arrives in the buffer.

[0079] The audio output unit sequentially outputs the audio sample values ​​of a directional audio block, starting from the starting sampling point. After outputting the end sampling point of the directional audio block, it determines the next consecutive block number as the new block number to be output and reads the next directional audio block. Adjacent directional audio blocks are connected according to their block numbers. The end sampling point of the previous directional audio block is connected to the starting sampling point of the next directional audio block. The directional audio blocks are combined in the sampling order to form a continuous directional audio stream. After the audio output unit completes the output of a directional audio block, it releases or marks the corresponding buffer position as writable. When the activity matrix index is updated, the directional audio blocks before beam switching and the directional audio blocks after beam switching still maintain consecutive block numbers. After the first directional audio block that has been fully processed using the updated activity matrix index and the corresponding full weight matrix enters the audio output unit, its block number remains unchanged in the position of the continuous directional audio stream, so that the beam switching completion information can correspond to the actual output directional audio block.

[0080] Finally, it should be noted that the above descriptions are merely preferred embodiments of the present invention and are not intended to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art can still modify the technical solutions described in the foregoing embodiments or make equivalent substitutions for some of the technical features. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A beam switching method for a linear eight-microphone directional sound receiving device, characterized in that, include: Obtain a continuous eight-channel audio block and pre-store complete weight matrices corresponding to multiple preset sound pickup directions. Each complete weight matrix contains beamforming parameters corresponding to eight microphone channels. When the current audio block begins processing, the active matrix index is read as the current block matrix index, and the current block matrix index is kept unchanged until the current audio block processing ends. Beamforming is performed on the current audio block using the complete weight matrix corresponding to the current block matrix index; Receive angle command, determine target matrix index according to angle command, set the matrix index to be activated as the target matrix index, set the valid flag to be activated as valid, and do not change the active matrix index; At the block boundary after the current audio block is processed, if the pending valid identifier is valid and the complete weight matrix corresponding to the pending valid matrix index is in a valid state, then the active matrix index is updated to the pending valid matrix index, and the pending valid identifier is set to invalid; otherwise, the active matrix index remains unchanged. Using the updated activity matrix index corresponding to the complete weight matrix, beamforming is performed on the next complete audio block to output a directional audio block.

2. The beam switching method according to claim 1, characterized in that, The pending-to-be-activated matrix index and the pending-to-be-activated valid identifier are set by the control task; the reading of the pending-to-be-activated valid identifier, the updating of the activity matrix index, and the invalidation setting of the pending-to-be-activated valid identifier are performed by the audio processing task at the block boundary; the control task does not directly modify the activity matrix index.

3. The beam switching method according to claim 1, characterized in that, The step of determining the target matrix index according to the angle command, setting the matrix index to be activated as the target matrix index, and setting the valid identifier to be activated as valid includes: Parse the angle command to obtain the target angle identifier; If the target angle identifier is valid, the target matrix index is determined according to the preset angle index mapping table; If the complete weight matrix corresponding to the target matrix index is in a valid state, and the target matrix index is different from the active matrix index, then the matrix index to be activated is first set to the target matrix index, and then the valid flag to be activated is set to valid. If the target angle identifier is invalid, the complete weight matrix corresponding to the target matrix index is invalid, or the target matrix index is the same as the active matrix index, then the matrix index to be activated and the valid identifier to be activated will not be set according to this angle instruction, and the active matrix index will remain unchanged.

4. The beam switching method according to claim 3, characterized in that, Each complete weight matrix is ​​associated with a valid state; after the beamforming parameters corresponding to the eight microphone channels in the complete weight matrix have been loaded and passed the integrity check, the valid state of the matrix is ​​set to valid; when the beamforming parameters have not been loaded or have failed the integrity check, the valid state of the matrix is ​​set to invalid.

5. The beam switching method according to claim 1, characterized in that: The acquisition of the continuous eight-channel audio block includes: acquiring eight audio sample values ​​of a linear eight-microphone array according to a common time base and the same sampling sequence number, and forming the eight-channel audio block by combining eight audio sample values ​​within the same sampling sequence number range; The pre-stored complete weight matrices corresponding to multiple preset radio directions include: loading and storing each complete weight matrix in an internal memory or external mapped storage area accessible by the digital signal processor; The method further includes generating a block boundary indicating the completion of processing of the current audio block based on sample count, direct memory access completion event, or buffer swap event.

6. The beam switching method according to claim 1, characterized in that, After outputting the directional audio block, the first audio block that is processed by the complete weight matrix corresponding to the updated activity matrix index from the start sampling point to the end sampling point is determined. The audio block is determined as the first effective audio block, the block number of the first effective audio block is recorded, and the block number is used as the beam switching completion information.

7. A linear eight-microphone directional sound receiving device, characterized in that, include: A linear eight-microphone array is used to acquire sound field signals and convert them into eight microphone signals; A multi-channel audio acquisition unit, connected to the linear eight-microphone array, is used to sample and align the eight microphone signals to form a continuous eight-channel audio block. The weight matrix storage unit is used to pre-store complete weight matrices corresponding to multiple preset sound pickup directions, and each complete weight matrix contains beamforming parameters corresponding to eight microphone channels. The instruction receiving and parsing unit is used to receive angle instructions and parse them to obtain the target angle identifier. The index control unit, connected to the instruction receiving and parsing unit and the weight matrix storage unit, is used to determine the target matrix index according to the target angle identifier, set the matrix index to be activated as the target matrix index, set the valid identifier to be activated as valid, and not change the active matrix index. A beamforming processing unit, connected to the multi-channel audio acquisition unit, the weight matrix storage unit, and the index control unit, is used to read the active matrix index as the current block matrix index when the current audio block begins processing, keep the current block matrix index unchanged until the current audio block processing ends, and perform beamforming on the current audio block using the complete weight matrix corresponding to the current block matrix index; it is also used at the block boundary after the current audio block processing is completed, when the pending effective valid identifier is valid and the complete weight matrix corresponding to the pending effective matrix index is in a valid state, to update the active matrix index to the pending effective matrix index, set the pending effective valid identifier to invalid, and perform beamforming on the next complete audio block using the complete weight matrix corresponding to the updated active matrix index, outputting a directional audio block; The activity matrix index is updated only by the beamforming processing unit at the block boundary.

8. The linear eight-microphone directional sound receiving device according to claim 7, characterized in that, The beamforming parameters include at least one of the following: a combination of delay parameters and amplitude weights, finite impulse response filter coefficients, or frequency domain complex weights; a complete weight matrix is ​​selected for the same audio block by the same current block matrix index.

9. The linear eight-microphone directional sound receiving device according to claim 7, characterized in that, The index control unit is also used to check the valid status of each complete weight matrix when the system starts, select the matrix index corresponding to the default reception direction as the initial active matrix index, and set the pending valid flag to invalid.

10. The linear eight-microphone directional sound receiving device according to claim 7, characterized in that, It also includes an audio output unit, which is connected to the beamforming processing unit and is used to receive and buffer the directional audio blocks output by the beamforming processing unit in sequence according to the block number, and continuously output a directional audio stream composed of each directional audio block.