[go: up one dir, main page]

CN118824261A - Audio processing method, chip and electronic device - Google Patents

Audio processing method, chip and electronic device Download PDF

Info

Publication number
CN118824261A
CN118824261A CN202411097373.5A CN202411097373A CN118824261A CN 118824261 A CN118824261 A CN 118824261A CN 202411097373 A CN202411097373 A CN 202411097373A CN 118824261 A CN118824261 A CN 118824261A
Authority
CN
China
Prior art keywords
audio signal
signal
frequency
harmonic
audio
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411097373.5A
Other languages
Chinese (zh)
Inventor
石磊
范俊民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Awinic Technology Co Ltd
Original Assignee
Shanghai Awinic Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Awinic Technology Co Ltd filed Critical Shanghai Awinic Technology Co Ltd
Priority to CN202411097373.5A priority Critical patent/CN118824261A/en
Publication of CN118824261A publication Critical patent/CN118824261A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/003Changing voice quality, e.g. pitch or formants
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L21/00Speech or voice signal processing techniques to produce another audible or non-audible signal, e.g. visual or tactile, in order to modify its quality or its intelligibility
    • G10L21/02Speech enhancement, e.g. noise reduction or echo cancellation
    • G10L21/0316Speech enhancement, e.g. noise reduction or echo cancellation by changing the amplitude
    • G10L21/0364Speech enhancement, e.g. noise reduction or echo cancellation by changing the amplitude for improving intelligibility

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The application relates to the technical field of audio processing, and discloses an audio processing method, a chip and electronic equipment. The audio processing method of the present application includes: acquiring a first audio signal; generating a first harmonic signal based on the first audio signal; performing feature recognition on the first audio signal to determine the signal type of the first audio signal; determining the harmonic proportion of the first audio signal in real time according to the signal type of the first audio signal; and adding the original audio signal of the first audio signal and the first harmonic signal based on the harmonic proportion of the first audio signal to obtain a second audio signal. According to the scheme, the harmonic proportion can be regulated and controlled in real time according to the signal type of the first audio signal, so that a user can intuitively feel the low-frequency hearing of low-frequency audio of different types, and the playing effect of the audio signal is improved.

Description

音频处理方法、芯片和电子设备Audio processing method, chip and electronic device

技术领域Technical Field

本申请涉及音频处理技术领域,特别涉及一种音频处理方法、芯片和电子设备。The present application relates to the field of audio processing technology, and in particular to an audio processing method, chip and electronic device.

背景技术Background Art

随着科学技术的发展,手机、平板电脑等便携式电子设备已经成为了人们生活中常用的电子产品,并且人们会在日常生活中使用便携式电子设备播放音频信号。With the development of science and technology, portable electronic devices such as mobile phones and tablet computers have become commonly used electronic products in people's lives, and people use portable electronic devices to play audio signals in daily life.

便携式电子设备受到体积大小的限制,通常使用微型扬声器作为发声单元。微型扬声器受到单元尺寸、箱体结构等物理条件和规律的限制,截止频率通常比较高,一般为400-1000Hz,因此通常复现出的400Hz以下的低频信号的清晰度较低,失真较严重。然而音频信号中的低频信号对音频信号的音质起着重要作用。声音的丰满度、混厚感、空间感等音质都由音频信号中的低频信号表现。例如:100-150Hz的低频信号影响音色的丰满度,60-100Hz的低频信号影响音频的混厚感;20-60Hz的低频信号影响音色的空间感。因此,如何提高微型扬声器复现低频信号的低频听感的能力是音频处理领域需要解决的问题。Portable electronic devices are limited by their size and usually use micro speakers as sound-generating units. Micro speakers are limited by physical conditions and rules such as unit size and cabinet structure, and their cutoff frequencies are usually relatively high, generally 400-1000Hz. Therefore, the low-frequency signals below 400Hz reproduced usually have low clarity and severe distortion. However, the low-frequency signals in audio signals play an important role in the sound quality of audio signals. The fullness, thickness, and spatial sense of the sound are all represented by the low-frequency signals in the audio signals. For example: low-frequency signals of 100-150Hz affect the fullness of the timbre, low-frequency signals of 60-100Hz affect the thickness of the audio; and low-frequency signals of 20-60Hz affect the spatial sense of the timbre. Therefore, how to improve the ability of micro speakers to reproduce the low-frequency hearing of low-frequency signals is a problem that needs to be solved in the field of audio processing.

发明内容Summary of the invention

为了提高微型扬声器复现低频数据的低频听感的能力,本申请实施例提供了一种音频处理方法、芯片和电子设备。In order to improve the ability of a micro speaker to reproduce the low-frequency hearing sensation of low-frequency data, an embodiment of the present application provides an audio processing method, a chip, and an electronic device.

第一方面,本申请实施例提供了一种音频处理方法,音频处理方法包括:获取第一音频信号;基于第一音频信号生成第一谐波信号;对第一音频信号进行特征识别,以确定第一音频信号的信号类型;根据第一音频信号的信号类型实时确定第一音频信号的谐波比例;基于第一音频信号的谐波比例,对第一音频信号的原始音频信号和第一谐波信号进行加和处理,得到第二音频信号。In a first aspect, an embodiment of the present application provides an audio processing method, the audio processing method comprising: acquiring a first audio signal; generating a first harmonic signal based on the first audio signal; performing feature recognition on the first audio signal to determine a signal type of the first audio signal; determining a harmonic ratio of the first audio signal in real time according to the signal type of the first audio signal; and based on the harmonic ratio of the first audio signal, summing an original audio signal of the first audio signal and the first harmonic signal to obtain a second audio signal.

本申请实施例通过识别第一音频信号中的成分,根据第一音频信号的信号类型实时调控谐波比例以使用户可以直观的感受低频音频的低频听感,实现了得到的具有低频听感的第二音频信号既保留了第一音频信号的原始音频信号中的高频信号对应的听感,又可以虚拟出第一音频信号中的低频信号的低音听感,提高了音频信号的播放效果。The embodiment of the present application identifies the components in the first audio signal and adjusts the harmonic ratio in real time according to the signal type of the first audio signal so that the user can intuitively feel the low-frequency hearing sense of the low-frequency audio. The second audio signal with a low-frequency hearing sense not only retains the hearing sense corresponding to the high-frequency signal in the original audio signal of the first audio signal, but also can virtualize the bass hearing sense of the low-frequency signal in the first audio signal, thereby improving the playback effect of the audio signal.

在一种可能的实现中,根据第一音频信号的信号类型实时确定第一音频信号的谐波比例,包括:对应于第一音频信号的信号类型为背景音信号,将第一音频信号的谐波比例由预设比例降低至第一比例;对应于第一音频信号的信号类型为人声信号,将第一音频信号的谐波比例由预设比例降低至第二比例,其中,第一比例小于第二比例。In a possible implementation, the harmonic ratio of the first audio signal is determined in real time according to the signal type of the first audio signal, including: corresponding to the signal type of the first audio signal being a background sound signal, reducing the harmonic ratio of the first audio signal from a preset ratio to a first ratio; corresponding to the signal type of the first audio signal being a voice signal, reducing the harmonic ratio of the first audio signal from a preset ratio to a second ratio, wherein the first ratio is smaller than the second ratio.

在本申请实施例中,通过实时调整谐波比例,使得低频信号中人声信号对应的谐波信号成分小于背景音信号对应的谐波信号成分,从而提高低频信号中人声信号的清晰度。In an embodiment of the present application, the harmonic ratio is adjusted in real time so that the harmonic signal component corresponding to the human voice signal in the low-frequency signal is smaller than the harmonic signal component corresponding to the background sound signal, thereby improving the clarity of the human voice signal in the low-frequency signal.

在一种可能的实现中,将第一音频信号的谐波比例由预设比例降低至第一比例,包括:将第一音频信号的谐波比例基于第一速度由预设比例降低至第一比例。将第一音频信号的谐波比例由预设比例降低至第二比例,包括:将第一音频信号的谐波比例基于第二速度由预设比例降低至第二比例;其中,第一速度小于第二速度。In a possible implementation, reducing the harmonic ratio of the first audio signal from a preset ratio to a first ratio includes: reducing the harmonic ratio of the first audio signal from a preset ratio to the first ratio based on a first speed. Reducing the harmonic ratio of the first audio signal from a preset ratio to a second ratio includes: reducing the harmonic ratio of the first audio signal from a preset ratio to the second ratio based on a second speed; wherein the first speed is less than the second speed.

