Audio codec device, method and system with sound source directional function

By integrating voice activity detection, comprehensive signal-to-noise ratio calculation and delay estimation modules in the audio codec device, automatic weight distribution and sound source directional calculation are realized, which solves the problems of low accuracy and high algorithm complexity in sound source directional technology. , optimized delay control, improved audio experience and system stability.

CN117912474BActive Publication Date: 2024-10-22ALKAIDSEMI (SHANGHAI) TECHNOLOGIES CORP
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311762358.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-19
Publication Date
2024-10-22
Estimated Expiration
2043-12-19

AI Technical Summary

Technical Problem

Sound source directional technology has problems such as low accuracy, high algorithm complexity, and difficulty in balancing time delay control, which affects the accuracy of sound source positioning and the stability of the system.

Method used

An audio codec device with sound source directional function is designed, including a signal acquisition unit, an analog-to-digital conversion unit and a sound source directional unit. Through voice activity detection, comprehensive signal-to-noise ratio calculation, delay estimation and orientation judgment modules, it is realized Automated weight distribution and sound source orientation calculation improves the accuracy and stability of sound source orientation.

Benefits of technology

It significantly improves the accuracy of sound source orientation, reduces algorithm design complexity and engineering costs, optimizes delay control, provides a more realistic and accurate audio experience, and reduces the risk of sound delay and distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117912474B_ABST
    Figure CN117912474B_ABST
Patent Text Reader

Abstract

The present application provides an audio codec device, method and system with a sound source orientation function. By setting the sound source orientation function inside the audio codec and automatically allocating weights and calculating the sound source orientation based on real-time audio in the sound source orientation module, the accuracy of the sound source orientation is improved and the limitation of the sampling rate is eliminated. While maintaining high stability, the sound source orientation work provides flexible delay adjustment to better suit the real-time audio field. The complexity of the algorithm design is reduced, and the delay control can be automatically performed according to the actual scenario. In addition, the computing burden of the main processor is significantly reduced, and the efficiency and response speed of the overall system are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of audio coding and decoding, and in particular to an audio coding and decoding device, method and system with a sound source directional function. Background Art

[0002] The audio codec system is the core of digital audio. It is responsible for converting analog signals into digital signals and performing data compression and decompression. The system has an important impact on sound quality, data volume and processing efficiency. Its main processes include analog-to-digital conversion (ADC) and digital-to-analog conversion (DAC). During the analog-to-digital conversion process, the analog signal is sampled and quantized into a digital signal. Its sampling rate and quantization depth determine the audio quality. In order to facilitate storage and transmission, digital signals are compressed. Although technological development has reduced the need for compression, it is still important when resources are limited. During playback, digital-to-analog conversion restores digital signals to analog signals. Its performance, such as linearity, dynamic range and signal-to-noise ratio, is directly related to sound quality. High-performance digital-to-analog conversion is used to ensure high-fidelity conversion and provide high-quality listening experience. Audio codec technology is not only used in various electronic products, but also supports new technologies such as VR and AR to provide immersive experience.

[0003] Sound source directional technology uses complex acoustic models and advanced signal processing algorithms to analyze audio signals and accurately identify the spatial position of sound sources to achieve auditory reproduction of real-world sound environments. In applications such as VR, AR, and environmental sound processing, sound source directional technology effectively enhances the authenticity and immersion of audio, and improves the expressiveness and functionality of audio content. However, sound source directional technology still faces several challenges in practical applications, which mainly focus on the accuracy of sound source directional, the complexity and stability of algorithm design, and delay control. First, the higher the sampling rate of the sound source, the higher the accuracy of its directional. However, due to the limitation of the size of the microphone of the existing embedded device, its sampling rate is also limited, which affects the accuracy of sound source positioning. Secondly, sound source directional technology requires accurate knowledge of the coordinate information of each microphone, and different microphone array arrangements require the design of different processing algorithms. Due to the low accuracy of current sound source directional, the algorithm needs to be redesigned and adjusted each time it is applied to a new array configuration. This not only increases the cost of engineering applications, but also affects the stability and reliability of the system. Finally, if the delay of sound source directional processing is set too large, the accuracy of sound source directional will be reduced. If it is set too small, the system stability will be poor. Therefore, it is difficult to effectively balance delay control among system stability, sound source localization accuracy, and algorithm matching. Summary of the invention

[0004] In view of the shortcomings of the prior art described above, the purpose of the present application is to provide an audio codec device, method and system with a sound source orientation function, which is used to solve the problems of low accuracy, high algorithm complexity and difficult to balance delay control in sound source orientation technology.

[0005] To achieve the above-mentioned purpose and other related purposes, the first aspect of the present application provides an audio codec device with a sound source orientation function, comprising: a signal acquisition unit, used to acquire near-end audio analog signals through one or more pairs of audio acquisition devices; each audio acquisition device acquires one of the near-end audio analog signals; an analog-to-digital conversion unit, electrically connected to the signal acquisition unit; the analog-to-digital conversion unit is used to perform an analog-to-digital conversion operation, a data matching operation, and a data caching operation on the near-end audio analog signal to generate a corresponding near-end audio digital signal, and output the near-end audio digital signal to a sound source orientation unit; the sound source orientation unit is electrically connected to the analog-to-digital conversion unit; the sound source orientation unit includes two input terminals and an output terminal, the two input terminals respectively input the near-end audio digital signal and the position information of one or more pairs of audio acquisition devices sent by the control interface, and the output terminal is used to output the sound source orientation result obtained by the sound source orientation unit to the control interface; a digital-to-analog conversion unit, used to receive the far-end audio digital signal sent by the data interface, and perform a data caching operation, a data matching operation, a mixing operation, and a digital-to-analog conversion operation on the far-end audio digital signal.

