Summary of the invention
Technical problem to be solved by this invention is to provide a kind of noise elimination method of time division multiplex equipment, make in the multi-party communication system of party telephone a side of not speech or in dispatching patcher the noise during unmanned the speech can not enter system, thereby the signal to noise ratio in the raising system is improved speech quality.
To achieve these goals, the invention provides a kind of noise elimination method of time division multiplex equipment, be applied to many telephone user system, comprise the steps: by the switching network connection
Step 10 sets in advance the telephone subscriber's who needs noise elimination receive threshold FresholdA by network management interface:
Step 20 is determined the receive channel of this telephone subscriber in switching network;
Step 30 is according to corresponding transmitting channel in this telephone subscriber's the receive channel acquisition switching network;
Step 40 reads input pcm encoder value from switching network;
Step 50, with the pcm encoder value of reading in, FresholdA compares with receive threshold, and decision output is in noise-limited condition or is in normal operating conditions.
Be according to the pcm encoder cycle in the program control process, per 125 μ s are a frame, and by the cycle timing, per 125 μ s scan user's input that needs carry out noise elimination, read in the pcm encoder value.
The described input pcm encoder value that reads from switching network also comprises: the input analog signal that reads from switching network is carried out A/ μ lead coding, obtain input range value IN.
Described input range value IN is PCM amplitude computing formula IN=(the INXOR 0X55) ﹠amp by the input analog signal; 0X7F calculates.
Described FresholdA compares with receive threshold with the pcm encoder value of reading in, and decision output is in noise-limited condition or is in normal operating conditions and further may further comprise the steps:
Step 501 is if telephone subscriber's receive threshold FresholdA>input range value IN changes step 502; Otherwise change step 505;
Step 502, if active user's state is an on-state, the number of times of this condition of accumulative total changes step 503, otherwise is that current state is a mute state, removes counting, returns step 10;
Step 503 if cumulative number reaches the quiet level and smooth number of times of setting, is changeed step 504, otherwise is returned step 10;
Step 504, the state of control exchange chip makes user's reception be in mute state, and promptly the channel of the second link port CHAN2 correspondence is in output level "0" sign indicating number state; Software data is preserved this state, removes counting, returns step 10;
Step 505, if active user's state is a mute state, the number of times of this condition of accumulative total changes step 506, otherwise is that current state is an on-state, removes counting, returns step 10;
Step 506 if cumulative number reaches the level and smooth number of times of the connection of setting, is changeed step 507, otherwise is returned step 10;
Step 507, the state of control exchange chip makes user's reception be in normal on-state, i.e. and the output of the first link port CHAN1 is directly inputted to the second link port CHAN2, and software data is preserved this state, removes counting, returns step 10.
Described receive threshold FresholdA is the maximum pcm encoder " range value " of noise.
According to the noise and the echo of user terminal, each user that need carry out noise elimination is provided with different threshold values, described threshold value is static relatively, by webmaster change is set.
Adopt the method for the invention, improved the signal to noise ratio of party telephone system, improved speech quality, reduced the influence of noise the user; Adopt programme controlled mode, saved hardware cost, improved the performance of system.Compared with prior art, realize that simply cost is low, effect is obvious, and is very suitable to the party telephone system.
Describe the present invention below in conjunction with the drawings and specific embodiments, but not as a limitation of the invention.
Embodiment
The present invention has disclosed a kind of based on directly reading pcm encoder (no matter being that A leads or μ leads) data, and the control by the method realization of software setting electronic switch is sent signal and received signal to the user reduces the influence of noise to the user.
Be described in further detail below in conjunction with the enforcement of accompanying drawing technical scheme.
As shown in Figure 1, be hardware controls principle schematic of the present invention.In the many telephone user system that connect by switching network,exchange chip 1 with function of exchange is set in switching network, MT90820 chip for example, thisexchange chip 1 is connected with CPU3 by data/address bus 2, and the input of the first link port CHAN1 of describedexchange chip 1 links to each other by switching network with the output of the second link port CHAN2.Utilize described CPU3 directly to read the pcm encoder data of the first link port CHAN1 in the describedexchange chip 1, and according to the pcm encoder data that read, the second link port CHAN2 by the describedexchange chip 1 of program control connects the input signal of the first link port CHAN1 or directly exports a PCM code value.
Behind closing of the circuit, telephone subscriber's transmission signal and received signal are all connected by certain time slot and the audio mixing chip of exchange chip.For exchange chip, no matter be domestic consumer or be reciprocity from the signal of hybrid chip.Each channel of exchange chip can be read its input value (as CHAN1) by cpu bus, and the output of each channel all can be controlled its state (as CHAN2) by CPU: connect an input signal or directly export a PCM code value.
The first link port CHAN1 is the point that CPU3 reads input value in thisexchange chip 1, and according to the pcm encoder cycle, per 125 μ s are a frame, and by the cycle timing, per 125 μ s scan user's input that needs carry out noise elimination, read in pcm encoder value wherein.
The second link port CHAN2 is the exchange output port state that CPU3 will control in thisexchange chip 1, by interfaces such as webmasters the function that needs carry out the telephone subscriber of noise elimination is provided with, and comprises aspects such as noise door line, reception noise elimination, transmission noise elimination.Suppose that leading the coded amplitude value by the A/ μ that webmaster is provided with the threshold value correspondence that A receives is FresholdA, according to input range value IN, by compare the output state of control CHAN2 with threshold value FresholdA.
As shown in Figure 2, be noise elimination method main flow chart of the present invention, when initial, controlled User Status is in normal operating conditions, and it mainly is to finish by following steps:
Step 10 sets in advance the telephone subscriber's who needs noise elimination receive threshold FresholdA by network management interface.Receive threshold FresholdA is the maximum pcm encoder " range value " of noise, according to the noise and the echo of user terminal, to each user that need carry out noise elimination different threshold values need be set, generally speaking, described threshold value is static relatively, by webmaster change is set.Here be assumed to be FresholdA.
Step 20 is determined the receive channel of this telephone subscriber in switching network.
Step 30 is according to corresponding transmitting channel in this telephone subscriber's the receive channel acquisition switching network.Described receive channel is the channel of user in switching network that needs noise elimination.
Step 40 reads input pcm encoder value from switching network.The signal that reads in is this user's received signal, and promptly the opposite end in the switching network sends signal.According to the pcm encoder standard, to the input analog signal that from switching network, reads carry out A/ μ lead the coding after, to its even bit negate, highest order is a sign bit.Obtain importing the PCM amplitude computing formula of analog signal:
IN=(IN?XOR?0X55)&0X7F;
IN value after the calculating is the value after the amplitude process A/ μ of analog signal leads coding, i.e. input range value IN.
According to the pcm encoder standard, the pcm encoder value of level "0" state correspondence is " 0X54 " or " 0X55 ".
Step 50, with the pcm encoder value of reading in, FresholdA compares with receive threshold, and decision output is in noise-limited condition or is in normal operating conditions.
Wherein, described FresholdA compares with receive threshold with the pcm encoder value of reading in, and decision output is in noise-limited condition or is in normal operating conditions and further may further comprise the steps:
Step 501 is if telephone subscriber's receive threshold FresholdA>input range value IN changes step 502; Otherwise change step 505;
Step 502, if active user's state is an on-state, the number of times of this condition of accumulative total changes step 503, otherwise is that current state is a mute state, removes counting, returns step 10;
Step 503 if cumulative number reaches the quiet level and smooth number of times of setting, is changeed step 504, otherwise is returned step 10;
Step 504, the state of control exchange chip makes user's reception be in mute state, and promptly the channel of the second link port CHAN2 correspondence is in output level "0" sign indicating number state; Software data is preserved this state, removes counting, returns step 10;
Step 505, if active user's state is a mute state, the number of times of this condition of accumulative total changes step 506, otherwise is that current state is an on-state, removes counting, returns step 10;
Step 506 if cumulative number reaches the level and smooth number of times of the connection of setting, is changeed step 507, otherwise is returned step 10;
Step 507, the state of control exchange chip makes user's reception be in normal on-state, i.e. and the output of the first link port CHANl is directly inputted to the second link port CHAN2, and software data is preserved this state, removes counting, returns step 10.
This connects level and smooth number of times is that (FresholdA<1N) processing of state need carry out the filtering of certain hour, and as 1ms, this time can not be oversize, falls first sound of speech to prevent " eating " for the spike noise of eliminating burst.
This quiet level and smooth number of times is in order to prevent to cut away personalization part such as presumable last or end syllable and to prevent the too frequently control (FresholdA<IN) processing of state to switching network, need carry out the maintenance and the filtering of certain hour to on-state, as 1s, just can move then according to actual conditions.
And, concerning exchange chip, no matter be to be reciprocity from common user or from the signal of hybrid chip, that if certain user environment noise is very big, need carry out noise elimination to its input in actual use, then carry out squelch control by the input signal that this user is set, if certain user needs long-time monitoring system,, then this user's reception can be provided with squelch control as dispatching telephone control board.
The present invention also can have other various embodiments, and under the situation that does not deviate from spirit of the present invention and essence thereof, the structure of device can be improved through further, but these corresponding changes all should belong to the protection range of the appended claim of invention.