在一种可能的实现中,对第一音频信号进行特征识别,以确定第一音频信号的信号类型,包括:基于预设特征对第一音频信号进行特征识别,以确定第一音频信号的信号类型,其中,预设特征包括过零率和波形因子。In a possible implementation, performing feature recognition on the first audio signal to determine the signal type of the first audio signal includes: performing feature recognition on the first audio signal based on preset features to determine the signal type of the first audio signal, wherein the preset features include a zero crossing rate and a waveform factor.

在一种可能的实现中,获取第一音频信号,包括:获取原始音频信号,通过第一滤波器组过滤原始音频信号,得到第一音频信号;基于第一音频信号生成第一谐波信号,包括:基于第一音频信号生成第二谐波信号;通过第二滤波器组过滤第二谐波信号,得到第一谐波信号。In a possible implementation, obtaining a first audio signal includes: obtaining an original audio signal, filtering the original audio signal through a first filter group, and obtaining a first audio signal; generating a first harmonic signal based on the first audio signal includes: generating a second harmonic signal based on the first audio signal; and filtering the second harmonic signal through a second filter group to obtain a first harmonic signal.

在一种可能的实现中,第一滤波器组和第二滤波器组均包括高通滤波器和低通滤波器,高通滤波器和低通滤波器均为线性滤波器。In a possible implementation, the first filter group and the second filter group both include a high-pass filter and a low-pass filter, and both the high-pass filter and the low-pass filter are linear filters.

在一种可能的实现中,线性滤波器包括贝塞尔滤波器。In one possible implementation, the linear filter comprises a Bessel filter.

在一种可能的实现中,第一滤波器组的带宽基于原始音频信号的音频带宽和电子设备的扬声器的带宽确定;第二滤波器组的带宽基于电子设备的扬声器的带宽确定。In a possible implementation, the bandwidth of the first filter group is determined based on the audio bandwidth of the original audio signal and the bandwidth of a speaker of the electronic device; the bandwidth of the second filter group is determined based on the bandwidth of the speaker of the electronic device.

在一种可能的实现中,第一滤波器组的带宽基于原始音频信号的音频带宽和电子设备的扬声器的带宽确定,包括:第一滤波器组中高通滤波器的截止频率基于原始音频信号的下限频率和电子设备的扬声器的低频截止频率确定,第一滤波器组中低通滤波器的截止频率基于电子设备的扬声器的低频截止频率和高频截止频率确定。In one possible implementation, the bandwidth of the first filter group is determined based on the audio bandwidth of the original audio signal and the bandwidth of the speaker of the electronic device, including: the cutoff frequency of the high-pass filter in the first filter group is determined based on the lower limit frequency of the original audio signal and the low-frequency cutoff frequency of the speaker of the electronic device, and the cutoff frequency of the low-pass filter in the first filter group is determined based on the low-frequency cutoff frequency and the high-frequency cutoff frequency of the speaker of the electronic device.

在一种可能的实现中,第二滤波器组的带宽基于电子设备的扬声器的带宽确定,包括:第二滤波器组中高通滤波器的截止频率基于电子设备的扬声器的低频截止频率确定,第二滤波器组中低通滤波器的截止频率基于电子设备的扬声器的高频截止频率确定。In one possible implementation, the bandwidth of the second filter group is determined based on the bandwidth of the speaker of the electronic device, including: the cutoff frequency of the high-pass filter in the second filter group is determined based on the low-frequency cutoff frequency of the speaker of the electronic device, and the cutoff frequency of the low-pass filter in the second filter group is determined based on the high-frequency cutoff frequency of the speaker of the electronic device.

第二方面,本申请实施例提供了一种芯片,包括电路,该电路用于执行上述第一方面及上述第一方面的各种可能实现提供的任一种音频处理方法。In a second aspect, an embodiment of the present application provides a chip, including a circuit, which is used to execute any audio processing method provided by the first aspect and various possible implementations of the first aspect.

第三方面,本申请实施例提供了一种电子设备,该电子设备包括上述芯片。In a third aspect, an embodiment of the present application provides an electronic device comprising the above-mentioned chip.

附图说明BRIEF DESCRIPTION OF THE DRAWINGS

图1根据本申请实施例,示出了一种音频处理方法的流程示意图;FIG1 is a schematic diagram showing a flow chart of an audio processing method according to an embodiment of the present application;

图2根据本申请实施例,示出了一种贝赛尔(Bessel)滤波器的相频特性曲线示意图;FIG2 is a schematic diagram showing a phase-frequency characteristic curve of a Bessel filter according to an embodiment of the present application;

图3根据本申请实施例,示出了一种Bessel滤波器的幅频特性曲线示意图;FIG3 is a schematic diagram showing an amplitude-frequency characteristic curve of a Bessel filter according to an embodiment of the present application;

图4根据本申请实施例,示出了一种音频处理方法的流程示意图;FIG4 is a schematic diagram showing a flow chart of an audio processing method according to an embodiment of the present application;

图5根据本申请实施例,示出了一种电子设备1300的结构示意图。FIG5 shows a schematic structural diagram of an electronic device 1300 according to an embodiment of the present application.

具体实施方式DETAILED DESCRIPTION

下面首先对本申请的技术术语进行介绍。The following first introduces the technical terms of this application.

基波:是指和周期性非正弦交流量振荡的最长周期相等的正弦波分量,相应于这个周期的频率称为基波频率。Fundamental wave: refers to the sinusoidal wave component that is equal to the longest period of oscillation of periodic non-sinusoidal alternating current quantity. The frequency corresponding to this period is called the fundamental wave frequency.

谐波:是指对周期性非正弦交流量进行傅里叶级数分解所得到的大于基波频率整数倍的各次分量,谐波的频率等于基波的频率的整数倍。例如,基波频率3倍的波称之为三次谐波,基波频率5倍的波称之为五次谐波。Harmonic: refers to the components greater than the integer multiples of the fundamental frequency obtained by Fourier series decomposition of periodic non-sinusoidal alternating current. The frequency of the harmonic is equal to the integer multiples of the fundamental frequency. For example, a wave with 3 times the fundamental frequency is called the third harmonic, and a wave with 5 times the fundamental frequency is called the fifth harmonic.

带通滤波器(band-pass filter):是指能通过某一频率范围内的频率分量,同时能将其他频率范围的频率分量衰减到极低水平的滤波器。Band-pass filter: A filter that can pass frequency components within a certain frequency range while attenuating frequency components in other frequency ranges to extremely low levels.

截止频率:用于描述滤波器或放大器频率特性。当一个滤波器或一个放大器保持输入信号的幅度不变,改变信号频率使输出信号降至最大值的0.707倍(对应-3dB),或0.5倍时(对应-6dB)的频率称为截止频率。Cut-off frequency: used to describe the frequency characteristics of filters or amplifiers. When a filter or an amplifier keeps the amplitude of the input signal unchanged and changes the signal frequency to reduce the output signal to 0.707 times (corresponding to -3dB) or 0.5 times (corresponding to -6dB) of the maximum value, the frequency is called the cut-off frequency.

谐波比例:谐波成分和基波成分的比值。Harmonic ratio: the ratio of harmonic components to fundamental components.

Bessel滤波器:是一种线性相位响应的线性过滤器。Bessel filter: is a linear filter with linear phase response.

本申请的说明性实施例包括但不限于一种音频处理方法、芯片和电子设备。The illustrative embodiments of the present application include, but are not limited to, an audio processing method, a chip, and an electronic device.

可以理解,本申请的技术方案适用于具有扬声器(例如微型扬声器)的电子设备,例如,包括但不限于手机、智能手表、电视、平板电脑、可穿戴设备、车载设备、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、笔记本电脑、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本、个人数字助理(personaldigital assistant,PDA)等,本发明实施例对电子设备的具体类型不作任何限制。It can be understood that the technical solution of the present application is applicable to electronic devices with speakers (such as micro speakers), for example, including but not limited to mobile phones, smart watches, televisions, tablet computers, wearable devices, vehicle-mounted devices, augmented reality (AR)/virtual reality (VR) devices, laptops, ultra-mobile personal computers (UMPC), netbooks, personal digital assistants (PDA), etc. The embodiments of the present invention do not impose any restrictions on the specific types of electronic devices.

