CN113115178B - Audio signal processing method and device - Google Patents
Audio signal processing method and device Download PDFInfo
- Publication number
- CN113115178B CN113115178B CN202110518288.1A CN202110518288A CN113115178B CN 113115178 B CN113115178 B CN 113115178B CN 202110518288 A CN202110518288 A CN 202110518288A CN 113115178 B CN113115178 B CN 113115178B
- Authority
- CN
- China
- Prior art keywords
- data stream
- channel
- sound
- signal processing
- audio signal
- 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.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2430/00—Signal processing covered by H04R, not provided for in its groups
Abstract
The embodiment of the invention relates to the technical field of sound playing, and discloses an audio signal processing method and device. The signal processing apparatus of the present invention includes: acquiring a PCM code stream of audio to be played, and dividing the PCM code stream into a first data stream and a second data stream; performing mute processing on the first data stream; dividing the second data stream into a first channel and a second channel, wherein the second channel is used for audio playing at the first sound-emitting device; and performing sound mixing processing on the first sound channel and the first data stream subjected to the mute processing to obtain a third data stream, wherein the third data stream is used for performing audio playing on a second sound generating device. The audio signal processing method and the audio signal processing device provided by the invention can avoid the problem that the left sound channel and the right sound channel are not synchronous.
Description
Technical Field
The embodiment of the invention relates to the technical field of sound playing, in particular to an audio signal processing method and device.
Background
For the stereo solution of the mobile phone, in the prior art, two external power amplifiers (Smart PA) are generally used to drive two loudspeakers (a receiver and a loudspeaker), the two loudspeakers respectively play audio of a left channel and an audio of a right channel, and the stereo can be realized by controlling the switch of the external power amplifiers on software.
The inventor finds that at least the following problems exist in the prior art: due to the delay of the signal, the left sound channel and the right sound channel played by the dual-loudspeaker are not synchronous.
Disclosure of Invention
An object of embodiments of the present invention is to provide an audio signal processing method and apparatus, which can avoid the problem of left channel and right channel being asynchronous due to signal delay.
To solve the above technical problem, an embodiment of the present invention provides a signal processing method, including: acquiring a pulse code modulation code stream of an audio to be played, and dividing the pulse code modulation code stream into a first data stream and a second data stream; muting the first data stream; dividing the second data stream into a first channel and a second channel, the second channel being used for audio playback at a first sound-emitting device; and performing sound mixing processing on the first sound channel and the first data stream subjected to the mute processing to obtain a third data stream, wherein the third data stream is used for performing audio playing on a second sound generating device.
An embodiment of the present invention also provides an audio signal processing apparatus, including: means for performing the audio signal processing method described above.
An embodiment of the present invention also provides an audio signal processing apparatus, including: a memory for storing a computer program; a processor for calling the computer program stored in the memory and executing the audio signal processing method as described above according to the obtained program.
Embodiments of the present invention also provide a computer-readable storage medium storing a program that, when run on a computer, causes the computer to implement performing the audio signal processing method as described above.
Compared with the prior art, the embodiment of the invention basically eliminates the influence of the first data stream on the sound finally emitted by the first sound emitting device by carrying out the mute processing on the first data stream, so that the signal of the first sound emitting device is basically from the first channel in the second data stream, and the signal of the second sound emitting device is basically from the second channel in the second data stream, namely, the signal of the first sound emitting device and the signal of the second sound emitting device are both from the second data stream, thereby avoiding the problem of the asynchronization of the left channel and the right channel caused by the signal delay.
In addition, the mixing the first channel and the muted first data stream to obtain a third data stream specifically includes: adjusting sound effect parameters of the first sound channel; and performing sound mixing processing on the adjusted first sound channel and the first data stream subjected to the mute processing to obtain the third data stream.
In addition, the performing the mute processing on the first data stream specifically includes: and adjusting the gain of the first data stream to be lower than or equal to a preset gain, so that the muted first data stream only contains the background noise signal.
In addition, the preset gain is less than minus 80 decibels and greater than minus 100 decibels.
In addition, the acquiring a pulse code modulation code stream of the audio to be played specifically includes: reading the audio to be played from the storage module; and interpreting the audio to be played into the pulse code modulation code stream.
In addition, the first sound-emitting device is a receiver, and the second sound-emitting device is a loudspeaker; or, the first sound-generating device is a loudspeaker, and the second sound-generating device is a receiver.
In addition, the first channel is a left channel and the second channel is a right channel; or, the first channel is a right channel, and the second channel is a left channel.
Drawings
One or more embodiments are illustrated by way of example in the accompanying drawings which correspond to and are not to be construed as limiting the embodiments, in which elements having the same reference numeral designations represent like elements throughout, and in which the drawings are not to be construed as limiting in scale unless otherwise specified.
Fig. 1 is a flowchart of a signal processing method according to a first embodiment of the present invention;
fig. 2 is a schematic structural diagram of an audio signal processing apparatus according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of an audio signal processing apparatus according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a terminal device according to a fourth embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention more apparent, embodiments of the present invention will be described in detail below with reference to the accompanying drawings. However, it will be appreciated by those of ordinary skill in the art that numerous technical details are set forth in order to provide a better understanding of the present application in various embodiments of the present invention. However, the technical solution claimed in the present application can be implemented without these technical details and various changes and modifications based on the following embodiments.
A first embodiment of the present invention relates to a signal processing method, as shown in fig. 1, including the steps of:
s11: the method comprises the steps of obtaining a pulse code modulation code stream of audio to be played, and dividing the pulse code modulation code stream into a first data stream and a second data stream.
Specifically, in this step, the DSP module (digital signal processing module) may first read the audio to be played from the storage module (e.g., memory card), and then interpret the audio to be played as a Pulse Code Modulation (PCM).
S12: the first data stream is muted.
Specifically, in this step, the DSP module may adjust a gain of the first data stream to be lower than or equal to a preset gain, so that the muted first data stream only includes a noise floor signal, where the preset gain may be smaller than negative 80 db and greater than negative 100 db.
S13: the second data stream is divided into a first channel and a second channel, the second channel being used for audio playback at the first sound-emitting device.
Specifically, in this step, the DSP module may output the second channel of the second data stream to the first sound emitting device.
S14: and performing sound mixing processing on the first sound channel and the first data stream subjected to the mute processing to obtain a third data stream, wherein the third data stream is used for performing audio playing on a second sound generating device.
Specifically, in this step, the DSP module may first perform sound effect parameter adjustment on a first sound channel in the second data stream, perform sound mixing processing on the adjusted first sound channel and the first data stream after the mute processing to obtain a third data stream, and then output the third data stream to the first sound emitting device.
In practical applications, either one of the first channel and the second channel is a left channel, and the other is a right channel, that is, the first channel is a left channel, and the second channel is a right channel, or the first channel is a right channel, and the second channel is a left channel; the first data stream and the second data stream may both be the same as a PCM code stream of the audio to be played, that is, both the first data stream and the second data stream include a left channel and a right channel; the first sound generating device may be a receiver and the second sound generating device may be a speaker, or the first sound generating device may be a speaker and the second sound generating device may be a receiver.
Compared with the prior art, the embodiment of the invention basically eliminates the influence of the first data stream on the sound finally emitted by the first sound emitting device by carrying out mute processing on the first data stream, so that the signal of the first sound emitting device is basically from the first channel in the second data stream, and the signal of the second sound emitting device is basically from the second channel in the second data stream, that is, the signal of the first sound emitting device and the signal of the second sound emitting device are both from the second data stream, thereby avoiding the problem of unsynchronization of the left channel and the right channel caused by signal delay.
A second embodiment of the present invention relates to an audio signal processing apparatus 100, as shown in fig. 2, including: means for performing the audio signal processing method described above.
Specifically, the shunting module 16 is configured to obtain a PCM code stream of the audio to be played, and divide the PCM code stream into a first data stream and a second data stream; the first sound effect module 11 is configured to mute the first data stream; the second sound effect module 13 is configured to send a first sound channel in the second data stream to the sound mixing module 15, and output a second sound channel in the second data stream to the second output end 14, where the second sound channel in the output second data stream is used for performing audio playing in the first sound generating apparatus; the audio mixing module 15 is configured to perform audio mixing processing on the first audio channel in the second data stream and the muted first data stream to obtain a third data stream, and output the third data stream to the first output end 12, where the output third data stream is used for performing audio playing on the second sound generating apparatus.
That is to say, one end of each of the first sound effect module 11 and the second sound effect module 13 is connected to the splitting module 16, the other end of each of the first sound effect module and the second sound effect module is connected to the mixing module 15, the second sound effect module 13 is further connected to the first external sound generating device, and the mixing module 15 is further connected to the second external sound generating device. The first data stream and the second data stream may both be the same as a PCM code stream of the audio to be played, that is, both the first data stream and the second data stream include a left channel and a right channel. Specifically, the signal processing apparatus 100 may employ a DSP module (digital signal processing module).
In this embodiment, the second sound effect module 13 is specifically configured to adjust sound effect parameters of a first sound channel in the second data stream, and transmit the adjusted first sound channel to the sound mixing module 15, so that sound effect debugging of the first sound channel is achieved. In addition, the second channel in the second data stream can be transmitted to the external power amplifier after reaching the second output end 14, and the external power amplifier is used for adjusting the sound effect parameters of the second channel transmitted by the second output end 14, so that the sound effect debugging of the first channel is realized. The adjustment of the sound effect parameters is specifically to adjust module parameters such as HPF, EQ, DRC, FNS, FIR and the like.
The foregoing mute processing is specifically that the first sound effect module 11 is specifically configured to adjust the gain of the first data stream to be lower than or equal to a preset gain, so that the muted first data stream only includes a bottom noise signal, where the preset gain is smaller than negative 80 db and greater than negative 100 db, and in this embodiment, the preset gain is negative 90 db, and in fact, the smaller the gain of the first data stream is adjusted to, the better the influence of the first data stream on the sound finally emitted by the first sound emitting device can be avoided.
In this embodiment, the shunting module 16 is specifically configured to read the audio to be played from the storage module, interpret the audio to be played as a PCM code stream, and shunt the PCM code stream into the first data stream and the second data stream. Specifically, the splitting module 16 is further configured to configure a device ID a and a device ID B for the first data stream and the second data stream, and subsequently, the device ID a and the device ID B may be called to obtain the first data stream and the second data stream, respectively.
Compared with the prior art, the embodiment of the invention basically eliminates the influence of the first data stream on the sound finally emitted by the first sound emitting device by carrying out the mute processing on the first data stream, so that the signal of the first sound emitting device is basically from the first channel in the second data stream, and the signal of the second sound emitting device is basically from the second channel in the second data stream, namely, the signal of the first sound emitting device and the signal of the second sound emitting device are both from the second data stream, thereby avoiding the problem of the asynchronization of the left channel and the right channel caused by the signal delay.
A third embodiment of the present invention relates to an audio signal processing apparatus, as shown in fig. 3, including: a memory 31 for storing a computer program; a processor 32 for calling the computer program stored in the memory and executing the audio signal processing method as described above according to the obtained program.
A fourth embodiment of the present invention relates to a computer-readable storage medium storing a program that, when run on a computer, causes the computer to implement an audio signal processing method as described above.
A fifth embodiment of the present invention is directed to a terminal device, as shown in fig. 4, including: as above, the signal processing device 100, the codec module 17 (codec EAR) connected to the first output end, and the external power amplifier 18 (Smart PA) connected to the second output end, the codec module 17 is configured to drive the first sound generating device 19 to generate sound, and the external power amplifier 18 is configured to drive the second sound generating device 20 to generate sound.
It should be noted that, since the codec module 17 is a module carried by the chip itself, and the external power amplifier 18 connected to the second output terminal is already used in the prior art (in addition, the external power amplifier connected to the first output terminal may still exist in the prior art, and is not used in the stereo scheme of "headphone + speaker"), the solution of the embodiment of the present invention solves the problem that the left channel and the right channel are not synchronized on the premise that the hardware architecture of the terminal device is not changed.
In practical application, the terminal device may further include: the audio system comprises a first sound generating device 19 connected with the coding and decoding module 17 and a second sound generating device 20 connected with the external power amplifier 18, wherein the first sound generating device 19 can be a headphone, the second sound generating device 20 can be a loudspeaker, specifically, the headphone is driven by the A/B type power amplifier of the coding and decoding module 17, and the loudspeaker is driven by the external power amplifier 18.
In this embodiment, the second sound effect module is specifically configured to adjust sound effect parameters of a first sound channel in the second data stream, and transmit the adjusted first sound channel to the sound mixing module; the external power amplifier 18 is further configured to adjust sound effect parameters of a second channel transmitted by the second output terminal. The sound effect debugging of the first sound channel is realized through the second sound effect module, the sound effect adjustment of the second sound channel is realized through the external power amplifier 18, and the sound effect debugging of the left sound channel and the right sound channel is realized.
In practical application, the terminal device may further include: an earphone interface 21 connected to the codec module 17, and a microphone 22 connected to the codec module 17, but of course, only either one of the earphone interface 21 and the microphone 22 may be included.
Compared with the prior art, the embodiment of the present invention basically eliminates the influence of the first data stream on the sound finally emitted by the first sound emitting device 19 by muting the first data stream, so that the signal of the first sound emitting device 19 is basically from the first channel in the second data stream, and the signal of the second sound emitting device 20 is basically from the second channel in the second data stream, that is, the signal of the first sound emitting device 19 and the signal of the second sound emitting device 20 are both from the second data stream, thereby avoiding the problem of the left channel and the right channel being unsynchronized due to the signal delay; moreover, since the encoding and decoding module 17 is a module carried by the chip itself, and the external power amplifier 18 connected with the second output end is already used in the prior art, the hardware architecture of the terminal device is not changed, and the problem of incompatibility of old devices is avoided.
It will be understood by those of ordinary skill in the art that the foregoing embodiments are specific examples for carrying out the invention, and that various changes in form and details may be made therein without departing from the spirit and scope of the invention in practice.
Claims (9)
1. An audio signal processing method, comprising:
acquiring a pulse code modulation code stream of an audio to be played, and dividing the pulse code modulation code stream into a first data stream and a second data stream;
performing mute processing on the first data stream;
dividing the second data stream into a first channel and a second channel, the second channel being used for audio playback at a first sound-emitting device;
mixing the first sound channel and the first data stream subjected to the mute processing to obtain a third data stream, wherein the third data stream is used for audio playing on a second sound generating device;
the first sound-generating device is a receiver, and the second sound-generating device is a loudspeaker.
2. The audio signal processing method according to claim 1, wherein the mixing the first channel and the muted first data stream to obtain a third data stream specifically comprises:
adjusting sound effect parameters of the first sound channel;
and performing sound mixing processing on the adjusted first sound channel and the first data stream subjected to the mute processing to obtain the third data stream.
3. The audio signal processing method according to claim 1 or 2, wherein the muting the first data stream specifically comprises:
and adjusting the gain of the first data stream to be lower than or equal to a preset gain so that the muted first data stream only contains the background noise signal.
4. The audio signal processing method of claim 3, wherein the predetermined gain is less than minus 80 dB and greater than minus 100 dB.
5. The audio signal processing method according to claim 1, wherein the obtaining of the pulse code modulation code stream of the audio to be played specifically includes:
reading the audio to be played from the storage module;
and interpreting the audio to be played into the pulse code modulation code stream.
6. The audio signal processing method according to claim 1, wherein the first channel is a left channel, and the second channel is a right channel;
or, the first channel is a right channel, and the second channel is a left channel.
7. An audio signal processing apparatus, characterized in that the audio signal processing apparatus comprises means for performing the audio signal processing method of any one of the preceding claims 1 to 6.
8. An audio signal processing apparatus, comprising:
a memory for storing a computer program;
a processor for calling the computer program stored in the memory and executing the audio signal processing method according to any one of claims 1 to 6 in accordance with the obtained program.
9. A computer-readable storage medium, characterized in that the storage medium stores a program which, when run on a computer, causes the computer to carry out performing the audio signal processing method according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110518288.1A CN113115178B (en) | 2021-05-12 | 2021-05-12 | Audio signal processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110518288.1A CN113115178B (en) | 2021-05-12 | 2021-05-12 | Audio signal processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113115178A CN113115178A (en) | 2021-07-13 |
CN113115178B true CN113115178B (en) | 2022-11-01 |
Family
ID=76722077
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110518288.1A Active CN113115178B (en) | 2021-05-12 | 2021-05-12 | Audio signal processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113115178B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106658288A (en) * | 2016-11-29 | 2017-05-10 | 努比亚技术有限公司 | Method for controlling playing of loudspeaker, and mobile terminal |
CN106792368A (en) * | 2016-12-28 | 2017-05-31 | 深圳天珑无线科技有限公司 | A kind of multi-mode plays the terminal of voice signal |
CN111294438A (en) * | 2020-01-22 | 2020-06-16 | 华为技术有限公司 | Method and terminal for realizing stereo output |
Family Cites Families (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5233646A (en) * | 1989-09-11 | 1993-08-03 | Kuromi Kevin H | Telephone-operated stereo shut-off device |
JP4652302B2 (en) * | 2006-09-20 | 2011-03-16 | シャープ株式会社 | Audio reproduction device, video / audio reproduction device, and sound field mode switching method thereof |
CN102143421B (en) * | 2010-02-02 | 2013-06-05 | 华为终端有限公司 | Terminal and method for processing audio of terminal |
US9055265B2 (en) * | 2012-12-07 | 2015-06-09 | Sony Corporation | Accessibility improvement for hearing impaired |
CN106060708B (en) * | 2016-05-30 | 2019-10-08 | 努比亚技术有限公司 | Play the terminal and method of audio |
CN108616800B (en) * | 2018-03-28 | 2021-04-09 | 腾讯科技(深圳)有限公司 | Audio playing method and device, storage medium and electronic device |
CN109040384B (en) * | 2018-10-26 | 2021-08-03 | 深圳市万普拉斯科技有限公司 | Mobile terminal capable of realizing stereophonic sound |
WO2020132839A1 (en) * | 2018-12-24 | 2020-07-02 | 华为技术有限公司 | Audio data transmission method and device applied to monaural and binaural modes switching of tws earphone |
CN112511954A (en) * | 2020-12-08 | 2021-03-16 | 南昌勤胜电子科技有限公司 | Stereo assembly and terminal equipment |
-
2021
- 2021-05-12 CN CN202110518288.1A patent/CN113115178B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106658288A (en) * | 2016-11-29 | 2017-05-10 | 努比亚技术有限公司 | Method for controlling playing of loudspeaker, and mobile terminal |
CN106792368A (en) * | 2016-12-28 | 2017-05-31 | 深圳天珑无线科技有限公司 | A kind of multi-mode plays the terminal of voice signal |
CN111294438A (en) * | 2020-01-22 | 2020-06-16 | 华为技术有限公司 | Method and terminal for realizing stereo output |
Also Published As
Publication number | Publication date |
---|---|
CN113115178A (en) | 2021-07-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9208766B2 (en) | Computer program product for adaptive audio signal shaping for improved playback in a noisy environment | |
CN103460716B (en) | For the method and apparatus of Audio Signal Processing | |
US10475434B2 (en) | Electronic device and control method of earphone device | |
US11395065B2 (en) | Audio device, audio system, and audio processing method | |
CN102724360B (en) | Method and device for implementation of hearing-aid function of mobile phone and hearing-aid mobile phone | |
US10104470B2 (en) | Audio processing device, audio processing method, recording medium, and program | |
US10966019B2 (en) | Audio signal processing device and sound box | |
WO2021160040A1 (en) | Audio transmission method and electronic device | |
CN1914890A (en) | Sound reproduction in portable electronic equipment | |
CN107645689B (en) | Method and device for eliminating sound crosstalk and voice coding and decoding chip | |
CN102143421A (en) | Terminal and method for processing audio of terminal | |
US20230171539A1 (en) | Audio output device, method for eliminating sound leakage, and storage medium (as amended) | |
CN104157292A (en) | Anti-howling audio signal processing method and device thereof | |
JP2001282297A (en) | Method and device for reproducing sound information | |
CN103548329A (en) | Transceiver | |
CN113115178B (en) | Audio signal processing method and device | |
WO2017185602A1 (en) | Earphone mode switching method and electronic device | |
US10431199B2 (en) | Electronic device and control method of earphone device | |
TWI567731B (en) | System and method for digital signal processing | |
CN112073890B (en) | Audio data processing method and device and terminal equipment | |
CN112511954A (en) | Stereo assembly and terminal equipment | |
US20140372110A1 (en) | Voic call enhancement | |
CN213880236U (en) | Sound effect conversion device | |
CN109144457B (en) | Audio playing device and audio control circuit thereof | |
TWI784594B (en) | Conference terminal and embedding method of audio watermark |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |