CN112954548B - Method and device for combining sound collected by terminal microphone and headset - Google Patents

Method and device for combining sound collected by terminal microphone and headset Download PDF

Info

Publication number
CN112954548B
CN112954548B CN202110196804.3A CN202110196804A CN112954548B CN 112954548 B CN112954548 B CN 112954548B CN 202110196804 A CN202110196804 A CN 202110196804A CN 112954548 B CN112954548 B CN 112954548B
Authority
CN
China
Prior art keywords
sound
channel
sound data
terminal microphone
data collected
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
Application number
CN202110196804.3A
Other languages
Chinese (zh)
Other versions
CN112954548A (en
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.)
Huizhou TCL Mobile Communication Co Ltd
Original Assignee
Huizhou TCL Mobile Communication 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 Huizhou TCL Mobile Communication Co Ltd filed Critical Huizhou TCL Mobile Communication Co Ltd
Priority to CN202110196804.3A priority Critical patent/CN112954548B/en
Publication of CN112954548A publication Critical patent/CN112954548A/en
Application granted granted Critical
Publication of CN112954548B publication Critical patent/CN112954548B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • H04R3/005Circuits for transducers, loudspeakers or microphones for combining the signals of two or more microphones

Landscapes

  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Otolaryngology (AREA)
  • Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Acoustics & Sound (AREA)
  • Signal Processing (AREA)
  • Headphones And Earphones (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses a method and a device for combining sound collected by a terminal microphone and an earphone microphone, wherein the method comprises the following steps: acquiring sound data acquired by a terminal microphone and sound data acquired by an earphone microphone; acquiring the sound receiving type of a terminal microphone, and determining sound data collected by the terminal microphone and an output sound channel corresponding to the sound data collected by the headset according to the sound receiving type of the terminal microphone; and outputting the sound data collected by the terminal microphone and the headset from the output sound channel. The problem of the user can't receive the sound that cell-phone microphone and headset gathered simultaneously in prior art is solved.

Description

Method and device for combining sound collected by terminal microphone and headset
Technical Field
The invention relates to the field of digital audio, in particular to a method and a device for combining sound collected by a terminal microphone and an earphone microphone.
Background
At present, a mobile phone microphone is arranged at the bottom of a mobile phone for providing clear conversation, and along with the development of science and technology and the increase of the mobile phone radio receiving demand of people, an earphone microphone is also brought forward. At present, the sound reception of the mobile phone can be very clear even in a very noisy environment, so that a plurality of mobile phone manufacturers can use an audio zooming scheme with a built-in microphone in the mobile phone, and the directivity of the sound reception of the microphone can be automatically adjusted according to the focal length of a picture of the mobile phone, so that the target sound is clearer. However, in the use scenario of audio zooming, the user cannot receive the sound collected by the microphone and the headset of the mobile phone at the same time.
Thus, there is still a need for improvement and development of the prior art.
Disclosure of Invention
The technical problem to be solved by the present invention is to provide a method and an apparatus for combining the sound collected by a terminal microphone and a headset, aiming at solving the problem that the user cannot receive the sound collected by the microphone and the headset of the mobile phone at the same time in the prior art.
The technical scheme adopted by the invention for solving the problems is as follows:
in a first aspect, an embodiment of the present invention provides a method for combining sounds collected by a terminal microphone and an ear microphone, where the method includes:
acquiring sound data collected by a terminal microphone and sound data collected by an earphone microphone;
acquiring the sound receiving type of a terminal microphone, and determining sound data collected by the terminal microphone and an output sound channel corresponding to the sound data collected by the headset according to the sound receiving type of the terminal microphone;
and outputting the sound data collected by the terminal microphone and the headset from the output sound channel.
In one embodiment, the acquiring the sound data collected by the terminal microphone and the sound data collected by the headset includes:
acquiring pin level data of a jack corresponding to the headset and a preset level threshold;
comparing the pin level data of the jack corresponding to the headset with the preset level threshold;
when the pin level data of the jack corresponding to the headset is lower than a preset level threshold, judging that the headset is in an insertion state;
and acquiring sound data collected by a terminal microphone and sound data collected by a headset.
In an embodiment, the obtaining a sound collection category of a terminal microphone, and determining, according to the sound collection category of the terminal microphone, sound data collected by the terminal microphone and an output channel corresponding to the sound data collected by an ear microphone includes:
the method comprises the steps of obtaining the sound receiving type of a terminal microphone, and when the sound receiving type of the terminal microphone is double-channel sound receiving, determining that sound data collected by the terminal microphone and sound data collected by an ear microphone correspond to two output sound channels which are respectively a left sound channel and a right sound channel.
In an embodiment, the obtaining a sound collection category of a terminal microphone, and determining, according to the sound collection category of the terminal microphone, sound data collected by the terminal microphone and an output channel corresponding to the sound data collected by an ear microphone includes:
acquiring a reception type of a terminal microphone, and when the reception type of the terminal microphone is dual-channel reception, determining that sound data collected by the terminal microphone correspond to two output channels which are respectively a left channel and a right channel;
and determining that the sound data collected by the headset corresponds to an output sound channel, wherein the output sound channel is any one of the left sound channel or the right sound channel.
In an embodiment, the obtaining the sound collection category of the terminal microphone, and determining, according to the sound collection category of the terminal microphone, the sound data collected by the terminal microphone and the output channel corresponding to the sound data collected by the headset includes:
acquiring the reception type of a terminal microphone, and when the reception type of the terminal microphone is monaural reception, determining that sound data collected by the terminal microphone and the headset respectively correspond to an output sound channel;
when the output sound channel corresponding to the sound data collected by the terminal microphone is a left sound channel, the output sound channel corresponding to the sound data collected by the headset is a right sound channel;
and when the output sound channel corresponding to the sound data collected by the terminal microphone is the right sound channel, the output sound channel corresponding to the sound data collected by the headset is the left sound channel.
In one embodiment, the outputting the sound data collected by the terminal microphone and the headset from the output channel includes:
when the reception type of the terminal microphone is two-channel reception, sound data collected by the terminal microphone comprises left channel data and right channel data;
dividing sound data collected by the headset into first sound data and second sound data;
mixing the first sound data and the left channel data and outputting the mixed data from the left channel;
and mixing the second sound data and the right channel data and outputting the mixed data from the right channel.
In one embodiment, the outputting the sound data collected by the terminal microphone and the headset from the output channel includes:
when the reception type of the terminal microphone is two-channel reception, sound data collected by the terminal microphone comprises left channel data and right channel data;
mixing the left channel data and the right channel data to obtain mixed sound data;
outputting sound data collected by the headset from the right channel when the remix data is output from the left channel;
when the remix data is output from the right channel, sound data collected by the headset is output from the left channel.
In one embodiment, the method further comprises:
acquiring an intensity value of an input signal of the output sound channel and a preset intensity threshold value;
comparing the intensity value of the input signal of the output channel with the intensity threshold value, and reducing the intensity value of the input signal of the output channel through an automatic gain control algorithm when the intensity value of the input signal of the output channel is greater than the intensity threshold value;
and encoding the reduced signal and outputting the signal from the output channel.
In a second aspect, an embodiment of the present invention further provides an apparatus for combining sounds collected by a terminal microphone and an ear microphone, where the apparatus includes:
the acquisition module is used for acquiring sound data acquired by a terminal microphone and sound data acquired by an earphone microphone;
the determining module is used for acquiring the sound receiving type of a terminal microphone and determining the sound data collected by the terminal microphone and the output sound channel corresponding to the sound data collected by the headset according to the sound receiving type of the terminal microphone;
and the combining module is used for outputting the sound data collected by the terminal microphone and the headset from the output sound channel.
In a third aspect, the present invention further provides a computer-readable storage medium, on which a plurality of instructions are stored, wherein the instructions are adapted to be loaded and executed by a processor to implement any of the above-mentioned steps of the method for combining the sound collected by the terminal microphone and the sound collected by the ear microphone.
The invention has the beneficial effects that: the embodiment of the invention acquires the sound data collected by the terminal microphone and the sound data collected by the headset; acquiring the sound receiving type of a terminal microphone, and determining sound data collected by the terminal microphone and an output sound channel corresponding to the sound data collected by the headset according to the sound receiving type of the terminal microphone; and outputting the sound data collected by the terminal microphone and the headset from the output sound channel. The problem of the sound that the user can't receive cell-phone microphone and headset simultaneously and gather in prior art is solved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating a method for combining sounds collected by a terminal microphone and an ear microphone according to an embodiment of the present invention.
Fig. 2 is a reference diagram of a first method for combining sounds collected by a terminal microphone and an ear microphone when the terminal microphone is a binaural sound collection according to an embodiment of the present invention.
Fig. 3 is a reference diagram of a second method for combining the sound collected by the terminal microphone and the ear microphone when the terminal microphone receives the sound with two channels according to the embodiment of the present invention.
Fig. 4 is a reference diagram of a method for combining sounds collected by a terminal microphone and an ear microphone when the terminal microphone receives a monaural sound according to an embodiment of the present invention.
Fig. 5 is a reference diagram for performing Audio Mixing by using the Audio Mixing technology according to the embodiment of the present invention.
Fig. 6 is a block diagram of an internal module of an apparatus for combining sound collected by a terminal microphone and an ear microphone according to an embodiment of the present invention.
Fig. 7 is a functional block diagram of a terminal according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that, if directional indications (such as up, down, left, right, front, and back … …) are involved in the embodiment of the present invention, the directional indications are only used to explain the relative positional relationship between the components, the movement situation, and the like in a specific posture (as shown in the drawing), and if the specific posture is changed, the directional indications are changed accordingly.
At present, a mobile phone microphone is arranged at the bottom of a mobile phone to provide clear conversation, and along with the development of science and technology and the increase of the mobile phone radio receiving demand of people, the headset also comes into play. At present, even in a very noisy environment, the mobile phone can also have a very clear sound reception function, so that the effect of receiving the sound by the mobile phone is more and more emphasized by the current mobile phone manufacturers, and a plurality of mobile phone manufacturers can use an audio zooming scheme with a plurality of built-in microphones in the mobile phone, so that the directivity of the microphone sound reception can be automatically adjusted according to the focal length of a mobile phone picture, and the target sound is clearer. The directivity of a microphone sound collection refers to a description of the sensitivity pattern of the microphone to sound from all directions in space, for example, a bi-directional microphone can receive sound from the front and the back of the microphone and cancel most of the sound from the side of 90 degrees. However, in the use scenario of the audio zoom, the user cannot receive the sound collected by the microphone and the headset of the mobile phone at the same time.
In view of the above-mentioned drawbacks of the prior art, the present invention provides a method for combining the sound collected by a terminal microphone and the sound collected by a headset, by acquiring the sound data collected by the terminal microphone and the sound data collected by the headset; acquiring the sound receiving type of a terminal microphone, and determining sound data collected by the terminal microphone and an output sound channel corresponding to the sound data collected by the headset according to the sound receiving type of the terminal microphone; and outputting the sound data collected by the terminal microphone and the headset from the output sound channel. The problem of the sound that the user can't receive cell-phone microphone and headset simultaneously and gather in prior art is solved.
As shown in fig. 1, the method comprises the following steps:
and S100, acquiring sound data collected by a terminal microphone and sound data collected by an earphone microphone.
Sound is a wave phenomenon generated by vibration, transmitted through a medium (air or solid or liquid) and perceived by the human or animal auditory organs. A microphone (also called a microphone or a microphone) is a transducer that converts sound into an electronic signal, collects the sound and converts the sound into an analog electrical signal, and then converts the analog electrical signal into an analog signal that can be recognized by a computer in a digital manner. In order to combine the sound collected by the microphone and the headset of the mobile phone, the embodiment first needs to acquire the sound collected by the microphone of the mobile phone as basic sound data. In addition to collecting the sound data collected by the terminal microphone, the present embodiment also needs to acquire the sound data collected by the headset as basic sound data. The headset is the whole of the earphone and the microphone, is designed aiming at voice transmission, and has more functions of microphone sound reception compared with the common earphone. The headset is close to the sound production position of the lips of the user, so that the headset is mainly used for collecting sound information produced by the user.
In one implementation, the step S100 specifically includes the following steps:
step S110, obtaining pin level data of a jack corresponding to the headset;
step S120, pin level data of the jack corresponding to the headset is compared with the preset level threshold;
step S130, when the pin level data of the jack corresponding to the headset is lower than a preset level threshold, judging that the headset is in an insertion state;
and step S140, acquiring the sound data collected by the terminal microphone and the sound data collected by the headset.
The application scenario of this embodiment is when the user needs to use the mobile phone microphone and the headset at the same time, so this embodiment needs to accurately determine whether the user has performed stable data connection between the headset and the terminal at present, and starts to collect the sound data collected by the terminal microphone and the sound data of the headset when the headset performs stable data connection with the terminal. Specifically, in this embodiment, a level threshold for identifying insertion of the earphone is preset, then, by acquiring pin level data of the jack corresponding to the headset in real time, and comparing the pin level data of the jack corresponding to the headset with the preset level threshold, when it is detected that the pin level data of the jack corresponding to the headset is lower than the preset level threshold, it is determined that the earphone is in an insertion state. And when the earphone state is the insertion state, the control terminal starts to acquire the sound data acquired by the microphone of the terminal and the sound data acquired by the headset in real time.
After acquiring the sound data collected by the terminal microphone and the sound data collected by the headset, as shown in fig. 1, the method further includes the following steps:
step S200, acquiring the sound receiving type of a terminal microphone, and determining the sound data collected by the terminal microphone and the output sound channel corresponding to the sound data collected by the headset according to the sound receiving type of the terminal microphone.
In brief, in this embodiment, it is necessary to determine, according to a sound receiving category of a terminal microphone, sound data collected by the terminal microphone and an output channel corresponding to the sound data collected by the headset, and output the sound data collected by the terminal microphone and the sound data collected by the headset from the determined output channel, so that a user can receive the sound data collected by the terminal microphone and the sound data collected by the headset at the same time.
The terminal microphone has two main types of sound reception, one is single-channel sound reception, and the other is dual-channel sound reception. The single-channel sound reception means that only one sound channel is adopted to collect sound data, namely, sound signals from different directions are mixed and then are uniformly transmitted to a loudspeaker through one sound channel to be played. For example, the recording of a concert, the sounds of different instruments simultaneously transmitted from various aspects of the stage are received by a microphone and integrated into an audio current for recording. When playing sound, a loudspeaker also makes sound. The user can only hear the combined sound of the instruments in different directions, but cannot tell which instrument sound is coming from which direction, and cannot feel the stereoscopic impression as when listening to music in a concert hall. By binaural reception is meant that there are two sound channels, a left channel, i.e. sound data generated simulating the auditory range of the human left ear, and a right channel, i.e. sound data generated simulating the auditory range of the human right ear. When people hear the sound, the specific position of the sound source can be judged according to the phase difference of the left ear and the right ear to the sound. And each sound channel collects sound data and plays the sound data through two different loudspeakers. Therefore, the dual-channel radio can reflect the spatial positions of different sound sources, so that people can listen to the sound recording just like listening to sound sources in all aspects in the real world, the sound recording has a stereoscopic impression, and the sound output by the dual-channel radio is also called as stereophonic sound.
In one implementation, the step S200 includes the following steps:
step S210, acquiring a sound reception type of a terminal microphone, and when the sound reception type of the terminal microphone is a dual-channel sound reception type, determining that sound data collected by the terminal microphone and sound data collected by the headset both correspond to two output channels, and the two output channels are a left channel and a right channel respectively.
Specifically, when the sound collection category of the terminal microphone is binaural sound collection, it means that the terminal microphone will output the collected sound data through two output channels, which are usually a left channel and a right channel. In order to maintain the stereophonic effect generated by the binaural sound collection of the terminal microphone and enable the user to receive the sound data collected by the terminal microphone and the sound data collected by the headset at the same time, the present embodiment outputs the sound data collected by the terminal microphone according to the left channel and the right channel corresponding to the normal binaural sound collection, and also outputs the sound data collected by the headset and the sound data collected by the terminal microphone from the left channel and the right channel after mixing (as shown in fig. 2). Since the present embodiment also maintains the method of outputting sound signals in two channels, the sound heard by the end user is also the stereo effect, and the better hearing feeling of the user is maintained. And the user can also receive the sound collected by the terminal microphone and the headset at the same time.
In another implementation manner, the step S200 includes the following steps:
step S220, acquiring a sound receiving type of a terminal microphone, and when the sound receiving type of the terminal microphone is dual-channel sound receiving, determining that sound data collected by the terminal microphone correspond to two output channels which are respectively a left channel and a right channel;
step S221, determining that the sound data collected by the headset corresponds to an output channel, where the output channel is any one of the left channel and the right channel.
Similarly, in order to maintain the stereophonic effect generated by the binaural sound collection of the terminal microphone and enable the user to receive the sound data collected by the terminal microphone and the sound data collected by the headset at the same time, the present embodiment still maintains the output of the sound data collected by the terminal microphone as the left channel and the right channel corresponding to the normal binaural sound collection, but outputs the sound data collected by the headset from only one output channel, that is, outputs the sound data collected by the headset from only one of the left channel or the right channel. It can be understood that the method of the present embodiment also maintains the method of outputting sound signals in two channels, so that the sound heard by the end user is also the stereo effect, the better auditory sense of the user is maintained, and the user can also receive the sound collected by the terminal microphone and the headset at the same time (as shown in fig. 3).
In another implementation, the step S200 includes the following steps:
step S230, acquiring the sound receiving type of a terminal microphone, and when the sound receiving type of the terminal microphone is single-channel sound receiving, determining that sound data collected by the terminal microphone and sound data collected by the headset respectively correspond to one output sound channel;
step S231, when an output channel corresponding to the sound data collected by the terminal microphone is a left channel, an output channel corresponding to the sound data collected by the headset is a right channel;
step S232, when the output channel corresponding to the sound data collected by the terminal microphone is the right channel, the output channel corresponding to the sound data collected by the headset is the left channel.
Since some microphones of the first generation terminals still have the function of receiving the monaural sound, the present embodiment provides another method for combining the sound data collected by the microphone of the terminal and the sound data collected by the headset for the monaural sound receiving terminal. Specifically, when the sound reception category of the terminal microphone is monaural sound reception, it is determined that sound data collected by the terminal microphone and the headset respectively correspond to one output sound channel. When the output sound channel corresponding to the sound data collected by the terminal microphone is a left sound channel, the output sound channel corresponding to the sound data collected by the headset is a right sound channel; and when the output sound channel corresponding to the sound data collected by the terminal microphone is the right sound channel, the output sound channel corresponding to the sound data collected by the headset is the left sound channel. In short, as shown in fig. 4, in this embodiment, the monaural sound data collected by the terminal microphone is output from any one of the left channel and the right channel, and the sound data collected by the headset is output from the other channel, so that the user can receive the sound data collected by the terminal microphone and the sound data collected by the headset through the two channels, and not only can the sound data collected by the terminal microphone be combined with the sound data collected by the headset, but also the planar sound effect caused by the original monaural sound collection is converted into the stereo sound effect generated by the two-channel output, so as to bring better hearing feeling to the user.
As shown in fig. 1, the method further comprises the steps of:
and step S300, outputting the sound data collected by the terminal microphone and the headset from the output sound channel.
After the output sound channels of the sound data collected by the terminal microphone and the headset are determined, the sound data collected by the terminal microphone and the headset are output from the specified output sound channels, and then the user can receive the sound data collected by the terminal microphone and the headset at the same time.
In one implementation, when the scheme corresponding to step S210 is adopted to determine the output channels of the sound data collected by the terminal microphone and the headset, step S300 includes the following steps:
step S310, when the reception type of the terminal microphone is dual-channel reception, sound data collected by the terminal microphone comprises left channel data and right channel data;
step S311, dividing the sound data collected by the headset into first sound data and second sound data;
step S312, mixing the first sound data and the left channel data and outputting the mixed data from the left channel;
and step 313, mixing the second sound data and the right channel data and outputting the mixture from the right channel.
Since the present embodiment needs to output the sound data collected by the headset together with the sound data of the terminal microphone output by the original left channel and the sound data of the terminal microphone output by the original right channel, respectively, a new stereophonic sound is formed (as shown in fig. 2). Therefore, in this embodiment, it is necessary to first divide the sound data collected by the headset into first sound data and second sound data, then mix the first sound data and the left channel data and output the mixed data from the left channel, and mix the second sound data and the right channel data and output the mixed data from the right channel. In one implementation, as shown in fig. 5, Audio Mixing may be implemented by using Audio Mixing technology, and the principle of the Audio Mixing technology is to perform bit conversion on a plurality of Audio data that need to be mixed and then superimpose the Audio data.
In one implementation manner, when determining the output channels of the sound data collected by the microphone and the headset of the terminal according to the scheme corresponding to steps S220-S221, the step S300 includes the following steps:
step S320, when the sound reception type of the terminal microphone is dual-channel sound reception, sound data collected by the terminal microphone comprises left channel data and right channel data;
step S321, mixing the left channel data and the right channel data to obtain mixed sound data;
step S323 of outputting sound data collected by the headset from the right channel when the remix data is output from the left channel;
step S324, when the mixed sound data is output from the right channel, outputting the sound data collected by the headset from the left channel.
In this embodiment, the sound data originally collected by the terminal microphone for two-channel output is changed into one channel for output, so that the left channel data and the right channel data need to be mixed first. In one implementation, the Mixing of the left channel data and the right channel data may be implemented by Audio Mixing technology. After mixing, the obtained mixed sound data is output from any one of the left channel or the right channel, and then the sound data collected by the headset is output from the other channel. For example, as shown in fig. 3, the left channel data and the right channel data may be mixed and output from the left channel, and the sound data collected by the headset may be output from the right channel.
In one implementation, when the output channels of the sound data collected by the terminal microphone and the headset are determined according to the scheme corresponding to steps S230-S232, the sound data collected by the terminal microphone may be output from any one of the left channel or the right channel, and the sound data collected by the headset may be output from the other channel. For example, as shown in fig. 4, it is possible to output sound data of a single channel collected by a microphone of the terminal from a left channel and output sound data collected by a headset from a right channel.
In one implementation, in order to avoid the mixed sound exceeding the encodable range and causing sound break, which results in poor hearing experience for users, the embodiment further introduces an Automatic Gain Control (AGC). Specifically, after determining an output channel of sound data collected by a terminal microphone and an output channel of sound collected by a headset, a new input signal corresponding to a left channel and a new input signal corresponding to a right channel are generated, and after receiving the respective input signals and outputting the input signals, the two channels generate sounds heard in the range of the left ear and the right ear of the user. However, since the present embodiment relates to a sound mixing technology, in order to avoid that a mixed sound generated after mixing exceeds a codeable range and causes sound breakdowns, it is necessary to first obtain an intensity value of an input signal of the output channel and a preset intensity threshold, then compare the intensity value of the input signal of the output channel with the intensity threshold, when the intensity value of the input signal of the output channel is greater than the intensity threshold, reduce the intensity value of the input signal of the output channel through an automatic gain control algorithm, and then code and output the reduced signal from the output channel. Conversely, a lower intensity threshold value can be set, and when the intensity value of the input signal of the output sound channel is lower than the lower intensity threshold value, the intensity value of the input signal of the output sound channel is improved through an automatic gain control algorithm, so that the sound volume which can be heard by a user is appropriate and clear.
Based on the above embodiment of the present invention, the present application further provides a device for combining sounds collected by a terminal microphone and an ear microphone, as shown in fig. 6, the device includes:
the acquisition module 01 is used for acquiring sound data acquired by a terminal microphone and sound data acquired by an earphone microphone;
the determining module 02 is configured to acquire a reception category of a terminal microphone, and determine, according to the reception category of the terminal microphone, sound data collected by the terminal microphone and an output channel corresponding to the sound data collected by the headset;
and the combining module 03 is configured to output the sound data collected by the terminal microphone and the headset from the output sound channel.
Based on the above embodiment, the present invention further provides an intelligent terminal, and a schematic block diagram thereof may be as shown in fig. 7. The intelligent terminal comprises a processor, a memory, a network interface and a display screen which are connected through a system bus. Wherein, the processor of the intelligent terminal is used for providing calculation and control capability. The memory of the intelligent terminal comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The network interface of the intelligent terminal is used for being connected and communicated with an external terminal through a network. The computer program is executed by a processor to implement a method of combining sound collected by a terminal microphone and an ear microphone. The display screen of the intelligent terminal can be a liquid crystal display screen or an electronic ink display screen.
It will be understood by those skilled in the art that the block diagram of fig. 7 is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation to the intelligent terminal to which the solution of the present invention is applied, and a specific intelligent terminal may include more or less components than those shown in the figure, or combine some components, or have different arrangements of components.
In one implementation, one or more programs are stored in a memory of the smart terminal and configured to be executed by one or more processors include instructions for performing a method of combining sounds collected by a terminal microphone and an ear microphone.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, databases, or other media used in embodiments provided herein may include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
In summary, the present invention discloses a method for combining the sound collected by a terminal microphone and the sound collected by an ear microphone, by acquiring the sound data collected by the terminal microphone and the sound data collected by the ear microphone; acquiring the sound receiving type of a terminal microphone, and determining sound data collected by the terminal microphone and an output sound channel corresponding to the sound data collected by the headset according to the sound receiving type of the terminal microphone; and outputting the sound data collected by the terminal microphone and the headset from the output sound channel. The problem of the sound that the user can't receive cell-phone microphone and headset simultaneously and gather in prior art is solved.
It is to be understood that the invention is not limited to the examples described above, but that modifications and variations may be effected thereto by those of ordinary skill in the art in light of the foregoing description, and that all such modifications and variations are intended to be within the scope of the invention as defined by the appended claims.

Claims (5)

1. A method for combining sound collected by a terminal microphone and an ear microphone, the method comprising: acquiring sound data collected by a terminal microphone and sound data collected by an earphone microphone;
acquiring the sound receiving type of a terminal microphone, and determining sound data collected by the terminal microphone and an output sound channel corresponding to the sound data collected by the headset according to the sound receiving type of the terminal microphone;
outputting sound data collected by the terminal microphone and the headset from the output sound channel;
when the reception type of the terminal microphone is obtained, the specific mode of determining the sound data collected by the terminal microphone and the output channel corresponding to the sound data collected by the headset according to the reception type of the terminal microphone is as follows: acquiring the reception category of a terminal microphone, determining that the sound data collected by the terminal microphone and the sound data collected by the headset correspond to two output channels when the reception category of the terminal microphone is two-channel reception, and outputting the sound data collected by the terminal microphone and the sound data collected by the headset from the output channels when the two output channels are a left channel and a right channel respectively, wherein the method comprises the following steps:
when the reception type of the terminal microphone is two-channel reception, sound data collected by the terminal microphone comprises left channel data and right channel data;
dividing sound data collected by the headset into first sound data and second sound data;
mixing the first sound data and the left sound channel data by using an Audio Mixing technology and then outputting the mixed data from the left sound channel;
mixing the second sound data and the right channel data by using an Audio Mixing technology and then outputting the mixed data from the right channel;
when the sound reception type of the terminal microphone is obtained, the specific mode of determining the sound data collected by the terminal microphone and the output channel corresponding to the sound data collected by the headset according to the sound reception type of the terminal microphone is as follows: acquiring a reception type of a terminal microphone, and when the reception type of the terminal microphone is dual-channel reception, determining that sound data collected by the terminal microphone correspond to two output channels which are respectively a left channel and a right channel; determining that the sound data collected by the headset corresponds to an output channel, and when the output channel is any one of the left channel or the right channel, the outputting the sound data collected by the terminal microphone and the headset from the output channel includes:
when the sound receiving type of the terminal microphone is dual-channel sound receiving, the sound data collected by the terminal microphone comprises left channel data and right channel data;
mixing the left channel data and the right channel data by using an Audio Mixing technology to obtain mixed sound data;
outputting sound data collected by the headset from the right channel when the mixed sound data is output from the left channel;
outputting sound data collected by the headset from the left channel when the mixed sound data is output from the right channel;
the acquiring of the sound reception category of the terminal microphone, and determining the sound data collected by the terminal microphone and the output sound channel corresponding to the sound data collected by the headset according to the sound reception category of the terminal microphone comprise:
acquiring the reception type of a terminal microphone, and when the reception type of the terminal microphone is monaural reception, determining that sound data collected by the terminal microphone and the headset respectively correspond to an output sound channel;
when the output sound channel corresponding to the sound data collected by the terminal microphone is a left sound channel, the output sound channel corresponding to the sound data collected by the headset is a right sound channel;
and when the output sound channel corresponding to the sound data collected by the terminal microphone is the right sound channel, the output sound channel corresponding to the sound data collected by the headset is the left sound channel.
2. The method of claim 1, wherein the acquiring the sound data collected by the terminal microphone and the sound data collected by the headset comprises:
acquiring pin level data of a jack corresponding to the headset and a preset level threshold;
comparing the pin level data of the jack corresponding to the headset with the preset level threshold;
when the pin level data of the jack corresponding to the headset is lower than a preset level threshold, judging that the headset is in an insertion state;
and acquiring sound data collected by a terminal microphone and sound data collected by a headset.
3. The method of claim 1, wherein the method further comprises:
acquiring an intensity value of an input signal of the output sound channel and a preset intensity threshold value;
comparing the intensity value of the input signal of the output channel with the intensity threshold value, and reducing the intensity value of the input signal of the output channel through an automatic gain control algorithm when the intensity value of the input signal of the output channel is greater than the intensity threshold value;
and encoding the reduced signal and outputting the signal from the output channel.
4. An apparatus for combining sound collected by a terminal microphone and an ear microphone, the apparatus comprising:
the acquisition module is used for acquiring sound data acquired by a terminal microphone and sound data acquired by an earphone microphone;
the determining module is used for acquiring the sound receiving type of a terminal microphone, and determining the sound data collected by the terminal microphone and the output sound channel corresponding to the sound data collected by the headset according to the sound receiving type of the terminal microphone;
the combining module is used for outputting the sound data collected by the terminal microphone and the headset from the output sound channel;
when the determination module adopts the radio reception category of obtaining the terminal microphone, when the radio reception category of the terminal microphone is two-channel radio reception, it is determined that the sound data collected by the terminal microphone and the sound data collected by the headset both correspond to two output channels, and when the two output channels are the modes of a left channel and a right channel respectively, the combination module includes:
when the reception type of the terminal microphone is two-channel reception, sound data collected by the terminal microphone comprises left channel data and right channel data;
dividing sound data collected by the headset into first sound data and second sound data;
mixing the first sound data and the left sound channel data by using an Audio Mixing technology and then outputting the mixed data from the left sound channel;
mixing the second sound data and the right channel data by using an Audio Mixing technology and then outputting the mixed data from the right channel;
when the determining module acquires the reception type of a terminal microphone, and when the reception type of the terminal microphone is dual-channel reception, determining that sound data collected by the terminal microphone correspond to two output channels, wherein the two output channels are a left channel and a right channel respectively; when it is determined that the sound data collected by the headset corresponds to an output channel, and the output channel is any one of the left channel and the right channel, the combining module includes:
when the reception type of the terminal microphone is two-channel reception, sound data collected by the terminal microphone comprises left channel data and right channel data;
mixing the left channel data and the right channel data by using an Audio Mixing technology to obtain mixed sound data;
outputting sound data collected by the headset from the right channel when the mixed sound data is output from the left channel;
outputting sound data collected by the headset from the left channel when the mixed sound data is output from the right channel;
the determining module comprises:
acquiring the reception type of a terminal microphone, and when the reception type of the terminal microphone is monaural reception, determining that sound data collected by the terminal microphone and the headset respectively correspond to an output sound channel;
when the output sound channel corresponding to the sound data collected by the terminal microphone is a left sound channel, the output sound channel corresponding to the sound data collected by the headset is a right sound channel;
and when the output sound channel corresponding to the sound data collected by the terminal microphone is the right sound channel, the output sound channel corresponding to the sound data collected by the headset is the left sound channel.
5. A computer readable storage medium having stored thereon instructions adapted to be loaded and executed by a processor to perform the steps of a method of combining sound collected by a terminal microphone and an ear microphone according to any of claims 1-3.
CN202110196804.3A 2021-02-22 2021-02-22 Method and device for combining sound collected by terminal microphone and headset Active CN112954548B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110196804.3A CN112954548B (en) 2021-02-22 2021-02-22 Method and device for combining sound collected by terminal microphone and headset

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110196804.3A CN112954548B (en) 2021-02-22 2021-02-22 Method and device for combining sound collected by terminal microphone and headset

Publications (2)

Publication Number Publication Date
CN112954548A CN112954548A (en) 2021-06-11
CN112954548B true CN112954548B (en) 2022-09-02

Family

ID=76245152

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110196804.3A Active CN112954548B (en) 2021-02-22 2021-02-22 Method and device for combining sound collected by terminal microphone and headset

Country Status (1)

Country Link
CN (1) CN112954548B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303789A (en) * 2016-10-31 2017-01-04 维沃移动通信有限公司 A kind of way of recording, earphone and mobile terminal

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9888317B2 (en) * 2013-10-22 2018-02-06 Nokia Technologies Oy Audio capture with multiple microphones
CN108111952B (en) * 2017-12-26 2020-07-31 上海展扬通信技术有限公司 Recording method, device, terminal and computer readable storage medium
CN108683980B (en) * 2018-05-31 2020-06-30 维沃移动通信有限公司 Audio signal transmission method and mobile terminal
CN111970626B (en) * 2020-08-28 2022-03-22 Oppo广东移动通信有限公司 Recording method and apparatus, recording system, and storage medium
CN111970625B (en) * 2020-08-28 2022-03-22 Oppo广东移动通信有限公司 Recording method and device, terminal and storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106303789A (en) * 2016-10-31 2017-01-04 维沃移动通信有限公司 A kind of way of recording, earphone and mobile terminal

Also Published As

Publication number Publication date
CN112954548A (en) 2021-06-11

Similar Documents

Publication Publication Date Title
CN108111952B (en) Recording method, device, terminal and computer readable storage medium
JP4921470B2 (en) Method and apparatus for generating and processing parameters representing head related transfer functions
CN110049428B (en) Method, playing device and system for realizing multi-channel surround sound playing
EP2816823B1 (en) Audio system and audio apparatus and channel mapping method thereof
US9769585B1 (en) Positioning surround sound for virtual acoustic presence
CN109195063B (en) Stereo sound generating system and method
CN114727212B (en) Audio processing method and electronic equipment
CN111863011B (en) Audio processing method and electronic equipment
US20100322446A1 (en) Spatial Audio Object Coding (SAOC) Decoder and Postprocessor for Hearing Aids
CN112954548B (en) Method and device for combining sound collected by terminal microphone and headset
CN112616108A (en) Audio output method, device, system, storage medium and electronic equipment
CN114866905A (en) Audio processing method and device for vehicle-mounted sound equipment
CN111510847B (en) Micro loudspeaker array, in-vehicle sound field control method and device and storage device
CN114501297A (en) Audio processing method and electronic equipment
CN114257910A (en) Audio processing method and device, computer readable storage medium and electronic equipment
CN114420158A (en) Model training method and device, and target frequency response information determining method and device
CN111756929A (en) Multi-screen terminal audio playing method and device, terminal equipment and storage medium
CN114598985B (en) Audio processing method and device
CN220475928U (en) Live broadcast sound control processing system
CN111128104B (en) Wireless karaoke method, audio device and intelligent terminal
CN113612881B (en) Loudspeaking method and device based on single mobile terminal and storage medium
Griesinger Accurate reproduction of binaural recordings through individual headphone equalization and time domain crosstalk cancellation
CN115460526B (en) Method for determining hearing model, electronic equipment and system
KR100494288B1 (en) A apparatus and method of multi-channel virtual audio
CN115474130A (en) Audio processing method and related equipment

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