[0006] In some embodiments of the first aspect of the present application, the sound source orientation unit includes: a voice activity detection module: which includes an input end and an output end; the input end is connected to the analog-to-digital conversion unit, and the output end is connected to the comprehensive signal-to-noise ratio calculation module; the voice activity detection module performs voice activity detection on the received near-end audio digital signal to generate a voice activity judgment result, and sends the voice activity judgment result to the comprehensive signal-to-noise ratio calculation module; a comprehensive signal-to-noise ratio calculation module: which includes two input ends and an output end; the two input ends are respectively connected to the analog-to-digital conversion unit and the voice activity detection module, and the output end is connected to the orientation judgment module; the comprehensive signal-to-noise ratio calculation module calculates the comprehensive signal-to-noise ratio based on the received near-end audio digital signal and the voice activity judgment result, and sends the comprehensive signal-to-noise ratio The time delay estimation module comprises an input terminal and an output terminal, wherein the input terminal is connected to the analog-to-digital conversion unit, and the output terminal is connected to the direction judgment module; the time delay estimation module performs a time delay estimation operation based on the received near-end audio digital signal to generate a time delay estimation result, and sends the time delay estimation result to the direction judgment module; the direction judgment module comprises three input terminals and one output terminal, wherein the three input terminals are respectively connected to the comprehensive signal-to-noise ratio calculation module, the time delay estimation module and the control interface; the direction judgment module performs a sound source orientation operation based on the received comprehensive signal-to-noise ratio corresponding to each pair of audio acquisition devices, the time delay estimation result and the position information of one or more pairs of audio acquisition devices to generate a sound source orientation result, and sends the sound source orientation result to the control interface.

[0007] In some embodiments of the first aspect of the present application, the process of the voice activity detection module performing voice activity detection includes: receiving a near-end audio digital signal, and using a window function to segment the near-end audio digital signal to obtain a set of amplitudes of continuous time points within a preset time period; calculating the short-time energy of the received near-end audio analog signal based on the set of amplitudes of continuous time points within the preset time period; if the current short-time energy is higher than a threshold, marking the current time point as voice activity detected, and outputting a corresponding voice activity judgment result; otherwise, marking the current time point as no voice activity detected, and outputting a corresponding voice activity judgment result; and sending the voice activity judgment result to the comprehensive signal-to-noise ratio calculation module.

[0008] In some embodiments of the first aspect of the present application, the process of the comprehensive signal-to-noise ratio calculation module performing the comprehensive signal-to-noise ratio calculation includes: calculating the average signal power and the average noise power of each channel based on the received voice activity judgment result and the near-end audio digital signal; calculating the signal-to-noise ratio of each channel based on the average signal power and the average noise power of each channel; calculating the comprehensive signal-to-noise ratio of the near-end audio analog signal based on the signal-to-noise ratio of each channel, and sending the comprehensive signal-to-noise ratio to the directional judgment module.

[0009] In some embodiments of the first aspect of the present application, the process of performing sound source orientation on the near-end audio analog signal collected by each pair of audio collection devices by the orientation judgment module includes: performing spatial angle estimation based on the time delay estimation results of each pair of near-end audio analog signals and the position information difference of each pair of audio collection devices to generate an estimated angle for each pair of audio collection devices; setting the corresponding weight according to the comprehensive signal-to-noise ratio of each pair of near-end audio analog signals; and calculating the sound source direction of the near-end audio analog signal by weighted averaging based on the estimated angle and the corresponding weight of each pair of audio collection devices to generate a sound source orientation result and sending the sound source orientation result to the control interface.

[0010] In some embodiments of the first aspect of the present application, the process of delay estimation performed by the delay estimation module includes: receiving a near-end audio digital signal, inputting the digital signal collected by each pair of audio acquisition devices into a cross-correlation function, and performing delay estimation on the near-end audio analog signal based on the time difference between the near-end audio analog signal reaching each pair of audio acquisition devices, so as to generate a delay estimation result and send the delay estimation result to the directional judgment module.

[0011] In some embodiments of the first aspect of the present application, the digital-to-analog conversion unit includes: a digital-to-analog conversion module: used to convert the received remote audio digital signal into an analog signal of the remote audio signal; a mixing module: used to mix and superimpose the digital signal of the remote audio signal with the digital signals of other remote audio streams or the locally stored digital audio streams to generate a digital-to-analog intermediate signal; a data matching module: performing a format conversion operation on the digital-to-analog intermediate signal in a preset format to generate a digital-to-analog intermediate signal after format conversion; a data caching module: performing delay matching and data caching operations on the digital-to-analog intermediate signal after format conversion.

[0012] To achieve the above-mentioned purpose and other related purposes, the second aspect of the present application provides an audio codec method with a sound source orientation function, which is applied to an audio codec, including: collecting near-end audio analog signals through one or more pairs of audio acquisition devices; each audio acquisition device collects one of the near-end audio analog signals; performing analog-to-digital conversion operations, data matching operations, and data caching operations on the near-end audio analog signals to generate corresponding near-end audio digital signals; receiving position information of one or more pairs of audio acquisition devices, performing sound source orientation operations on the near-end audio digital signals based on the position information to generate sound source orientation results, and sending the sound source orientation results and the near-end audio digital signals to a main chip; receiving far-end audio digital signals sent by a data interface, performing data caching operations, data matching operations, mixing operations, and digital-to-analog conversion operations on the far-end audio digital signals.

[0013] In some embodiments of the second aspect of the present application, the process of performing a sound source orientation operation on a near-end audio digital signal includes: performing voice activity detection on the near-end audio digital signal to generate a voice activity judgment result; calculating a comprehensive signal-to-noise ratio based on the near-end audio digital signal and the voice activity judgment result; performing a delay estimation operation on the near-end audio digital signal to generate a delay estimation result; and performing a sound source orientation operation to generate a sound source orientation result based on the comprehensive signal-to-noise ratio, the comprehensive signal-to-noise ratio, the delay estimation result, and position information of one or more pairs of audio collection devices.

