Adaptive speech codec adjustment method, apparatus, device and medium
By using real-time voice quality detection and adaptive voice codec adjustment algorithms, the problem of deteriorating call quality caused by changes in channel quality has been solved, and intelligent adjustment of voice codec type has been achieved, thereby improving call quality and user experience.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2026-04-07
AI Technical Summary
In current voice communication, when the channel quality changes dynamically, the voice device cannot adaptively adjust the voice codec in real time, resulting in poor voice quality and affecting user experience.
The current channel conditions are detected by a real-time intelligent voice measurement algorithm. Based on the voice quality detection results, the voice codec type is adaptively adjusted, including obtaining encoding and decoding samples, constructing a set of available codec types, and selecting the codec type with the highest priority for switching.
It improved call quality, enhanced user experience, and resolved the codec mismatch issue caused by changes in channel quality.
Smart Images

Figure CN115910078B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of speech coding and decoding, and particularly relates to an adaptive speech coding and decoding adjustment method, device, equipment and medium. BACKGROUND
[0002] Voice communication is an important communication mode. In voice communication, voice analog signals are converted into digital signals through sampling and quantization, encoded, transmitted to the network through a communication module, decoded by a voice terminal at the other end, and finally converted into voice analog signals for playing.
[0003] Speech signals contain a large amount of redundancy, that is, some parts of the signal do not contain information, and some can be estimated according to the correlation of the amplitudes of adjacent sample values of the speech signal. Through speech signal digitization and coding, the spectrum of the signal can be compressed, and the system bandwidth occupied by the speech data during transmission can be reduced. There are many types of coding, and various coding has different speech coding quality and anti-interference ability. There are three major categories of waveform coding, parameter coding and hybrid coding. Waveform coding is a digital voice signal formed by sampling, quantizing and coding the waveform signal of analog voice in the time domain. Parameter coding is based on the pronunciation mechanism of human language to find characteristic parameters representing speech, and encodes the characteristic parameters. Hybrid coding integrates the high quality of waveform coding and the high efficiency of parameter coding into one, and adds certain waveform coding features on the basis of parameter coding to improve the naturalness on the basis of intelligibility. Under the three categories, the coding types are further subdivided into multiple subcategories.
[0004] In the current voice communication process, the channel quality (especially short wave, satellite and other wireless channels) is always in dynamic change, and when the channel quality changes, the voice device still uses the speech coding and decoding specified in the call process, which cannot be adjusted in real time, affecting the call experience. When the channel quality deteriorates (network congestion intensifies, packet loss increases, transmission rate slows down, and delay increases), it is not possible to select a speech coding algorithm with good anti-interference performance; when the channel quality improves (network congestion eases, packet loss decreases, transmission rate increases, and delay decreases), it is not possible to select a speech coding algorithm that can have better voice quality.
[0005] Current voice devices cannot intelligently detect the call voice quality in real time during voice communication, and cannot adaptively adjust the speech coding type in real time, causing the problem of poor call voice quality, affecting user experience. SUMMARY
[0006] The application aims at overcoming the defects of the prior art, and provides a self-adaptive speech coding adjustment method, device, equipment and medium, which detects the voice quality under the current channel condition by using a real-time intelligent voice measurement algorithm, and adjusts the speech coding type based on the voice quality detection result, so as to improve the voice quality of the call and improve the user experience.
[0007] The application aims at overcoming the defects of the prior art, and provides a self-adaptive speech coding adjustment method, device, equipment and medium, which detects the voice quality under the current channel condition by using a real-time intelligent voice measurement algorithm, and adjusts the speech coding type based on the voice quality detection result, so as to improve the voice quality of the call and improve the user experience.
[0008] A self-adaptive speech coding adjustment method, which is applied to a call stage of a voice communication system, and comprises the following steps:
[0009] Step S100: obtaining the coding sample of a voice sending end and the corresponding decoding sample of a voice receiving end;
[0010] Step S200: judging whether the voice quality detection of all the speech decoding types supported by the voice receiving end is completed, if yes, entering step S400, and if no, entering step S300;
[0011] Step S300: performing the voice quality detection on the speech decoding types supported by the voice receiving end but not subjected to the voice quality detection, and judging whether the voice quality of the speech decoding types not subjected to the voice quality detection meets the preset requirement under the current channel condition;
[0012] Step S400: constructing the available coding type set of the voice sending end and the available coding type set of the voice receiving end;
[0013] Step S500: judging whether the available coding type set of the voice sending end and the available coding type set of the voice receiving end have an intersection, if no, keeping the original speech coding type unchanged, and if yes, entering step S600;
[0014] Step S600: selecting the speech coding type with the highest priority in the intersection as the optimal speech coding type;
[0015] Step S700: judging whether the optimal speech coding type is the same as the speech coding type used in the current communication, if yes, keeping the original speech coding type unchanged, and if no, the voice sending end and the voice receiving end interactively update the speech coding type, and the optimal speech coding type is used in the voice communication.
[0016] Further, the obtaining of the coding sample of the voice sending end and the corresponding decoding sample of the voice receiving end specifically comprises:
[0017] The microphone records for a period of time, and the voice analog signal is quantized into pulse modulation coding voice data through sampling.
[0018] The speech coding is performed to obtain coded samples, and the coded samples are directly decoded within the processor to obtain decoded samples.
[0019] Further, the judging whether the speech decoding type which has not been subjected to the voice quality detection meets the preset requirement in the current channel condition specifically comprises:
[0020] Measuring the similarity between the pulse modulation coded voice data and the decoded samples;
[0021] According to the similarity and the preset threshold, it is judged whether the speech decoding type which has not been subjected to the voice quality detection meets the preset requirement in the current channel condition.
[0022] Further, the priority of the speech coding and decoding type is defined by the user.
[0023] Further, the voice sending end and the voice receiving end interactively update the speech coding and decoding type, and the optimal speech coding and decoding type is used in the speech communication, which specifically comprises:
[0024] The voice sending end uses the optimal speech coding and decoding type to code the next frame of the current communication, and sends a coding and decoding type update identifier to the voice receiving end;
[0025] After receiving the coding and decoding type update identifier, the voice receiving end uses the new coding and decoding type to decode the voice data of the current frame and the subsequent frames.
[0026] On the other hand, the application further provides an adaptive speech coding and decoding adjustment device, which is used to realize the foregoing method, and specifically comprises:
[0027] A coding and decoding sample acquisition module is used to realize step S100: acquiring coded samples of a voice sending end and corresponding decoded samples of a voice receiving end;
[0028] A voice quality detection completion judging module is used to realize step S200: judging whether voice quality detection has been completed for all speech decoding types supported by the voice receiving end, and if the voice quality detection has been completed for all the speech decoding types, step S400 is entered, and if the voice quality detection has not been completed for all the speech decoding types, step S300 is performed;
[0029] A voice quality detection module is used to realize step S300: performing voice quality detection on a speech decoding type which is supported by the voice receiving end but has not been subjected to the voice quality detection, and judging whether the speech decoding type which has not been subjected to the voice quality detection meets a preset requirement in a current channel condition;
[0030] A codec type set construction module is configured to implement step S400 of constructing the available codec type set of the voice sending end and the available codec type set of the voice receiving end.
[0031] A codec type intersection judgment module is configured to implement step S500 of judging whether the available codec type set of the voice sending end and the available codec type set of the voice receiving end have an intersection, and if not, keeping the original speech codec type unchanged, and if yes, entering step S600.
[0032] A codec type selection module is configured to implement step S600 of selecting the speech codec type with the highest priority in the intersection as the optimal speech codec type.
[0033] A codec type switching module is configured to implement step S700 of judging whether the optimal speech codec type is the same as the speech codec type used in the current communication, and if yes, keeping the original speech codec type unchanged, and if not, the voice sending end and the voice receiving end interactively updating the speech codec type, and using the optimal speech codec type in the voice communication.
[0034] In another aspect, the present application further provides a computer device, which comprises a processor and a memory, and the memory stores a computer program, which is loaded and executed by the processor to implement any of the above adaptive speech codec adjustment methods.
[0035] In another aspect, the present application further provides a computer readable storage medium, which stores a computer program, and the computer program is loaded and executed by a processor to implement any of the above adaptive speech codec adjustment methods.
[0036] The present application has the following advantages:
[0037] The adaptive speech codec adjustment method, device, equipment and medium provided by the present application can solve the problem of poor voice quality in voice communication caused by mismatched speech codec due to changes in channel quality, detect the voice quality under the current channel condition by using a real-time voice quality detection algorithm, and adjust the speech codec type adaptively based on the voice quality detection result by using an intelligent adaptive speech codec adjustment algorithm, thereby improving the voice quality in communication and improving the communication experience. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is a flowchart of the adaptive speech codec adjustment method provided by the present application;
[0039] Figure 2is a structural block diagram of a voice communication system provided by an embodiment of the present application;
[0040] Figure 3 is a schematic diagram of voice sending frame data structure of an embodiment of the present application;
[0041] Figure 4 is a schematic diagram of voice data flow of an embodiment of the present application;
[0042] Figure 5 is a structural block diagram of an adaptive speech codec adjustment device provided by an embodiment of the present application. DETAILED DESCRIPTION
[0043] The embodiments of the present application will be described in detail below with specific reference to specific examples. Those skilled in the art can easily understand other advantages and effects of the present application from the content disclosed in the specification. The present application can also be implemented or applied by different specific embodiments, and various modifications or changes can be made to the details in the specification without departing from the spirit of the present application. It should be noted that the following embodiments and features in the embodiments can be combined with each other without conflict.
[0044] All other embodiments obtained by those skilled in the art without creative labor on the basis of the embodiments in the present application belong to the scope of protection of the present application.
[0045] In the current voice communication process, the channel quality (especially short wave, satellite and other wireless channels) is always in dynamic change, and when the channel quality changes, the voice device still uses the speech codec specified in the call process and cannot be adjusted in real time, which affects the call experience. When the channel quality deteriorates (network congestion intensifies, more packets are lost, transmission rate slows down, and time delay becomes larger), it is not possible to select a speech codec algorithm with good anti-interference performance; when the channel quality improves (network congestion is reduced, packet loss is reduced, transmission rate is increased, and time delay is reduced), it is not possible to select a speech codec algorithm that can have better voice quality.
[0046] The current voice device cannot intelligently detect the call voice quality in the voice communication process in real time, and cannot adaptively adjust the speech codec type in real time, which causes the problem of poor call voice quality and affects the user experience.
[0047] In order to solve the above technical problems, the following embodiments of the adaptive speech codec adjustment method, device, equipment and medium are proposed.
[0048] Embodiment 1
[0049] The embodiment provides an adaptive speech codec adjustment method, and the basic working principle of the method is as follows:
[0050] In voice communication, the voice analog signal is sent to the network through sampling and quantization, encoding, and a communication module, decoded at the other end of the voice terminal, and finally converted into a voice analog signal for playing the voice.
[0051] Speech signals contain a large amount of redundancy, that is, some parts of the signal do not contain information, and some can be estimated according to the correlation of the amplitudes of adjacent sample values of the speech signal. Through speech signal digitization and coding, the spectrum of the signal can be compressed to reduce the system bandwidth occupied by the speech data during transmission. There are many types of coding, and various coding has different voice coding quality and anti-interference ability. There are three types of waveform coding, parameter coding, and hybrid coding. Waveform coding is a digital voice signal formed by sampling, quantization, and encoding of the time-domain analog voice waveform signal. Parameter coding is based on the pronunciation mechanism of human language to find characteristic parameters representing the speech, and to encode the characteristic parameters. Hybrid coding integrates the high quality of waveform coding and the high efficiency of parameter coding, and adds certain waveform coding features based on parameter coding to improve the naturalness on the basis of intelligibility.
[0052] The embodiment is based on the real-time detection result of voice quality detection, and realizes adaptive adjustment of the speech coding and decoding type through the voice quality detection result.
[0053] The embodiment provides a typical application example, which refers to Figure 2 As shown in Figure 2 The structure block diagram of the voice communication system provided by the embodiment is shown. The real-time voice quality detection algorithm module detects the voice quality by adding coding samples in the coded data of the local voice terminal and using the decoded data of the other end. The intelligent adaptive speech coding and decoding adjustment algorithm realizes adaptive adjustment of the speech coding and decoding type according to the voice quality detection result. The intelligent adjustment of the speech coding and decoding type is performed only once in each call process during the speech call stage after the voice terminal is connected.
[0054] The structure block diagram of the voice communication system provided by the embodiment is shown. The real-time voice quality detection algorithm module detects the voice quality by adding coding samples in the coded data of the local voice terminal and using the decoded data of the other end. The intelligent adaptive speech coding and decoding adjustment algorithm realizes adaptive adjustment of the speech coding and decoding type according to the voice quality detection result. The intelligent adjustment of the speech coding and decoding type is performed only once in each call process during the speech call stage after the voice terminal is connected. Figure 1 As shown in Figure 1 The adaptive speech coding and decoding adjustment method provided by the embodiment is shown. The method specifically includes the following steps:
[0055] Step S100: acquiring coding samples of a voice sending end and corresponding decoding samples of a voice receiving end;
[0056] Step S200: judging whether voice quality detection of all speech decoding types supported by the voice receiving end is completed, if yes, entering step S400, and if no, performing step S300;
[0057] Step S300: voice quality detection is performed on the speech decoding type which is supported by the voice receiving end but not subjected to voice quality detection, and it is determined whether the voice quality of the speech decoding type not subjected to voice quality detection meets the preset requirement under the current channel condition;
[0058] Step S400: a set of available codec types of the voice sending end and a set of available codec types of the voice receiving end are constructed;
[0059] Step S500: it is determined whether the set of available codec types of the voice sending end and the set of available codec types of the voice receiving end have intersection, if not, the original speech codec type is kept unchanged, if yes, step S600 is entered;
[0060] Step S600: the speech codec type with the highest priority in the intersection is selected as the optimal speech codec type;
[0061] Step S700: it is determined whether the optimal speech codec type is the same as the speech codec type used in the current communication, if yes, the original speech codec type is kept unchanged, if not, the voice sending end and the voice receiving end interactively update the speech codec type, and the optimal speech codec type is used in the voice communication.
[0062] Referring to Figure 3 As shown in Figure 3 , it is a schematic diagram of voice sending frame data structure in the embodiment. In the embodiment, the encoded samples are attached to the tail of the encoded voice data, and are transmitted to the opposite voice terminal through the network. The opposite voice terminal decodes the encoded samples, and compares the decoded data with the decoded samples to obtain the current voice quality detection result.
[0063] Referring to Figure 4 As shown in Figure 4 , it is a schematic diagram of voice data flow in the embodiment. PCM is the full name of Pulse-Code Modulation, i.e. pulse modulation coding. PCM voice data refers to pulse modulation coding voice data, and PCM is a method for representing analog signals by data.
[0064] The codec types supported by the voice terminal need to be tested for voice quality detection. The codec type currently subjected to voice quality detection in the codec types supported by the voice terminal is named as CODEC_TEST speech codec type.
[0065] The voice analog signal is quantized by sampling to PCM voice data, CODEC_TEST voice encoding is performed to generate CODEC_TEST encoded voice data, and then the CODEC_TEST encoded voice data is sent to the network through the communication module. The CODEC_TEST encoded voice data is received by the voice terminal at the other end, CODEC_TEST decoding is performed, PCM voice signal is obtained, and then the PCM voice signal is converted to voice analog signal for playing voice.
[0066] In order to obtain the CODEC_TEST encoded sample and the CODEC_TEST decoded sample, the voice analog signal is quantized by sampling to PCM voice data, and then CODEC_TEST voice encoding is performed to obtain the CODEC_TEST encoded sample (A0-An). The CODEC_TEST encoded voice data is directly decoded in the processor to obtain the CODEC_TEST decoded PCM voice data sample (G0-Gn), which is the CODEC_TEST decoded sample. The various types of encoding and decoding samples need to be preset in the voice terminal. The recording time of the encoding and decoding samples is k seconds, and the specific value of k is set by the user.
[0067] In the embodiment, whether the voice quality of the voice decoding type which has not been detected meets the preset requirement under the current channel condition is determined in the following manner:
[0068] After being transmitted through the communication network, the encoded sample data (a0, a1, a2,..., an) is separated from the received data at the voice terminal at the other end, and the PCM voice data (g0, g1, g2,..., gn) is obtained by CODEC_TEST decoding.
[0069] The similarity between the PCM voice data (g0-gn) and the CODEC_TEST decoded sample (G0-Gn) is measured by "Psum", and Psum is defined as
[0070] Dx = |gx-Gx|, where x = 0-n;
[0071] Psum = D0+D1+…+Dn;
[0072] V_max represents the maximum value of the PCM voice data (4095 if 13-bit linear PCM is used), and V_min represents the minimum value of the PCM voice data (-4096 if 13-bit linear PCM is used).
[0073] When Dx / V_max < 1% (x = 0~n) and Psum / V_max < 5%, then it is determined that the CODEC_TEST speech codec is good in voice quality under the current channel quality, and is an available speech codec, otherwise is unavailable.
[0074] All speech codec types supported by the voice terminal are traversed, and it is determined whether it is an available speech codec under the current channel quality.
[0075] In the embodiment, the priority of the speech codec type supported by the voice terminal is set by the user.
[0076] After the calling voice terminal and the called voice terminal are traversed to send all speech codecs supported by the current voice terminal through the real-time voice quality detection algorithm module for detection and determination, the calling voice terminal and the called voice terminal processor respectively obtain the calling voice terminal available codec type set Host_Codec_Available_Set = {CodecHost_1, CodecHost_2, …} and the called voice terminal available speech codec type set Client_Codec_Available_Set = {CodecClient_1, CodecClient_2, …} under the current channel environment. The called voice terminal sends the current available called voice terminal speech codec type set Client_Codec_Available_Set to the calling voice terminal. The calling voice terminal adjusts the intelligent speech codec type by using the calling terminal available codec type set Host_Codec_Available_Set and the called terminal available speech codec type set Client_Codec_Available_Set.
[0077] In specific applications, the following two scenarios may occur:
[0078] Scenario one:
[0079] When the calling voice terminal and the called voice terminal do not have the same available speech codec type (i.e., Host_Codec_Available_Set and Client_Codec_Available_Set have no intersection), the speech codec type of the current call remains unchanged, the calling voice terminal sends the "non-update identifier" to the called voice terminal, and the intelligent speech codec adjustment process is ended.
[0080] Scenario two:
[0081] When the calling voice terminal and the called voice terminal have one or more same available speech codec types (i.e., Host_Codec_Available_Set intersects with Client_Codec_Available_Set), a common available speech codec set Common_Codec_Available_Set = {CodecHost_1, …} is obtained.
[0082] If the speech codec type with the highest priority in Common_Codec_Available_Set is the same as the currently used speech codec type, the speech codec type of the current call remains unchanged, the calling voice terminal sends a "non-updating identifier" to the called voice terminal, and the speech codec intelligent adjustment process is ended.
[0083] If the speech codec type with the highest priority in Common_Codec_Available_Set is different from the currently used speech codec type, the speech codec type with the highest priority in Common_Codec_Available_Set is selected as the speech codec type of the current call, and the updated speech codec type is used for encoding in the next frame, and a "codec type updating identifier" is sent to the called voice terminal. After the called voice terminal receives the updating identifier, the new codec type is used for decoding operation on the current frame and subsequent speech data, and the updated speech codec type is used for encoding in the next frame, and a "codec type updating identifier" is fed back to the calling terminal. After the calling voice terminal receives the updating identifier, the new codec type is used for decoding operation on the current frame and subsequent speech data, and the speech codec intelligent adjustment process is ended.
[0084] The adaptive speech codec adjustment method provided in the embodiment can solve the problem of poor call voice quality caused by mismatch of speech codec due to change of channel quality in voice call. The real-time voice quality detection algorithm is used to detect the voice quality under the current channel condition, and based on the voice quality detection result, the intelligent adaptive speech codec adjustment algorithm is used to adaptively adjust the speech codec type, so as to improve the call voice quality and improve the call experience.
[0085] Embodiment 2
[0086] Referring to Figure 5 As Figure 5 shown is a structure block diagram of an adaptive speech codec adjustment device provided in the embodiment, which specifically comprises:
[0087] The codec sample acquisition module 10 is configured to implement step S100 of acquiring the encoding sample of the voice sending end and the corresponding decoding sample of the voice receiving end.
[0088] The voice quality detection completion judging module 20 is configured to implement step S200, i.e., judging whether the voice quality detection for all the speech decoding types supported by the voice receiving end is completed, and if yes, proceeding to step S400, or if not, proceeding to step S300.
[0089] The voice quality detection module 30 is configured to implement step S300, i.e., performing voice quality detection on the speech decoding types supported by the voice receiving end but not yet subjected to voice quality detection, and judging whether the voice quality of the speech decoding types not yet subjected to voice quality detection meets the preset requirement under the current channel condition.
[0090] The codec type set construction module 40 is configured to implement step S400, i.e., constructing the available codec type set of the voice sending end and the available codec type set of the voice receiving end.
[0091] The codec type intersection judging module 50 is configured to implement step S500, i.e., judging whether the available codec type set of the voice sending end and the available codec type set of the voice receiving end have intersection, and if not, keeping the original speech codec type unchanged, or if yes, proceeding to step S600.
[0092] The codec type selecting module 60 is configured to implement step S600, i.e., selecting the speech codec type with the highest priority in the intersection as the optimal speech codec type.
[0093] The codec type switching module 70 is configured to implement step S700, i.e., judging whether the optimal speech codec type is the same as the speech codec type used in the current communication, and if yes, keeping the original speech codec type unchanged, or if not, the voice sending end and the voice receiving end interactively updating the speech codec type, and using the optimal speech codec type in the voice communication.
[0094] The self-adaptive speech codec adjustment device provided in the embodiment has the beneficial effects of the self-adaptive speech codec adjustment method provided in the embodiments, which are described in the foregoing embodiments and will not be repeated here.
[0095] Embodiment 3
[0096] The preferred embodiment provides a computer device, which can implement the steps in any of the embodiments of the self-adaptive speech codec adjustment method provided in the embodiments, and thus can implement the beneficial effects of the self-adaptive speech codec adjustment method provided in the embodiments, which are described in the foregoing embodiments and will not be repeated here.
[0097] Embodiment 4
[0098] Those skilled in the art can understand that all or part of the steps of various methods in the above embodiments can be completed by instructions or by controlling relevant hardware by the instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor. To this end, the embodiments of the present application provide a storage medium, which stores a plurality of instructions capable of being loaded by a processor to execute the steps of any embodiment of the adaptive speech codec adjustment method provided by the embodiments of the present application.
[0099] The storage medium can include a read only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0100] Since the instructions stored in the storage medium can execute the steps in any embodiment of the adaptive speech codec adjustment method provided by the embodiments of the present application, the beneficial effects of any adaptive speech codec adjustment method provided by the embodiments of the present application can be achieved, which are described in detail in the foregoing embodiments and will not be described here.
[0101] The above only describes the preferred embodiments of the present application and is not intended to limit the present application. Any modification, equivalent replacement and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.
Claims
1. An adaptive speech codec adjustment method, the method being applied to the call phase of a voice communication system, characterized in that, The method includes: Step S100: Obtain the encoded sample from the voice transmitter and the corresponding decoded sample from the voice receiver; Step S200: Determine whether voice quality detection has been completed for all voice decoding types supported by the voice receiver. If all have been completed, proceed to step S400; otherwise, proceed to step S300. Step S300: Perform voice quality detection on the voice decoding types that the voice receiver supports but has not performed voice quality detection on, and determine whether the voice quality of the voice decoding types that have not performed voice quality detection meets the preset requirements under the current channel conditions; Step S400: Construct the set of available codec types for the voice transmitting end and the set of available codec types for the voice receiving end; Step S500: Determine whether there is an intersection between the set of available codec types at the voice transmitting end and the set of available codec types at the voice receiving end. If there is no intersection, keep the original voice codec type unchanged. If there is an intersection, proceed to step S600. Step S600: Select the speech codec type with the highest priority in the intersection as the optimal speech codec type; Step S700: Determine whether the optimal voice codec type is the same as the voice codec type used in the current communication. If they are the same, keep the original voice codec type unchanged. If they are different, the voice transmitting end and the voice receiving end will interactively update the voice codec type and use the optimal voice codec type in the voice communication. The acquisition of the encoded sample from the voice transmitter and the corresponding decoded sample from the voice receiver specifically includes: After the microphone records for a period of time, the analog voice signal is sampled and quantized into pulse modulation coded voice data. Speech encoding is performed to obtain encoded samples, and the encoded samples are directly decoded inside the processor to obtain decoded samples; The determination of whether the voice quality of the speech decoding type that has not undergone voice quality detection meets the preset requirements under the current channel conditions specifically includes: Encoded samples are appended to encoded voice data and transmitted to the voice receiver via a communication network. The voice receiver decodes the encoded samples to obtain decoded data and measures the similarity between the decoded data and the decoded samples. Based on similarity and a preset threshold, it is determined whether the voice quality of the speech decoding type that has not undergone voice quality detection meets the preset requirements under the current channel conditions.
2. The adaptive speech codec adjustment method as described in claim 1, characterized in that, The priority of the voice codec type is defined by the user.
3. The adaptive speech codec adjustment method as described in claim 1, characterized in that, The interactive updating of the speech codec type between the voice transmitting end and the voice receiving end, and the use of the optimal speech codec type in voice communication specifically includes: The voice transmitting end encodes the next frame of the current communication using the optimal voice codec type and sends a codec type update identifier to the voice receiving end. After receiving the codec type update flag, the voice receiver uses the new codec type to decode the current frame and subsequent voice data.
4. An adaptive speech codec adjustment device, characterized in that, The apparatus is used to implement the method of claim 1, and the apparatus specifically includes: The encoding / decoding sample acquisition module is used to implement step S100: acquiring the encoded sample from the voice transmitting end and the corresponding decoded sample from the voice receiving end; The voice quality detection completion judgment module is used to implement step S200: determine whether voice quality detection has been completed for all voice decoding types supported by the voice receiver. If all have been completed, proceed to step S400; if not all have been completed, proceed to step S300. The voice quality detection module is used to implement step S300 to perform voice quality detection on the voice decoding types that the voice receiver supports but has not performed voice quality detection, and to determine whether the voice quality of the voice decoding types that have not performed voice quality detection meets the preset requirements under the current channel conditions. The codec type set construction module is used to implement step S400 to construct the available codec type set of the voice transmitting end and the available codec type set of the voice receiving end; The codec type intersection judgment module is used to implement step S500: determine whether there is an intersection between the available codec type set of the voice transmitting end and the available codec type set of the voice receiving end. If there is no intersection, the original voice codec type remains unchanged. If there is an intersection, proceed to step S600. The codec type selection module is used to implement step S600: selecting the speech codec type with the highest priority in the intersection as the optimal speech codec type; The codec type switching module is used to implement step S700: determine whether the optimal voice codec type is the same as the voice codec type used in the current communication. If they are the same, the original voice codec type is kept unchanged. If they are different, the voice transmitting end and the voice receiving end interact to update the voice codec type and use the optimal voice codec type in the voice communication.
5. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing a computer program, which is loaded and executed by the processor to implement the adaptive speech codec adjustment method as described in any one of claims 1-3.
6. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which is loaded and executed by a processor to implement the adaptive speech codec adjustment method as described in any one of claims 1-3.
Citation Information
Patent Citations
AMR-WB coding method and encoder
CN101359474A
Method and system for encoding and decoding algorithm dynamic negotiation of SIP terminal
CN101483494A