CN111857639B - Audio input signal detection system, method, computer device and storage medium - Google Patents
Audio input signal detection system, method, computer device and storage medium Download PDFInfo
- Publication number
- CN111857639B CN111857639B CN202010595416.8A CN202010595416A CN111857639B CN 111857639 B CN111857639 B CN 111857639B CN 202010595416 A CN202010595416 A CN 202010595416A CN 111857639 B CN111857639 B CN 111857639B
- Authority
- CN
- China
- Prior art keywords
- audio
- input
- interface
- rca
- sound
- 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
- 238000001514 detection method Methods 0.000 title claims abstract description 51
- 238000000034 method Methods 0.000 title claims abstract description 39
- 238000012360 testing method Methods 0.000 claims description 32
- 238000004590 computer program Methods 0.000 claims description 16
- 239000003990 capacitor Substances 0.000 claims description 10
- 238000004519 manufacturing process Methods 0.000 claims description 6
- 238000001228 spectrum Methods 0.000 description 20
- 230000005236 sound signal Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 16
- 238000013461 design Methods 0.000 description 7
- 239000002184 metal Substances 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000007613 environmental effect Effects 0.000 description 3
- 238000002955 isolation Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/162—Interface to dedicated audio devices, e.g. audio drivers, interface to CODECs
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L21/00—Speech 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/02—Speech enhancement, e.g. noise reduction or echo cancellation
- G10L21/0316—Speech enhancement, e.g. noise reduction or echo cancellation by changing the amplitude
- G10L21/0324—Details of processing therefor
- G10L21/034—Automatic adjustment
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- Multimedia (AREA)
- General Health & Medical Sciences (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Quality & Reliability (AREA)
- Signal Processing (AREA)
- Acoustics & Sound (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
The present application relates to a system, a method, a computer device and a storage medium for detection of an audio input signal. The audio codec acquires an input sound source through the RCA interface device, determines the sound source characteristics of the input sound source, and transmits the sound source characteristics to the CPU, and the CPU determines the type of the input source according to the sound source characteristics and preset calibration characteristics. The method realizes the judgment of the type of the input audio according to the sound source characteristics of the sound source when the sound source is input by using the RCA audio interface through one RCA interface.
Description
Technical Field
The present application relates to the field of audio input technologies, and in particular, to an audio input signal detection system, method, computer device, and storage medium.
Background
In the security field, the audio use scene is relatively complex, and the audio interface of Radio Corporation of America (RCA) has MIC input and linear audio source input. The design method in the related technology uses different interfaces to respectively correspond to different audio input modes, so that the cost is higher; or the same audio input interface is adopted, but under the condition that only one audio input interface is adopted, the audio input type cannot be distinguished, so that the problems of over-light and over-large audio sound, distortion or sound breaking and the like are caused.
Aiming at the problems that the RCA audio interface is high in setting cost and the audio input type cannot be distinguished in the related technology, an effective solution is not provided at present.
Disclosure of Invention
In view of the above, it is necessary to provide an audio input signal detection system, method, computer device and storage medium for solving the above technical problems.
According to one aspect of the present invention, there is provided a system for detection of an audio input signal, the system comprising an audio input interface device, an audio codec and a CPU, the audio input interface device comprising a U.S. radio RCA interface,
the audio codec is used for acquiring an input sound source through the RCA interface device, determining sound source characteristics of the input sound source and transmitting the sound source characteristics to the CPU;
and the CPU determines the type of the input source according to the sound source characteristics and preset calibration characteristics.
In one embodiment, the CPU is further configured to call a preset audio parameter corresponding to the input source type according to the input source type.
In one embodiment, the audio input interface device comprises an RCA female head, the housing of the RCA female head comprises a first housing and a second housing, the first housing is connected with the first pin, the second housing is connected with the second pin, and the signal line of the RCA female head is connected with the third pin, wherein the first housing and the second housing are electrically isolated when the RCA male head is not connected, and are electrically connected when the RCA male head is connected; the first pin is connected with the CPU, the second pin is grounded, and the third pin is connected with the audio codec;
the CPU is used for determining whether the RCA male connector is connected to the RCA female connector or not according to a level value between the first shell and the second shell, and instructing the audio codec to provide a bias voltage under the condition that the RCA male connector is connected to the RCA female connector.
In one embodiment, the system further comprises a sound unit connected to the CPU;
and under the condition that the RCA male head is connected with the RCA female head, the CPU is also used for indicating the sound production unit to produce preset test sound, and determining the type of the input source according to the sound source characteristic and the calibration characteristic of the input sound source, wherein the calibration characteristic is the characteristic of the test sound.
In one embodiment, the CPU includes a ctrl1 interface, a ctrl2 interface, a ctrl3 interface, a detect interface, and a data1 interface; the audio codec comprises a ctrl4 interface, a data2 interface, an audio-in interface and a Mic _ bias interface; the system also comprises a PNP triode, a first resistor, a second resistor and a capacitor:
the base electrode of the PNP triode is connected with the ctrl1 interface, the emitting electrode of the PNP triode is connected with a power supply voltage, and the collecting electrode of the PNP triode is connected with the first pin through the second resistor; the detect interface is connected with the first pin, the data1 interface is connected with the data2 interface, and the ctrl2 interface is connected with the ctrl4 interface; the audio-in interface is connected with the third pin through the capacitor; the Mic _ bias interface is connected with the third pin through the first resistor; and the sound production unit is connected with the ctrl3 interface.
According to another aspect of the present invention, there is also provided an audio input signal detection method, the method including:
acquiring an input sound source, and determining sound source characteristics of the input sound source;
and determining the type of the input source according to the sound source characteristics and preset calibration characteristics.
In one embodiment, before the obtaining the input audio source, the method further comprises:
and under the condition that the RCA male head is detected to be connected with the RCA female head, emitting a test sound, wherein the test sound corresponds to the calibration characteristic.
In one embodiment, after determining the input source type according to the sound source characteristics and preset calibration characteristics, the method further includes:
and calling a preset audio parameter corresponding to the input source type according to the input source type.
According to another aspect of the present invention, there is also provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the following steps when executing the computer program:
acquiring an input sound source, and determining sound source characteristics of the input sound source;
and determining the type of the input source according to the sound source characteristics and preset calibration characteristics.
In one embodiment, the processor, when executing the computer program, performs the steps of:
and under the condition that the RCA male head is detected to be connected with the RCA female head, emitting a test sound, wherein the test sound corresponds to the calibration characteristic.
In one embodiment, the processor, when executing the computer program, performs the steps of: and calling a preset audio parameter corresponding to the input source type according to the input source type.
According to another aspect of the present invention, there is also provided a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
acquiring an input sound source, and determining sound source characteristics of the input sound source;
and determining the type of the input source according to the sound source characteristics and preset calibration characteristics.
In one embodiment, the computer program when executed by a processor implements the steps of:
and emitting a test sound under the condition that the external sound source interface is detected to be accessed, wherein the test sound corresponds to the calibration characteristic.
In one embodiment, the computer program when executed by a processor performs the steps of: and calling a preset audio parameter corresponding to the input source type according to the input source type.
The audio codec acquires an input sound source through the RCA interface device, determines the sound source characteristics of the input sound source and transmits the sound source characteristics to the CPU; the CPU determines the type of the input source according to the characteristics of the sound source and the preset calibration characteristics, and the input audio type is judged according to the characteristics of the sound source when the sound source is input through the RCA interface and the RCA audio interface.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
fig. 1 is a diagram illustrating an application scenario of a method for detecting an audio input signal according to an embodiment of the present invention;
FIG. 2 is a schematic diagram of an audio input signal detection system according to one embodiment of the invention;
FIG. 3 is a schematic diagram of an audio input interface device according to an embodiment of the invention;
FIG. 4 is a schematic diagram of an audio input signal detection system in accordance with another embodiment of the present invention;
FIG. 5 is a schematic diagram of an audio input signal detection system in accordance with yet another embodiment of the present invention;
FIG. 6 is a schematic diagram of an audio input signal detection system in accordance with yet another embodiment of the present invention;
FIG. 7 is a flow chart of a method of audio input signal detection according to one embodiment of the present invention;
fig. 8 is a flow chart of an audio input signal detection method according to another embodiment of the present invention;
FIG. 9 is a flow chart of a method of audio input signal detection according to yet another embodiment of the present invention;
FIG. 10 is a flow chart of a method of audio input signal detection according to an embodiment of the present invention;
fig. 11 is a schematic diagram of an audio input signal detection computer device in accordance with one embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more clearly understood, the present application is described and illustrated below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments provided in the present application without any inventive step are within the scope of protection of the present application.
It is obvious that the drawings in the following description are only examples or embodiments of the present application, and that it is also possible for a person skilled in the art to apply the present application to other similar contexts on the basis of these drawings without inventive effort. Moreover, it should be appreciated that in the development of any such actual implementation, as in any engineering or design project, numerous implementation-specific decisions must be made to achieve the developers' specific goals, such as compliance with system-related and business-related constraints, which may vary from one implementation to another.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is to be expressly and implicitly understood by one of ordinary skill in the art that the embodiments described herein may be combined with other embodiments without conflict.
Unless defined otherwise, technical or scientific terms referred to herein shall have the ordinary meaning as understood by those of ordinary skill in the art to which this application belongs. Reference to "a," "an," "the," and similar words throughout this application are not to be construed as limiting in number, and may refer to the singular or the plural. The present application is directed to the use of the terms "including," "comprising," "having," and any variations thereof, which are intended to cover non-exclusive inclusions; for example, a process, method, system, article, or apparatus that comprises a list of steps or modules (elements) is not limited to only those steps or elements but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus. Reference to "connected," "coupled," and the like in this application is not intended to be limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The term "plurality" as used herein means two or more. "and/or" describes the association relationship of the associated object, indicating that there may be three relationships, for example, "a and/or B" may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. Reference herein to the terms "first," "second," "third," and the like, are merely to distinguish similar objects and do not denote a particular ordering for the objects.
Fig. 1 is a diagram illustrating an application scenario of a method for detecting an audio input signal according to an embodiment of the present invention, and the method for detecting an audio input signal provided in the present application may be applied to the application environment shown in fig. 1. The RCA interface 102 is disposed on the security device 104, and the security device 104 obtains the audio information through the RCA interface 102. The security device 104 may be, but is not limited to, various image video capturing devices and monitoring hosts.
In the related art, the audio input device detects whether an input audio is an electret MIC or a linear audio signal according to the magnitude of the input audio impedance, and generates a corresponding detection signal to the CPU, the CPU controls the audio codec to collect the MIC audio signal or the linear audio signal according to the detection signal, and the audio codec sends the collected audio signal to the CPU for processing. Or, a bias power supply of the electret MIC is used for providing bias voltage for the interface, two logic control levels with different heights are generated according to different plug bias voltage positions and grounding states of different interface types, and the multi-channel logic control analog switch switches an audio channel according to the difference of the heights of the logic control levels to perform microphone and audio input interface self-adaptation. Or, MIC and linear audio share one input interface, the design point is that the bias power supply of the electret MIC is directly added on the input port, the direct current component is removed through an isolation capacitor in the later circuit design, and the interface can transmit the electret MIC audio and the linear audio. However, in the above method, the input impedance of the linear audio has a large difference due to the design difference, the detection error is large, and when the audio signal is input, the voltage fluctuation on the detection circuit is large, and the type of the input audio source cannot be determined. Alternatively, the method requires the use of a 4-segment audio input interface, and the type of the audio input source cannot be determined by using the RCA interface. Or, the audio input type is not determined, however, the input amplitude of the electret MIC is low and mV level, the input amplitude of the linear sound source can reach V level, and the amplitude difference is large, so that after the audio is collected and processed by the CPU, the audio problems such as light sound, large sound, sound breaking or distortion can occur on the premise that the volume cannot be adjusted.
In an embodiment, fig. 2 is a schematic diagram of an audio input signal detection system according to an embodiment of the present invention, and as shown in fig. 2, an audio input signal detection system is provided, which is described by taking the method as an example applied to the security device 104 in fig. 1, the system includes an audio input interface device 22, an audio codec 24, and a CPU26, the audio input interface device 22 includes an RCA interface 102, and the audio codec 24 is configured to obtain an input audio source through the audio input interface device 22, determine audio source characteristics of the input audio source, and transmit the audio source characteristics to the CPU26; the CPU26 determines the input source type according to the sound source characteristics and the preset calibration characteristics.
When an external RCA interface is connected to the RCA interface 102 of the security device 104, the audio codec 24 acquires an input sound source through the RCA interface 102. Because the input sound source mainly comprises MIC input and linear sound source input, the system mainly identifies the type of the input source by identifying the type of the MIC input. Since the MIC input is collecting environmental sound, when the MIC input is accessed, a preset sound signal is input at the microphone, where the sound signal may be a preset audio, for example, a buzzer is used to emit a preset sound, or a specific audio message is played, or a human voice describing a specific sentence is played. The CPU26 stores a preset characteristic of the sound signal for judgment, such as a frequency spectrum, as a calibration characteristic, for example, in the case that the preset sound signal is a buzzer, the CPU26 stores the frequency spectrum of the sound of the buzzer; when the preset sound is specific audio information, the CPU26 stores a frequency spectrum of the specific audio information; if the predetermined sound is a human voice, the CPU26 stores a common human voice spectrum. When the CPU26 receives the sound source characteristics of the input sound source, that is, the frequency spectrum of the input sound source, transmitted from the audio codec 24, the frequency spectrum of the input sound source is compared with the calibration characteristics stored in the CPU26. Under the condition that the frequency spectrum of the input sound source is in accordance with the calibration characteristics stored in the CPU26, judging that the input source is MIC input; when the frequency spectrum of the input sound source does not match the calibration characteristics stored in the CPU26, the input source is determined to be a linear input. The detection system for the audio input signals realizes that two types of audio input are received through one RCA interface, and the type of the input audio can be judged according to the characteristics of the sound source frequency spectrum and the like of the sound source.
In one embodiment, the CPU26 is further configured to call a preset audio parameter corresponding to the input source type according to the input source type. In this embodiment, since the input amplitude of the MIC is lower and is at mv level, and the input amplitude of the linear sound source can reach V level, the amplitude difference is large, so that after the audio is collected and processed by the CPU26, on the premise that the volume cannot be adjusted, audio problems such as light sound, large sound, sound breaking or distortion may occur. Therefore, the CPU26 also presets a volume parameter corresponding to the type of the input source, thereby avoiding the phenomena of excessive light and large sound, distortion or sound break, and the like.
In one embodiment, fig. 3 is a schematic structural diagram of an audio input interface device according to an embodiment of the present invention, as shown in fig. 3, the audio input interface device 22 includes an RCA female, a housing of the RCA female includes a first housing 32 and a second housing 34, the first housing is connected to a first pin 36, the second housing is connected to a second pin 37, and a signal line of the RCA female is connected to a third pin 38, wherein the first housing 32 and the second housing 34 are electrically isolated when the RCA male is not connected, and are electrically connected when the RCA male is connected. Fig. 4 is a schematic diagram of an audio input signal detection system according to another embodiment of the present invention, as shown in fig. 4, the first pin 36 of the audio input interface device 22 is connected to the CPU26, the second pin 37 is connected to ground, and the third pin 38 is connected to the audio codec 24. The CPU26 determines whether the RCA male is connected to the RCA female according to the level value between the first housing 34 and the second housing 36, and instructs the audio codec 24 to supply a bias voltage to the MIC in the case where the RCA male is connected to the RCA female. In this embodiment, a prototype design based on the RCA master is provided, and the audio input interface device 22 is obtained by modifying the metal housing to separate the metal housing into two independent parts, which are not taken as a whole. When the external audio source is accessed, the RCA male head can short the two parts of the shell together, and the high level is pulled down. Whether an external sound source interface is inserted into the audio input port or not is judged by identifying the change of the level on the metal shell, so that the detection process is triggered, and the detection efficiency is improved. It should be noted that the audio input interface device 22 only needs to divide the metal housing of the RCA female into two independent parts and have pins connected out, and is not limited to the design in fig. 3. In addition, since the electret MIC needs an additional bias voltage when in use, the audio codec 24 is provided with a microphone bias voltage power supply interface MIC _ bias, and when the CPU26 detects that an external sound source is connected, the audio codec 24 is instructed to power on the microphone bias voltage interface, so that the MIC does not need an additional bias power supply, the cost can be reduced, and the RCA interface is compatible with two input sources.
In an embodiment, fig. 5 is a schematic diagram of a detection system of an audio input signal according to still another embodiment of the present invention, as shown in fig. 5, the detection system of an audio input signal further includes a sound generating unit 52, the sound generating unit 52 is connected to the CPU26, and in a case that the RCA male plug is connected to the RCA female plug, the CPU26 is further configured to instruct the sound generating unit 52 to emit a preset test sound, and determine an input source type according to a sound source characteristic of the input sound source and a calibration characteristic, where the calibration characteristic is a characteristic of the test sound emitted by the generating unit. In this embodiment, by using the above-mentioned configuration, it can be detected whether the external sound source interface is connected to the RCA interface 102, and in the case that the RCA male connector is connected to the RCA female connector, the CPU26 instructs the sound generating unit 52 to generate a preset test sound. The audio codec 24 collects the input audio source signal of the audio input interface and transmits the data to the CPU26, and the CPU26 analyzes the content of the input source and compares it with the test sound generated by the sound generating unit 52. Alternatively, the test sound is usually a plurality of intermittent sounds spaced apart by a preset time, and the CPU26 may compare not only the frequency spectrum of the input audio, but also whether the time interval between the collected sounds is the same as the test sound to determine the input source. In the case of using a human voice or a separate buzzer as the test sound, the test sound is easily affected by noise in the environment. Moreover, due to manual operation, the situation that the test sound is inconsistent with the preset rule is easy to occur, the implementation mode can avoid human errors, and the detection efficiency and the detection accuracy are improved.
In one embodiment, fig. 6 is a schematic diagram of an audio input signal detection system according to yet another embodiment of the present invention, as shown in fig. 6, the CPU26 includes a ctrl1 interface, a ctrl2 interface, a ctrl3 interface, a detect interface, and a data1 interface; the audio codec 24 comprises a ctrl4 interface, a data2 interface, an audio-in interface, and a Mic _ bias interface; the system further comprises a PNP triode (Q1), a first resistor (R1), a second resistor (R2) and a capacitor (C1):
a base electrode (1) of the PNP triode is connected with the ctrl1 interface, an emitting electrode (2) of the PNP triode is connected with a power supply voltage, a collecting electrode (3) of the PNP triode is connected with a second resistor, and the second resistor is connected with a first pin; the detect interface is connected with the first pin, the data1 interface is connected with the data2 interface, and the ctrl2 interface is connected with the ctrl4 interface; the audio-in interface is connected with a capacitor, and the capacitor is connected with the third pin; the Mic _ bias interface is connected with a first resistor, and the first resistor is connected with a third pin; the sound emitting unit 52 interfaces with ctrl 3. In this embodiment, the CPU26 detects whether an external sound source interface is inserted into the audio input interface through the detect port, when the CPU26 determines that an external interface is connected, raises ctrl1, controls the Mic _ bias of the audio codec 24 to be powered on through the ctrl2 interface and the ctrl4 interface, then controls the sounding unit 52 to emit a test sound through the ctrl3 interface, and the audio codec 24 collects an input signal of the audio input interface through the audio _ in interface and transmits data to the CPU26 through the data2 interface and the data1 interface. The first resistor is used for adjusting the partial pressure of the bias voltage, the second resistor is used for adjusting the partial pressure at the triode, the first capacitor is an isolation capacitor, the direct current component is removed, and at the moment, the interface can transmit MIC audio of the electret and can also transmit linear audio. The CPU26 configures corresponding audio parameters according to the determined type of the input source, optionally, the audio parameters are embedded in the CPU26, and if the audio input source is MIC, the audio parameter with higher gain is configured, and if the audio input source is linear audio, the audio parameter with lower gain is configured. The circuit arrangement realizes the detection of whether the external RCA interface is accessed, detects the input source type of the input sound source under the condition that the external RCA interface is accessed, and adjusts the audio frequency parameters according to the input source type, thereby solving the problems of over-light sound, over-large sound, distortion or sound breaking and the like of the audio frequency caused by sharing one path of MIC and linear audio frequency.
The various modules of the audio input signal detection system described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, fig. 7 is a flowchart of an audio input signal detection method according to one embodiment of the present invention, and as shown in fig. 7, there is also provided an audio input signal detection method, including:
step S710, acquiring an input sound source, and determining the sound source characteristics of the input sound source;
step S720, determining the input source type according to the sound source characteristics and the preset calibration characteristics.
In steps S710 to S720, the input source type is discriminated by determining whether the input source is an MIC input. Since the MIC input is to collect environmental sound, when the MIC input is accessed, a preset sound signal is input at the microphone, and the sound signal may be a preset audio frequency, such as a buzzer to emit a preset sound, or a specific audio information to be played, or a human voice to describe a specific sentence. The frequency spectrum of the preset sound signal is the calibration characteristic, for example, in the case that the preset sound signal is a buzzer, the frequency spectrum of the sound of the buzzer is the calibration characteristic; in the case that the preset sound is specific audio information, the frequency spectrum of the specific audio information is a calibration characteristic, and preferably, the sound of the buzzer or the specific audio information is a sound different from a common environmental sound. And comparing the frequency spectrum of the input sound source with the frequency spectrum of the preset sound signal, and judging whether the input sound source is MIC input according to the comparison result, namely the frequency spectrum of the input sound source is consistent with the frequency spectrum of the preset sound signal, wherein the input sound source is MIC input, and otherwise, the input sound source is linear audio input.
In an embodiment, fig. 8 is a flowchart of an audio input signal detection method according to another embodiment of the present invention, and as shown in fig. 8, before the input audio source is acquired, step S810 is included, and in case that an access of an external audio source interface is detected, a test sound is emitted. Wherein the test sound corresponds to the calibration characteristic. By using the audio access interface device in the audio input signal detection system, under the condition that the external interface is detected to be accessed to the RCA interface, the test sound is played, then the input sound source is collected, the content of the input sound source is analyzed and compared with the test sound. Optionally, the test sound is usually intermittent sound with a preset time interval for multiple times, and in the case of comparing audio characteristics, not only the frequency spectrum of the input audio may be compared, but also whether the time interval of the collected sounds is the same as the time interval of the sounds in the test sound may be compared to determine the type of the input source. In the case of using a human voice or a separate buzzer as the test sound, the test sound is easily affected by noise in the environment. Or due to manual operation, the situation that the test sound is inconsistent with the preset rule is caused, and through the embodiment, the test sound is played without human errors, so that the detection efficiency and the detection accuracy can be improved.
In an embodiment, fig. 9 is a flowchart of an audio input signal detection method according to still another embodiment of the present invention, and as shown in fig. 9, after determining the input source type according to the sound source characteristics and the preset calibration characteristics, the method includes: step S910, according to the input source type, invoking a preset audio parameter corresponding to the input source type. Optionally, when the audio input source is MIC, a higher gain audio parameter is configured, and when the audio input source is linear audio, a lower gain audio parameter is configured. According to the embodiment, after the input source type of the input sound source is detected, the audio parameters are adjusted according to the input source type, and the problems that when one path is shared by MIC and linear audio, the audio has light and large sound, is distorted or breaks sound and the like are solved.
In a specific embodiment, fig. 10 is a flow chart of a method for audio input signal detection according to a specific embodiment of the present invention, as shown in fig. 10, the method comprising:
in step S1010, an input audio signal is detected. When the external access sound source, RCA male will short the two parts of the shell together, and the high level will be pulled down. The CPU judges that an external sound source interface is inserted into the audio input port by identifying the change of the level on the metal shell;
step S1020, when the CPU judges that an external interface is accessed, the CPU raises ctrl1 and controls Mic _ bias of the audio codec to be electrified;
step S1030, the CPU controls the sound generation unit to generate sound, for example, three times;
step S1040, the audio codec collects the input signal of the audio input interface and transmits the data to the CPU;
step S1050, the CPU compares the input audio content with the sound emitted by the sound-emitting unit;
in step S1060, the type of the input audio is determined. If the collected audio frequency is consistent with the frequency spectrum of the audio signal sent by the sound production unit by the CPU and the time interval of the three-time signal, judging that the input audio source is MIC input, and if the collected audio frequency is inconsistent with the frequency spectrum of the audio signal sent by the sound production unit by the CPU, judging that the input audio source is linear audio;
in step S1070, the CPU adjusts the audio gain parameter according to the determined input source type. The parameters should be built into the software. And if the audio input source is MIC, configuring audio parameters with higher gain, and if the audio input source is linear audio, configuring the audio input source as audio parameters with lower gain.
The audio input signal detection method in the embodiment solves the problem that the audio cannot be detected to be inserted by using the RCA interface, and can also judge the type of the input audio when the audio source is input by using the RCA audio interface; the problem that when the MIC and the linear audio share one path, the audio has the phenomena of light and large sound, distortion or sound breaking and the like is solved.
It should be understood that although the various steps in the flowcharts of fig. 7-10 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 7-10 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
For specific limitations of the audio input signal detection method, reference may be made to the above limitations of the audio input signal detection system, which are not described herein again.
In one embodiment, a computer device is provided, and fig. 11 is a schematic diagram of an audio input signal detection computer device according to one embodiment of the present invention, the computer device may be a security device terminal, and an internal structure diagram of the computer device may be as shown in fig. 11. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device 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 computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement an audio input signal detection method. The display screen of the computer equipment can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on a shell of the computer equipment, an external keyboard, a touch pad or a mouse and the like.
Those skilled in the art will appreciate that the architecture shown in fig. 11 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In the computer equipment for detecting the audio input signal, the audio codec acquires an input sound source through the RCA interface device, determines the sound source characteristics of the input sound source and transmits the sound source characteristics to the CPU; and the CPU determines the type of the input source according to the sound source characteristics and the preset calibration characteristics. The method realizes the judgment of the type of the input audio according to the sound source characteristics of the sound source when the sound source is input by using the RCA audio interface through one RCA interface.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, realizes the above-mentioned audio input signal detection method.
The computer readable storage medium for detecting the audio input signal, the audio codec acquires an input sound source through the RCA interface device, determines the sound source characteristics of the input sound source, and transmits the sound source characteristics to the CPU; and the CPU determines the type of the input source according to the sound source characteristics and the preset calibration characteristics. The method realizes that the type of input audio is judged according to the sound source characteristics of the sound source when the sound source is input by using the RCA audio interface through one RCA interface.
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, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. 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 (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.
Claims (9)
1. The system for detecting the audio input signal is characterized by comprising an audio input interface device, an audio codec and a CPU, wherein the audio input interface device comprises an RCA female head, a shell of the RCA female head comprises a first shell and a second shell, the first shell is connected with a first pin, the second shell is connected with a second pin, and a signal wire of the RCA female head is connected with a third pin, wherein the first shell and the second shell are electrically isolated under the condition that an RCA male head is not connected, and are electrically connected under the condition that the RCA male head is connected; the first pin is connected with the CPU, the second pin is grounded, and the third pin is connected with the audio codec; the CPU is used for determining whether the RCA male connector is connected to the RCA female connector or not according to a level value between the first shell and the second shell, and indicating the audio codec to provide a bias voltage under the condition that the RCA male connector is connected to the RCA female connector;
the audio codec is used for acquiring an input sound source through the RCA interface device, determining sound source characteristics of the input sound source and transmitting the sound source characteristics to the CPU;
and the CPU determines the type of the input source according to the sound source characteristics and preset calibration characteristics.
2. The system according to claim 1, wherein the CPU is further configured to invoke a preset audio parameter corresponding to the input source type according to the input source type.
3. The system of claim 1, further comprising a sound unit, said sound unit being connected to said CPU;
and under the condition that the RCA male head is connected to the RCA female head, the CPU is also used for indicating the sound production unit to produce preset test sound, and determining the type of the input source according to the sound source characteristic and the calibration characteristic of the input sound source, wherein the calibration characteristic is the characteristic of the test sound.
4. The system of claim 3, wherein the CPU comprises a ctrl1 interface, a ctrl2 interface, a ctrl3 interface, a detect interface, and a data1 interface; the audio codec comprises a ctrl4 interface, a data2 interface, an audio-in interface and a Mic _ bias interface; the system also comprises a PNP triode, a first resistor, a second resistor and a capacitor:
the base electrode of the PNP triode is connected with the ctrl1 interface, the emitting electrode of the PNP triode is connected with a power supply voltage, and the collecting electrode of the PNP triode is connected with the first pin through the second resistor; the detect interface is connected with the first pin, the data1 interface is connected with the data2 interface, and the ctrl2 interface is connected with the ctrl4 interface; the audio-in interface is connected with the third pin through the capacitor; the Mic _ bias interface is connected with the third pin through the first resistor; and the sound production unit is connected with the ctrl3 interface.
5. An audio input signal detection method is applied to a detection system of an audio input signal, and is characterized in that the detection system comprises an audio input interface device, an audio codec and a CPU;
the detection method comprises the following steps:
the audio input interface device is used for obtaining an input sound source, wherein the audio input interface device comprises an RCA female head, a shell of the RCA female head comprises a first shell and a second shell, the first shell is connected with a first pin, the second shell is connected with a second pin, a signal wire of the RCA female head is connected with a third pin, the first shell and the second shell are electrically isolated under the condition that an RCA male head is not connected, and the first shell and the second shell are electrically connected under the condition that the RCA male head is connected; the first pin is connected with the CPU, the second pin is grounded, and the third pin is connected with the audio codec; the CPU is used for determining whether the RCA male connector is connected to the RCA female connector or not according to a level value between the first shell and the second shell, and instructing the audio codec to provide a bias voltage under the condition that the RCA male connector is connected to the RCA female connector;
determining source characteristics of the input source;
and determining the type of the input source according to the sound source characteristics and preset calibration characteristics.
6. The method of claim 5, wherein before the obtaining the input audio source, the method further comprises:
and emitting a test sound under the condition that the external sound source interface is detected to be accessed, wherein the test sound corresponds to the calibration characteristic.
7. The method of claim 6, wherein after determining the input source type according to the sound source characteristics and the preset calibration characteristics, the method further comprises:
and calling a preset audio parameter corresponding to the input source type according to the input source type.
8. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method according to any of claims 5 to 7 are implemented when the computer program is executed by the processor.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 5 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010595416.8A CN111857639B (en) | 2020-06-28 | 2020-06-28 | Audio input signal detection system, method, computer device and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010595416.8A CN111857639B (en) | 2020-06-28 | 2020-06-28 | Audio input signal detection system, method, computer device and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111857639A CN111857639A (en) | 2020-10-30 |
CN111857639B true CN111857639B (en) | 2023-01-24 |
Family
ID=72988187
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010595416.8A Active CN111857639B (en) | 2020-06-28 | 2020-06-28 | Audio input signal detection system, method, computer device and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111857639B (en) |
Family Cites Families (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101847412B (en) * | 2009-03-27 | 2012-02-15 | 华为技术有限公司 | Method and device for classifying audio signals |
US8629580B2 (en) * | 2011-02-09 | 2014-01-14 | Apple Inc. | Audio accessory type detection and connector pin signal assignment |
US9100757B2 (en) * | 2012-07-02 | 2015-08-04 | Apple Inc. | Headset impedance detection |
CN103634723B (en) * | 2012-08-24 | 2017-06-16 | 深圳市朗驰欣创科技有限公司 | Audio input circuit and the electronic equipment with audio input |
CN103793193A (en) * | 2012-10-30 | 2014-05-14 | 联想(北京)有限公司 | Mode switching method for audio interface, audio interface and electronic equipment |
CN103139512A (en) * | 2013-01-16 | 2013-06-05 | 深圳创维-Rgb电子有限公司 | Device, method and display equipment for audio dual output |
US9883305B2 (en) * | 2014-03-19 | 2018-01-30 | Cirrus Logic, Inc. | Non-linear control of loudspeakers |
CN105120404B (en) * | 2015-07-31 | 2018-11-30 | 华为技术有限公司 | A kind of audio frequency apparatus, terminal device and electronic equipment |
CN106231495B (en) * | 2016-08-31 | 2019-05-21 | 浙江大华技术股份有限公司 | A kind of audio identification methods and device |
KR20180123879A (en) * | 2017-05-10 | 2018-11-20 | 삼성전자주식회사 | Electronic device and method for controlling audio output according to type of earphone |
CN208337860U (en) * | 2018-05-29 | 2019-01-04 | 杭州海康威视数字技术股份有限公司 | A kind of audio input type detecting circuit and video camera |
CN110347367B (en) * | 2019-07-15 | 2023-06-20 | 百度在线网络技术(北京)有限公司 | Volume adjustment method, terminal equipment, storage medium and electronic equipment |
-
2020
- 2020-06-28 CN CN202010595416.8A patent/CN111857639B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111857639A (en) | 2020-10-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20220261468A1 (en) | Ear-based biometric identification | |
US20180096120A1 (en) | Earpiece with biometric identifiers | |
US20170318377A1 (en) | Intelligent headphone | |
JP6657337B2 (en) | Method of operating hearing aid and hearing aid | |
CN109547897B (en) | Wireless earphone connection method, device and system and wireless earphone box | |
US20200143788A1 (en) | Interference generation | |
KR20130123671A (en) | Apparatus and method for preventing error recognition in earjack | |
WO2009023633A1 (en) | Musical, diagnostic and operational earcon | |
CN111491249A (en) | Method and device for detecting in-ear state of earphone, earphone and storage medium | |
WO2020019858A1 (en) | Microphone hole clogging detection method and related products | |
CN103944983A (en) | Error correction method and system for voice control instruction | |
CN114071308A (en) | Earphone self-adaptive tuning method and device, earphone and readable storage medium | |
CN108781338B (en) | Hearing assistance device and method with automatic safety control | |
CN111857639B (en) | Audio input signal detection system, method, computer device and storage medium | |
TW201528761A (en) | Method and apparatus for audio testing | |
KR102450024B1 (en) | Neural network based building fire detection system | |
US20220030342A1 (en) | Intrinsically-safe microphone assembly | |
WO2020019844A1 (en) | Speech data processing method and related product | |
US10997984B2 (en) | Sounding device, audio transmission system, and audio analysis method thereof | |
EP4018681A1 (en) | Microphone blocking detection control | |
CN116055976A (en) | Earphone wearing forward and backward detection method and device, earphone and storage medium | |
US20240281202A1 (en) | Electronic Device Audio Adjustment | |
US20210152965A1 (en) | Method for detecting blocking of microphone and related products | |
CN112740739B (en) | Interference processing method and device, storage medium and electronic equipment | |
CN112437375A (en) | Earphone and earphone sound effect adjusting method |
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 |