[0014] To achieve the above-mentioned purpose and other related purposes, the third aspect of the present application provides an audio codec system with a sound source directional function, including: a main processor and the audio codec device with a sound source directional function.

[0015] As described above, an audio codec device, method and system with a sound source orientation function in the field of audio codec of the present application have the following beneficial effects: by setting the sound source orientation function inside the audio codec, and performing automatic weight allocation and sound source orientation calculation based on real-time audio in the sound source orientation module, the sound source orientation accuracy is effectively improved, the algorithm design and application costs are reduced, the delay and stability are optimized, and the computing power pressure of the main processor is released.

[0016] First, the audio codec device with the sound source orientation function provided by the present invention is arranged inside the audio codec, so that high sampling frequency audio can be effectively utilized, thereby getting rid of the problem that the traditional sound source orientation is limited by the low sampling rate and has poor accuracy. The system can process audio signals up to 96kHz or 192kHz, greatly improving the accuracy of sound source orientation. Compared with the traditional 16kHz or 48kHz sampling rate, this significant improvement makes the sound source orientation more accurate in complex environments and reduces the error rate. In practical applications, this means that the accuracy of sound positioning can reach higher standards, especially in occasions where accurate sound source positioning is required (such as professional audio production, VR / AR applications, etc.), the present invention can provide a more realistic and accurate audio experience. Secondly, the present invention effectively reduces the complexity of algorithm design and the cost of engineering implementation. This adaptive algorithm not only reduces the investment in human resources, but also reduces the dependence on professional knowledge. Finally, the present invention optimizes the stability of delay control, and the present invention can optimize the response time of sound source orientation processing according to actual needs. Compared with traditional solutions, this optimization can significantly improve user experience and reduce the risk of sound delay and distortion. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 A structural schematic diagram showing the external connections of an embodiment of an audio codec device with a sound source directional function of the present application.

[0018] Figure 2 A structural schematic diagram showing the internal connections of an embodiment of an audio codec device with a sound source directional function of the present application.

[0019] Figure 3 A schematic diagram showing the structure of an analog-to-digital conversion unit in an embodiment of an audio codec device with a sound source directional function of the present application

[0020] Figure 4 A schematic diagram of the structure of a sound source orientation unit in an embodiment of an audio codec device with a sound source orientation function of the present application is shown.

[0021] Figure 5 A schematic diagram of the structure of a digital-to-analog conversion unit in an embodiment of an audio codec device with a sound source directional function of the present application is shown.

[0022] Figure 6 A flow chart of an embodiment of an audio encoding and decoding method with a sound source directional function of the present application is shown.

[0023] Figure 7 A schematic diagram of the interaction process of an embodiment of an audio codec system with a sound source directional function of the present application is shown. DETAILED DESCRIPTION

[0024] The following describes the embodiments of the present application through specific examples, and those skilled in the art can easily understand other advantages and effects of the present application from the contents disclosed in this specification. The present application can also be implemented or applied through other different specific embodiments, and the details in this specification can also be modified or changed in various ways based on different viewpoints and applications without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.

[0025] It should be noted that in the following description, with reference to the accompanying drawings, several embodiments of the present application are described in the accompanying drawings. It should be understood that other embodiments may also be used, and mechanical composition, structure, electrical and operational changes may be made without departing from the spirit and scope of the present application. The following detailed description should not be considered restrictive, and the scope of the embodiments of the present application is limited only by the claims of the published patents. The terms used here are only for describing specific embodiments and are not intended to limit the present application. Spatially related terms, such as "upper", "lower", "left", "right", "below", "below", "lower", "above", "upper", etc., may be used in the text to facilitate the description of the relationship between an element or feature shown in the figure and another element or feature.

[0026] In this application, unless otherwise clearly specified and limited, the terms "install", "connect", "connect", "fix", "hold" and the like should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be an indirect connection through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in this application can be understood according to specific circumstances.

[0027] Furthermore, as used herein, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless there is an indication to the contrary in the context. It should be further understood that the terms "comprise", "include" indicate the presence of the described features, operations, elements, components, items, kinds, and / or groups, but do not exclude the presence, occurrence or addition of one or more other features, operations, elements, components, items, kinds, and / or groups. The terms "or" and "and / or" used herein are interpreted as inclusive, or mean any one or any combination. Therefore, "A, B or C" or "A, B and / or C" means "any of the following: A; B; C; A and B; A and C; B and C; A, B and C". Exceptions to this definition will only occur when the combination of elements, functions or operations is inherently mutually exclusive in some way.

[0028] In order to solve the problems in the above-mentioned background technology, the present invention provides an audio codec device, method and system with a sound source orientation function, aiming to solve the problems of low accuracy, high algorithm complexity and difficulty in balancing delay control in the sound source orientation technology. At the same time, in order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution in the embodiment of the present invention is further described in detail through the following embodiments and in combination with the accompanying drawings. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the invention.

[0029] Before further describing the present invention in detail, the nouns and terms involved in the embodiments of the present invention are explained. The nouns and terms involved in the embodiments of the present invention are applicable to the following interpretations:

[0030] <1> Audio codec: Audio codec is used to encode / decode audio data, converting audio data from one format to another to reduce data computing, transmission, and storage costs.

[0031] <2> Sound source orientation: Sound source orientation refers to the processing of sound signals to determine the direction of the sound source. This process usually involves waveform analysis and processing of sound signals to determine the direction of the sound source.

[0032] <3> Acoustic-to-electrical transducer: Acoustic-to-electrical transducer refers to a device or component that can convert sound signals into electrical signals or vice versa. These devices usually include microphones, speakers, headphones, etc.

[0033] <4> Short-time energy of audio: Short-time energy of audio refers to the energy of an audio signal within a period of time. Short-time energy is usually calculated by performing a short-time Fourier transform on the audio signal.

[0034] <5> Cross-correlation function: The cross-correlation function refers to the correlation function between two signals. It is used to measure the similarity and correlation between two signals.