可以理解,微型扬声器受到单元尺寸、箱体结构等物理条件和规律的限制,截止频率通常比较高,一般为400Hz至1000Hz,因此对于400Hz以下的低频信号通常无法较好的复现,低频信号的还原能力较弱。It is understandable that micro speakers are limited by physical conditions and laws such as unit size and cabinet structure. The cutoff frequency is usually relatively high, generally 400Hz to 1000Hz. Therefore, low-frequency signals below 400Hz are usually not reproduced well, and the ability to restore low-frequency signals is relatively weak.

然而低频信号容易与人体产生共振,是人体感知最明显的音频信号。如鼓声和贝斯(bass)等乐器以及人声的基频普遍都在400Hz以下,人们可以基于低频信号更明显的感受到音乐与语音的冲击力,因此可以通过提高微型扬声器复现低频信号的低频听感的能力来提高用户感知到的音频信号的音质。However, low-frequency signals easily resonate with the human body and are the most obvious audio signals perceived by the human body. For example, the fundamental frequencies of instruments such as drums and bass, as well as human voices, are generally below 400Hz. People can more clearly feel the impact of music and voices based on low-frequency signals. Therefore, the sound quality of the audio signal perceived by the user can be improved by improving the ability of micro speakers to reproduce the low-frequency hearing of low-frequency signals.

一些实施例中,为了提高微型扬声器复现低频信号的低频听感的能力,采用虚拟低音的方法来弥补低频信号的低频听感,包括:采用巴特沃斯滤波器对原始音频信号进行滤波,以获取原始音频信号的基波信号。其中,谐波信号的频率可以设置为高于微型扬声器截止频率的3倍。例如,微型扬声器的截止频率为400Hz,基波信号的频率为100Hz,则将基波信号的4次谐波作为虚拟低频信号低音效果的谐波信号,即将基波信号频率四倍的信号作为虚拟低频信号低音效果的谐波信号。最后,将虚拟低音信号与原始音频信号相加,得到具有低频听感的音频信号。In some embodiments, in order to improve the ability of the micro-speaker to reproduce the low-frequency hearing sense of the low-frequency signal, a virtual bass method is used to compensate for the low-frequency hearing sense of the low-frequency signal, including: using a Butterworth filter to filter the original audio signal to obtain the fundamental signal of the original audio signal. Among them, the frequency of the harmonic signal can be set to be higher than 3 times the cutoff frequency of the micro-speaker. For example, the cutoff frequency of the micro-speaker is 400Hz, and the frequency of the fundamental signal is 100Hz, then the 4th harmonic of the fundamental signal is used as the harmonic signal of the virtual low-frequency signal bass effect, that is, the signal with four times the frequency of the fundamental signal is used as the harmonic signal of the virtual low-frequency signal bass effect. Finally, the virtual bass signal is added to the original audio signal to obtain an audio signal with a low-frequency hearing sense.

然而,由于巴特沃斯滤波器是非线性滤波器,非线性滤波器使得过滤后的信号中各频率成分的相对相位发生改变,导致虚拟低音信号与原始音频信号的相位存在偏差,如虚拟低音信号的波峰与原始音频信号的波峰不对应。并且,上述方案中虚拟低音信号与原始音频信号相加的比例固定,即,无论原始音频信号是人声信号还是背景声信号,谐波信号与原始音频信号相加的比例恒定。在保证背景音信号清晰度时可能会造成人声信号过于浑厚或有些嘶哑,清晰度较低;在保证人声信号清晰度时可能会造成背景音信号的低频力度不够。However, since the Butterworth filter is a nonlinear filter, the nonlinear filter changes the relative phase of each frequency component in the filtered signal, resulting in a phase deviation between the virtual bass signal and the original audio signal, such as the peak of the virtual bass signal does not correspond to the peak of the original audio signal. In addition, in the above scheme, the ratio of the addition of the virtual bass signal to the original audio signal is fixed, that is, regardless of whether the original audio signal is a human voice signal or a background sound signal, the ratio of the addition of the harmonic signal to the original audio signal is constant. When ensuring the clarity of the background sound signal, the human voice signal may be too thick or a little hoarse, and the clarity is low; when ensuring the clarity of the human voice signal, the low-frequency strength of the background sound signal may be insufficient.

在另一些实施例中,采用将原始音频信号分成两路,分别通过高通滤波器和低通滤波器。经过高通滤波器后的高频信号经预设时间延迟后直接保留;经过低通滤波器过滤后的低频信号则需要通过谐波生成器和能量控制模块进行处理,得到虚拟低音信号。最后,将虚拟低音信号和延迟的高频信号叠加,得到输出信号。这种虚拟低音的方法也存在虚拟低音信号与原始音频信号相加的比例固定的问题,即在保证背景音信号清晰度时可能会造成人声信号过于浑厚或有些嘶哑,清晰度较低,在保证人声信号清晰度时可能会造成背景音信号的低频力度不够。In other embodiments, the original audio signal is divided into two paths, which are respectively passed through a high-pass filter and a low-pass filter. The high-frequency signal after the high-pass filter is directly retained after a preset time delay; the low-frequency signal after filtering by the low-pass filter needs to be processed by a harmonic generator and an energy control module to obtain a virtual bass signal. Finally, the virtual bass signal and the delayed high-frequency signal are superimposed to obtain an output signal. This virtual bass method also has the problem of a fixed ratio between the virtual bass signal and the original audio signal, that is, when ensuring the clarity of the background sound signal, the human voice signal may be too thick or a little hoarse, and the clarity is low. When ensuring the clarity of the human voice signal, the low-frequency strength of the background sound signal may be insufficient.

为解决上述微型扬声器复现出的低频信号的清晰度较低,失真较严重的问题,本申请实施例提供一种音频处理方法,音频处理方法包括:获取第一音频信号;基于第一音频信号生成第一谐波信号;对第一音频信号进行特征识别,以确定第一音频信号的信号类型;根据第一音频信号的信号类型实时确定第一音频信号的谐波比例;基于第一音频信号的谐波比例,对第一音频信号的原始音频信号和第一谐波信号进行加和处理,得到第二音频信号。In order to solve the problem that the low-frequency signal reproduced by the above-mentioned micro-speaker has low clarity and severe distortion, an embodiment of the present application provides an audio processing method, which includes: obtaining a first audio signal; generating a first harmonic signal based on the first audio signal; performing feature recognition on the first audio signal to determine the signal type of the first audio signal; determining the harmonic ratio of the first audio signal in real time according to the signal type of the first audio signal; and based on the harmonic ratio of the first audio signal, summing the original audio signal of the first audio signal and the first harmonic signal to obtain a second audio signal.

本申请实施例通过识别第一音频信号中的成分,根据第一音频信号的信号类型实时调控谐波比例以使用户可以直观的感受不同类型低频信号的低频听感,使得得到的具有低频听感的第二音频信号既保留了第一音频信号的原始音频信号中高频信号对应的听感,又可以虚拟出第一音频信号中低频信号的低音听感,提高了音频信号的播放效果。The embodiment of the present application identifies the components in the first audio signal and adjusts the harmonic ratio in real time according to the signal type of the first audio signal so that the user can intuitively feel the low-frequency hearing of different types of low-frequency signals, so that the obtained second audio signal with low-frequency hearing not only retains the hearing corresponding to the high-frequency signal in the original audio signal of the first audio signal, but also can virtualize the bass hearing of the low-frequency signal in the first audio signal, thereby improving the playback effect of the audio signal.

为使本申请的目的、技术方案和优点更加清楚,下面以视频播放场景为例,结合附图对本申请实施例中的技术方案进行清楚、详尽的描述。In order to make the purpose, technical solutions and advantages of the present application clearer, the technical solutions in the embodiments of the present application are clearly and comprehensively described below with reference to the accompanying drawings, taking the video playback scenario as an example.

下面对本申请实施例提供的音频处理方法进行详细说明,本申请实施例的音频处理方法应用于具有微型扬声器的电子设备。其中,图1示出了本申请实施例一种音频处理方法的示意图,音频处理方法包括:The following is a detailed description of the audio processing method provided in the embodiment of the present application. The audio processing method in the embodiment of the present application is applied to an electronic device having a micro speaker. FIG1 shows a schematic diagram of an audio processing method in the embodiment of the present application. The audio processing method includes:

101:获取第一音频信号。101: Acquire a first audio signal.

