Audio transcoding method, device, audio transcoder, equipment and storage medium
Through the combination of entropy decoding and entropy coding, the problem of high complexity of the audio transcoding process is solved, the transcoding speed and efficiency are improved, the requirements of different network bandwidths are adapted, and real-time voice chat support is achieved.
Patent Information
- Application Number
- CN202111619099.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-02-26
- Filing Date
- 2021-12-27
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2041-12-27
AI Technical Summary
The existing audio transcoding process is highly complex, resulting in slow speed and low efficiency, and cannot effectively adapt to the real-time needs of users with different network bandwidths in voice chat.
Use entropy decoding to obtain audio feature parameters and excitation signals, re-quantize based on the time domain signal and the target transcoding code rate, and entropy encode it to generate an audio stream with a lower code rate, reducing the processing of the time domain signal to improve Operational efficiency.
On the premise of ensuring sound quality, the speed and efficiency of audio transcoding are significantly improved, adapting to the needs of different network bandwidths, and realizing the normal progress of real-time voice chat.
Smart Images

Figure CN115050377B_ABST
Abstract
Description
[0001] This application claims priority to Chinese patent application No. 202110218868.9 filed on February 26, 2021, with invention name “Audio transcoding method, apparatus, audio transcoder, device and storage medium”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of audio processing, and in particular to an audio transcoding method, apparatus, audio transcoder, device and storage medium. Background Art
[0003] With the development of network technology, more and more users are conducting voice chats through social applications.
[0004] In the related technology, since the network bandwidth of different users is different, during the process of users conducting voice chat, social applications need to transcode the transmitted audio. For example, if a user's network bandwidth is low, then the audio needs to be transcoded, that is, the audio bit rate needs to be reduced to ensure that the user can conduct voice chat normally.
[0005] However, during the audio transcoding process, the transcoding complexity is high, resulting in slow audio transcoding speed and low efficiency. Summary of the invention
[0006] The embodiments of the present application provide an audio transcoding method, apparatus, audio transcoder, device and storage medium, which can improve the speed and efficiency of audio transcoding. The technical solution is as follows:
[0007] In one aspect, a method for audio transcoding is provided, the method comprising:
[0008] Performing entropy decoding on a first audio stream of a first bit rate to obtain an audio feature parameter and an excitation signal of the first audio stream, wherein the excitation signal is a quantized speech signal;
[0009] Based on the audio feature parameter and the excitation signal, obtaining a time domain audio signal corresponding to the excitation signal;
[0010] Re-quantizing the excitation signal and the audio feature parameter based on the time-domain audio signal and the target transcoding bit rate;
[0011] The requantized audio feature parameters and the requantized excitation signal are entropy encoded to obtain a second audio stream at a second bit rate, where the second bit rate is lower than the first bit rate.
[0012] On the one hand, an audio transcoder is provided, the audio transcoder comprising: an entropy decoding unit, a time domain decoding unit, a quantization unit and an entropy coding unit, wherein the entropy decoding unit is connected to the time domain decoding unit and the quantization unit respectively, the time domain decoding unit is connected to the quantization unit, and the quantization unit is connected to the entropy coding unit;
[0013] The entropy decoding unit is used to perform entropy decoding on the first audio stream of the first bit rate to obtain audio feature parameters and an excitation signal of the first audio stream, where the excitation signal is a quantized speech signal;
[0014] The time domain decoding unit is used to obtain a time domain audio signal corresponding to the excitation signal based on the audio feature parameter and the excitation signal;
[0015] The quantization unit is used to re-quantize the excitation signal and the audio feature parameter based on the time domain audio signal and the target transcoding bit rate;
[0016] The entropy coding unit is used to perform entropy coding on the requantized audio feature parameters and the requantized excitation signal to obtain a second audio stream at a second bit rate, where the second bit rate is lower than the first bit rate.
[0017] In a possible implementation, the quantization unit is used to determine a first candidate quantization parameter based on the target transcoding bit rate during any of the iterations; simulate the re-quantization process of the excitation signal and the audio feature parameter based on the first candidate quantization parameter to obtain a first signal corresponding to the excitation signal and a first parameter corresponding to the audio feature parameter; simulate the entropy coding process of the first signal and the first parameter to obtain a simulated audio stream; in response to the simulated audio stream meeting the first target condition, and at least one of the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the simulated audio stream, and the number of iterations meeting the second target condition, determine the first candidate quantization parameter as the first quantization parameter.
[0018] In a possible implementation manner, the analog audio stream meeting the first target condition refers to at least one of the following:
[0019] The bit rate of the analog audio stream is less than or equal to the target transcoding bit rate;
[0020] An audio stream quality parameter of the analog audio stream is greater than or equal to a quality parameter threshold.
[0021] In a possible implementation manner, at least one of the time-domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations meets the second target condition, which means that:
[0022] The similarity between the time-domain audio signal and the first signal is greater than or equal to a similarity threshold;
[0023] The difference between the target transcoding bit rate and the bit rate of the analog audio stream is less than or equal to a difference threshold;
[0024] The number of iterations is equal to the iteration number threshold.
[0025] In a possible implementation, the quantization unit is used to: respectively simulate the discrete cosine transform process of the excitation signal and the discrete cosine transform process of the audio feature parameter to obtain a second signal corresponding to the excitation signal and a second parameter corresponding to the audio feature parameter; respectively divide the second signal and the second parameter by the first alternative quantization parameter and then round them to obtain the first signal and the first parameter.
[0026] In a possible implementation, the quantization unit is further used to: in response to the analog audio stream not meeting the first target condition, or the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations not meeting the second target condition, use a second alternative quantization parameter determined based on the target transcoding bit rate as input for the next iteration process.
[0027] In a possible implementation, the entropy decoding unit is used to: obtain the occurrence probabilities of multiple coding units in the first audio stream; decode the first audio stream based on the occurrence probabilities to obtain multiple decoding units corresponding to the multiple coding units respectively; and combine the multiple decoding units to obtain audio feature parameters and excitation signals of the first audio stream.
[0028] In a possible implementation, the entropy coding unit is used to:
[0029] Obtaining the requantized audio feature parameters and the occurrence probabilities of multiple coding units in the requantized excitation signal;
[0030] Based on the occurrence probability, the multiple coding units are encoded to obtain the second audio stream.
[0031] In a possible implementation, the audio transcoder further includes a forward error correction module, which is connected to the entropy coding unit and is configured to perform forward error correction coding on a subsequently received audio stream based on the second audio stream.
[0032] In one aspect, an audio transcoding device is provided, the device comprising:
[0033] A decoding module, configured to perform entropy decoding on a first audio stream of a first bit rate to obtain an audio feature parameter and an excitation signal of the first audio stream, wherein the excitation signal is a quantized speech signal;
[0034] A time domain audio signal acquisition module, used to acquire a time domain audio signal corresponding to the excitation signal based on the audio feature parameter and the excitation signal;
[0035] A quantization module, configured to re-quantize the excitation signal and the audio feature parameter based on the time domain audio signal and the target transcoding bit rate;
[0036] The encoding module is used to perform entropy encoding on the requantized audio feature parameters and the requantized excitation signal to obtain a second audio stream with a second bit rate, where the second bit rate is lower than the first bit rate.
[0037] In a possible implementation, the quantization module is used to obtain a first quantization parameter based on the target transcoding bit rate through at least one iterative process, wherein the first quantization parameter is used to adjust the first bit rate of the first audio stream to the target transcoding bit rate; and re-quantize the excitation signal and the audio feature parameter based on the time domain audio signal and the first quantization parameter.
[0038] In a possible implementation, the quantization module is used to determine a first candidate quantization parameter based on the target transcoding bit rate during any of the iteration processes; simulate the re-quantization process of the excitation signal and the audio feature parameter based on the first candidate quantization parameter to obtain a first signal corresponding to the excitation signal and a first parameter corresponding to the audio feature parameter; simulate the entropy coding process of the first signal and the first parameter to obtain a simulated audio stream; in response to the simulated audio stream meeting the first target condition, and at least one of the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the simulated audio stream, and the number of iterations meeting the second target condition, determine the first candidate quantization parameter as the first quantization parameter.
[0039] In a possible implementation manner, the analog audio stream meeting the first target condition refers to at least one of the following:
[0040] The bit rate of the analog audio stream is less than or equal to the target transcoding bit rate;
[0041] An audio stream quality parameter of the analog audio stream is greater than or equal to a quality parameter threshold.
[0042] In a possible implementation manner, at least one of the time-domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations meets the second target condition, which means that:
[0043] The similarity between the time-domain audio signal and the first signal is greater than or equal to a similarity threshold;
[0044] The difference between the target transcoding bit rate and the bit rate of the analog audio stream is less than or equal to a difference threshold;
[0045] The number of iterations is equal to the iteration number threshold.
[0046] In a possible implementation, the quantization module is used to simulate the discrete cosine transform process of the excitation signal and the discrete cosine transform process of the audio feature parameter, respectively, to obtain a second signal corresponding to the excitation signal and a second parameter corresponding to the audio feature parameter; and to divide the second signal and the second parameter by the first alternative quantization parameter, respectively, and then round them to obtain the first signal and the first parameter.
[0047] In a possible implementation, the quantization module is further used to, in response to the analog audio stream not meeting the first target condition, or the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations not meeting the second target condition, use a second alternative quantization parameter determined based on the target transcoding bit rate as input for the next iteration process.
[0048] In a possible implementation, the decoding module is used to obtain the occurrence probabilities of multiple coding units in the first audio stream; decode the first audio stream based on the occurrence probabilities to obtain multiple decoding units corresponding to the multiple coding units respectively; and combine the multiple decoding units to obtain audio feature parameters and excitation signals of the first audio stream.
[0049] In a possible implementation, the encoding module is used to obtain the occurrence probabilities of multiple encoding units in the requantized audio feature parameters and the requantized excitation signal; and encode the multiple encoding units based on the occurrence probabilities to obtain the second audio stream.
[0050] In a possible implementation manner, the device further includes a forward error correction module, configured to perform forward error correction encoding on a subsequently received audio stream based on the second audio stream.
[0051] On the one hand, a computer device is provided, which includes one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, and the computer program is loaded and executed by the one or more processors to implement the audio transcoding method.
[0052] On the one hand, a computer-readable storage medium is provided, wherein at least one computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by a processor to implement the audio transcoding method.
[0053] On the one hand, a computer program product or a computer program is provided, which includes a program code, the program code is stored in a computer-readable storage medium, a processor of a computer device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the computer device performs the above-mentioned audio transcoding method.
[0054] Through the technical solution provided by the embodiment of the present application, when transcoding the audio stream, complete parameter extraction is not required, but entropy decoding is used to obtain audio feature parameters and excitation signals. When re-quantization is performed, the excitation signal and audio feature parameters are also performed, and no related processing of the time domain signal is involved. Finally, the excitation signal and the audio feature parameters are entropy encoded to obtain a second audio stream with a lower bit rate. Since the amount of computation of entropy decoding and entropy encoding is small, not processing the time domain signal can also greatly reduce the amount of computation, thereby improving the speed and efficiency of audio transcoding as a whole while ensuring the sound quality. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0056] Figure 1 is a schematic diagram of the structure of an encoder provided in an embodiment of the present application;
[0057] Figure 2 It is a schematic diagram of an implementation environment of an audio transcoding method provided in an embodiment of the present application;
[0058] Figure 3 is a flow chart of an audio transcoding method provided in an embodiment of the present application;
[0059] Figure 4 is a flow chart of an audio transcoding method provided in an embodiment of the present application;
[0060] Figure 5 is a schematic diagram of the structure of a decoder provided in an embodiment of the present application;
[0061] Figure 6 is a structural diagram of an audio transcoder provided in an embodiment of the present application;
[0062] Figure 7 It is a schematic diagram of a forward error correction coding method provided by an embodiment of the present application;
[0063] Figure 8 is a structural schematic diagram of an audio transcoding device provided in an embodiment of the present application;
[0064] Fig. 9 is a schematic diagram of the structure of a terminal provided in an embodiment of the present application;
[0065] Fig.10 It is a structural diagram of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0066] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0067] In this application, the terms "first", "second", etc. are used to distinguish identical or similar items with basically the same effects and functions. It should be understood that there is no logical or temporal dependency between "first", "second", and "nth", nor is there any limitation on quantity and execution order.
[0068] In the present application, the term "at least one" means one or more, and the term "plurality" means two or more.
[0069] Cloud Technology is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model. It can form a resource pool, which is used on demand and flexible and convenient. Cloud computing technology will become an important support. The backend services of the technical network system require a large amount of computing and storage resources, such as video websites, image websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, which needs to be transmitted to the backend system for logical processing. Data of different levels will be processed separately. All kinds of industry data need strong system backing support, which can only be achieved through cloud computing.
[0070] Cloud computing is a computing model that distributes computing tasks across a resource pool consisting of a large number of computers, enabling various application systems to obtain computing power, storage space, and information services as needed. The network that provides resources is called a "cloud". From the user's perspective, the resources in the "cloud" are infinitely scalable and can be accessed at any time, used on demand, expanded at any time, and paid for as needed.
[0071] As a provider of basic cloud computing capabilities, a cloud computing resource pool (referred to as a cloud platform, generally referred to as an IaaS (Infrastructure as a Service) platform) will be established, and various types of virtual resources will be deployed in the resource pool for external customers to choose to use. The cloud computing resource pool mainly includes: computing devices (virtualized machines, including operating systems), storage devices, and network devices.
[0072] According to the logical function division, the PaaS (Platform as a Service) layer can be deployed on the IaaS (Infrastructure as a Service) layer, and the SaaS (Software as a Service) layer can be deployed on the PaaS layer. SaaS can also be deployed directly on IaaS. PaaS is a platform for software operation, such as databases, web containers, etc. SaaS is a variety of business software, such as web portals, SMS mass senders, etc. Generally speaking, SaaS and PaaS are upper layers relative to IaaS.
[0073] Cloud conferencing is an efficient, convenient and low-cost conferencing format based on cloud computing technology. Users only need to use the Internet interface and perform simple and easy-to-use operations to quickly and efficiently share voice, data files and videos with teams and customers around the world. The cloud conferencing service provider helps users operate complex technologies such as data transmission and processing during the meeting.
[0074] At present, domestic cloud conferences are mainly concentrated on service content based on the SaaS (Software as a Service) model, including telephone, network, video and other service forms. Video conferencing based on cloud computing is called cloud conferencing.
[0075] In the era of cloud conferencing, data transmission, processing, and storage are all handled by the computer resources of video conferencing manufacturers. Users no longer need to purchase expensive hardware or install cumbersome software. They only need to open a browser and log in to the corresponding interface to conduct efficient remote meetings.
[0076] The cloud conference system supports dynamic cluster deployment of multiple servers and provides multiple high-performance servers, which greatly improves the stability, security and availability of conferences. In recent years, video conferencing has been welcomed by many users because it can greatly improve communication efficiency, continuously reduce communication costs, and upgrade internal management levels. It has been widely used in various fields such as transportation, finance, operators, education, and enterprises. There is no doubt that after the use of cloud computing, video conferencing has a stronger appeal in terms of convenience, speed, and ease of use, which will surely stimulate the arrival of a new wave of video conferencing applications.
[0077] Entropy coding: Entropy coding is the coding process that does not lose any information according to the entropy principle. Information entropy is the average amount of information in the source.
[0078] Quantization: refers to the process of approximating the continuous value of a signal (or a large number of possible discrete values) to a finite number (or fewer) of discrete values.
[0079] In-band forward error correction: In-band forward error correction, also known as forward error correction code (FEC), is a method of increasing the credibility of data communications. In a one-way communication channel, once an error is discovered, its receiver will no longer have the right to request transmission. FEC is a method of using data to transmit redundant information, which allows the receiver to reconstruct the data when an error occurs during transmission.
[0080] Audio coding is divided into two types: multi-rate coding and scalable coding. Scalable coding bitstream has the following characteristics: low bitrate bitstream is a subset of high bitrate bitstream. When the network is congested, only low bitrate core bitstream can be transmitted, which is more flexible. Multi-scale coding bitstream does not have this feature. But generally speaking, at the same bitrate, the decoding result of multi-scale coding bitstream will be better than that of scalable coding bitstream.
[0081] OPUS is one of the most widely used audio encoders. The OPUS encoder is a multi-scale encoder and cannot generate a segmentable bitstream like a scalable encoder. Figure 1 A schematic diagram of the structure of an OPUS encoder is provided. Figure 1It can be seen that when the OPUS encoder is used to encode audio, the OPUS encoder needs to perform voice activity detection (VAD), pitch processing, noise shaping, LTP (Long-Term Prediction) scaling control, gain processing, LSF (Line Spectral Frequency) quantization, prediction, pre-filtering, noise shaping quantization and interval coding on the audio. When audio transcoding is required, the OPUS decoder is required to first decode the encoded audio, and then the decoded audio is re-encoded through the OPUS encoder to change the audio bit rate. Since the OPUS encoder involves many steps for encoding, the encoding complexity is relatively high.
[0082] In the embodiments of the present application, the computer device may be provided as a terminal or a server. The implementation environment consisting of a terminal and a server will be introduced below.
[0083] Figure 2 is a schematic diagram of an implementation environment of an audio transcoding method provided in an embodiment of the present application, see Figure 2 , the implementation environment may include a terminal 210 and a server 240.
[0084] The terminal 210 is connected to the server 240 via a wireless network or a wired network. Optionally, the terminal 210 is a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, etc., but is not limited thereto. The terminal 210 has a social application installed and running.
[0085] Optionally, the server 240 is an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, distribution networks (Content Delivery Network, CDN), and big data and artificial intelligence platforms. In some embodiments, the server 240 can serve as the execution subject of the audio transcoding method provided in the embodiment of the present application, that is, the terminal 210 can collect audio signals, send the audio signals to the server 240, and the server 240 transcodes the audio signals and sends the transcoded audio to other terminals.
[0086] Optionally, terminal 210 refers to one of multiple terminals, and the embodiment of the present application only takes terminal 210 as an example.
[0087] Those skilled in the art will appreciate that the number of the above terminals may be more or less. For example, there may be only one terminal, or there may be dozens or hundreds of terminals, or a greater number, and the above implementation environment may also include other terminals. The embodiment of the present application does not limit the number and device type of the terminals.
[0088] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0089] After introducing the implementation environment of the embodiment of the present application, the application scenario of the embodiment of the present application will be introduced in combination with the above-mentioned implementation environment. In the following introduction, the terminal is the terminal 210 in the above-mentioned implementation environment, and the server is the server 240 in the above-mentioned implementation environment. The embodiment of the present application can be applied to various social applications, such as online conference applications, or instant messaging applications, or live broadcast applications, and the embodiment of the present application does not limit this.
[0090] In online conference applications, there are often multiple terminals, and online conference applications are installed on multiple terminals. The users of each terminal are all participants in an online conference. Multiple terminals are connected to the server through the network. In the process of conducting an online conference, the server can transcode the voice signals uploaded by each terminal, and then send the transcoded voice signals to multiple terminals, so that multiple terminals can play the voice signals, thereby realizing an online conference. Since the network environment in which multiple terminals are located may be different, in the process of the server transcoding the voice signal, the server can adopt the technical solution provided by the embodiment of the present application, convert the voice signal into different bit rates according to the network bandwidth of different terminals, and send the voice signals of different bit rates to different terminals, so as to ensure that different terminals can conduct online conferences normally, that is, for terminals with larger network bandwidth, the server can transcode the voice signal at a higher bit rate, and a higher bit rate also means higher voice quality, so that the larger bandwidth can be fully utilized to improve the quality of the online conference. For terminals with smaller network bandwidth, the server can transcode the voice signal at a lower bit rate, and a lower bit rate also means a smaller bandwidth occupancy, so that the voice signal can be sent to the terminal in real time, ensuring the normal online conference access of the terminal. In addition, due to network fluctuations, that is, for the same terminal, the network bandwidth may be larger at one time and smaller at another time. Then the server can also adjust the transcoding bit rate according to the fluctuation of the network to ensure the normal progress of the online meeting. In some embodiments, the online meeting is also called a cloud meeting.
[0091] In instant messaging applications, users can conduct voice chats by installing instant messaging applications on their terminals. Taking two users conducting voice chats through instant messaging applications as an example, instant messaging applications can obtain the voice signals of the two users during the chat through the terminals of the two users, send the voice signals to the server, and the server sends the voice signals to the two terminals respectively. The instant messaging application plays the voice signals through the terminals, so that the voice chat between the two users can be realized. Similar to the online conference scenario, the network environment in which the two parties in the voice chat are located may also be different, that is, one party has a larger network bandwidth and the other party has a smaller network bandwidth. In this case, the server can adopt the technical solution provided in the embodiment of the present application to transcode the voice signal, convert the voice signal to a suitable bit rate and then send it to the two terminals, thereby ensuring that the two users can conduct voice chats normally.
[0092] In live broadcast applications, the host end used by the host can collect the host's live voice signal, send the live voice signal to the live broadcast server, and the live broadcast server sends the live voice signal to the audience end used by different audiences. After receiving the live voice signal, the audience end plays the live voice signal, and the audience can hear the host's voice during the live broadcast. Since different audience ends may be in different network environments, the server can adopt the technical solution provided by the embodiment of the present application, and transcode the live voice signal according to the network environment in which different audience ends are located, that is, convert the live voice signal into different bit rates according to the different network bandwidths of the audience end, and send the voice signals of different bit rates to different audience ends, so as to ensure that different audience ends can play the live audio normally. That is, for the audience end with a larger network bandwidth, the server can transcode the live voice signal at a higher bit rate, and a higher bit rate also means a higher voice quality, so that the larger bandwidth can be fully utilized and the quality of the live broadcast can be improved. For the audience end with a smaller network bandwidth, the server can transcode the live voice signal at a lower bit rate, and a lower bit rate also means a smaller bandwidth occupancy, so that the live voice signal can be sent to the audience end in real time, and the audience end can watch the live broadcast normally. In addition, due to network fluctuations, that is, for the same viewer, the network bandwidth may be larger at one time and smaller at another time. Then the server can also adjust the transcoding bit rate according to the fluctuation of network bandwidth to ensure the normal live broadcast.
[0093] In addition to the above three application scenarios, the technical solution provided in the embodiments of the present application can also be applied to other audio transmission scenarios, such as in radio and television transmission scenarios, or in satellite communication scenarios, which is not limited by the embodiments of the present application.
[0094] Of course, the audio transcoding method provided in the embodiment of the present application can not only be used on the server as a cloud service, but also can be applied on the terminal, and the terminal can quickly transcode the audio. The embodiment of the present application does not limit the execution entity.
[0095] After introducing the implementation environment and application scenarios of the embodiments of the present application, the technical solutions provided by the embodiments of the present application are described below. In the following description, the subject of the audio transcoding method is taken as an example, see Figure 3 , methods include:
[0096] 301. The server performs entropy decoding on a first audio stream of a first bit rate to obtain audio feature parameters and an excitation signal of the first audio stream, where the excitation signal is a quantized speech signal.
[0097] In some embodiments, the first audio stream is a high-bitrate audio stream, and the audio feature parameters include signal gain, LSF (Line Spectral Frequency) parameters, LTP (Long-Term Prediction) parameters, and treble delay, etc. Quantization refers to the process of approximating the continuous value of a signal to a finite number of (or fewer) discrete values. The voice signal is a continuous signal, and the excitation signal obtained after quantization is also a discrete signal, which is convenient for the server to perform subsequent processing. In some embodiments, high bit rate refers to the bit rate of the audio stream uploaded by the terminal to the server. In other embodiments, high bit rate may also be a bit rate higher than a certain bit rate threshold, such as a bit rate threshold of 1Mbps, then a bit rate higher than 1Mbps is also called a high bit rate. Of course, in different coding standards, the definition of high bit rate may be different, and the embodiments of the present application do not limit this.
[0098] 302. The server obtains a time domain audio signal corresponding to the excitation signal based on the audio feature parameter and the excitation signal.
[0099] In some embodiments, the excitation signal is a discrete signal, and the server can restore the excitation signal to a time-domain audio signal based on the audio feature parameters for subsequent audio transcoding.
[0100] 303. The server re-quantizes the excitation signal and the audio feature parameters based on the time-domain audio signal and the target transcoding bit rate.
[0101] In some embodiments, requantization may also be referred to as noise shaping quantization (NSQ). The requantization process is also a compression process. The server requantizes the excitation signal and the audio feature parameters, which is a process of recompressing the excitation signal and the audio feature parameters.
[0102] 304. The server performs entropy coding on the requantized audio feature parameters and the requantized excitation signal to obtain a second audio stream at a second bit rate, where the second bit rate is lower than the first bit rate.
[0103] After the audio feature parameters and the excitation signal are re-quantized, the audio feature parameters and the excitation signal are re-compressed. The re-quantized audio feature parameters and the excitation are entropy encoded to directly obtain a second audio stream with a lower bit rate.
[0104] Through the technical solution provided by the embodiment of the present application, when transcoding the audio stream, it is not necessary to perform a complete parameter extraction process, but entropy decoding is used to obtain audio feature parameters and excitation signals. When re-quantization is performed, it is also performed on the excitation signal and audio feature parameters, and does not involve related processing of the time domain signal. Finally, the excitation signal and the audio feature parameters are entropy encoded to obtain a second audio stream with a lower bit rate. Since the amount of computation of entropy decoding and entropy encoding is small, not processing the time domain signal can also greatly reduce the amount of computation, thereby improving the speed and efficiency of audio transcoding as a whole while ensuring the sound quality.
[0105] The above steps 301-304 are a brief introduction to the embodiment of the present application. The technical solution provided by the embodiment of the present application will be more clearly explained below with reference to some examples. Figure 4 , methods include:
[0106] 401. The server performs entropy decoding on a first audio stream of a first bit rate to obtain audio feature parameters and an excitation signal of the first audio stream, where the excitation signal is a quantized speech signal.
[0107] In a possible implementation, the server obtains the occurrence probabilities of multiple coding units in the first audio stream. The server decodes the first audio stream based on the occurrence probabilities to obtain multiple decoding units corresponding to the multiple coding units. The server combines the multiple decoding units to obtain audio feature parameters and an excitation signal of the first audio stream.
[0108] The above implementation is a possible implementation of entropy decoding. In order to explain the above implementation more clearly, an entropy encoding method corresponding to the above implementation is first described below.
[0109] For example, in order to simplify the process, it is assumed that the audio feature parameters and excitation signal of the first audio stream are "MNOOP", each letter is a coding unit, wherein the occurrence probabilities of "M", "N", "O" and "P" in "MNOOP" are 0.2, 0.2, 0.4, and 0.2 respectively, and the initial interval corresponding to "MNOOP" is [0, 100000]. The server divides the interval [0, 100000] into four sub-intervals according to the occurrence probabilities of "M", "N", "O" and "P": M: [0, 20000], N: [20000, 40000], O: [40000, 80000] and P: [80000, 100000], wherein the ratio between the lengths of each sub-interval is the same as the ratio between the corresponding occurrence probabilities. Since the first letter in "MNOOP" is "M", the server selects the first sub-interval M: [0, 20000] as the basic interval for subsequent entropy coding. The server divides the interval M: [0, 20000] into four sub-intervals according to the probability of occurrence of "M", "N", "O" and "P": MM: [0, 4000], MN: [4000, 8000], MO: [8000, 16000] and MP: [16000, 20000]. Since the first two letters in "MNOOP" are "MN", the server selects the second sub-interval MN: [4000, 8000] as the basic interval for subsequent entropy coding. The server divides the interval MN: [4000, 8000] into four sub-intervals according to the probability of occurrence of "M", "N", "O" and "P": MNM: [4000, 4800], MNN: [4800, 5600], MNO: [5600, 7200] and MNP: [7200, 8000]. Since the first three letters in "MNOOP" are "MNO", the server uses the third sub-interval MNO: [5600, 7200] as the basic interval for subsequent entropy coding. The server divides the interval MNO: [5600, 7200] into four sub-intervals: MNOM: [5600, 5920], MNON: [5920, 6240], MNOO: [6240, 6880], and MNOP: [6880, 7200] according to the probability of "M", "N", "O", and "P" appearing. Since the first four letters in "MNOOP" are "MNOO", the server uses the third sub-interval MNOO: [6240, 6880] as the basic interval for subsequent entropy coding.The server divides the interval MNOO: [6240, 6880] into four sub-intervals according to the probability of occurrence of "M", "N", "O" and "P": MNOOM: [6240, 6368], MNOON: [6368, 6496], MNOOO: [6496, 6752] and MNOOP: [6752, 6880]. The interval for entropy encoding of "MNOOP" is [6752, 6880]. The server can use any value in the interval [6752, 6880] to represent the encoding result of "MNOOP", such as using 6800 to represent "MNOOP". In the above implementation, 6800 is also the first audio stream.
[0110] The above-mentioned implementation mode is explained on the basis of the above-mentioned entropy coding.
[0111] Taking the first audio stream 6800 as an example, the server obtains the probability of occurrence of multiple coding units in the first audio stream, that is, the probabilities of occurrence of "M", "N", "O" and "P" are 0.2, 0.2, 0.4, and 0.2 respectively. The server constructs the same initial interval [0, 100000] as the entropy coding process. The server divides the interval [0, 100000] into four sub-intervals according to the probabilities of occurrence of "M", "N", "O" and "P": M: [0, 20000], N: [20000, 40000], O: [40000, 80000] and P: [80000, 100000]. Since the first audio stream 6800 is in the first sub-interval M: [0, 20000], the server uses the interval [0, 20000] as the basic interval for subsequent entropy decoding, and M is the first decoding unit decoded. The server divides the interval M: [0, 20000] into four sub-intervals according to the probabilities of occurrence of "M", "N", "O" and "P": MM: [0, 4000], MN: [4000, 8000], MO: [8000, 16000] and MP: [16000, 20000]. Since the first audio stream 6800 is in the second sub-interval MN: [4000, 8000], the server uses the sub-interval [4000, 8000] as the basic interval for subsequent entropy decoding, and N is the second decoding unit decoded. The server divides the interval MN: [4000, 8000] into four sub-intervals according to the probability of occurrence of "M", "N", "O" and "P": MNM: [4000, 4800], MNN: [4800, 5600], MNO: [5600, 7200] and MNP: [7200, 8000]. Since the first audio stream 6800 is in the third sub-interval MNO: [5600, 7200], the sub-interval [5600, 7200] is used as the basic interval for subsequent entropy decoding, and O is used as the third decoding unit decoded. The server divides the interval MNO: [5600, 7200] into four sub-intervals according to the probability of occurrence of "M", "N", "O" and "P": MNOM: [5600, 5920], MNON: [5920, 6240], MNOO: [6240, 6880] and MNOP: [6880, 7200]. Since the first audio stream 6800 is in the third sub-interval MNOO: [6240, 6880], the server uses the sub-interval [6240, 6880] as the basic interval for subsequent entropy decoding, and O is the fourth decoding unit decoded.The server divides the interval MNOO: [6240, 6880] into four sub-intervals: MNOOM: [6240, 6368], MNOON: [6368, 6496], MNOOO: [6496, 6752] and MNOOP: [6752, 6880] according to the probability of occurrence of "M", "N", "O" and "P". Since the first audio stream 6800 is in the fourth sub-interval MNOOP: [6752, 6880], the server uses P as the fifth decoding unit decoded. The server combines the five decoded decoding units "M", "N", "O", "O" and "P" to obtain "MNOOP", which is the audio feature parameter and excitation signal of the first audio stream.
[0112] In order to more clearly illustrate the technical solution provided by the embodiments of the present application, the above implementation method is described below based on the entropy decoding in the above example.
[0113] In one possible implementation, see Figure 5 , the server inputs the first audio stream into the interval decoder 501, and performs entropy decoding on the first audio stream. The process of entropy decoding is shown in the above example and will not be repeated here. After the interval decoder 501 performs entropy decoding on the first audio stream, an audio stream after entropy decoding is obtained. The server inputs the audio stream after entropy decoding into the parameter decoder 502, and the parameter decoder 502 outputs the flag pulse, signal gain and audio feature parameters. The server inputs the flag pulse and signal gain into the excitation signal generator 503 to obtain an excitation signal.
[0114] 402. The server obtains a time domain audio signal corresponding to the excitation signal based on the audio feature parameter and the excitation signal.
[0115] In a possible implementation, the server processes the excitation signal based on the audio feature parameter to obtain a time domain audio signal corresponding to the excitation signal.
[0116] For example, see Figure 5, the server inputs the audio feature parameters and the excitation signal into the frame reconstruction module 504, and the frame reconstruction module 504 outputs the audio signal after frame reconstruction. The server inputs the audio signal after frame reconstruction into the sampling rate conversion filter 505, and performs resampling encoding through the sampling rate conversion filter 505 to obtain a time domain audio signal corresponding to the excitation signal. Optionally, if the audio signal after frame reconstruction is a stereo audio signal, then before the audio signal after frame reconstruction is input into the sampling rate conversion filter, the server can input the audio signal after frame reconstruction into the stereo separation module 506 to divide the audio signal after frame reconstruction into a mono audio signal. The server inputs the mono audio signal into the sampling rate conversion filter 505 for resampling encoding to obtain a time domain audio signal corresponding to the excitation signal.
[0117] The following is an explanation of the method by which the frame reconstruction module reconstructs the excitation signal:
[0118] In a possible implementation, the audio feature parameters include signal gain, LSF (Line Spectral Frequency) coefficient, LTP (Long-Term Prediction) coefficient, and treble delay, etc. The frame reconstruction module includes an LTP synthesis filter and an LPC (Linear Predictive Coding, LPC) synthesis filter. The server inputs the excitation signal and the treble delay and LTP coefficient in the audio feature parameters into the LTP synthesis filter, and the LTP synthesis filter performs a first frame reconstruction on the excitation signal to obtain a first filtered audio signal. The server inputs the first filtered audio signal, the LSF coefficient, and the signal gain into the LPC synthesis filter, and the LPC synthesis filter performs a second frame reconstruction on the first filtered audio signal to obtain a second filtered audio signal. The server fuses the first filtered audio signal and the second filtered audio signal to obtain a frame-reconstructed audio signal.
[0119] 403. The server obtains a first quantization parameter based on the target transcoding bit rate through at least one iterative process, where the first quantization parameter is used to adjust the first bit rate of the first audio stream to the target transcoding bit rate.
[0120] In one possible implementation, the server obtains the first quantization parameter through at least one iterative process, and in any iterative process, the server determines the first candidate quantization parameter based on the target transcoding bit rate. Based on the first candidate quantization parameter, the server simulates the re-quantization process of the excitation signal and the audio feature parameter to obtain the first signal corresponding to the excitation signal and the first parameter corresponding to the audio feature parameter. The server simulates the entropy coding process of the first signal and the first parameter to obtain a simulated audio stream. In response to the simulated audio stream meeting the first target condition, and at least one of the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the simulated audio stream, and the number of iterations meeting the second target condition, the first candidate quantization parameter is determined as the first quantization parameter.
[0121] In the above implementation, the processing process includes four parts, that is, the server first determines an alternative quantization parameter, and re-quantizes the excitation signal and the audio feature parameter according to the alternative quantization parameter to obtain the first signal and the first parameter. The server can simulate the entropy coding process of the first signal and the first parameter to obtain a simulated audio stream. The server judges the simulated audio stream to determine whether the simulated audio stream meets the requirements, and the requirements are judged based on the first target condition and the second target condition. When the first target condition and the second target condition are met at the same time, the server can end the iteration and output the first quantization parameter. When either of the first target condition and the second target condition is not met, the server can iterate again.
[0122] In order to explain the above implementation more clearly, the following will be divided into four parts to explain the above implementation.
[0123] The first part describes a method for determining a first candidate quantization parameter based on a target transcoding bit rate by a server.
[0124] The target transcoding bitrate can be determined by the server according to actual conditions, for example, according to the network bandwidth, so that the target transcoding bitrate matches the network bandwidth.
[0125] In some embodiments, the first candidate quantization parameter represents a quantization step size, and the larger the quantization step size, the greater the compression ratio and the smaller the amount of data after quantization. The smaller the quantization step size, the smaller the compression ratio and the larger the amount of data after quantization. In some embodiments, the target transcoding bit rate is lower than the first bit rate of the first audio stream, so the audio transcoding process is a process of reducing the bit rate. In this process, the server can generate a first candidate quantization parameter based on the target transcoding bit rate, and after re-quantizing the excitation signal and the audio feature parameters using the first candidate quantization parameter, an audio stream with a lower bit rate can be obtained, and the bit rate of the audio stream is close to the target transcoding bit rate.
[0126] The second part describes a method of simulating the re-quantization process of the excitation signal and the audio feature parameter based on the first candidate quantization parameter by the server to obtain the first signal corresponding to the excitation signal and the first parameter corresponding to the audio feature parameter.
[0127] The above simulation means that the server does not re-quantize the excitation signal and the audio feature parameter itself, but simulates a re-quantization process based on the first candidate quantization parameter, so as to subsequently determine the first quantization parameter used in the actual quantization process.
[0128] In a possible implementation, the server simulates the discrete cosine transform process of the excitation signal and the discrete cosine transform process of the audio feature parameter, respectively, to obtain a second signal corresponding to the excitation signal and a second parameter corresponding to the audio feature parameter. The server divides the second signal and the second parameter by the first candidate quantization parameter, respectively, and then rounds them to obtain the first signal and the first parameter.
[0129] Taking the server re-quantizing the excitation signal as an example, in the simulation process, the server performs discrete cosine transform on the excitation signal to obtain a second signal. The server re-quantizes the second signal using the quantization step corresponding to the first candidate quantization parameter, that is, the second signal is divided by the quantization step represented by the first candidate parameter and then rounded to obtain the first signal.
[0130] For example, if the excitation signal is a matrix The server can respond to the stimulus signal Discrete cosine transform is performed, that is, the excitation signal is transformed by the following formula (1) Perform discrete cosine transform to obtain a second signal.
[0131]
[0132] Wherein, F(u) is the second signal, u is a generalized frequency variable, u=1, 2, 3...N-1, f(i) is an excitation signal, N is the number of values in the excitation signal, and i is a value in the excitation signal.
[0133] For the convenience of explanation, the second signal is taken as The quantization step length is taken as 28 as an example. In some embodiments, the server can re-quantize the second signal by using the following formula (2) to obtain the first signal.
[0134] Q(m)=round(m / S+0.5) (2)
[0135] Wherein, Q() is a quantization function, m is a value in the second signal, round() is a rounding function, and S is a quantization step size.
[0136] With the second signal For example, the server can substitute 195 into formula (2), that is, Q(195)=round(195 / 28+0.5)=round(7.464)=7, where 7 is the result of quantizing 195. The server uses formula (2) to quantize the second signal After requantization, the first signal can be obtained
[0137] Part 3: The method of simulating the entropy encoding process of the first signal and the first parameter by the server to obtain the simulated audio stream is explained.
[0138] To simulate the first signal Taking entropy coding as an example, the server can convert the first signal Divided into four vectors, (7, -1, 0, 0) T 、(0,-1,0,0) T 、(0,0,0,0) T and (0, 0, 0, 0) T The server will vector (7, -1, 0, 0) T Let A be the vector (0, -1, 0, 0) T Let it be B, and let the vector (0, 0, 0, 0) T Denoted as C. The first signal It can also be simplified to (ABCC). In the first signal (ABCC), the probability of the coding units "A", "B" and "C" appearing in (ABCC) is 0.25, 0.25 and 0.5 respectively, and the server generates an initial interval [0, 100000]. The server divides the initial interval [0, 100000] into three sub-intervals A: [0, 25000], B [25000, 50000] and C [50000, 100000] according to the probability of the coding units "A", "B" and "C" appearing. Since the first letter in the first signal (ABCC) is "A", the server selects the first sub-interval A: [0, 25000] as the basic interval for subsequent entropy coding. The server divides the interval A: [0, 25000] into three sub-intervals AA: [0, 6250], AB [6250, 12500] and AC [12500, 100000] according to the probability of the occurrence of the coding units "A", "B" and "C". Since the second letter in the first signal (ABCC) is "B", the server selects the second sub-interval AB [6250, 12500] as the basic interval for subsequent entropy coding. The server divides the interval AB [6250, 12500] into three sub-intervals ABA: [6250, 7812.5], ABB [7812.5, 9375] and ABC [9375, 12500] according to the probability of the occurrence of the coding units "A", "B" and "C". Since the third letter in the first signal (ABCC) is "C", the server selects the third sub-interval ABC [9375, 12500] as the basic interval for subsequent entropy coding. According to the probability of occurrence of coding units "A", "B" and "C", the server divides the interval ABC[9375, 12500] into three sub-intervals ABCA: [9375, 10156.25], ABCB[10156.25, 10, 937.5] and ABCC[10, 937.5, 12500], thereby obtaining the interval for entropy encoding the first signal (ABCC) as ABCC[10, 937.5, 12500]. The server can use any value in the interval ABCC[10, 937.5, 12500] to represent the first signal (ABCC), such as using 12000 to represent the first signal (ABCC).
[0139] If the entropy encoding process of the first signal and the first parameter is simulated and the obtained interval is [100, 130], then the server can use any value in the interval [100, 130] to represent the simulated audio stream, for example, use 120 to represent the simulated audio stream.
[0140] Part 4: Explain the first target condition and the second target condition.
[0141] In a possible implementation manner, the analog audio stream meeting the first target condition refers to at least one of the following:
[0142] The bit rate of the analog audio stream is less than or equal to the target transcoding bit rate, and the audio stream quality parameter of the analog audio stream is greater than or equal to the quality parameter threshold. Among them, the audio stream quality parameters include signal-to-noise ratio, PESQ (Perceptual Evaluation of Speech Quality) and POLQA (Perceptual Objective Listening Quality Analysis), etc. The quality parameter threshold is set according to the actual situation, such as according to the quality requirements of the voice call, that is, when the quality requirements of the voice call are high, then the quality parameter threshold can be set higher, and when the quality requirements of the voice call are low, the quality parameter threshold can be set smaller, and the embodiment of the present application does not limit this.
[0143] In a possible implementation manner, at least one of the time-domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations meets the second target condition, which means that:
[0144] The similarity between the time domain audio signal and the first signal is greater than or equal to the similarity threshold. The difference between the target transcoding bit rate and the bit rate of the analog audio stream is less than or equal to the difference threshold. The number of iterations is equal to the iteration number threshold. That is, in the iteration process, the similarity between the time domain audio signal and the first signal is used as the first factor affecting the termination of the iteration, the difference between the target transcoding bit rate and the bit rate of the analog audio stream is used as the second factor affecting the termination of the iteration, and the number of iterations is used as the third factor affecting the termination of the iteration. The server determines the timing of ending the iteration through three phonemes. In some embodiments, if the iteration number threshold is 3, the current iteration number is 3, the similarity between the time domain audio signal and the first signal obtained by the iteration is less than the similarity threshold, and the difference between the target transcoding bit rate and the bit rate of the analog audio stream is greater than the difference threshold, since the number of iterations is the same as the number threshold, the server can terminate the iteration and use the alternative quantization parameter corresponding to the current iteration as the first quantization parameter. Through the restriction of the second target condition, the server can obtain the first quantization parameter with a smaller number of iterations, so that in the scenario of real-time voice calls, transcoding can be completed at a faster speed.
[0145] Under the restriction of the above-mentioned second target condition, the server does not execute the complete iterative process. In some embodiments, the above-mentioned iterative process is also a noise shaping quantization (NSQ) loop iteration. The restriction of the above-mentioned second target condition can also be called a greedy algorithm. The use of a greedy algorithm can greatly improve the speed of audio transcoding for the following reasons: First, since the first audio stream is the optimal quantization result of a high bit rate, the server can directly search for other alternative quantization parameters near the quantization parameters of the first audio stream. Second, when comparing the excitation signal and the time domain audio signal, the number of iterations can be greatly reduced according to the above three factors. Of course, in more radical cases, such as only iterating once, the decoder can also be deleted and audio transcoding can be performed directly. The embodiments of the present application do not limit this.
[0146] In addition, during the iteration process, in response to the analog audio stream not meeting the first target condition, or the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations not meeting the second target condition, the server uses the second candidate quantization parameter determined based on the target transcoding bit rate as the input for the next iteration process. That is, when the iteration number threshold is greater than 1, if both the first target condition and the second target condition are not met, the server can re-determine the second candidate quantization parameter based on the target transcoding bit rate, and perform the next iteration process based on the second candidate quantization parameter.
[0147] 404. The server re-quantizes the excitation signal and the audio feature parameter based on the time-domain audio signal and the first quantization parameter.
[0148] In a possible implementation, the server performs discrete cosine transform on the excitation signal and the audio feature parameter, respectively, to obtain a third signal corresponding to the excitation signal and a third parameter corresponding to the audio feature parameter. The server divides the third signal and the third parameter by the first quantization parameter, respectively, and rounds them to obtain a re-quantized excitation signal and a re-quantized audio feature parameter. This implementation belongs to the same inventive concept as the second part in the above step 503. The implementation process is described above and will not be repeated again.
[0149] 405. The server performs entropy coding on the re-quantized audio feature parameters and the re-quantized excitation signal to obtain a second audio stream at a second bit rate, where the second bit rate is lower than the first bit rate.
[0150] In a possible implementation, the server obtains the re-quantized audio feature parameters and the occurrence probabilities of multiple coding units in the re-quantized excitation signal, and encodes the multiple coding units based on the occurrence probabilities to obtain a second audio stream.
[0151] For example, in order to simplify the process, assume that the requantized audio feature parameters and the requantized excitation signal are "DEFFG", each letter is a coding unit, where the probabilities of "D", "E", "F" and "G" in "DEFFG" are 0.2, 0.2, 0.4, and 0.2 respectively, and the initial interval corresponding to "DEFFG" is [0, 100000]. The server divides the interval [0, 100000] into four sub-intervals according to the probabilities of "D", "E", "F" and "G": D: [0, 20000], E: [20000, 40000], F: [40000, 80000] and G: [80000, 100000], where the ratio between the lengths of each sub-interval is the same as the ratio of the corresponding probability of occurrence. Since the first letter in "DEFFG" is "D", the server selects the first sub-interval D: [0, 20000] as the basic interval for subsequent entropy coding. The server divides the interval D: [0, 20000] into four sub-intervals according to the probability of occurrence of "D", "E", "F" and "G": DD: [0, 4000], DE: [4000, 8000], DF: [8000, 16000] and DG: [16000, 20000]. Since the first two letters in "DEFFG" are "DE", the server selects the second sub-interval DE: [4000, 8000] as the basic interval for subsequent entropy coding. The server divides the interval DE: [4000, 8000] into four sub-intervals according to the probability of occurrence of "D", "E", "F" and "G": DED: [4000, 4800], DEE: [4800, 5600], DEF: [5600, 7200] and DEG: [7200, 8000]. Since the first three letters in "DEFFG" are "DEF", the server uses the third sub-interval DEF: [5600, 7200] as the basic interval for subsequent entropy coding. The server divides the interval DEF: [5600, 7200] into four sub-intervals according to the probability of occurrence of "D", "E", "F" and "G": DEFD: [5600, 5920], DEFE: [5920, 6240], DEFF: [6240, 6880] and DEFG: [6880, 7200]. Since the first four letters in "DEFFG" are "DEFF", the server uses the third sub-interval DEFF: [6240, 6880] as the basic interval for subsequent entropy coding.According to the probability of occurrence of "D", "E", "F" and "G", the server divides the interval DEFF: [6240, 6880] into four sub-intervals: DEFFD: [6240, 6368], DEFFE: [6368, 6496], DEFFF: [6496, 6752] and DEFFG: [6752, 6880]. The interval for entropy encoding of "DEFFG" is [6752, 6880]. The server can use any value in the interval [6752, 6880] to represent the encoding result of "DEFFG", such as using 6800 to represent "DEFFG". In the above implementation, 6800 is also the second audio stream.
[0152] Optionally, after step 505, the audio transcoding method provided in the embodiment of the present application can also be combined with other audio processing methods to improve the quality of audio transcoding. For example, the audio transcoding method provided in the embodiment of the present application can be combined with a forward error correction (FEC) encoding method. In the transmission process of the audio stream, errors and jitters may occur, resulting in a decrease in the quality of the audio transmission. Based on this, the forward error correction method can be used to encode the audio. The essence of forward error correction is to add redundant information to the audio so that errors can be corrected immediately. The redundant information is information related to the first N frames of the current audio frame, where N is a positive integer.
[0153] In a possible implementation manner, the server performs forward error correction coding on a subsequently received audio stream based on the second audio stream.
[0154] For example, assuming that an audio stream is an audio frame, the second audio stream is recorded as T-1 frame, and the audio stream subsequently received from the terminal is recorded as T frame, then when the server encodes the T frame, it can encode the T-1 frame, that is, the second audio stream, as redundant information in the forward error correction coding of the T frame, thereby obtaining the encoded FEC code stream, where T is a positive integer. Since the bit rate of the T-1 frame is reduced by the audio transcoding method provided in the embodiment of the present application, the overall bit rate of the encoded FEC code stream can also be reduced, thereby improving the network antagonism during audio stream transmission while ensuring audio quality, wherein network antagonism is the performance of resisting network fluctuations.
[0155] The above description is based on an example of encoding an audio frame as redundant information in forward error correction coding. In other possible implementations, see Figure 6If the server is currently encoding the Tth frame, then for the T-1 frame and the T-2 frame, the server can use the audio transcoding method provided in the embodiment of the present application to adjust the bit rate of the T-1 frame and the T-2 frame to reduce the bit rate of the T-1 frame and the T-2 frame, and use the in-band forward error correction method to encode the adjusted T-1 frame, the adjusted T-2 frame and T to obtain the encoded FEC code stream. Since the bit rate of the T-1 frame and the T-2 frame is reduced, the overall bit rate of the encoded FEC code stream can also be reduced, thereby improving the network antagonism during audio stream transmission while ensuring the audio quality.
[0156] Through the technical solution provided by the embodiment of the present application, when transcoding the audio stream, it is not necessary to perform a complete parameter extraction process, and entropy decoding is used to obtain audio feature parameters and excitation signals, that is, a more radical greedy algorithm is adopted. When re-quantization is performed, it is also performed on the excitation signal and audio feature parameters, and does not involve related processing of the time domain signal. Finally, the excitation signal and the audio feature parameters are entropy encoded to obtain a second audio stream with a lower bit rate. Since the complexity of entropy decoding and entropy encoding is almost negligible, the amount of computation of entropy decoding and entropy encoding is small, and not processing the time domain signal can also greatly reduce the amount of computation, thereby improving the speed and efficiency of audio transcoding as a whole while ensuring the audio quality.
[0157] In addition, the present application embodiment also provides an audio transcoder, the structure of which is shown in FIG. Figure 7 , the audio transcoder includes: an entropy decoding unit 701, a time domain decoding unit 702, a quantization unit 703 and an entropy coding unit 704, wherein the entropy decoding unit 701 is connected to the time domain decoding unit 702 and the quantization unit 703 respectively, the time domain decoding unit 702 is connected to the quantization unit 703, and the quantization unit 703 is connected to the entropy coding unit 704. In some embodiments, the audio transcoder provided in the embodiments of the present application is also referred to as a downlink transcoder.
[0158] The entropy decoding unit 701 is used to perform entropy decoding on a first audio stream of a first bit rate to obtain audio feature parameters and an excitation signal of the first audio stream, where the excitation signal is a quantized speech signal.
[0159] The time domain decoding unit 702 is used to obtain a time domain audio signal corresponding to the excitation signal based on the audio feature parameter and the excitation signal.
[0160] The quantization unit 703 is used to re-quantize the excitation signal and the audio feature parameter based on the time domain audio signal and the target transcoding bit rate. In some embodiments, the quantization unit 703 is also called a fast noise shaping quantization unit.
[0161] The entropy coding unit 704 is used to perform entropy coding on the re-quantized audio feature parameters and the re-quantized excitation signal to obtain a second audio stream at a second bit rate, where the second bit rate is lower than the first bit rate.
[0162] In some embodiments, during the transcoding process, the entropy decoding unit 701 can send the audio feature parameters and the excitation signal to the time domain decoding unit 702 and the quantization unit 703 respectively, and the time domain decoding unit 702 can obtain the audio feature parameters and the excitation signal from the entropy decoding unit, and based on the audio feature parameters and the excitation signal, obtain the time domain audio signal corresponding to the excitation signal. The time domain decoding unit 702 can send the time domain audio signal to the quantization unit 703. The quantization unit 703 can receive the target transcoding bit rate, the audio feature parameters, the excitation signal and the time domain audio signal, and re-quantize the excitation signal and the audio feature parameters. The quantization unit 703 can send the re-quantized audio feature parameters and the re-quantized excitation signal to the entropy coding unit 704, and the entropy coding unit 704 entropy codes the re-quantized audio feature parameters and the re-quantized excitation signal to obtain a second audio stream of a second bit rate.
[0163] In a possible implementation, the quantization unit is configured to obtain a first quantization parameter based on a target transcoding bit rate through at least one iterative process, wherein the first quantization parameter is used to adjust a first bit rate of the first audio stream to the target transcoding bit rate. The excitation signal and the audio feature parameter are requantized based on the time domain audio signal and the first quantization parameter.
[0164] In one possible implementation, the quantization unit is used to determine a first candidate quantization parameter based on a target transcoding bit rate during any iteration process. Based on the first candidate quantization parameter, a requantization process of an excitation signal and an audio feature parameter is simulated to obtain a first signal corresponding to the excitation signal and a first parameter corresponding to the audio feature parameter. The entropy encoding process of the first signal and the first parameter is simulated to obtain a simulated audio stream. In response to the simulated audio stream meeting the first target condition, and at least one of the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the simulated audio stream, and the number of iterations meeting the second target condition, the first candidate quantization parameter is determined as the first quantization parameter.
[0165] In a possible implementation manner, the analog audio stream meeting the first target condition refers to at least one of the following:
[0166] The bit rate of the analog audio stream is less than or equal to the target transcoding bit rate.
[0167] An audio stream quality parameter of the analog audio stream is greater than or equal to a quality parameter threshold.
[0168] In a possible implementation manner, at least one of the time-domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations meets the second target condition, which means that:
[0169] The similarity between the time-domain audio signal and the first signal is greater than or equal to a similarity threshold.
[0170] The difference between the target transcoding bitrate and the bitrate of the analog audio stream is less than or equal to the difference threshold.
[0171] The number of iterations completed is equal to the iteration threshold.
[0172] In a possible implementation, the quantization unit is used to:
[0173] The discrete cosine transform process of the excitation signal and the discrete cosine transform process of the audio characteristic parameter are simulated respectively to obtain a second signal corresponding to the excitation signal and a second parameter corresponding to the audio characteristic parameter.
[0174] The second signal and the second parameter are respectively divided by the first candidate quantization parameter and then rounded to obtain the first signal and the first parameter.
[0175] In a possible implementation, the quantization unit is further used for: in response to the analog audio stream not meeting the first target condition, or the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations not meeting the second target condition, using the second alternative quantization parameter determined based on the target transcoding bit rate as input for the next iteration process.
[0176] In a possible implementation, the entropy decoding unit is used to: obtain the occurrence probabilities of multiple coding units in the first audio stream, decode the first audio stream based on the occurrence probabilities, and obtain multiple decoding units corresponding to the multiple coding units, respectively, and combine the multiple decoding units to obtain audio feature parameters and excitation signals of the first audio stream.
[0177] In a possible implementation, the entropy coding unit is used to:
[0178] Obtain the requantized audio feature parameters and the occurrence probabilities of multiple coding units in the requantized excitation signal.
[0179] Based on the occurrence probability, multiple coding units are encoded to obtain a second audio stream.
[0180] In a possible implementation, the audio transcoder further includes a forward error correction unit, and the forward error correction module is connected to the entropy coding unit and is configured to perform forward error correction coding on a subsequently received audio stream based on the second audio stream.
[0181] It should be noted that: the audio transcoder provided in the above embodiment only uses the division of the above functional units as an example for audio transcoding. In actual applications, the above functions can be assigned to different functional units as needed, that is, the internal structure of the audio transcoder is divided into different functional units to complete all or part of the functions described above. In addition, the audio transcoder provided in the above embodiment and the audio transcoding method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0182] Through the technical solution provided by the embodiment of the present application, when transcoding the audio stream, it is not necessary to perform a complete parameter extraction process, but entropy decoding is used to obtain audio feature parameters and excitation signals. When re-quantization is performed, it is also performed on the excitation signal and audio feature parameters, and does not involve related processing of the time domain signal. Finally, the excitation signal and the audio feature parameters are entropy encoded to obtain a second audio stream with a lower bit rate. Since the amount of computation of entropy decoding and entropy encoding is small, not processing the time domain signal can also greatly reduce the amount of computation, thereby improving the speed and efficiency of audio transcoding as a whole while ensuring the sound quality.
[0183] Figure 8 This is a schematic diagram of the structure of an audio transcoding device provided in an embodiment of the present application, see Figure 8 The device includes: a decoding module 801, a time domain audio signal acquisition module 802, a quantization module 803 and an encoding module 804.
[0184] The decoding module 801 is used to perform entropy decoding on a first audio stream of a first bit rate to obtain audio feature parameters and an excitation signal of the first audio stream, where the excitation signal is a quantized speech signal.
[0185] The time domain audio signal acquisition module 802 is used to acquire a time domain audio signal corresponding to the excitation signal based on the audio feature parameter and the excitation signal.
[0186] The quantization module 803 is used to re-quantize the excitation signal and the audio feature parameters based on the time domain audio signal and the target transcoding bit rate.
[0187] The encoding module 804 is used to perform entropy encoding on the re-quantized audio feature parameters and the re-quantized excitation signal to obtain a second audio stream at a second bit rate, where the second bit rate is lower than the first bit rate.
[0188] In a possible implementation, the quantization module is used to obtain a first quantization parameter based on a target transcoding bit rate through at least one iterative process, wherein the first quantization parameter is used to adjust a first bit rate of the first audio stream to the target transcoding bit rate. Based on the time domain audio signal and the first quantization parameter, the excitation signal and the audio feature parameter are requantized.
[0189] In one possible implementation, the quantization module is used to determine a first candidate quantization parameter based on a target transcoding bit rate during any iteration process. Based on the first candidate quantization parameter, a requantization process of an excitation signal and an audio feature parameter is simulated to obtain a first signal corresponding to the excitation signal and a first parameter corresponding to the audio feature parameter. The entropy encoding process of the first signal and the first parameter is simulated to obtain a simulated audio stream. In response to the simulated audio stream meeting the first target condition, and at least one of the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the simulated audio stream, and the number of iterations meeting the second target condition, the first candidate quantization parameter is determined as the first quantization parameter.
[0190] In a possible implementation manner, the analog audio stream meeting the first target condition refers to at least one of the following:
[0191] The bit rate of the analog audio stream is less than or equal to the target transcoding bit rate.
[0192] An audio stream quality parameter of the analog audio stream is greater than or equal to a quality parameter threshold.
[0193] In a possible implementation manner, at least one of the time-domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations meets the second target condition, which means that:
[0194] The similarity between the time-domain audio signal and the first signal is greater than or equal to a similarity threshold.
[0195] The difference between the target transcoding bitrate and the bitrate of the analog audio stream is less than or equal to the difference threshold.
[0196] The number of iterations completed is equal to the iteration threshold.
[0197] In a possible implementation, the quantization module is used to simulate the discrete cosine transform process of the excitation signal and the discrete cosine transform process of the audio feature parameter, respectively, to obtain a second signal corresponding to the excitation signal and a second parameter corresponding to the audio feature parameter.
[0198] The second signal and the second parameter are respectively divided by the first candidate quantization parameter and then rounded to obtain the first signal and the first parameter.
[0199] In one possible implementation, the quantization module is further used to respond to the analog audio stream not meeting the first target condition, or the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations not meeting the second target condition, and use the second alternative quantization parameter determined based on the target transcoding bit rate as input for the next iteration process.
[0200] In a possible implementation, the decoding module is used to obtain the occurrence probabilities of multiple coding units in the first audio stream, decode the first audio stream based on the occurrence probabilities, and obtain multiple decoding units corresponding to the multiple coding units, and combine the multiple decoding units to obtain the audio feature parameters and excitation signal of the first audio stream.
[0201] In a possible implementation, the encoding module is used to obtain the re-quantized audio feature parameters and the occurrence probabilities of multiple encoding units in the re-quantized excitation signal, and encode the multiple encoding units based on the occurrence probabilities to obtain a second audio stream.
[0202] In a possible implementation manner, the device further includes a forward error correction module, configured to perform forward error correction encoding on a subsequently received audio stream based on the second audio stream.
[0203] It should be noted that: the audio transcoding device provided in the above embodiment only uses the division of the above functional modules as an example for audio transcoding. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the audio transcoding device is divided into different functional modules to complete all or part of the functions described above. In addition, the audio transcoding device provided in the above embodiment and the audio transcoding method embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and will not be repeated here.
[0204] Through the technical solution provided by the embodiment of the present application, when transcoding the audio stream, it is not necessary to perform a complete parameter extraction process, but entropy decoding is used to obtain audio feature parameters and excitation signals. When re-quantization is performed, it is also performed on the excitation signal and audio feature parameters, and does not involve related processing of the time domain signal. Finally, the excitation signal and the audio feature parameters are entropy encoded to obtain a second audio stream with a lower bit rate. Since the amount of computation of entropy decoding and entropy encoding is small, not processing the time domain signal can also greatly reduce the amount of computation, thereby improving the speed and efficiency of audio transcoding as a whole while ensuring the sound quality.
[0205] The embodiment of the present application provides a computer device for executing the above method. The computer device can be implemented as a terminal or a server. The structure of the terminal is first introduced below:
[0206] Fig. 9 900 is a schematic diagram of a terminal provided in an embodiment of the present application. The terminal 900 may be a smart phone, a tablet computer, a laptop computer or a desktop computer. The terminal 900 may also be called a user equipment, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0207] Typically, the terminal 900 includes: one or more processors 901 and one or more memories 902 .
[0208] The processor 901 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 901 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 901 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 901 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 901 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.
[0209] The memory 902 may include one or more computer-readable storage media, which may be non-transitory. The memory 902 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 902 is used to store at least one computer program, which is used to be executed by the processor 901 to implement the audio transcoding method provided in the method embodiment of the present application.
[0210] Those skilled in the art will understand that Fig. 9 The structure shown in the figure does not constitute a limitation on the terminal 900, and the terminal 900 may include more or less components than those shown in the figure, or combine some components, or adopt a different component arrangement.
[0211] The above-mentioned computer device can also be implemented as a server. The structure of the server is introduced below:
[0212] Fig.10This is a schematic diagram of the structure of a server provided in an embodiment of the present application. The server 1000 may have relatively large differences due to different configurations or performances, and may include one or more processors (Central Processing Units, CPU) 1001 and one or more memories 1002, wherein at least one computer program is stored in the one or more memories 1002, and the at least one computer program is loaded and executed by the one or more processors 1001 to implement the methods provided in the above-mentioned various method embodiments. Of course, the server 1000 may also have components such as a wired or wireless network interface, a keyboard, and an input and output interface for input and output. The server 1000 may also include other components for implementing device functions, which will not be described in detail here.
[0213] In an exemplary embodiment, a computer-readable storage medium is also provided, such as a memory including a computer program, and the computer program can be executed by a processor to perform the audio transcoding method in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.
[0214] In an exemplary embodiment, a computer program product or a computer program is also provided, which includes a program code, and the program code is stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the computer device performs the above-mentioned audio transcoding method.
[0215] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0216] The above are only optional embodiments of the present application and are not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. An audio transcoding method, characterized in that: The method comprises: Performing entropy decoding on a first audio stream of a first bit rate to obtain an audio feature parameter and an excitation signal of the first audio stream, wherein the excitation signal is a quantized speech signal; Based on the audio feature parameter and the excitation signal, obtaining a time domain audio signal corresponding to the excitation signal; Based on a target transcoding bit rate, obtaining a first quantization parameter through at least one iterative process, where the first quantization parameter is used to adjust the first bit rate of the first audio stream to the target transcoding bit rate; Re-quantizing the excitation signal and the audio feature parameter based on the time-domain audio signal and the first quantization parameter; The requantized audio feature parameters and the requantized excitation signal are entropy encoded to obtain a second audio stream at a second bit rate, where the second bit rate is lower than the first bit rate.
2. The method according to claim 1, characterized in that The obtaining of the first quantization parameter based on the target transcoding bit rate through at least one iteration process includes: In any of the iterative processes, determining a first candidate quantization parameter based on the target transcoding bit rate; Based on the first candidate quantization parameter, simulating a re-quantization process of the excitation signal and the audio feature parameter to obtain a first signal corresponding to the excitation signal and a first parameter corresponding to the audio feature parameter; Simulating an entropy coding process of the first signal and the first parameter to obtain a simulated audio stream; In response to the analog audio stream meeting the first target condition, and at least one of the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations meeting the second target condition, the first candidate quantization parameter is determined as the first quantization parameter.
3. The method according to claim 2, characterized in that The analog audio stream meets the first target condition, which means at least one of the following: The bit rate of the analog audio stream is less than or equal to the target transcoding bit rate; An audio stream quality parameter of the analog audio stream is greater than or equal to a quality parameter threshold.
4. The method according to claim 2, characterized in that: At least one of the time-domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations meets the second target condition, which means: The similarity between the time-domain audio signal and the first signal is greater than or equal to a similarity threshold; The difference between the target transcoding bit rate and the bit rate of the analog audio stream is less than or equal to a difference threshold; The number of iterations is equal to the iteration number threshold.
5. The method according to claim 2, characterized in that: The step of simulating the re-quantization process of the excitation signal and the audio feature parameter based on the first candidate quantization parameter to obtain a first signal corresponding to the excitation signal and a first parameter corresponding to the audio feature parameter comprises: Simulating the discrete cosine transform process of the excitation signal and the discrete cosine transform process of the audio feature parameter respectively to obtain a second signal corresponding to the excitation signal and a second parameter corresponding to the audio feature parameter; The second signal and the second parameter are respectively divided by the first candidate quantization parameter and then rounded to integers to obtain the first signal and the first parameter.
6. The method according to claim 2, characterized in that The method further comprises: In response to the analog audio stream not meeting the first target condition, or the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations all not meeting the second target condition, a second alternative quantization parameter determined based on the target transcoding bit rate is used as an input for the next iteration process.
7. The method according to claim 1, characterized in that The entropy decoding of the first audio stream of the first bit rate to obtain the audio feature parameter and the excitation signal of the first audio stream comprises: Obtaining occurrence probabilities of multiple coding units in the first audio stream; Decoding the first audio stream based on the occurrence probability to obtain a plurality of decoding units respectively corresponding to the plurality of encoding units; The multiple decoding units are combined to obtain audio feature parameters and an excitation signal of the first audio stream.
8. The method according to claim 1, characterized in that The performing entropy coding on the re-quantized audio feature parameters and the re-quantized excitation signal to obtain a second audio stream at a second bit rate comprises: Obtaining the requantized audio feature parameters and the occurrence probabilities of multiple coding units in the requantized excitation signal; Based on the occurrence probability, the multiple coding units are encoded to obtain the second audio stream.
9. The method according to claim 1, characterized in that: After performing entropy coding on the requantized audio feature parameters and the requantized excitation signal to obtain a second audio stream with a second bit rate, the method further includes: Based on the second audio stream, forward error correction encoding is performed on a subsequently received audio stream.
10. An audio transcoder, characterized in that: The audio transcoder comprises: an entropy decoding unit, a time domain decoding unit, a quantization unit and an entropy coding unit, wherein the entropy decoding unit is connected to the time domain decoding unit and the quantization unit respectively, the time domain decoding unit is connected to the quantization unit, and the quantization unit is connected to the entropy coding unit; The entropy decoding unit is used to perform entropy decoding on the first audio stream of the first bit rate to obtain audio feature parameters and an excitation signal of the first audio stream, where the excitation signal is a quantized speech signal; The time domain decoding unit is used to obtain a time domain audio signal corresponding to the excitation signal based on the audio feature parameter and the excitation signal; The quantization unit is configured to obtain a first quantization parameter based on a target transcoding bit rate through at least one iterative process, wherein the first quantization parameter is used to adjust the first bit rate of the first audio stream to the target transcoding bit rate; and re-quantize the excitation signal and the audio feature parameter based on the time domain audio signal and the first quantization parameter; The entropy coding unit is used to perform entropy coding on the requantized audio feature parameters and the requantized excitation signal to obtain a second audio stream at a second bit rate, where the second bit rate is lower than the first bit rate.
11. The audio transcoder according to claim 10, characterized in that: The quantization unit is used to determine a first candidate quantization parameter based on the target transcoding bit rate during any of the iterations; Based on the first alternative quantization parameter, the re-quantization process of the excitation signal and the audio feature parameter is simulated to obtain a first signal corresponding to the excitation signal and a first parameter corresponding to the audio feature parameter; the entropy encoding process of the first signal and the first parameter is simulated to obtain a simulated audio stream; in response to the simulated audio stream meeting the first target condition, and at least one of the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the simulated audio stream, and the number of iterations meeting the second target condition, the first alternative quantization parameter is determined as the first quantization parameter.
12. The audio transcoder according to claim 11, characterized in that: The analog audio stream meets the first target condition, which means at least one of the following: The bit rate of the analog audio stream is less than or equal to the target transcoding bit rate; An audio stream quality parameter of the analog audio stream is greater than or equal to a quality parameter threshold.
13. The audio transcoder according to claim 11, characterized in that: At least one of the time-domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations meets the second target condition, which means: The similarity between the time-domain audio signal and the first signal is greater than or equal to a similarity threshold; The difference between the target transcoding bit rate and the bit rate of the analog audio stream is less than or equal to a difference threshold; The number of iterations is equal to the iteration number threshold.
14. The audio transcoder according to claim 11, characterized in that: The quantization unit is used to: simulate the discrete cosine transform process of the excitation signal and the discrete cosine transform process of the audio feature parameter, respectively, to obtain a second signal corresponding to the excitation signal and a second parameter corresponding to the audio feature parameter; divide the second signal and the second parameter by the first alternative quantization parameter, respectively, and then round them to obtain the first signal and the first parameter.
15. The audio transcoder according to claim 11, characterized in that: The quantization unit is also used for: in response to the analog audio stream not meeting the first target condition, or the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations not meeting the second target condition, using a second alternative quantization parameter determined based on the target transcoding bit rate as input for the next iteration process.
16. The audio transcoder according to claim 10, characterized in that: The entropy decoding unit is used to: obtain the occurrence probabilities of multiple coding units in the first audio stream; decode the first audio stream based on the occurrence probabilities to obtain multiple decoding units corresponding to the multiple coding units respectively; The multiple decoding units are combined to obtain audio feature parameters and an excitation signal of the first audio stream.
17. The audio transcoder according to claim 10, characterized in that: The entropy coding unit is used for: Obtaining the requantized audio feature parameters and the occurrence probabilities of multiple coding units in the requantized excitation signal; Based on the occurrence probability, the multiple coding units are encoded to obtain the second audio stream.
18. The audio transcoder according to claim 10, characterized in that: The audio transcoder further includes a forward error correction module, which is connected to the entropy coding unit and is used to perform forward error correction coding on a subsequently received audio stream based on the second audio stream.
19. An audio transcoding device, characterized in that: The device comprises: A decoding module, configured to perform entropy decoding on a first audio stream of a first bit rate to obtain an audio feature parameter and an excitation signal of the first audio stream, wherein the excitation signal is a quantized speech signal; A time domain audio signal acquisition module, used to acquire a time domain audio signal corresponding to the excitation signal based on the audio feature parameter and the excitation signal; a quantization module, configured to obtain a first quantization parameter based on a target transcoding bit rate through at least one iterative process, wherein the first quantization parameter is used to adjust the first bit rate of the first audio stream to the target transcoding bit rate; and re-quantize the excitation signal and the audio feature parameter based on the time domain audio signal and the first quantization parameter; The encoding module is used to perform entropy encoding on the requantized audio feature parameters and the requantized excitation signal to obtain a second audio stream with a second bit rate, where the second bit rate is lower than the first bit rate.
20. The audio transcoding device according to claim 19, characterized in that: The quantization module is used to determine a first candidate quantization parameter based on the target transcoding bit rate during any of the iterations; Based on the first alternative quantization parameter, the re-quantization process of the excitation signal and the audio feature parameter is simulated to obtain a first signal corresponding to the excitation signal and a first parameter corresponding to the audio feature parameter; the entropy encoding process of the first signal and the first parameter is simulated to obtain a simulated audio stream; in response to the simulated audio stream meeting the first target condition, and at least one of the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the simulated audio stream, and the number of iterations meeting the second target condition, the first alternative quantization parameter is determined as the first quantization parameter.
21. The audio transcoding device according to claim 20, characterized in that: The analog audio stream meets the first target condition, which means at least one of the following: The bit rate of the analog audio stream is less than or equal to the target transcoding bit rate; An audio stream quality parameter of the analog audio stream is greater than or equal to a quality parameter threshold.
22. The audio transcoding device according to claim 20, characterized in that: At least one of the time-domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations meets the second target condition, which means: The similarity between the time-domain audio signal and the first signal is greater than or equal to a similarity threshold; The difference between the target transcoding bit rate and the bit rate of the analog audio stream is less than or equal to a difference threshold; The number of iterations is equal to the iteration number threshold.
23. The audio transcoding device according to claim 20, characterized in that: The quantization module is used to simulate the discrete cosine transform process of the excitation signal and the discrete cosine transform process of the audio feature parameter, respectively, to obtain a second signal corresponding to the excitation signal and a second parameter corresponding to the audio feature parameter; and to divide the second signal and the second parameter by the first alternative quantization parameter respectively and then round them to obtain the first signal and the first parameter.
24. The audio transcoding device according to claim 20, characterized in that: The quantization module is also used to respond to the analog audio stream not meeting the first target condition, or the time domain audio signal and the first signal, the target transcoding bit rate and the bit rate of the analog audio stream, and the number of iterations not meeting the second target condition, using a second alternative quantization parameter determined based on the target transcoding bit rate as input for the next iteration process.
25. The audio transcoding device according to claim 19, characterized in that: The decoding module is configured to obtain occurrence probabilities of multiple coding units in the first audio stream; decode the first audio stream based on the occurrence probabilities to obtain multiple decoding units corresponding to the multiple coding units respectively; The multiple decoding units are combined to obtain audio feature parameters and an excitation signal of the first audio stream.
26. The audio transcoding device according to claim 19, characterized in that: The encoding module is used to obtain the re-quantized audio feature parameters and the occurrence probability of multiple encoding units in the re-quantized excitation signal; Based on the occurrence probability, the multiple coding units are encoded to obtain the second audio stream.
27. The audio transcoding device according to claim 19, characterized in that: The device also includes a forward error correction module, configured to perform forward error correction encoding on a subsequently received audio stream based on the second audio stream.
28. A computer device, characterized in that: The computer device includes one or more processors and one or more memories, wherein at least one computer program is stored in the one or more memories, and the computer program is loaded and executed by the one or more processors to implement the audio transcoding method according to any one of claims 1 to 9.
29. A computer-readable storage medium, characterized in that: At least one computer program is stored in the computer-readable storage medium, and the computer program is loaded and executed by the processor to implement the audio transcoding method according to any one of claims 1 to 9.
30. A computer program product, characterized in that The computer program product includes a program code, which is stored in a computer-readable storage medium. A processor of a computer device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the computer device implements the audio transcoding method according to any one of claims 1 to 9.