[0035] <6> Signal-to-noise ratio: Signal-to-noise ratio refers to the ratio between signal and noise. It is used to measure the clarity and quality of the signal and the degree of interference from the noise.

[0036] The embodiment of the present invention provides an audio codec device with a sound source directional function, a method of an audio codec method with a sound source directional function, and an electronic terminal for implementing the audio codec method with a sound source directional function. As for the implementation of the audio codec device with a sound source directional function, the embodiment of the present invention will illustrate an exemplary implementation scenario of the audio codec with a sound source directional function.

[0037] like Figure 1FIG. 1 is a schematic diagram showing the external structure of an audio codec device with a sound source directional function in an embodiment of the present invention. The audio codec device with a sound source directional function is arranged inside the audio codec, and a control interface and a data interface for external data transmission are arranged inside the audio codec. The external connection structure of the audio codec device with a sound source directional function is explained below.

[0038] In one embodiment of the present invention, the audio codec is used to perform encoding / decoding operations for audio data, and the audio data is converted from one format to another format to reduce the cost of data calculation, transmission and storage. The basic structure of the audio codec includes three parts. The first part is the uplink (recording) path, which includes an analog-to-digital conversion module, a data format conversion module, a data cache module, and a data interface; the second part is the downlink (playing) path, which includes a data cache module, a data format conversion module, a mixing module (for mixing multiple audio streams), and a digital-to-analog conversion unit; and the third part is a control interface. The audio codec involved in the present invention is internally provided with a DOA (direction of arrival estimation or sound source orientation) processing unit, which is used to perform real-time sound source orientation in the audio and video encoding and decoding link, thereby improving the accuracy of sound source orientation, reducing design complexity, improving stability, and optimizing delay performance.

[0039] In one embodiment of the present invention, input audio refers to an audio acquisition device that obtains an audio stream from the outside, wherein the audio acquisition device includes but is not limited to a digital microphone, an analog microphone, a sensor, or other forms of sound-to-electric conversion devices. The audio acquisition device converts the input sound wave signal into a voltage signal by converting the sound signal into an electrical signal. It is worth noting that the purpose of the present invention is to perform real-time sound source orientation in the audio and video encoding and decoding link, so the audio input of the present invention is a multi-channel signal to perform sound source orientation detection.

[0040] In one embodiment of the present invention, audio output refers to the audio codec outputting the audio stream to an external sound playback device. The types of players include but are not limited to receivers, speakers or headphones, or a combination of one or more of the above. The audio collected by a single sound playback device can be single-channel or multi-channel. The audio output is also responsible for converting electrical signals into sound signals. Its input is a voltage signal and its output is a sound wave signal.

[0041] In one embodiment of the present invention, Figure 1The control interface in the audio codec is a channel for the main processor to issue instructions to the audio codec, and the audio codec can also feedback the real-time status to the main processor through the control interface. The interface protocols that the control interface can adopt include but are not limited to I2C protocol, Soundwire protocol, Slimbus protocol, HDA protocol, etc. The user can issue control instructions to the audio codec and collect the status of the audio codec through the control interface. In particular, when performing the sound source orientation operation, the user sends the location information of the current audio acquisition device to the audio codec by issuing control instructions through the control interface, so that the audio codec can perform the sound source orientation operation. At the same time, the audio codec also sends the generated sound source orientation result to the main processor through the control interface, so that the user can perform subsequent operations based on the sound source orientation result.

[0042] In one embodiment of the present invention, Figure 1 The data interface in the audio codec is used to provide an audio data interaction channel between the main processor and the audio codec. Exemplarily, the original audio stream is sent to the main processor through the data interface, and the main processor transmits the remote audio signal or the local music signal to the audio codec through the data interface. The communication interface protocol used by the data interface includes but is not limited to the I2S / PCM / TDM protocol, Soundwire protocol, Slimbus protocol, HDA protocol and other interface protocols.

[0043] In one embodiment of the present invention, Figure 1 The main processor in the above refers to the SOC (System On Chip) processing chip. The main processor is responsible for the function control of the device, receiving and processing the audio data of the audio codec upstream, or transmitting the audio data to the audio codec downstream channel for further processing. At the same time, the operating status of the audio codec can be monitored in real time through the control interface, and the parameter configuration for the sound source directional calculation can be sent to the audio codec.

[0044] Combination of the above Figure 1 The external connection structure and function of the audio codec device with sound source directional function of the present invention are described in detail. Figure 2 The audio codec device with sound source directional function of the present invention is described in detail.

[0045] like Figure 2 FIG. 2 is a schematic diagram showing the structure of an audio codec device with a sound source orientation function in an embodiment of the present invention. In this embodiment, the audio codec device with a sound source orientation function includes: a signal acquisition unit, an analog-to-digital conversion unit, a sound source orientation unit, and a digital-to-analog conversion unit.

[0046] Signal acquisition unit: used to collect proximal audio analog signals through one or more pairs of audio acquisition devices; each audio acquisition device collects one path of proximal audio analog signals.

[0047] In an embodiment of the present invention, the types of one or more pairs of audio acquisition devices collected include but are not limited to digital microphones, analog microphones, sensors, or other forms of acoustic-electric conversion devices. The signal acquisition unit converts the acoustic signal of the input device into an electrical signal and converts the acoustic wave signal into a voltage signal. It is worth noting that the purpose of the present invention is to perform real-time sound source orientation in the audio and video encoding and decoding links. Therefore, the audio input of the present invention is a multi-channel signal to perform sound source orientation detection.

[0048] Analog-to-digital conversion unit, electrically connected to the signal acquisition unit; the analog-to-digital conversion unit is used to perform analog-to-digital conversion operations, data matching operations, and data caching operations on the proximal audio analog signals to generate corresponding proximal audio digital signals and output the proximal audio digital signals to the sound source orientation unit.