在本申请实施例中,可以首先获取原始音频信号,通过第一滤波器组过滤原始音频信号,得到用于生成谐波信号低频信号,即用于生成谐波信号的第一音频信号。其中,原始音频信号可以为需要通过微型扬声器播放的原始音频信号,例如,原始音频信号可以是音频播放应用所播放的音乐、免提通话中通话对象的语音等。In an embodiment of the present application, an original audio signal may be first obtained, and the original audio signal may be filtered through a first filter group to obtain a low-frequency signal for generating a harmonic signal, that is, a first audio signal for generating a harmonic signal. The original audio signal may be an original audio signal that needs to be played through a micro speaker, for example, the original audio signal may be music played by an audio playback application, the voice of a caller in a hands-free call, etc.

其中,第一滤波器组包括高通滤波器和低通滤波器,高通滤波器与低通滤波器可以串联连接。对于高通滤波器与低通滤波器串联连接的情况,第一滤波器可以通过的信号的频率范围为高通滤波器的截止频率至低通滤波器的截止频率。并且,由于高通滤波器与低通滤波器串联连接,信号需要先通过高通滤波器,再通过低通滤波器,这种配置会增加信号的延时,可以抵消获取到的第一音频信号与原始音频信号的相位差。Wherein, the first filter group includes a high-pass filter and a low-pass filter, and the high-pass filter and the low-pass filter can be connected in series. In the case where the high-pass filter and the low-pass filter are connected in series, the frequency range of the signal that can be passed by the first filter is from the cutoff frequency of the high-pass filter to the cutoff frequency of the low-pass filter. In addition, since the high-pass filter and the low-pass filter are connected in series, the signal needs to pass through the high-pass filter first and then through the low-pass filter. This configuration will increase the delay of the signal and can offset the phase difference between the acquired first audio signal and the original audio signal.

可以理解,高通滤波器用于对原始音频信号进行高通滤波,以得到高于高通滤波器的截止频率的信号;低通滤波器用于对高通滤波后的原始音频信号进行低通滤波,以得到低于低通滤波器的截止频率的信号。It can be understood that the high-pass filter is used to perform high-pass filtering on the original audio signal to obtain a signal higher than the cutoff frequency of the high-pass filter; the low-pass filter is used to perform low-pass filtering on the original audio signal after high-pass filtering to obtain a signal lower than the cutoff frequency of the low-pass filter.

在本申请实施例中,可以根据原始音频信号的音频带宽和电子设备的微型扬声器的带宽确定第一滤波器组的带宽。In the embodiment of the present application, the bandwidth of the first filter group may be determined according to the audio bandwidth of the original audio signal and the bandwidth of the micro speaker of the electronic device.

在一些实施例中,第一滤波器组中低通滤波器的截止频率可以根据微型扬声器的低频截止频率和高频截止频率确定,第一滤波器组中高通滤波器的截止频率可以根据原始音频信号的下限频率和微型扬声器的低频截止频率确定。例如,低通滤波器的截止频率可以大于等于微型扬声器的低频截止频率,小于微型扬声器的高频截止频率,高通滤波器的截止频率可以大于等于原始音频信号的下限频率,小于微型扬声器的低频截止频率。In some embodiments, the cutoff frequency of the low-pass filter in the first filter group can be determined according to the low-frequency cutoff frequency and the high-frequency cutoff frequency of the micro-speaker, and the cutoff frequency of the high-pass filter in the first filter group can be determined according to the lower limit frequency of the original audio signal and the low-frequency cutoff frequency of the micro-speaker. For example, the cutoff frequency of the low-pass filter can be greater than or equal to the low-frequency cutoff frequency of the micro-speaker and less than the high-frequency cutoff frequency of the micro-speaker, and the cutoff frequency of the high-pass filter can be greater than or equal to the lower limit frequency of the original audio signal and less than the low-frequency cutoff frequency of the micro-speaker.

例如,原始音频信号的频率范围为20Hz至20kHz,手机的微型扬声器的低频截止频率为400Hz,高频截止频率为10KHz,即手机的微型扬声器无法较好的复现原始音频信号中20Hz至400Hz的信号。为了获取原始音频信号的低频信号,可以将第一滤波器组中的高通滤波器的截止频率设置为大于等于原始音频信号的下限频率、小于手机的微型扬声器的低频截止频率,例如20Hz,第一滤波器组中低通滤波器的截止频率设置为大于等于电子设备的扬声器的低频截止频率,小于电子设备的扬声器的高频截止频率,如400Hz,即通过第一滤波器组组成20Hz至400Hz的带通,以过滤原始音频信号,得到用于生成虚拟低音信号的第一音频信号,其中第一音频信号的频带范围满足20Hz至400Hz。For example, the frequency range of the original audio signal is 20Hz to 20kHz, the low-frequency cutoff frequency of the micro-speaker of the mobile phone is 400Hz, and the high-frequency cutoff frequency is 10KHz, that is, the micro-speaker of the mobile phone cannot reproduce the signal of 20Hz to 400Hz in the original audio signal well. In order to obtain the low-frequency signal of the original audio signal, the cutoff frequency of the high-pass filter in the first filter group can be set to be greater than or equal to the lower limit frequency of the original audio signal and less than the low-frequency cutoff frequency of the micro-speaker of the mobile phone, for example, 20Hz, and the cutoff frequency of the low-pass filter in the first filter group is set to be greater than or equal to the low-frequency cutoff frequency of the speaker of the electronic device and less than the high-frequency cutoff frequency of the speaker of the electronic device, such as 400Hz, that is, a bandpass of 20Hz to 400Hz is formed by the first filter group to filter the original audio signal to obtain a first audio signal for generating a virtual bass signal, wherein the frequency band range of the first audio signal satisfies 20Hz to 400Hz.

在本申请实施例中,第一滤波器组的滤波器为线性滤波器,如Bessel滤波器。可以理解,第一滤波器组的滤波器为线性滤波器,而线性滤波器过滤后的音频信号具有线性相位,保证了过滤后的第一音频信号中各频率成分的相对相位关系不改变,避免了第一音频信号与原始音频信号的相位不匹配的问题。In the embodiment of the present application, the filter of the first filter group is a linear filter, such as a Bessel filter. It can be understood that the filter of the first filter group is a linear filter, and the audio signal filtered by the linear filter has a linear phase, which ensures that the relative phase relationship of each frequency component in the filtered first audio signal does not change, avoiding the problem of phase mismatch between the first audio signal and the original audio signal.

第一滤波器组中低通滤波器的传递函数如公式(1)所示:The transfer function of the low-pass filter in the first filter group is shown in formula (1):

其中,θn(0)和θn(s/ω0)是反向Bessel多项式,s是频率信息,ω0是选定的期望截止频率,s/ω0是相位信息。Wherein, θ n (0) and θ n (s/ω 0 ) are inverse Bessel polynomials, s is the frequency information, ω 0 is the selected desired cutoff frequency, and s/ω 0 is the phase information.

Bessel低通滤波器的相频特性曲线如图2所示,图2中的横坐标为Bessel低通滤波器的ω,纵坐标为Bessel低通滤波器的相位,由图2可知,Bessel低通滤波器的相位随ω的增加单调递增,即Bessel低通滤波器的相位为线性相位,即Bessel低通滤波器过滤后的信号的相位不会发生改变。The phase-frequency characteristic curve of the Bessel low-pass filter is shown in Figure 2. The horizontal axis in Figure 2 is the ω of the Bessel low-pass filter, and the vertical axis is the phase of the Bessel low-pass filter. It can be seen from Figure 2 that the phase of the Bessel low-pass filter increases monotonically with the increase of ω, that is, the phase of the Bessel low-pass filter is a linear phase, that is, the phase of the signal filtered by the Bessel low-pass filter will not change.

Bessel低通滤波器的幅频特性曲线如图3所示,图3中的横坐标为Bessel低通滤波器的频率,纵坐标为Bessel低通滤波器允许通过的信号的幅值,由图3可知,Bessel低通滤波器可以通过的信号的幅值小于0,且随频率的增加而逐渐降低,即Bessel低通滤波器可以使得通过低频信号、抑制高频信号。The amplitude-frequency characteristic curve of the Bessel low-pass filter is shown in Figure 3. The horizontal axis in Figure 3 is the frequency of the Bessel low-pass filter, and the vertical axis is the amplitude of the signal allowed to pass by the Bessel low-pass filter. It can be seen from Figure 3 that the amplitude of the signal that can be passed by the Bessel low-pass filter is less than 0, and gradually decreases with the increase of frequency, that is, the Bessel low-pass filter can pass low-frequency signals and suppress high-frequency signals.

