Sound mixing method and storage medium

文档序号:142782 发布日期:2021-10-22 浏览:27次 中文

阅读说明:本技术 一种混音方法及存储介质 (Sound mixing method and storage medium ) 是由 陈时钦 江正梁 于 2021-06-28 设计创作,主要内容包括:一种混音方法及存储介质。一种混音方法,包括如下步骤,麦克风通过相同的时钟与音频播放器工作在第一频率,麦克风录制收音数据流,所述收音数据流与回声采集用的音频数据流通过混音处理芯片混音后,得到第二频率的混音后的数据流,将混音后的音频数据流送入I2S总线,所述I2S总线兼容第二频率,混音后的音频数据流再通过I2S总线被发送至处理单元。通过上述技术方案,能够实现在保证播放器音质以及麦克风收音音质的情况下,进行回采信号与麦克风收音信号的混音处理。(A sound mixing method and a storage medium. A sound mixing method comprises the following steps that a microphone works at a first frequency through the same clock and an audio player, the microphone records a sound receiving data stream, the sound receiving data stream and an audio data stream for echo collection are mixed by a sound mixing processing chip to obtain a mixed data stream of a second frequency, the mixed audio data stream is sent to an I2S bus, the I2S bus is compatible with the second frequency, and the mixed audio data stream is sent to a processing unit through an I2S bus. Through the technical scheme, the sound mixing processing of the extraction signal and the microphone sound receiving signal can be realized under the condition that the sound quality of the player and the sound quality of the microphone sound receiving are ensured.)

1. A sound mixing method is characterized by comprising the following steps that a microphone works at a first frequency through the same clock and an audio player, the microphone records a sound receiving data stream, the sound receiving data stream and an audio data stream for echo collection are mixed by a sound mixing processing chip to obtain a mixed data stream of a second frequency, the mixed audio data stream is sent to an I2S bus, the I2S bus is compatible with the second frequency, and the mixed audio data stream is sent to a processing unit through an I2S bus.

2. The mixing method according to claim 1, further comprising the step of the first frequency being higher than the second frequency.

3. The mixing method according to claim 2, wherein the first frequency is 48kHz and the second frequency is 16 kHz.

4. The mixing method according to claim 1, further comprising the step of performing echo cancellation on the mixed data stream by the processing unit.

5. A sound mixing storage medium is characterized in that a computer program is stored, the computer program when executed comprises the following steps that a microphone and an audio player work at a first frequency through the same clock, the microphone records a sound receiving data stream, the sound receiving data stream and an audio data stream for echo collection are mixed through a sound mixing processing chip to obtain a mixed data stream of a second frequency, the mixed audio data stream is sent to an I2S bus, the I2S bus is compatible with the second frequency, and the mixed audio data stream is sent to a processing unit through an I2S bus.

6. The mixing storage medium of claim 5, further comprising a step of the first frequency being higher than the second frequency.

7. The mixing storage medium of claim 6, wherein the first frequency is 48kHz and the second frequency is 16 kHz.

8. The mixing storage medium of claim 5, further comprising a step of the processing unit performing echo cancellation on the mixed data stream.

Technical Field

The present invention relates to the field of audio data processing, and in particular, to a method and a storage medium capable of extracting data while ensuring the quality of the played sound.

Background

An audio signal processing algorithm is required in the intelligent speech recognition product, and an important part of the algorithm is echo cancellation. The echo cancellation algorithm needs to collect the sound played by the loudspeaker as an echo reference signal of the algorithm, so that data recovery and real-time synchronization are performed on the audio data played by the equipment, which is an important step and directly influences the echo cancellation effect.

There are many echo cancellation devices on the world at present, but the price is expensive on the whole, and the effect is not very good when the HDMI and the loudspeaker are switched. Common recording and playing of devices share one group of MCLK, in order to use a common audio processing algorithm (16k of data) on the market, resampling (48k- >16k or 16k- >48k) is needed, and it is difficult to satisfy the recording requirement and simultaneously consider that the playing sound quality is not affected. The design idea that this paper provided can all adopt hard recovery when HDMI and loudspeaker output sound, accomplishes the sound source synchronous, and can freely switch the recovery data, and the effect is still relatively good when the price is low.

Disclosure of Invention

Therefore, it is desirable to provide a mixing method and a storage medium to meet the mixing requirement in an audio extraction apparatus.

In order to achieve the above object, the inventor provides a sound mixing method, which includes the following steps that a microphone works at a first frequency through the same clock and an audio player, the microphone records a sound receiving data stream, the sound receiving data stream and an audio data stream for echo acquisition are mixed by a sound mixing processing chip to obtain a mixed data stream of a second frequency, the mixed audio data stream is sent to an I2S bus, the I2S bus is compatible with the second frequency, and the mixed audio data stream is sent to a processing unit through an I2S bus.