[0049] In an embodiment of the present invention, the analog-to-digital conversion unit is used to convert an external audio input signal into a digital signal that meets the current system processing requirements. As Figure 3 shown, it shows the structural schematic diagram of the analog-to-digital conversion unit in an embodiment of the present invention. The analog-to-digital conversion unit includes an analog-to-digital conversion module, a data matching module, and a data caching module. The input signal of the analog-to-digital conversion unit is an audio input signal, that is, an analog audio signal; its output is a digital signal that meets the current audio encoding and decoding processing requirements. The input signal of the analog-to-digital conversion unit is a multi-channel signal, and the number of channels of the output signal is the same as that of the input signal.

[0050] In an embodiment of the present invention, the analog-to-digital conversion module converts the input analog audio stream into a digital audio stream through sampling and quantization for subsequent processing to be based on digital discrete signals.

[0051] x(n) = x(nT), -∞ < n < ∞ (Formula 1)

[0052] x q (n) = Q[x(n)] (Formula 2)

[0053] Among them, Formula 1 represents the sampling process of the analog-to-digital conversion module, which first discretely samples the input analog continuous signal x(t) at the sampling period T and outputs x(n). Formula 2 shows the process of performing quantization operations on the discrete-time signal, discretizing the amplitude of the output x(n) of the sampling process through the quantization function Q and outputting x q (n). Through the above two processes, the conversion of the analog continuous signal into the output digital discrete signal is realized, and the analog intermediate signal in the digital signal format is input for the data matching operation to be performed.

[0054] In one embodiment of the present invention, the data matching module performs a format conversion operation on the converted digital audio stream, including but not limited to operations such as sampling rate matching and signal bit width matching.

[0055]

[0056]

[0057] Wherein, formula 3 represents the filtering operation and sampling rate conversion operation of the analog intermediate signal. Wherein, x(n) is the output of the analog-to-digital conversion module, M is the downsampling change factor, I is the upsampling change factor, h(k) is the unit impulse response function, and the output y d (n) or y u (n). Formula 4 represents the process of signal width matching. According to the positive or negative value of the shift width B, it is determined whether the width matching is left shift amplification or right shift reduction. The input signal of this unit is the analog-to-digital intermediate signal, and the output is a digital signal that meets the current system processing requirements.

[0058] In one embodiment of the present invention, the data cache module is used to cache a certain amount of data in the audio interface to avoid jitter introduced into the audio signal due to design defects of the systems on both sides of the interface, that is, the audio data is repeatedly sampled or lost. Through the data cache module, the audio codec system can output two multi-channel audio signals with different sampling rates to the sound source directional unit and the main control of the system at the same time. The input of this unit is a digital signal, and there is no output data stream.

[0059] A sound source orientation unit is electrically connected to the analog-to-digital conversion unit; the sound source orientation unit includes two input terminals and an output terminal, the two input terminals respectively input the near-end audio digital signal and the position information of one or more pairs of audio collection devices sent by the control interface, and the output terminal is used to output the sound source orientation result obtained by the sound source orientation unit to the control interface.

[0060] In one embodiment of the present invention, Figure 4As shown, the sound source orientation unit includes: a voice activity detection module, a comprehensive signal-to-noise ratio calculation module, a time delay estimation module and a direction determination module. The sound source orientation unit combines technologies such as time delay estimation (TDOA), voice activity detection (VAD) and signal-to-noise ratio analysis (SNR), and provides accurate sound source direction estimation by accurately measuring the time difference between the sound reaching different microphones and effectively distinguishing between signals and noise. The core idea is to use the signal-to-noise ratio of each pair of sound collection devices to represent the weight of each pair of signals, and synthesize the final sound source direction by weighted averaging.

[0061] In one embodiment of the present invention, the paired audio collection devices used are microphones, and the position coordinates of N microphones on the same plane are defined as m 1 ,m 2 ,…,m N , specifically, each coordinate m i =(x i ,y i ) represents the position of the i-th microphone. S i (t) represents the amplitude of the signal received by the i-th microphone at time point t.

[0062] In this embodiment, the voice activity detection module includes an input end and an output end; the input end is connected to the analog-to-digital conversion unit, and the output end is connected to the comprehensive signal-to-noise ratio calculation module; the voice activity detection module performs voice activity detection on the received near-end audio digital signal to generate a voice activity judgment result, and sends the voice activity judgment result to the comprehensive signal-to-noise ratio calculation module.

[0063] Furthermore, the process of the voice activity detection module performing voice activity detection includes: receiving a near-end audio digital signal, and using a window function to segment the near-end audio digital signal to obtain a set of amplitudes of continuous time points within a preset time period; calculating the short-time energy of the received near-end audio analog signal based on the set of amplitudes of continuous time points within the preset time period; if the current short-time energy is higher than a threshold, marking the current time point as voice activity detected, and outputting a corresponding voice activity judgment result; otherwise, marking the current time point as no voice activity detected, and outputting a corresponding voice activity judgment result; and sending the voice activity judgment result to the comprehensive signal-to-noise ratio calculation module.

[0064] In one embodiment of the present invention, the voice activity detection module detects voice activity based on an audio energy threshold, and uses voice activity monitoring based on the energy threshold to distinguish between the signal part and the noise part. Specifically, short-term energy calculation is used to determine the sound activity.

[0065]

[0066] Where E(t) represents the short-time energy collected by the current window w. If E(t)>Θ, it is considered that there is speech activity at time point t, and Θ represents the threshold of short-time energy.

[0067] In this embodiment, the delay estimation module includes an input end and an output end; the input end is connected to the analog-to-digital conversion unit, and the output end is connected to the orientation judgment module; the delay estimation module performs a delay estimation operation based on the received near-end audio digital signal to generate a delay estimation result, and sends the delay estimation result to the orientation judgment module.