102:基于第一音频信号生成第一谐波信号。102: Generate a first harmonic signal based on the first audio signal.

本申请实施例,将第一音频信号输出到谐波生成器,以通过谐波生成器基于第一音频信号生成第二谐波信号。然后,通过第二滤波器组过滤第二谐波信号,得到第一谐波信号,即虚拟低音信号。可以理解,在音频信号的处理过程中,高频谐波通常与声音的清晰度相关,本申请通过添加音频信号的谐波信号可以增强信号的亮度和清晰度,提高音频信号的听觉清晰度和存在感。In an embodiment of the present application, the first audio signal is output to a harmonic generator, so as to generate a second harmonic signal based on the first audio signal through the harmonic generator. Then, the second harmonic signal is filtered by a second filter group to obtain a first harmonic signal, i.e., a virtual bass signal. It can be understood that in the process of processing audio signals, high-frequency harmonics are usually related to the clarity of sound. The present application can enhance the brightness and clarity of the signal by adding the harmonic signal of the audio signal, thereby improving the auditory clarity and presence of the audio signal.

在一些实施例中,若第一音频信号的频率为20Hz至400Hz,通常情况下,为了增加音频信号的清晰度,可以基于第一音频信号生成一到三次谐波,如生成的第二谐波信号的频率范围包括:20Hz至400Hz、40Hz至800Hz、60Hz至1200Hz。然后通过第二滤波器组过滤第二谐波信号,得到第一谐波信号,即虚拟低音信号。In some embodiments, if the frequency of the first audio signal is 20 Hz to 400 Hz, generally, in order to increase the clarity of the audio signal, one to three harmonics may be generated based on the first audio signal, such as the frequency range of the generated second harmonic signal includes: 20 Hz to 400 Hz, 40 Hz to 800 Hz, 60 Hz to 1200 Hz. The second harmonic signal is then filtered through the second filter group to obtain the first harmonic signal, that is, the virtual bass signal.

可以理解,第二滤波器组用于通过满足电子设备的微型扬声器的频带范围的信号,以选择性地过滤掉不满足电子设备的微型扬声器的频带范围的信号,第二滤波器组的滤波器包括高通滤波器和低通滤波器,第二滤波器组的滤波器为线性滤波器,如Bessel滤波器。It can be understood that the second filter group is used to pass the signal that meets the frequency band range of the micro-speaker of the electronic device to selectively filter out the signal that does not meet the frequency band range of the micro-speaker of the electronic device, and the filters of the second filter group include high-pass filters and low-pass filters. The filters of the second filter group are linear filters, such as Bessel filters.

在本申请实施例中,可以根据电子设备的微型扬声器的带宽确定第二滤波器组的带宽。In the embodiment of the present application, the bandwidth of the second filter group can be determined according to the bandwidth of the micro speaker of the electronic device.

在一些实施例中,第二滤波器组中低通滤波器的截止频率可以根据微型扬声器的高频截止频率确定,第二滤波器组中高通滤波器的截止频率可以根据微型扬声器的低频截止频率确定。在另一些实施例中,第二滤波器组中低通滤波器的截止频率可以根据待复现音频信号的基频确定,第二滤波器组中高通滤波器的截止频率可以根据微型扬声器的低频截止频率确定。In some embodiments, the cutoff frequency of the low-pass filter in the second filter group can be determined according to the high-frequency cutoff frequency of the micro-speaker, and the cutoff frequency of the high-pass filter in the second filter group can be determined according to the low-frequency cutoff frequency of the micro-speaker. In other embodiments, the cutoff frequency of the low-pass filter in the second filter group can be determined according to the fundamental frequency of the audio signal to be reproduced, and the cutoff frequency of the high-pass filter in the second filter group can be determined according to the low-frequency cutoff frequency of the micro-speaker.

例如,第二滤波器组组成400Hz至10KHz的带通,第二滤波器组可以过滤第二谐波信号中小于400Hz的谐波信号,和大于10KHz的谐波信号,得到频率范围在400Hz至10KHz的第一谐波信号。For example, the second filter group forms a bandpass of 400 Hz to 10 KHz, and the second filter group can filter the harmonic signals less than 400 Hz and the harmonic signals greater than 10 KHz in the second harmonic signal to obtain the first harmonic signal with a frequency range of 400 Hz to 10 KHz.

103:对第一音频信号进行特征识别,以确定第一音频信号的信号类型。103: Perform feature recognition on the first audio signal to determine a signal type of the first audio signal.

在本申请实施例中,通过对第一音频信号进行特征识别,以确定第一音频信号的信号类型;其中,可以基于支持向量机和预设特征对第一音频信号进行特征识别,预设特征包括时域特征,时域特征具有计算量小且能有效区分人声和背景音的特点。在一些实施例中,时域特征包括过零率和波形因子。In an embodiment of the present application, feature recognition is performed on the first audio signal to determine the signal type of the first audio signal; wherein, feature recognition of the first audio signal can be performed based on a support vector machine and preset features, and the preset features include time domain features, which have the characteristics of small computational complexity and can effectively distinguish between human voice and background sound. In some embodiments, the time domain features include zero crossing rate and waveform factor.

在一些实施例中,预设特征包括时域特征和频域特征,频域特征包括频率、频谱、频率带宽、频率中心等。In some embodiments, the preset features include time domain features and frequency domain features, and the frequency domain features include frequency, spectrum, frequency bandwidth, frequency center, etc.

104:根据第一音频信号的信号类型实时确定第一音频信号的谐波比例。104: Determine a harmonic ratio of the first audio signal in real time according to the signal type of the first audio signal.

在本申请实施例中,对应于第一音频信号的信号类型为背景音信号,将第一音频信号的谐波比例由预设比例降低至第一比例。对应于第一音频信号的信号类型为人声信号,将第一音频信号的谐波比例由预设比例降低至第二比例,其中,第一比例小于第二比例。In the embodiment of the present application, the signal type corresponding to the first audio signal is a background sound signal, and the harmonic ratio of the first audio signal is reduced from a preset ratio to a first ratio. The signal type corresponding to the first audio signal is a voice signal, and the harmonic ratio of the first audio signal is reduced from a preset ratio to a second ratio, wherein the first ratio is less than the second ratio.

可以理解,音频信号的谐波含量可以影响声音的音色和质地。音频信号的谐波越多,声音听起来越丰富、越复杂,音频信号的谐波越少,声音听起来越纯净。It is understandable that the harmonic content of an audio signal can affect the timbre and texture of the sound. The more harmonics an audio signal has, the richer and more complex it sounds, and the fewer harmonics an audio signal has, the purer it sounds.

可以理解,低频信号中的人声信号和背景音信号的音频特征并不完全相同,如通常情况下低频信号中人声信号较背景音信号的厚度更高。为了兼顾低频信号中背景音信号和人声信号的音频效果,如为了兼顾低频信号中鼓声和人声效果,本申请实施例采用谐波比例动态调控的方法,使得人声信号的谐波比例的下降速度大于背景音信号的谐波比例的下降速度,即第一速度小于第二速度,从而提高人声的清晰度,在保证低频冲击力的同时提升了清晰度。例如,对应于第一音频信号的信号类型为背景音信号,如鼓声、贝斯声等,以第一速度降低预设比例,得到第一比例;对应于第一音频信号的信号类型为人声信号,以第二速度降低预设比例,得到第二比例,从而保证谐波信号与基波信号都可以呈现出对应的音频效果。It can be understood that the audio characteristics of the human voice signal and the background sound signal in the low-frequency signal are not exactly the same. For example, in general, the thickness of the human voice signal in the low-frequency signal is higher than that of the background sound signal. In order to take into account the audio effects of the background sound signal and the human voice signal in the low-frequency signal, such as in order to take into account the drum sound and the human voice effect in the low-frequency signal, the embodiment of the present application adopts a method of dynamically controlling the harmonic ratio, so that the decreasing speed of the harmonic ratio of the human voice signal is greater than the decreasing speed of the harmonic ratio of the background sound signal, that is, the first speed is less than the second speed, thereby improving the clarity of the human voice, while ensuring the low-frequency impact force and improving the clarity. For example, the signal type corresponding to the first audio signal is a background sound signal, such as drum sound, bass sound, etc., and the preset ratio is reduced at the first speed to obtain a first ratio; the signal type corresponding to the first audio signal is a human voice signal, and the preset ratio is reduced at the second speed to obtain a second ratio, thereby ensuring that both the harmonic signal and the fundamental signal can present corresponding audio effects.

