Disclosure of Invention
In view of the above, the present invention provides a method and an apparatus for adjusting a call voice, which can adjust a call voice in real time, improve the quality of the call voice, and improve the experience of a user.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
the invention provides a method for adjusting call voice, which comprises the following steps:
receiving a result signal of voice quality detection;
when the result signal shows that the current voice quality is poor, further judging whether the contact person of the current call is the contact person of the first call; when the judgment result is negative, searching the stored mapping relation between the contact and the audio characteristic parameters, and acquiring the audio characteristic parameters corresponding to the contact;
and adjusting the call voice according to the audio characteristic parameters.
In the above scheme, the method further comprises: and when the result signal indicates that the current voice quality is poor and the current call contact is the first call contact, adjusting the call voice according to the preset audio characteristic parameters.
In the above scheme, the method further comprises: and when the result signal indicates that the current voice quality is good and the contact person of the current call is the contact person of the first call, extracting the audio characteristic parameters of the voice, and storing the mapping relation between the contact person and the audio characteristic parameters and the mapping relation between the contact person and the detection parameters in the result signal.
In the above scheme, the method further comprises: and when the result signal shows that the current voice quality is good and the contact person of the current call is not the contact person of the first call, searching the mapping relation between the contact person and the detection parameters in the result signal to obtain the detection parameters corresponding to the contact person, if the voice quality shown by the current result signal is better than the voice quality shown by the stored detection parameters, extracting the audio characteristic parameters of the current voice, and updating the audio characteristic parameters corresponding to the contact person and the detection parameters corresponding to the contact person.
In the foregoing solution, before receiving a result signal of the voice quality detection, the method further includes:
detecting an input voice data packet, sending the voice data packet to voice quality detection equipment at a network side for voice quality detection, and receiving a returned voice quality detection result signal.
The invention also provides a device for adjusting the call voice, which comprises a receiving and sending module, a judging module, a retrieval module and a processing module; wherein,
the receiving and sending module is used for receiving a result signal of voice quality detection, and when the result signal shows that the current voice quality is poor, the judging module is triggered;
the judging module is used for judging whether the contact person of the current call is the contact person of the first call or not, and triggering the retrieval module when the judging result is negative;
the retrieval module is used for retrieving the mapping relation between the stored contact persons and the audio characteristic parameters, acquiring the audio characteristic parameters corresponding to the contact persons and sending the audio characteristic parameters to the processing module;
and the processing module is used for adjusting the call voice according to the audio characteristic parameters sent by the retrieval module.
In the above scheme, the processing module is further configured to adjust the call voice according to a preset audio characteristic parameter when the contact of the current call is the contact of the first call.
In the above scheme, the device further comprises an extraction module and a storage module; wherein,
the extraction module is used for extracting the audio characteristic parameters of the voice when the result signal shows that the current voice quality is good, and sending the audio characteristic parameters and the corresponding contact persons to the storage module;
and the storage module is used for storing the mapping relation between the contact and the audio characteristic parameters and between the contact and the detection parameters in the result signals.
In the above scheme, the device further includes a comparing module, configured to compare, when the contact of the current call is not the contact of the first call, the voice quality indicated by the current result signal with the voice quality indicated by the retrieved detection parameters according to the detection parameters corresponding to the current contact obtained by the mapping relationship between the contact retrieved by the retrieving module and the detection parameters in the result signal, and send the comparison result to the storage module;
correspondingly, the storage module is further configured to update the stored audio characteristic parameters corresponding to the contact and the stored detection parameters corresponding to the contact when the comparison result sent by the comparison module is that the voice quality indicated by the current result signal is good.
In the above scheme, the device further comprises a detection module, configured to detect an input voice data packet and send the voice data packet to the transceiver module;
correspondingly, the transceiver module is configured to send the voice data packet sent by the detection module to the voice quality detection device on the network side.
The method and the device for adjusting the call voice receive a result signal of voice quality detection, further judge whether a contact person of the current call is a contact person of the first call when the result signal shows that the current voice quality is poor, retrieve the mapping relation between the stored contact person and the audio characteristic parameter when the contact person of the current call is not the contact person of the first call, obtain the audio characteristic parameter corresponding to the contact person, and adjust the call voice according to the audio characteristic parameter. Therefore, the call voice can be adjusted according to different voice frequency characteristics or voice characteristics of the user, the call voice quality is improved, and the user experience is improved.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and specific embodiments.
Fig. 1 is a schematic flow chart of a call voice adjustment method of the present invention, as shown in fig. 1, including the following steps:
step 101: receiving a result signal of voice quality detection, and executing step 102 when the result signal indicates that the current voice quality is poor:
here, before receiving a result signal of the voice quality detection, the method further includes:
detecting an input voice data packet, sending the voice data packet to voice quality detection equipment at a network side for voice quality detection, and receiving a returned voice quality detection result signal;
the voice quality detection equipment at the network side can set a standard value or a value range to detect whether the voice quality is good or not according to the existing method for detecting the voice quality by the equipment at the network side, and returns the good or bad detection result to the terminal in a signal mode; since the specific voice quality detection method is the prior art, the details are not repeated here;
the parameters specifically detected may include: parameters which can indicate voice quality such as signal-to-noise ratio, distortion degree, noise transmission and suppression degree and the like;
the detection result comprises parameters such as signal-to-noise ratio, distortion degree, noise transmission and suppression degree and the like in the current voice data;
the signal mode can be high and low, or different values.
Step 102: judging whether the contact person of the current call is the contact person of the first call, if not, executing step 103;
step 103: retrieving a mapping relation between a stored contact and an audio characteristic parameter, acquiring the audio characteristic parameter corresponding to the contact, and adjusting the call voice according to the audio characteristic parameter;
here, the audio feature parameters include parameters capable of characterizing speech features, such as spectral combinations, spectral envelopes, and the like;
specifically, a finite impulse response or wireless impulse response filter is mainly set according to the spectrum combination in the audio characteristic parameter, when the low frequency component is insufficient, the low frequency component is increased, when the high frequency component is lacked, the high frequency component is supplemented at the corresponding frequency point, and simultaneously, the high frequency noise part is suppressed, so that the response curve and the spectrum characteristic in the audio characteristic parameter are as close as possible.
Further, the method further comprises: when the result signal indicates that the current voice quality is poor and the current call contact is the first call contact, adjusting the call voice according to a preset audio characteristic parameter;
here, the preset audio characteristic parameter is a default audio characteristic parameter preset in a certain usage mode, such as a handheld mode, a headset mode, a hands-free mode, and the like.
Further, the method further comprises: and when the result signal indicates that the current voice quality is good and the contact person of the current call is the contact person of the first call, extracting the audio characteristic parameters of the voice, and storing the mapping relation between the contact person and the audio characteristic parameters and the mapping relation between the contact person and the detection parameters in the result signal.
Further, the method further comprises: when the result signal indicates that the current voice quality is good and the contact person of the current call is not the contact person of the first call, retrieving the mapping relation between the contact person and the detection parameters in the result signal to obtain the detection parameters corresponding to the contact person, and if the voice quality indicated by the current result signal is better than the voice quality indicated by the stored detection parameters, extracting the audio characteristic parameters of the voice, updating the audio characteristic parameters corresponding to the contact person and the detection parameters corresponding to the contact person to optimize the audio characteristic parameters, improve the fidelity of the voice and control the data storage capacity;
specifically, parameters such as signal-to-noise ratio, distortion degree, noise transmission and suppression degree in the detection parameters may be calculated by a weighting algorithm according to preset importance degrees, and two average values are calculated, and the two call voice qualities are compared according to the average values, where the comparison process is the prior art and is not described herein again.
Further, the method further comprises: the mapping relation between the stored contact persons and the audio characteristic parameters is cleared regularly, and the data of the contact persons with few contacts are cleared; the contact with few contacts may be a contact with a set number of calls less than N times within a set time range.
Fig. 2 is a schematic diagram of a structure of the call voice adjusting apparatus according to the present invention, and as shown in fig. 2, the apparatus includes a transceiver module 21, a determining module 22, a retrieving module 23, and a processing module 24; wherein,
the transceiver module 21 is configured to receive a result signal of voice quality detection, and trigger the determination module 22 when the result signal indicates that the current voice quality is poor;
the judging module 22 is configured to judge whether the contact person currently in a call is a contact person in a first call, and trigger the retrieving module 23 if the judging result is negative;
the retrieving module 23 is configured to retrieve a mapping relationship between a stored contact and an audio characteristic parameter, acquire an audio characteristic parameter corresponding to the contact, and send the audio characteristic parameter to the processing module 24;
the processing module 24 is configured to adjust the call voice according to the audio characteristic parameter sent by the retrieving module 23.
Further, the processing module 24 is further configured to adjust the call voice according to a preset audio characteristic parameter when the contact of the current call is the contact of the first call.
Further, the device also comprises an extraction module 26 and a storage module 25; wherein,
the extracting module 26 is configured to, when the result signal indicates that the current voice quality is good, extract an audio feature parameter of the voice, and send the audio feature parameter and a corresponding contact to the storage module;
the storage module 25 is configured to store mapping relationships between the contacts and the audio characteristic parameters, and between the contacts and the detection parameters in the result signal.
Further, the apparatus further includes a comparing module 27, configured to, when the contact in the current call is not the contact in the first call, compare the voice quality indicated by the current result signal with the voice quality indicated by the retrieved detection parameter according to the detection parameter corresponding to the current contact obtained by the mapping relationship between the contact retrieved by the retrieving module 23 and the detection parameter in the result signal, and send the comparison result to the storage module 25;
correspondingly, the storage module 25 is further configured to update the stored audio characteristic parameters corresponding to the contact and the stored detection parameters corresponding to the contact when the comparison result sent by the comparison module is that the voice quality is good.
Further, the apparatus further includes a detection module 28, configured to detect an input voice data packet, and send the voice data packet to the transceiver module 21;
correspondingly, the transceiver module 21 is configured to send the voice data packet sent by the detection module 28 to the voice quality detection device on the network side.
Fig. 3 is a schematic flow chart of a call voice adjustment method according to an embodiment of the present invention, as shown in fig. 3, including the following steps:
step 301 to step 303: detecting an input voice data packet, sending the voice data packet to a voice quality detection device at a network side for voice quality detection, receiving a returned voice quality detection result signal, and executing the step 304 to the step 309 when the result signal shows that the current voice quality is good; when the result signal indicates that the current voice quality is poor, executing step 310 to step 313;
here, the voice quality detection device on the network side may set a standard value or a value range to detect whether the voice quality is good according to the existing method for detecting the voice quality by the device on the network side;
the parameters specifically detected include parameters that can indicate the voice quality, such as signal-to-noise ratio, distortion degree, noise transmission and suppression degree, and the like.
Step 304: judging whether the contact person of the current call is the contact person of the first call, if so, executing the step 305 to the step 306; if the judgment result is negative, executing step 307 to step 309;
step 305 to step 306: extracting the audio characteristic parameters of the voice, storing the mapping relation between the contact persons and the audio characteristic parameters, and ending the processing flow;
step 307 to step 308: retrieving the mapping relation between the contact and the detection parameters in the result signal, acquiring the detection parameters corresponding to the current contact, judging whether the voice quality represented by the current result signal is better than the voice quality represented by the stored detection parameters, if so, executing step 309, otherwise, not executing any operation;
step 309: extracting the audio characteristic parameters of the voice, updating the stored audio characteristic parameters corresponding to the contact persons and the stored detection parameters corresponding to the contact persons, and ending the processing flow;
here, if the contact of the current call is not the contact of the first call, the stored detection parameters corresponding to the current contact are compared with the detection parameters in the current result signal, specifically, parameters such as a signal-to-noise ratio, a distortion degree, a noise transmission degree, a suppression degree and the like in the detection parameters can be calculated by a weighting algorithm according to a preset importance degree, an average value of two times is obtained, and the speech quality of the two times of calls is compared according to the average value, the comparison process is the prior art, and is not repeated herein. If the current call voice quality is better, updating the stored audio characteristic parameters corresponding to the contact persons and the stored detection parameters corresponding to the contact persons so as to optimize the audio characteristic parameters, improve the voice fidelity and control the data storage capacity;
the audio characteristic parameters comprise parameters capable of representing voice characteristics, such as spectrum combination, spectrum envelope and the like.
Step 310: judging whether the contact person currently in communication is the contact person in the first communication, if so, executing step 311; if the determination result is negative, go to step 312-step 313;
step 311: adjusting the call voice according to the preset audio characteristic parameters, and ending the processing flow;
here, the preset audio characteristic parameter is a default audio characteristic parameter preset in a certain usage mode, such as a handheld mode, a headset mode, a hands-free mode, and the like.
Step 312 to step 313: retrieving a mapping relation between a stored contact and an audio characteristic parameter, acquiring the audio characteristic parameter corresponding to the contact, and adjusting the call voice according to the audio characteristic parameter;
specifically, a finite impulse response or wireless impulse response filter is mainly set according to the spectrum combination in the audio characteristic parameter, when the low frequency component is insufficient, the low frequency component is increased, when the high frequency component is lacked, the high frequency component is supplemented at the corresponding frequency point, and simultaneously, the high frequency noise part is suppressed, so that the response curve and the spectrum characteristic in the audio characteristic parameter are as close as possible.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, and improvement made within the spirit and scope of the present invention are included in the protection scope of the present invention.