[0068] Furthermore, the delay estimation module performs the delay estimation process including: receiving a near-end audio digital signal, inputting the digital signal collected by each pair of audio acquisition devices into a cross-correlation function, and performing delay estimation on the near-end audio analog signal according to the time difference between the near-end audio analog signal reaching each pair of audio acquisition devices, so as to generate a delay estimation result and send the delay estimation result to the directional judgment module.

[0069] In one embodiment of the present invention, the cross-correlation function is used to measure the time delay estimate Δt of the sound reaching microphone pair i and j. ij , and the following calculation method is used.

[0070]

[0071] In this embodiment, the comprehensive signal-to-noise ratio calculation module includes two input terminals and one output terminal; the two input terminals are respectively connected to the analog-to-digital conversion module and the voice activity detection module, and the output terminal is connected to the orientation judgment module; the comprehensive signal-to-noise ratio calculation module calculates the comprehensive signal-to-noise ratio based on the received near-end audio digital signal and the voice activity judgment result, and sends the comprehensive signal-to-noise ratio to the orientation judgment module.

[0072] Furthermore, the process of performing comprehensive signal-to-noise ratio calculation by the comprehensive signal-to-noise ratio calculation module includes: calculating the average signal power and the average noise power of each channel based on the received voice activity judgment result and the near-end audio digital signal; calculating the signal-to-noise ratio of each channel based on the average signal power and the average noise power of each channel; calculating the comprehensive signal-to-noise ratio of the near-end audio analog signal based on the signal-to-noise ratio of each channel, and sending the comprehensive signal-to-noise ratio to the directional judgment module.

[0073] Furthermore, the process of performing sound source orientation on the near-end audio analog signal collected by each pair of audio collection devices by the orientation judgment module includes: performing spatial angle estimation based on the time delay estimation result of each pair of near-end audio analog signals and the position information difference of each pair of audio collection devices to generate an estimated angle for each pair of audio collection devices; setting the corresponding weight according to the comprehensive signal-to-noise ratio of each pair of near-end audio analog signals; and calculating the sound source direction of the near-end audio analog signal by weighted averaging based on the estimated angle and the corresponding weight of each pair of audio collection devices to generate a sound source orientation result and sending the sound source orientation result to the control interface.

[0074] In one embodiment of the present invention, the comprehensive signal-to-noise ratio calculation module first calculates the average power, ie, the signal power, within the time period when the voice activity is detected.

[0075]

[0076] Then, the average power during the period when no voice activity is detected is calculated, that is, the noise power.

[0077]

[0078] The signal-to-noise ratio is then calculated based on the signal power and the noise power.

[0079]

[0080] The combined signal-to-noise ratio for each pair of microphones i and j is:

[0081]

[0082] The weight of each pair of microphones i and j is defined based on the comprehensive signal-to-noise ratio of each pair of microphones i and j, and its weight w ij Set as signal-to-noise ratio SNR ij , for angular estimation of the sound source direction.

[0083] In this embodiment, the orientation judgment module includes three input terminals and one output terminal; the three input terminals are respectively connected to the comprehensive signal-to-noise ratio calculation module, the delay estimation module and the control interface; the orientation judgment module performs a sound source orientation operation based on the comprehensive signal-to-noise ratio corresponding to each pair of audio acquisition devices, the delay estimation result and the position information of one or more pairs of audio acquisition devices received to generate a sound source orientation result, and sends the sound source orientation result to the control interface.

[0084] Furthermore, the process of performing sound source orientation on the near-end audio analog signal collected by each pair of audio collection devices by the orientation judgment module includes: performing spatial angle estimation based on the time delay estimation result of each pair of near-end audio analog signals and the position information difference of each pair of audio collection devices to generate an estimated angle for each pair of audio collection devices; setting the corresponding weight according to the comprehensive signal-to-noise ratio of each pair of near-end audio analog signals; and calculating the sound source direction of the near-end audio analog signal by weighted averaging based on the estimated angle and the corresponding weight of each pair of audio collection devices to generate a sound source orientation result and sending the sound source orientation result to the control interface.

[0085] In one embodiment of the present invention, Formula 11 is used to estimate the angle of the sound source direction.

[0086]

[0087] Where c is the speed of sound, which is usually 343 m / s. T is the time delay of sound propagation, in ms. D is the distance difference between the two receivers received from the control interface, in m.

[0088] Subsequently, the sound source directions are synthesized by weighted averaging to generate the sound source orientation result.

[0089]

[0090] The digital-to-analog conversion unit 24 is used to receive the remote audio digital signal sent by the data interface, and perform data buffering, data matching, mixing and digital-to-analog conversion operations on the remote audio digital signal.

[0091] In one embodiment of the present invention, the digital-to-analog conversion unit is used to convert the digital signal into an audio output signal (usually an analog signal). Figure 5 As shown, the digital-to-analog conversion unit includes an analog-to-digital conversion module, a mixing module, a data matching module, and a data buffer module. The input signal of the unit is a digital signal, and the output signal is an analog signal. The input signal of the module can be a single-channel signal or a multi-channel signal, and the output signal can also be a single-channel or multi-channel. The number of channels of the input signal and the output signal does not have to be the same. The number of input channels and the number of output channels can be set accordingly by the mixing module.

[0092] Furthermore, the data cache module is used to cache audio data to avoid repeated sampling or loss of audio data due to jitter introduced by system clock design defects on both sides of the interface; the data matching module is used to convert the format of the audio stream to match an external sound playback device, the type of playback device includes but is not limited to a receiver, a speaker or headphones, or a combination of one or more of the above, and the audio collected by a single sound playback device can be single-channel or multi-channel.

[0093] In this embodiment, the mixing module is used to mix and superimpose the digital signal of the remote audio signal with the digital signal of other remote audio streams or the digital audio stream stored locally to generate a digital-to-analog intermediate signal.

[0094]

[0095] Wherein, Formula 13 indicates that there are M input audio streams x(n), and after accumulating them, the output mixed audio stream y(n) is obtained.

[0096] In this embodiment, the digital-to-analog conversion module converts the digital audio stream processed by the codec into an analog audio stream.