In particular, a step is also included, the first frequency being higher than the second frequency.

Specifically, the first frequency is 48kHz and the second frequency is 16 kHz.

Specifically, the method further comprises the step of performing echo cancellation on the mixed data stream by the processing unit.

A sound mixing storage medium stores a computer program, the computer program when being executed includes the following steps, a microphone works at a first frequency through the same clock and an audio player, the microphone records a sound receiving data stream, the sound receiving data stream and an audio data stream for echo collection are mixed by a sound mixing processing chip to obtain a mixed data stream of a second frequency, the mixed audio data stream is sent to an I2S bus, the I2S bus is compatible with the second frequency, and the mixed audio data stream is sent to a processing unit through an I2S bus.

In particular, a step is also included, the first frequency being higher than the second frequency.

Specifically, the first frequency is 48kHz and the second frequency is 16 kHz.

Specifically, the method further comprises the step of performing echo cancellation on the mixed data stream by the processing unit.

Through the technical scheme, the sound mixing processing of the extraction signal and the microphone sound receiving signal can be realized under the condition that the sound quality of the player and the sound quality of the microphone sound receiving are ensured.

Drawings

Fig. 1 is a flowchart illustrating an echo cancellation method according to an embodiment of the present invention;

FIG. 2 is a flow chart of a mixing method according to another embodiment of the present invention;

fig. 3 is a block diagram of an apparatus for echo cancellation according to an embodiment of the present invention.

Detailed Description

To explain technical contents, structural features, and objects and effects of the technical solutions in detail, the following detailed description is given with reference to the accompanying drawings in conjunction with the embodiments.

Referring to fig. 1, an echo cancellation method is introduced, which includes the steps of S100 determining whether an audio data separation chip is connected, and if the audio data separation chip is not connected, S102 calling an audio data stream of the codec as an audio data stream for echo collection, and simultaneously transmitting the audio data stream of the codec to an audio player; s104 is also performed to feed the audio data stream of codec to the processing unit for echo cancellation,

if the audio/video separation chip is connected, S106 calls the audio data stream generated by the audio/video separation chip as the audio data stream for echo collection, and S108 sends the audio data stream generated by the audio/video separation chip to the processing unit for echo cancellation.

The method solves the problem of the source of the mining data in the echo cancellation method, if the problem of delay error caused by insufficient resolving speed exists in software mining, the problem can be solved by adopting direct calling of hardware, and the problem can be avoided by adopting hardware mining.

As some further specific embodiments, the audio/video separation chip is used for separating audio/video data generated by the system in HDMI, DPI, DP, DVI, LVDS, and other formats. In the scheme, the audio and video separation chip is preferably an HDMI audio and video separation chip.

In a further embodiment, the step of performing echo cancellation specifically includes sending an audio data stream for echo acquisition to a sound mixing processing chip, mixing the audio data stream with a microphone sound reception data stream, and processing the sound mixing data and the audio data stream for echo acquisition by a processing unit for comparison cancellation.

In some other embodiments, in order to ensure the sound quality of the method, we also design a sound mixing method, please refer to fig. 2, in an application environment of the present scheme, we can let the microphone operate at a first frequency through the same clock and audio player, and then perform the steps, S200 the microphone records a sound reception data stream, the sound reception data stream and an audio data stream for echo acquisition are mixed by a sound mixing processing chip to obtain a mixed data stream of a second frequency, S202 the mixed audio data stream is sent to an I2S bus, the I2S bus is compatible with the second frequency, and the audio data stream mixed in S204 is sent to the processing unit through an I2S bus. The microphone works at the first frequency through the same clock and the same audio player, so that the cost of a clock chip can be saved, and if the sampling requirement of the microphone under the condition is not matched with the requirement of playing tone quality, an ideal recording and playing effect can not be obtained frequently. Therefore, in the case that the microphone and the audio player work at the same first frequency, the use of the mixing processing chip has two functions here, i.e., the integration of multiple data streams and the compatibility of data streams with different frequencies are performed. For example, in some of our embodiments, the first frequency is higher than the second frequency. It can be shown that in this embodiment, the sound receiving data stream collected by the microphone and the playing sound quality of the audio player are better, and the data stream after passing through the audio mixing processing chip is worse. The first frequency is 48kHz and the second frequency is 16 kHz. Therefore, the audio player works at 48kHz, better playing sound quality can be obtained, the audio mixing processing chip adopts an ES7210 audio analog-to-digital conversion chip, adopts a Time Division Multiplexing (TDM) output form, can record by using 48k frequency and is compatible with a 16kHz output mode. The mixing processing here refers to the integration and synchronous output of the sound reception data stream and the audio data stream, and is time division multiplexing of data, rather than the superposition mixing of audio waves. For example, the ES7210 audio analog-to-digital conversion chip can use 4 paths of output, and 2 paths of output radio data stream and 2 paths of output audio data stream; 2 paths of the radio frequency data stream and 2 paths of the audio data stream can be output, 3 paths of the radio frequency data stream and 1 path of the audio data stream can be output, and 3 paths of the radio frequency data stream with 16kHz output is equivalent to 48kHz, so that the sound quality of the radio frequency data stream is not lost. 2 sets of ES7210 audio analog-to-digital conversion chips can be used in parallel, 2 paths of the chips are used for outputting radio data streams, and 4 paths of chips are used for outputting audio data streams. The parallel 2 sets of ES7210 audio analog-to-digital conversion chips can achieve the technical effect of audio mixing output by using the implementation modes of 3 paths of output radio data streams, 3 paths of output audio data streams and the like.