105:基于第一音频信号的谐波比例,对第一音频信号的原始信号和第一谐波信号进行加和处理,得到第二音频信号。105: Based on the harmonic ratio of the first audio signal, add the original signal of the first audio signal and the first harmonic signal to obtain a second audio signal.

在本申请实施例中,可以基于第一音频信号的谐波比例,对第一音频信号的原始信号和第一音频信号对应的第一谐波信号进行加和处理,得到第二音频信号,然后通过微型扬声器播放第二音频信号。In the embodiment of the present application, based on the harmonic ratio of the first audio signal, the original signal of the first audio signal and the first harmonic signal corresponding to the first audio signal can be added to obtain a second audio signal, and then the second audio signal can be played through the micro speaker.

综上,在本申请实施例中,采用Bessel滤波器过滤音频信号,由于Bessel滤波器为线性滤波器,线性滤波器过滤后的音频信号具有线性相位,保证了过滤得到的音频信号的各频率成分的相对相位关系不改变,避免了过滤后的音频信号输入的音频信号的相位不匹配的问题,即避免了虚拟低音信号与原始音频信号的相位不匹配的问题。In summary, in the embodiment of the present application, a Bessel filter is used to filter the audio signal. Since the Bessel filter is a linear filter, the audio signal filtered by the linear filter has a linear phase, which ensures that the relative phase relationship of each frequency component of the filtered audio signal does not change, thereby avoiding the problem of phase mismatch between the audio signal input after the filtered audio signal, that is, avoiding the problem of phase mismatch between the virtual bass signal and the original audio signal.

并且本申请实施例利用机器学习的方法识别第一音频信号中的成分,根据第一音频信号的信号类型实时调控谐波比例,使得得到的具有低频听感的信号既保留了输入的原始音频信号中的高频信号对应的听感,又可以虚拟出输入的原始音频信号中的低频信号的低音听感,使得用户直观的感受低频音频的低频听感,提高了音频信号的播放效果。In addition, the embodiment of the present application utilizes a machine learning method to identify components in the first audio signal, and adjusts the harmonic ratio in real time according to the signal type of the first audio signal, so that the obtained signal with a low-frequency hearing sense not only retains the hearing sense corresponding to the high-frequency signal in the input original audio signal, but also can virtualize the bass hearing sense of the low-frequency signal in the input original audio signal, so that the user can intuitively feel the low-frequency hearing sense of the low-frequency audio, thereby improving the playback effect of the audio signal.

图4根据本申请的实施例示出了一种音频处理方法的示意图。可以理解,图4所示示意图的执行主体均为电子设备100。为了简化描述,下面在介绍图4所示示意图时将不再重复描述各步骤的执行主体。Fig. 4 shows a schematic diagram of an audio processing method according to an embodiment of the present application. It can be understood that the execution subject of the schematic diagram shown in Fig. 4 is the electronic device 100. In order to simplify the description, the execution subject of each step will not be repeatedly described below when introducing the schematic diagram shown in Fig. 4.

如图4所示,音频处理方法包括:电子设备获取输入(Din)的原始音频信号,并将原始音频信号分为两个通道,第一通道的原始音频信号输入Bessel滤波器组1,通过Bessel滤波器组1(或称为第一滤波器组)对原始音频信号进行过滤,得到过滤后的第一音频信号;通过数字信号处理器对第一音频信号进行特征识别,以确定第一音频信号的信号类型。通过带通滤波器或谐波激励器基于电子设备的微型扬声器的截止频率、第一音频信号的频率生成第二谐波信号;通过Bessel滤波器组2(或称为第二滤波器组)对第二谐波信号进行过滤,得到过滤后的满足电子设备扬声器带宽的第一谐波信号,即虚拟低音信号。对应于确定第一音频信号为背景音信号,如鼓声、贝斯声等,以第一速度降低预设比例,使得第一音频信号的谐波比例由预设比例降低至第一比例;对应于确定第一音频信号为人声信号,以第二速度降低预设比例,使得第一音频信号的谐波比例由预设比例降低至第二比例,其中,预设比例为谐波成分与基波成分的比例,第一比例小于第二比例,第一速度大于第二速度。As shown in FIG4 , the audio processing method includes: the electronic device obtains the original audio signal of the input (Din), and divides the original audio signal into two channels, the original audio signal of the first channel is input into the Bessel filter group 1, the original audio signal is filtered by the Bessel filter group 1 (or referred to as the first filter group), and the filtered first audio signal is obtained; the first audio signal is feature-recognized by the digital signal processor to determine the signal type of the first audio signal. The second harmonic signal is generated based on the cutoff frequency of the micro speaker of the electronic device and the frequency of the first audio signal by a bandpass filter or a harmonic exciter; the second harmonic signal is filtered by the Bessel filter group 2 (or referred to as the second filter group) to obtain the filtered first harmonic signal that meets the bandwidth of the electronic device speaker, that is, the virtual bass signal. Corresponding to determining that the first audio signal is a background sound signal, such as drum sounds, bass sounds, etc., the preset proportion is reduced at a first speed, so that the harmonic proportion of the first audio signal is reduced from the preset proportion to the first proportion; corresponding to determining that the first audio signal is a human voice signal, the preset proportion is reduced at a second speed, so that the harmonic proportion of the first audio signal is reduced from the preset proportion to the second proportion, wherein the preset proportion is the ratio of the harmonic component to the fundamental wave component, the first proportion is less than the second proportion, and the first speed is greater than the second speed.

将第二通道的原始音频信号输入加法器,在第一通道生成第一谐波信号和第一音频信号的谐波比例时,基于第一音频信号的谐波比例将第一谐波信号与第二通道的原始音频信号相加,得到输出(Dout)的音频信号。The original audio signal of the second channel is input into the adder, and when the first harmonic signal and the harmonic ratio of the first audio signal are generated in the first channel, the first harmonic signal is added to the original audio signal of the second channel based on the harmonic ratio of the first audio signal to obtain an output (Dout) audio signal.

在一些实施例中,在第一通道输出第一谐波信号和第一音频信号的谐波比例后,再将第二通道的原始音频信号输入加法器。在另一些实施例中,可以先第二通道的原始音频信号输入加法器,再将第一通道的第一通道输出第一谐波信号和第一音频信号的谐波比例输入加法器。在另一些实施例中,可以将第一通道输出的第一谐波信号、第一音频信号的谐波比例、第二通道的原始音频信号同时输入加法器。In some embodiments, after the first channel outputs the first harmonic signal and the harmonic ratio of the first audio signal, the original audio signal of the second channel is input into the adder. In other embodiments, the original audio signal of the second channel may be input into the adder first, and then the first harmonic signal output by the first channel of the first channel and the harmonic ratio of the first audio signal are input into the adder. In other embodiments, the first harmonic signal output by the first channel, the harmonic ratio of the first audio signal, and the original audio signal of the second channel may be input into the adder at the same time.

在本申请实施例中,采用Bessel滤波器过滤音频信号,由于Bessel滤波器为线性滤波器,线性滤波器过滤后的音频信号具有线性相位,保证了信号中各频率成分的相对相位关系不改变,避免了虚拟低音信号与输入的音频信号的相位不匹配的问题。In an embodiment of the present application, a Bessel filter is used to filter the audio signal. Since the Bessel filter is a linear filter, the audio signal filtered by the linear filter has a linear phase, which ensures that the relative phase relationship of each frequency component in the signal does not change, thereby avoiding the problem of phase mismatch between the virtual bass signal and the input audio signal.

本申请实施例提供了一种芯片,包括电路,电路用于执行上述音频处理方法。An embodiment of the present application provides a chip, including a circuit, and the circuit is used to execute the above audio processing method.

本实施例是与上述音频处理方法实施例相对应的芯片的实施方式,本实施例可与上述音频处理方法的实施方式互相配合实施。上述音频处理方法实施方式中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在电路实施方式中。This embodiment is an implementation of a chip corresponding to the above-mentioned audio processing method embodiment, and this embodiment can be implemented in conjunction with the above-mentioned audio processing method implementation. The relevant technical details mentioned in the above-mentioned audio processing method implementation are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the circuit implementation.

本申请实施例提供了一种电子设备,其特征在于,包括上述芯片。An embodiment of the present application provides an electronic device, characterized in that it includes the above-mentioned chip.