[0097]

[0098] v = ky(t) (Formula 15)

[0099] Among them, formula 14 is to increase the sampling rate to the analog processing sampling rate through the interpolation process, and interpolation fitting is performed between digital sample points. Formula 15 is the process of converting digital signals into analog signals. The input digital discrete signal y(n) is multiplied by the proportional factor k to obtain the output analog voltage signal v(t), realizing the function of converting discrete digital signals into continuous analog signals.

[0100] like Figure 6 FIG. 1 is a flow chart showing an audio codec method with a sound source orientation function in an embodiment of the present invention. The audio codec method with a sound source orientation function in this embodiment mainly includes the following steps:

[0101] Step S61: Perform voice activity detection on the near-end audio digital signal to generate a voice activity decision result.

[0102] Step S62: Calculate a comprehensive signal-to-noise ratio based on the near-end audio digital signal and the voice activity decision result.

[0103] Step S63: performing a delay estimation operation on the near-end audio digital signal to generate a delay estimation result.

[0104] Step S64: Based on the comprehensive signal-to-noise ratio, the comprehensive signal-to-noise ratio, the delay estimation result and the position information of one or more pairs of audio collection devices, a sound source orientation operation is performed to generate a sound source orientation result.

[0105] It should be noted that the audio codec method with sound source orientation function provided in the above embodiment and the audio codec device embodiment with sound source orientation function belong to the same concept, and the specific implementation process is detailed in the device embodiment, which will not be repeated here.

[0106] like Figure 7 As shown, a schematic diagram of the interaction process of an audio codec system with a sound source orientation function in one embodiment of the present invention is shown. It includes a main processor and the audio codec device with a sound source orientation function described above. The main processor sends control instructions to the audio codec device through a control interface and receives the sound source orientation result, and sends and receives audio data to the audio codec device through a data interface. In addition to the control interface and data interface connected to the main processor, the audio codec device also includes an audio input channel and an audio output channel to collect and play audio signals.

[0107] The audio codec system with sound source orientation function in this embodiment includes the following interactive process when performing sound source orientation: first, the main processor sends downlink audio to the audio codec device through the data interface, and plays the audio into the space through the playback device connected to the audio codec device. After receiving the played audio, one or more pairs of audio acquisition devices arranged in the space analyze it through the uplink path of the audio codec device. The analysis process is to estimate the orientation of the sound source based on the position information of the audio acquisition device sent by the main processor through the control interface, and send the sound source orientation result to the main processor through the control interface, so that the main processor can perform subsequent operations based on the sound source orientation result. At the same time, the audio codec device also sends the digital signal of the uplink audio signal collected in the uplink path to the main processor through the data interface.

[0108] It should be noted that the audio codec system with sound source orientation function provided in the above embodiment and the audio codec device embodiment with sound source orientation function belong to the same concept, and the specific implementation process is detailed in the device embodiment, which will not be repeated here.

[0109] In summary, the present application provides an audio codec device, method and system with a sound source orientation function. The present invention provides a method for improving the efficiency of an audio codec with a sound source orientation function. By setting the sound source orientation function inside the audio codec, and performing automatic weight distribution and sound source orientation calculation based on real-time audio in the sound source orientation module, the accuracy of the sound source orientation is improved, and the limitation of the sampling rate is eliminated. While maintaining high stability, the sound source orientation work provides flexible delay adjustment to better suit the real-time audio field. The complexity of the algorithm design is reduced, and the delay control can be automatically performed according to the actual scenario. In addition, the computing burden of the main processor is significantly reduced, and the efficiency and response speed of the overall system are improved. Therefore, the present application effectively overcomes the various shortcomings in the prior art and has a high industrial utilization value.

[0110] The above embodiments are merely illustrative of the principles and effects of the present application and are not intended to limit the present application. Anyone familiar with the technology may modify or change the above embodiments without violating the spirit and scope of the present application. Therefore, all equivalent modifications or changes made by a person of ordinary skill in the art without departing from the spirit and technical ideas disclosed in the present application shall still be covered by the claims of the present application.

Claims

1. An audio codec device with a sound source directional function, characterized in that: include: A signal acquisition unit is used to acquire near-end audio analog signals through one or more pairs of audio acquisition devices; each audio acquisition device acquires one near-end audio analog signal; an analog-to-digital conversion unit, electrically connected to the signal acquisition unit; the analog-to-digital conversion unit is used to perform an analog-to-digital conversion operation, a data matching operation, and a data caching operation on the near-end audio analog signal to generate a corresponding near-end audio digital signal, and output the near-end audio digital signal to the sound source directional unit; A sound source orientation unit is electrically connected to the analog-to-digital conversion unit; the sound source orientation unit includes two input terminals and an output terminal, the two input terminals respectively input the near-end audio digital signal and the position information of one or more pairs of audio collection devices sent by the control interface, and the output terminal is used to output the sound source orientation result obtained by the sound source orientation unit to the control interface; the sound source orientation unit includes a comprehensive signal-to-noise ratio calculation module, the comprehensive signal-to-noise ratio calculation module calculates the comprehensive signal-to-noise ratio based on the received near-end audio digital signal and the voice activity judgment result, and sends the comprehensive signal-to-noise ratio to the orientation judgment module; The process of the comprehensive signal-to-noise ratio calculation module performing comprehensive signal-to-noise ratio calculation includes: calculating the average signal power and average noise power of each channel based on the received voice activity judgment result and the near-end audio digital signal; calculating the signal-to-noise ratio of each channel based on the average signal power and average noise power of each channel; calculating the comprehensive signal-to-noise ratio of the near-end audio analog signal based on the signal-to-noise ratio of each channel, and sending the comprehensive signal-to-noise ratio to the orientation judgment module; the process of the orientation judgment module performing sound source orientation on the near-end audio analog signal collected by each pair of audio acquisition devices includes: performing spatial angle estimation based on the time delay estimation result of each pair of near-end audio analog signals and the position information difference of each pair of audio acquisition devices to generate an estimated angle of each pair of audio acquisition devices; setting the corresponding weight of each pair of near-end audio analog signals according to the comprehensive signal-to-noise ratio; calculating the sound source direction of the near-end audio analog signal by weighted averaging based on the estimated angle and the corresponding weight of each pair of audio acquisition devices to generate a sound source orientation result and sending the sound source orientation result to the control interface; The digital-to-analog conversion unit is used to receive the remote audio digital signal sent by the data interface, and perform data buffering operations, data matching operations, mixing operations and digital-to-analog conversion operations on the remote audio digital signal.