In a further specific embodiment, the method further includes the step of performing echo cancellation on the mixed data stream by the processing unit. The processing unit may be a dedicated echo cancellation chip, such as ATH8806, or may perform echo cancellation through processing unit operations by using a corresponding algorithm. The processing unit may be configured to perform subsequent echo cancellation processing on data transmitted from the I2S bus. The echo cancellation algorithm operates by comparing the received audio data stream to the audio data stream and canceling clutter and background echoes from the received audio data stream based on the audio data stream.

In the embodiment shown in fig. 3, the style of the device applying the scheme is shown, on the premise that the audio data separation chip is connected, the device receives the audio and video data stream, calls the audio data stream generated by the audio and video separation chip as the audio data stream for echo collection, and S108 sends the audio data stream generated by the audio and video separation chip to the sound mixing processing chip, and then sends the audio data stream back to the processing chip after sound mixing by the sound mixing processing chip for echo cancellation. If the audio data separation chip is not connected, directly calling the audio data stream of the system codec as the audio data stream for echo collection, and simultaneously sending the audio data stream of the codec to the SPEAKER audio player; and simultaneously, sending the audio data stream of the codec to a processing unit for echo cancellation. After that, a microphone is used for recording a sound reception data stream, the sound reception data stream and an audio data stream for echo collection are mixed by a sound mixing processing chip to obtain a mixed data stream with a second frequency, the mixed audio data stream is sent to an I2S bus, the I2S bus is compatible with the second frequency, and the mixed audio data stream is sent to a processing unit through an I2S bus.

The scheme also introduces an echo cancellation storage medium, which stores a computer program, wherein the computer program comprises the following steps of judging whether an audio data separation chip is connected or not when being executed, if the audio data separation chip is not connected, configuring a channel inside the codec, acquiring an audio data stream as the audio data stream for echo acquisition, and simultaneously sending the audio data stream of the codec to an audio player; the audio data stream of the codec is sent to a processing unit for echo cancellation,

if the audio/video separation chip is connected, the audio data stream generated by the audio/video separation chip is called as the audio data stream for echo collection and is sent to the processing unit for echo cancellation.

Specifically, the audio/video separation chip is used for separating audio/video data in the formats of HDMI, DPI, DP, DVI, LVDS, etc. generated by the system.

Specifically, the specific implementation of the echo cancellation when the computer program is run includes a step of sending an audio data stream for echo acquisition to a sound mixing processing chip, mixing the audio data stream with a microphone sound reception data stream, and processing the sound mixing data and the audio data stream for echo acquisition by a processing unit for comparison cancellation.

The scheme also introduces a sound mixing storage medium, which stores a computer program, wherein the computer program when executed comprises the following steps that a microphone works at a first frequency through the same clock and an audio player, the microphone records a sound receiving data stream, the sound receiving data stream and an audio data stream for echo collection are mixed by a sound mixing processing chip to obtain a mixed data stream of a second frequency, the mixed audio data stream is sent to an I2S bus, the I2S bus is compatible with the second frequency, and the mixed audio data stream is sent to a processing unit through an I2S bus.

In particular, a step is also included, the first frequency being higher than the second frequency.

Specifically, the first frequency is 48kHz and the second frequency is 16 kHz.

Specifically, the method further comprises the step of performing echo cancellation on the mixed data stream by the processing unit.

It should be noted that, although the above embodiments have been described herein, the invention is not limited thereto. Therefore, based on the innovative concepts of the present invention, the technical solutions of the present invention can be directly or indirectly applied to other related technical fields by making changes and modifications to the embodiments described herein, or by using equivalent structures or equivalent processes performed in the content of the present specification and the attached drawings, which are included in the scope of the present invention.

8页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种音频信号处理方法、装置、设备及存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!