本实施例是与上述芯片实施例相对应的电子设备的实施方式,本实施例可与上述音频处理方法的实施方式互相配合实施。上述音频处理方法的实施方式中提到的相关技术细节在本实施例中依然有效,为了减少重复,这里不再赘述。相应地,本实施例中提到的相关技术细节也可应用在电路实施方式中。This embodiment is an implementation of an electronic device corresponding to the above chip embodiment, and this embodiment can be implemented in conjunction with the above audio processing method implementation. The relevant technical details mentioned in the above audio processing method implementation are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the circuit implementation.

根据本申请的实施例,图5示出了一种基于片上系统(system on chip,SOC)的电子设备1300的框图。在图5中,相似的部件具有同样的附图标记。另外,虚线框是更先进的SOC的可选特征。在图5中,电子设备1300包括:互连单元1350,其被耦合至处理器1315,处理器1315可以用于控制电子设备执行本申请的音频处理方法;系统代理单元1370;总线控制器单元1380;集成存储器控制器单元1340;一组或一个或多个协处理器1320,其可包括第一滤波器组、第二滤波器组、加法器、音频处理器和视频处理器;静态随机存取存储器(staticrandom-access memory,SRAM)单元1330;直接存储器存取(direct memory access,DMA)单元1360。在一个实施例中,协处理器1320包括专用处理器,诸如例如网络或通信处理器、压缩引擎或嵌入式处理器等。According to an embodiment of the present application, FIG5 shows a block diagram of an electronic device 1300 based on a system on chip (SOC). In FIG5, similar components have the same reference numerals. In addition, the dashed box is an optional feature of a more advanced SOC. In FIG5, the electronic device 1300 includes: an interconnect unit 1350, which is coupled to a processor 1315, and the processor 1315 can be used to control the electronic device to perform the audio processing method of the present application; a system agent unit 1370; a bus controller unit 1380; an integrated memory controller unit 1340; a group or one or more coprocessors 1320, which may include a first filter group, a second filter group, an adder, an audio processor, and a video processor; a static random access memory (SRAM) unit 1330; a direct memory access (DMA) unit 1360. In one embodiment, the coprocessor 1320 includes a dedicated processor, such as, for example, a network or communication processor, a compression engine, or an embedded processor.

在一些情况下,所公开的实施例可以以硬件、固件、软件或其任何组合来实现。所公开的实施例还可以被实现为由一个或多个暂时或非暂时性机器可读(例如,计算机可读)存储介质承载或存储在其上的指令,其可以由一个或多个处理器读取和执行。例如,指令可以通过网络或通过其他计算机可读介质分发。因此,机器可读介质可以包括用于以机器(例如,计算机)可读的形式存储或传输信息的任何机制,包括但不限于,软盘、光盘、光碟、只读存储器(compact disc-read only memory,CD-ROMs)、磁光盘、只读存储器(read onlymemory,ROM)、随机存取存储器(random access memory,RAM)、可擦除可编程只读存储器(erasable programmable read only memory,EPROM)、电可擦除可编程只读存储器(electrically erasable programmable read-only memory,EEPROM)、磁卡或光卡、闪存、或用于利用因特网以电、光、声或其他形式的传播信号来传输信息(例如,载波、红外信号数字信号等)的有形的机器可读存储器。因此,机器可读介质包括适合于以机器(例如计算机)可读的形式存储或传输电子指令或信息的任何类型的机器可读介质。In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more temporary or non-temporary machine-readable (e.g., computer-readable) storage media, which may be read and executed by one or more processors. For example, instructions may be distributed over a network or through other computer-readable media. Therefore, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to floppy disks, optical disks, optical disks, read-only memories (compact disc-read only memories, CD-ROMs), magneto-optical disks, read-only memories (read only memory, ROM), random access memories (random access memory, RAM), erasable programmable read-only memories (erasable programmable read-only memories, EPROM), electrically erasable programmable read-only memories (electrically erasable programmable read-only memories, EEPROM), magnetic or optical cards, flash memory, or a tangible machine-readable memory for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using the Internet in electrical, optical, acoustic, or other forms of propagation signals. Accordingly, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a form readable by a machine (eg, a computer).

在附图中,可以以特定布置和/或顺序示出一些结构或方法特征。然而,应该理解,可能不需要这样的特定布置和/或排序。而是,在一些实施例中,这些特征可以以不同于说明性附图中所示的方式和/或顺序来布置。另外,在特定图中包括结构或方法特征并不意味着暗示在所有实施例中都需要这样的特征,并且在一些实施例中,可以不包括这些特征或者可以与其他特征组合。In the accompanying drawings, some structural or method features may be shown in a specific arrangement and/or order. However, it should be understood that such a specific arrangement and/or order may not be required. Instead, in some embodiments, these features may be arranged in a manner and/or order different from that shown in the illustrative drawings. In addition, the inclusion of structural or method features in a particular figure does not mean that such features are required in all embodiments, and in some embodiments, these features may not be included or may be combined with other features.

需要说明的是,本申请各设备实施例中提到的各单元/模块都是逻辑单元/模块,在物理上,一个逻辑单元/模块可以是一个物理单元/模块,也可以是一个物理单元/模块的一部分,还可以以多个物理单元/模块的组合实现,这些逻辑单元/模块本身的物理实现方式并不是最重要的,这些逻辑单元/模块所实现的功能的组合才是解决本申请所提出的技术问题的关键。此外,为了突出本申请的创新部分,本申请上述各设备实施例并没有将与解决本申请所提出的技术问题关系不太密切的单元/模块引入,这并不表明上述设备实施例并不存在其它的单元/模块。It should be noted that the units/modules mentioned in the various device embodiments of the present application are all logical units/modules. Physically, a logical unit/module can be a physical unit/module, or a part of a physical unit/module, or can be implemented as a combination of multiple physical units/modules. The physical implementation method of these logical units/modules themselves is not the most important. The combination of functions implemented by these logical units/modules is the key to solving the technical problems proposed by the present application. In addition, in order to highlight the innovative part of the present application, the above-mentioned device embodiments of the present application do not introduce units/modules that are not closely related to solving the technical problems proposed by the present application, which does not mean that there are no other units/modules in the above-mentioned device embodiments.

需要说明的是,在本专利的示例和说明书中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。虽然通过参照本申请的某些优选实施例,已经对本申请进行了图示和描述,但本领域的普通技术人员应该明白,可以在形式上和细节上对其作各种改变,而不偏离本申请的精神和范围。It should be noted that in the examples and description of this patent, the terms "include", "comprises" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "includes one" does not exclude the presence of other identical elements in the process, method, article or device including the element. Although the present application has been illustrated and described with reference to certain preferred embodiments of the present application, it should be understood by those skilled in the art that various changes may be made to it in form and detail without departing from the spirit and scope of the present application.

Claims (12)