2. The audio codec device with sound source directional function according to claim 1, characterized in that: The sound source directional unit comprises: A voice activity detection module: comprising an input end and an output end; the input end is connected to the analog-to-digital conversion unit, and the output end is connected to the comprehensive signal-to-noise ratio calculation module; the voice activity detection module performs voice activity detection on the received near-end audio digital signal to generate a voice activity judgment result, and sends the voice activity judgment result to the comprehensive signal-to-noise ratio calculation module; A comprehensive signal-to-noise ratio calculation module: comprising two input terminals and one output terminal; the two input terminals are respectively connected to the analog-to-digital conversion unit and the voice activity detection module, and the output terminal is connected to the orientation judgment module; a delay estimation module: comprising one input terminal and one output terminal; the input terminal is connected to the analog-to-digital conversion unit, and the output terminal is connected to the orientation judgment module; the delay estimation module performs a delay estimation operation based on the received near-end audio digital signal to generate a delay estimation result, and sends the delay estimation result to the orientation judgment module; Direction determination module: comprising three input terminals and one output terminal; the three input terminals are respectively connected to the comprehensive signal-to-noise ratio calculation module, the delay estimation module and the control interface; the direction determination module performs a sound source direction operation based on the comprehensive signal-to-noise ratio corresponding to each pair of audio acquisition devices, the delay estimation result and the position information of one or more pairs of audio acquisition devices received to generate a sound source direction result, and sends the sound source direction result to the control interface.

3. The audio codec device with sound source directional function according to claim 2, characterized in that: The process of the voice activity detection module performing voice activity detection includes: Receiving a near-end audio digital signal, and performing segmented processing on the near-end audio digital signal using a window function to obtain an amplitude set of continuous time points within a preset time period; Calculate the short-time energy of the received near-end audio analog signal based on the amplitude set of consecutive time points within a preset time period; If the current short-term energy is higher than the threshold, the current time point is marked as voice activity detected, and the corresponding voice activity judgment result is output; otherwise, the current time point is marked as voice activity not detected, and the corresponding voice activity judgment result is output; The voice activity determination result is sent to a comprehensive signal-to-noise ratio calculation module.

4. The audio codec device with sound source directional function according to claim 2, characterized in that: The process of performing delay estimation by the delay estimation module includes: receiving a near-end audio digital signal, inputting the digital signal collected by each pair of audio acquisition devices into a cross-correlation function, and performing delay estimation on the near-end audio analog signal according to the time difference between the near-end audio analog signal reaching each pair of audio acquisition devices, so as to generate a delay estimation result and send the delay estimation result to the directional judgment module.

5. The audio codec device with sound source directional function according to claim 1, characterized in that: The digital-to-analog conversion unit comprises: A digital-to-analog conversion module: used for converting the received remote audio digital signal into an analog signal of the remote audio signal; Mixing module: used to mix and superimpose the digital signal of the remote audio signal with the digital signal of other remote audio streams or the digital audio stream stored locally to generate a digital-analog intermediate signal; Data matching module: performing a format conversion operation on the digital-analog intermediate signal in a preset format to generate a digital-analog intermediate signal after format conversion; Data cache module: performs delay matching and data cache operations on the digital-to-analog intermediate signal after format conversion.

6. An audio codec method with a sound source directional function, applied to an audio codec, characterized in that: include: The near-end audio analog signal is collected by one or more pairs of audio collection devices; each audio collection device collects one of the near-end audio analog signals; Performing an analog-to-digital conversion operation, a data matching operation, and a data buffering operation on the near-end audio analog signal to generate a corresponding near-end audio digital signal; Receive position information of one or more pairs of audio collection devices, perform a sound source orientation operation on a near-end audio digital signal based on the position information to generate a sound source orientation result, and send the sound source orientation result and the near-end audio digital signal to the main chip; The process includes: calculating the signal-to-noise ratio of each channel based on the average signal power and average noise power of each channel; calculating the comprehensive signal-to-noise ratio of the near-end audio analog signal based on the signal-to-noise ratio of each channel; the process of performing sound source orientation on the near-end audio analog signal collected by each pair of audio acquisition devices includes: performing spatial angle estimation based on the time delay estimation result of each pair of near-end audio analog signals and the position information difference of each pair of audio acquisition devices to generate the estimated angle of each pair of audio acquisition devices; setting the corresponding weight of each pair of near-end audio analog signals according to the comprehensive signal-to-noise ratio of each pair of near-end audio analog signals; calculating the sound source direction of the near-end audio analog signal by weighted averaging based on the estimated angle and the corresponding weight of each pair of audio acquisition devices to generate the sound source orientation result; Receive the remote audio digital signal sent by the data interface, and perform data buffering, data matching, mixing and digital-to-analog conversion operations on the remote audio digital signal.

7. The audio encoding and decoding method with sound source directional function according to claim 6, characterized in that: The process of performing a sound source orientation operation on a near-end audio digital signal includes: performing voice activity detection on the near-end audio digital signal to generate a voice activity decision result; A delay estimation operation is performed on the near-end audio digital signal to generate a delay estimation result.

8. An audio codec system with a sound source directional function, characterized in that: include: A main processor and an audio codec device with a sound source directional function as claimed in any one of claims 1 to 5.