1.一种音频处理方法,其特征在于,应用于电子设备,所述音频处理方法包括:1. An audio processing method, characterized in that it is applied to an electronic device, the audio processing method comprising: 获取第一音频信号;Acquire a first audio signal; 基于所述第一音频信号生成第一谐波信号;generating a first harmonic signal based on the first audio signal; 对所述第一音频信号进行特征识别,以确定所述第一音频信号的信号类型;performing feature recognition on the first audio signal to determine a signal type of the first audio signal; 根据所述第一音频信号的信号类型实时确定所述第一音频信号的谐波比例;determining a harmonic ratio of the first audio signal in real time according to a signal type of the first audio signal; 基于所述第一音频信号的谐波比例,对所述第一音频信号的原始音频信号和所述第一谐波信号进行加和处理,得到第二音频信号。Based on the harmonic ratio of the first audio signal, an original audio signal of the first audio signal and the first harmonic signal are added together to obtain a second audio signal. 2.根据权利要求1所述的音频处理方法,其特征在于,所述根据所述第一音频信号的信号类型实时确定所述第一音频信号的谐波比例,包括:2. The audio processing method according to claim 1, wherein determining the harmonic ratio of the first audio signal in real time according to the signal type of the first audio signal comprises: 对应于所述第一音频信号的信号类型为背景音信号,将所述第一音频信号的谐波比例由预设比例降低至第一比例;Corresponding to the signal type of the first audio signal being a background sound signal, reducing the harmonic ratio of the first audio signal from a preset ratio to a first ratio; 对应于所述第一音频信号的信号类型为人声信号,将所述第一音频信号的谐波比例由预设比例降低至第二比例,其中,所述第一比例小于所述第二比例。Corresponding to the signal type of the first audio signal being a human voice signal, the harmonic ratio of the first audio signal is reduced from a preset ratio to a second ratio, wherein the first ratio is smaller than the second ratio. 3.根据权利要求2所述的音频处理方法,其特征在于,所述将所述第一音频信号的谐波比例由预设比例降低至第一比例,包括:3. The audio processing method according to claim 2, wherein reducing the harmonic ratio of the first audio signal from a preset ratio to a first ratio comprises: 将所述第一音频信号的谐波比例基于第一速度由所述预设比例降低至所述第一比例;reducing the harmonic ratio of the first audio signal from the preset ratio to the first ratio based on a first speed; 所述将所述第一音频信号的谐波比例由预设比例降低至第二比例,包括:The step of reducing the harmonic ratio of the first audio signal from a preset ratio to a second ratio includes: 将所述第一音频信号的谐波比例基于第二速度由所述预设比例降低至所述第二比例;reducing the harmonic ratio of the first audio signal from the preset ratio to the second ratio based on a second speed; 其中,所述第一速度小于所述第二速度。Wherein, the first speed is lower than the second speed. 4.根据权利要求1所述的音频处理方法,其特征在于,所述对所述第一音频信号进行特征识别,以确定所述第一音频信号的信号类型,包括:4. The audio processing method according to claim 1, wherein the performing feature recognition on the first audio signal to determine the signal type of the first audio signal comprises: 基于预设特征对所述第一音频信号进行特征识别,以确定所述第一音频信号的信号类型,其中,所述预设特征包括过零率和波形因子。Feature recognition is performed on the first audio signal based on preset features to determine a signal type of the first audio signal, wherein the preset features include a zero crossing rate and a waveform factor. 5.根据权利要求1所述的音频处理方法,其特征在于,所述获取第一音频信号,包括:5. The audio processing method according to claim 1, wherein obtaining the first audio signal comprises: 获取原始音频信号;Get the original audio signal; 通过第一滤波器组过滤所述原始音频信号,得到所述第一音频信号;Filter the original audio signal through a first filter group to obtain the first audio signal; 所述基于所述第一音频信号生成第一谐波信号,包括:The generating a first harmonic signal based on the first audio signal comprises: 基于所述第一音频信号生成第二谐波信号;generating a second harmonic signal based on the first audio signal; 通过第二滤波器组过滤所述第二谐波信号,得到所述第一谐波信号。The second harmonic signal is filtered through a second filter group to obtain the first harmonic signal. 6.根据权利要求5所述的音频处理方法,其特征在于,所述第一滤波器组和所述第二滤波器组均包括高通滤波器和低通滤波器,所述高通滤波器和低通滤波器均为线性滤波器。6 . The audio processing method according to claim 5 , wherein the first filter group and the second filter group both comprise a high-pass filter and a low-pass filter, and the high-pass filter and the low-pass filter are both linear filters. 7.根据权利要求6所述的音频处理方法,其特征在于,所述线性滤波器包括贝塞尔滤波器。7 . The audio processing method according to claim 6 , wherein the linear filter comprises a Bessel filter. 8.根据权利要求5至6任一项所述的音频处理方法,其特征在于,所述第一滤波器组的带宽基于所述原始音频信号的音频带宽和所述电子设备的扬声器的带宽确定;所述第二滤波器组的带宽基于所述电子设备的扬声器的带宽确定。8. The audio processing method according to any one of claims 5 to 6 is characterized in that the bandwidth of the first filter group is determined based on the audio bandwidth of the original audio signal and the bandwidth of the speaker of the electronic device; the bandwidth of the second filter group is determined based on the bandwidth of the speaker of the electronic device. 9.根据权利要求5至6任一项所述的音频处理方法,其特征在于,所述第一滤波器组的带宽基于所述原始音频信号的音频带宽和所述电子设备的扬声器的带宽确定,包括:9. The audio processing method according to any one of claims 5 to 6, characterized in that the bandwidth of the first filter group is determined based on the audio bandwidth of the original audio signal and the bandwidth of the speaker of the electronic device, comprising: 所述第一滤波器组中高通滤波器的截止频率基于所述原始音频信号的下限频率和所述电子设备的扬声器的低频截止频率确定,所述第一滤波器组中低通滤波器的截止频率基于所述电子设备的扬声器的低频截止频率和高频截止频率确定。The cutoff frequency of the high-pass filter in the first filter group is determined based on the lower limit frequency of the original audio signal and the low-frequency cutoff frequency of the speaker of the electronic device, and the cutoff frequency of the low-pass filter in the first filter group is determined based on the low-frequency cutoff frequency and the high-frequency cutoff frequency of the speaker of the electronic device. 10.根据权利要求5至6任一项所述的音频处理方法,其特征在于,所述第二滤波器组的带宽基于所述电子设备的扬声器的带宽确定,包括:10. The audio processing method according to any one of claims 5 to 6, characterized in that the bandwidth of the second filter group is determined based on the bandwidth of the speaker of the electronic device, comprising: 所述第二滤波器组中高通滤波器的截止频率基于所述电子设备的扬声器的低频截止频率确定,所述第二滤波器组中低通滤波器的截止频率基于所述电子设备的扬声器的高频截止频率确定。The cutoff frequency of the high-pass filter in the second filter group is determined based on the low-frequency cutoff frequency of the speaker of the electronic device, and the cutoff frequency of the low-pass filter in the second filter group is determined based on the high-frequency cutoff frequency of the speaker of the electronic device. 11.一种芯片,其特征在于,包括电路,所述电路用于执行权利要求1至10任一项所述音频处理方法。11. A chip, characterized by comprising a circuit, wherein the circuit is used to execute the audio processing method according to any one of claims 1 to 10. 12.一种电子设备,其特征在于,包括权利要求11所述的芯片。12. An electronic device, comprising the chip according to claim 11.
CN202411097373.5A 2024-08-09 2024-08-09 Audio processing method, chip and electronic device Pending CN118824261A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411097373.5A CN118824261A (en) 2024-08-09 2024-08-09 Audio processing method, chip and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411097373.5A CN118824261A (en) 2024-08-09 2024-08-09 Audio processing method, chip and electronic device

Publications (1)

Publication Number Publication Date
CN118824261A true CN118824261A (en) 2024-10-22

Family

ID=93078320

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411097373.5A Pending CN118824261A (en) 2024-08-09 2024-08-09 Audio processing method, chip and electronic device

Country Status (1)

Country Link
CN (1) CN118824261A (en)

Similar Documents

Publication Publication Date Title
CN115442709B (en) Audio processing method, virtual bass enhancement system, device, and storage medium
CN111966322B (en) Audio signal processing method, device, equipment and storage medium
US8204239B2 (en) Audio processing method and audio processing apparatus
CN111970627B (en) Audio signal enhancement method, device, storage medium and processor
CN110809214B (en) Audio playing method, audio playing device and terminal equipment
CN114299976A (en) Audio data processing method and electronic equipment
CN113170260B (en) Audio processing method, device, storage medium and electronic device
CN111796791A (en) Bass enhancement method, system, electronic device and storage medium
CN115835093A (en) Audio processing method, device, electronic device and computer-readable storage medium
CN102547517A (en) Bass signal harmonic generating method and device and sound playing equipment
JP4303026B2 (en) Acoustic signal processing apparatus and method
CN103077725B (en) Speech processing method and device
CN115811690A (en) Audio loudness adjusting method and device, terminal equipment and storage medium
CN115346544B (en) Audio signal processing methods, devices, storage media and software products
CN112163117B (en) Noise detection method, device and electronic equipment
CN118824261A (en) Audio processing method, chip and electronic device
CN111163411B (en) Method for reducing influence of interference sound and sound playing device
CN119007736A (en) Audio compression method and device
CN115835112A (en) Projector-based adaptive sound effect debugging method, system, device and platform
CN114067817A (en) Bass enhancement method, device, electronic device and storage medium
CN117116245A (en) Harmonic generation method, device, equipment and storage medium for sound signals
CN115396775A (en) Suspension type audio device with bass enhancement performance
CN115802274A (en) Audio signal processing method, electronic device, and computer-readable storage medium
CN113613143B (en) Audio processing method, device and storage medium suitable for mobile terminal
TWI789592B (en) Handheld electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination