WO2021218240A1 - 一种音频流解码方法、装置、存储介质及设备 - Google Patents

一种音频流解码方法、装置、存储介质及设备 Download PDF

Info

Publication number
WO2021218240A1
WO2021218240A1 PCT/CN2021/071635 CN2021071635W WO2021218240A1 WO 2021218240 A1 WO2021218240 A1 WO 2021218240A1 CN 2021071635 W CN2021071635 W CN 2021071635W WO 2021218240 A1 WO2021218240 A1 WO 2021218240A1
Authority
WO
WIPO (PCT)
Prior art keywords
decoding result
decoding
reset
audio
audio feature
Prior art date
Application number
PCT/CN2021/071635
Other languages
English (en)
French (fr)
Inventor
周航
胡文超
陈晓
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021218240A1 publication Critical patent/WO2021218240A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
    • G10L19/00Speech or audio signals analysis-synthesis techniques for redundancy reduction, e.g. in vocoders; Coding or decoding of speech or audio signals, using source filter models or psychoacoustic analysis

Definitions

  • the sub-audio feature and the system network state reset at the corresponding time are generated, and the device further includes: a second decoding unit, configured to perform a second decoding on the audio feature to obtain a second intermediate decoding result, wherein the second intermediate decoding result
  • the non-reset decoding result corresponding to the first sub-audio feature is included; the non-reset decoding result corresponding to the first sub-audio feature is a decoding result generated by the first sub-audio feature and the system network state that has not been reset at the corresponding time.
  • the audio feature includes a second sub-audio feature
  • the first intermediate decoding result includes a non-reset decoding result corresponding to the second sub-audio feature
  • the second decoding unit is also used to perform a second sub-audio feature on the audio feature. Decoding to obtain a second intermediate decoding result; where the second intermediate decoding result includes the reset decoding result corresponding to the second sub audio feature, and the reset decoding result corresponding to the second sub audio feature is determined by the second sub audio feature and the corresponding time Generated by the system network status after reset.
  • the first decoding unit includes: a first reset subunit, used in the first decoding process, when the duration of the audio stream to be decoded at the current moment can be restored to a preset state When the reset period is divisible, reset the system network status to obtain the reset system network status; perform inference calculations on the reset system network status and the audio characteristics at the current moment to obtain the first decoding result at the current moment;
  • the first obtaining subunit is used to perform inference calculations on the system network state at the previous moment and the audio characteristics at the current moment when the duration of the audio stream to be decoded at the current moment cannot be divisible by the preset state reset period
  • the first decoding subunit is used to obtain the first intermediate decoding result according to the first decoding result at the current moment.
  • the second decoding unit includes: a second reset subunit, used in the second decoding process, when the duration of the audio stream to be decoded at the current moment is reduced by half the preset After the state reset period of the system, when it can be divided by the preset state reset period, reset the system network state to obtain the reset system network state; and the reset system network state and the current audio
  • the feature performs inference calculation to obtain the second decoding result at the current moment; the second obtaining subunit is used for when the duration of the audio stream to be decoded at the current moment minus half of the preset state reset period, it cannot be pre-decoded.
  • the system network state at the previous moment and the audio feature at the current moment are inferred and calculated to obtain the second decoding result at the current moment; the second decoding subunit is used to calculate the second decoding result at the current moment.
  • the decoding result is the second intermediate decoding result.
  • the present application also provides an audio stream decoding device, the audio stream decoding device including: a memory and a processor;
  • the memory is used to store instructions; the processor is used to execute the instructions in the memory, and execute the method in the above-mentioned first aspect and any one of its possible implementation manners.
  • the present application also provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the method in the first aspect and any one of its possible implementation manners.
  • the audio feature of the audio stream to be decoded is first obtained, and then the audio feature is first decoded to obtain the first intermediate decoding result, where the audio feature is the audio stream to be decoded.
  • the feature extraction is obtained, and the first decoding includes resetting the system network state, and then according to the first intermediate decoding result, the final decoding result of the audio stream to be decoded is determined. It can be seen that, since the embodiment of the present application resets the system network state when the audio feature of the audio stream is first decoded, the system state accumulation risk can be eliminated, and the final and more accurate decoding result can be obtained later. , So that the entire decoding process has low network delay, small amount of calculation, low power consumption, and does not introduce the risk of state accumulation, and improves the accuracy of audio stream decoding.
  • Figure 2 is a schematic diagram of an application scenario of an embodiment of the application
  • FIG. 4 is a flowchart of an audio stream decoding method provided by an embodiment of the application.
  • FIG. 6 is an example diagram of first decoding and second decoding provided by an embodiment of the application.
  • the embodiments of the present application provide an audio stream decoding method, device, storage medium, and equipment, so that the network delay of the decoding process is low, the amount of calculation is small, the power consumption is low, and the risk of state accumulation is not introduced.
  • the data in the upper layer of the infrastructure is used to represent the data source in the field of artificial intelligence.
  • the data involves graphics, images, voice, and text, as well as the Internet of Things data of traditional devices, including business data of existing systems and sensory data such as force, displacement, liquid level, temperature, and humidity.
  • Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.
  • Reasoning refers to the process of simulating human intelligent reasoning in a computer or intelligent system, using formal information to conduct machine thinking and solving problems based on reasoning control strategies.
  • the typical function is search and matching.
  • Decision-making refers to the process of making decisions after intelligent information is reasoned, and usually provides functions such as classification, ranking, and prediction.
  • some general capabilities can be formed based on the results of the data processing, such as an algorithm or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image Recognition and so on.
  • Intelligent products and industry applications refer to the products and applications of artificial intelligence systems in various fields. It is an encapsulation of the overall solution of artificial intelligence, productizing intelligent information decision-making and realizing landing applications. Its application fields mainly include: intelligent terminals, intelligent transportation, Smart medical care, autonomous driving, safe city, etc.
  • the audio stream decoding method provided in the embodiments of the present application can be applied to the audio stream decoding process in the terminal device, and specifically, can be applied to the voice assistant on the terminal device, etc.
  • FIG. 2 is a schematic diagram of an application scenario of an embodiment of the application.
  • the terminal device 201 has an AI system that implements a voice interaction function, such as a voice assistant installed in a mobile phone.
  • the audio stream to be decoded can be an audio stream collected by a microphone (for example, a voice uttered by a user) or a segment of audio stream intercepted from a recording segment, and the to-be-decoded audio stream
  • the audio stream may be an audio stream used to implement different voice interaction functions such as voice wake-up, voiceprint recognition, and voice recognition.
  • the AI voice interaction system can be used to continue the first decoding of the obtained audio features to obtain the first intermediate decoding result, and the first decoding includes correcting
  • the system network status is reset to eliminate the cumulative risk of the system network status, and the first intermediate decoding result obtained can be further processed to determine the final and more accurate decoding result of the audio stream to be decoded. For example, voice wake-up can be realized, or the voice recognition result corresponding to the audio stream to be decoded can be obtained.
  • the terminal device 201 may be a mobile phone, a tablet, a notebook computer, a smart wearable device, etc., and the terminal device may decode the acquired audio stream. It should be understood that the embodiments of the present application may also be applied to other scenarios that require audio stream decoding, and other application scenarios are not listed here.
  • the audio stream data belongs to the serialized data, it has a strong correlation in the time domain and the frequency domain. Therefore, in order to improve the processing accuracy of the audio stream to be decoded, a recurrent neural network (RNN) structure is usually used as
  • the network structure of the AI system implements the voice interaction function, which is used to decode the audio stream to be decoded.
  • RNN recurrent neural network
  • RNNs The purpose of RNNs is to process sequence data.
  • the layers In the traditional neural network model, from the input layer to the hidden layer and then to the output layer, the layers are fully connected, and the nodes between each layer are not connected. But this ordinary neural network is powerless for many problems. For example, when predicting what the next word of a sentence is, the previous word is generally used because the preceding and following words in a sentence are not independent.
  • RNNs are called recurrent neural networks, that is, the current output of a sequence is also related to the previous output.
  • FIG. 3 shows a schematic diagram of the structure of the RNN provided by the embodiment of the present application, where x t represents the input at time t, o t represents the output at time t, and st represents the memory at time t.
  • the output at the current moment in the RNN is determined by the memory and the input at the current moment, for example, for a senior student, the knowledge of the student is the knowledge learned by the senior (current input) and junior and junior
  • the combination of previously learned knowledge (memory) is similar to RNN in this regard.
  • the neural network is best at integrating a lot of content through a series of parameters, and then learning this parameter, so the basis of RNN can be defined as follows:
  • the f() function represents the activation function in the neural network, which is used to filter information in the neural network.
  • the activation function can be selected according to the actual situation. The embodiment of the present application does not limit this.
  • the activation function can be Is the hyperbolic tangent function tanh().
  • the current memory st and the classification function softmax can usually be used for prediction. For example, when predicting the probability of the next word "I am China”, softmax can be used to predict the probability of the next word.
  • the specific prediction formula is as follows:
  • o t represents the output at time t
  • V represents a weight matrix
  • s t represents the memory at time t.
  • the embodiments of the present application provide an audio stream decoding method, which can be applied to the terminal device 201. As shown in Figure 4, the method includes:
  • S401 Acquire an audio feature of an audio stream to be decoded, where the audio feature is obtained by performing feature extraction on the audio stream to be decoded.
  • the terminal device may first perform framing processing on the audio stream to be decoded and generate audio features of the audio stream.
  • the audio features include the voice features and semantic information of the audio stream to be decoded.
  • Characteristic data can be vector data that characterize the semantic content of the audio stream to be decoded, for example, it can be the word vector or word vector contained in the audio stream to be decoded; while the voice feature refers to the vector data that can reflect the audio stream to be decoded.
  • the feature data of the voice characteristics of the voice which can be expressed in vector or other forms.
  • the terminal device can first extract the acoustic characteristics of the audio stream to be decoded, for example, the Mel frequency cepstrum coefficient (MFCC) of the audio stream to be decoded, and then perform the following steps S402-403 The acoustic feature is decoded to obtain the decoding result.
  • MFCC Mel frequency cepstrum coefficient
  • the audio stream to be decoded can be sent to the cloud side, and the audio stream to be decoded is processed by the cloud side.
  • the feature is extracted to obtain the audio feature, and then the audio feature is sent to the terminal device side for decoding.
  • the terminal device after the terminal device receives the audio feature of the audio stream to be decoded, it can use the AI system deployed on it to decode the audio feature frame by frame through subsequent steps S402-S403 to obtain the decoding result.
  • S402 Perform a first decoding on the audio feature to obtain a first intermediate decoding result; where the first decoding includes resetting the system network state.
  • the AI system uses the RNN network structure, according to the above analysis, it can be known that each time the RNN network performs the inference operation at the current moment, it needs to use the system network state information at the previous moment, resulting in the inference operation at the current moment. The result depends on all the information from initialization to the current moment, which will introduce state accumulation risks.
  • the system network state at the current moment is one of the AI system network output results at the current moment, which characterizes the state information of all audio features before the current moment.
  • the system network status corresponding to the 10th minute represents the cumulative status of all audio information in the previous 10 minutes, and the system network status can be represented by a vector or a matrix.
  • the vector dimension of the system network status at each moment is Consistent, the specific number of dimensions is determined by the RNN network structure of the AI system.
  • the system in order to eliminate the cumulative risk of the network state, when the terminal device uses the AI system based on the RNN structure to decode the acquired audio features (here defined as the first decoding), the system will be decoded during the decoding process.
  • the network status is reset.
  • the system network status can be reset periodically based on the preset period during the first decoding.
  • the system network status can be reset regularly, and the system network status vector after each reset can be used Or matrix for inference calculation, the specific inference calculation process is consistent with the existing streaming decoding method, so I will not repeat it here.
  • an intermediate decoding result here defined as the first intermediate decoding result
  • the audio feature includes a first sub-audio feature
  • the first intermediate decoding result includes a reset decoding result corresponding to the first sub-audio feature
  • the first sub-audio feature corresponds to
  • the reset decoding result is generated by the first sub-audio feature and the system network state after resetting at the corresponding time
  • this application can perform a second decoding on the audio feature to obtain a second intermediate decoding result, where the second intermediate decoding result
  • the non-reset decoding result corresponding to the first sub audio feature is included, and the non-reset decoding result is a decoding result generated by the first sub audio feature and the system network state that has not been reset at the corresponding time.
  • the audio feature can be decoded secondly to obtain The second intermediate decoding result and ensuring that the second decoding performs the normal decoding operation on the first audio feature, that is, the non-reset decoding result is generated using the first sub-audio feature and the system network state that has not been reset at the corresponding time, so that The second intermediate decoding result can include the non-reset decoding result corresponding to the first sub-audio feature.
  • non-reset decoding may be performed only at the time corresponding to the first sub-audio feature, or, during the second decoding, all audio streams may also be non-reset decoded to ensure correctness. Complete decoding of audio streams. In this way, the first intermediate decoding result and the second intermediate decoding result can be used to perform a comprehensive operation to obtain a more accurate decoding result.
  • the reset decoding result includes the system network state and the network inference calculation result after the inference calculation at the corresponding time of the second sub audio feature, and the system network state can be used for downloading. Inference calculation at one moment, and after all audio features are decoded, the network inference calculation results corresponding to each moment are summarized to obtain the final second intermediate decoding result. The specific inference calculation process is consistent with the existing streaming decoding method, and will not be repeated here.
  • the time when the first decoding and the second decoding reset the system network state are different, and correspondingly, the first sub-audio feature and the second sub-audio feature are also different. That is, the intersection between the two is an empty set, so that after performing the first decoding and the second decoding on the audio feature, the second intermediate decoding result obtained can include the reset decoding result corresponding to the second sub-audio feature, and The first intermediate decoding result includes the non-reset decoding result corresponding to the second sub-audio feature.
  • Step A1 In the first decoding process, when the duration of the audio stream to be decoded at the current moment can be divisible by the preset state reset period, reset the system network state to obtain the reset system network Status; and perform inference calculations on the reset system network status and the audio characteristics at the current moment to obtain the first decoding result at the current moment.
  • the audio features of the audio stream to be decoded are obtained through the above step S401, the audio features can be decoded first and second frame by frame, respectively, as shown in FIG. 5, it can be understood that the first The first decoding and the second decoding can be performed in parallel.
  • the first decoding process first determine whether the duration of the audio stream to be decoded at the current moment (here defined as t) is evenly divided by the preset state reset period (here defined as s), If yes, you can reset the system network status at the current moment to obtain the reset system network status, and perform inference calculations on the reset system network status and the audio characteristics at the current moment to obtain the decoding result at the current moment ( Here it is defined as the first decoding result at the current moment).
  • the system network state is cleared at the current moment, and the reset system network state is obtained as a zero vector or a zero matrix, and then the zero vector or zero matrix and the audio feature corresponding to the current moment can be used for inference calculations to obtain the current
  • the second decoding result at the moment includes the system network state at the current moment and the decoding result of the inference calculation.
  • the audio characteristics of the audio stream such as MFCC and other acoustic characteristics
  • Step B2 In the second decoding process, when the duration of the audio stream to be decoded at the current moment is subtracted by half of the preset state reset period, and cannot be divided by the preset state reset period, the previous The system network state at the time and the audio feature at the current time are inferred and calculated to obtain the second decoding result at the current time.
  • Step B3 Obtain a second intermediate decoding result according to the second decoding result at the current moment.
  • the system network state at the current moment can be further used for the inference calculation at the next moment, and the inference calculation result is obtained at each moment.
  • the decoding results are summarized to form the second intermediate decoding result.
  • the time point of the state reset is an integer multiple of the state reset period s. For example, if the state reset period s is 4 seconds, then in the first decoding process, the audio stream will be received at the 4th, 8th, etc. 4 seconds.
  • the system network status is reset (such as cleared) at an integer multiple of second.
  • the time point at which the second decoding resets the system network state is n+1/2 times the state reset period s, where n is an integer.
  • the system network status will be reset (such as cleared) at n+1/2 times of 4 seconds, such as the 2nd and 6th seconds of receiving the audio stream.
  • the first decoding performs the system network state reset
  • the second decoding is performing normal streaming decoding
  • the first decoding is performing normal streaming Decoding, so as to ensure that any audio feature in the audio stream whose duration is less than one-half of the state reset period s can be completely decoded, and then after the two intermediate decoding results are comprehensively processed, the decoded result obtained is eliminating While the accumulated risk of the state is reduced, a more accurate decoding result can be obtained.
  • First decoding and second decoding as shown in Figure 6, the thick black arrow in Figure 6 represents the audio stream to be decoded, the white long box above the thick arrow represents the first decoding, and the white long box below the thick arrow Represents the second decoding, and defines the start time of receiving the audio stream to be decoded as the 0th second, and sets the state reset period s to 4 seconds.
  • S403 Determine the final decoding result of the audio stream to be decoded according to the first intermediate decoding result.
  • the first intermediate decoding result can be further determined by using a predetermined decision rule to determine the audio to be decoded.
  • the final decoding result of the stream can be selected according to the actual situation, which is not limited in the embodiment of the present application.
  • the preset decision rules can be set as a weight ratio or a pre-trained decision model.
  • the first intermediate decoding result and the second intermediate decoding result are obtained.
  • the final decoding result of the audio stream to be decoded can be determined according to the first intermediate decoding result and the second intermediate decoding result.
  • the two intermediate decoding results can be decided by using the pre-set decision rules to eliminate the state accumulation risk and obtain a more accurate final result.
  • the decoding result For example, the preset decision rule can be set as a known fixed weight distribution, then the weight distribution rule can be used to make decision processing on the two intermediate decoding results, and the processing result can be used as the final decoding result.
  • each intermediate decoding result and the final decoding result can be a vector, and the value of each dimension in the vector can be a value in the interval [0,1], and the values of different dimensions represent different types of decoding results.
  • the first intermediate decoding result is a vector [0.9, 0.1]
  • the second intermediate decoding result is a vector [0.7, 0.3]
  • the preset weight distribution rule is that the weight ratio of the first intermediate decoding result is 0.6
  • the second intermediate decoding result is a vector [0.7, 0.3].
  • the weight ratio of the intermediate decoding result is 0.4.
  • the final decoding result is the vector [0.82, 0.18]. It can be seen that the value of the first dimension is 0.82. If it is larger, the corresponding decoding result type is the decoding result type of the audio stream to be decoded, that is, the audio stream to be decoded is a voice-awakened audio stream.
  • the audio feature can be decoded multiple times (that is, N times), where N is a positive integer greater than or equal to 1, and it is guaranteed that when a certain decoding resets the system network state, there is at least one other decoding The system network status at the moment has not been reset to ensure the integrity of audio feature decoding and improve the accuracy of the decoding result. Furthermore, it is possible to perform decision processing on more intermediate decoding results according to the preset decision rules, so as to determine the final and more accurate decoding result of the audio stream to be decoded.
  • the power consumption of the decoding will also increase. Therefore, it is necessary to ensure that the total power consumption of the N times of decoding is not greater than that of the sliding window decoding under the same conditions.
  • the method uses the power consumption during decoding to select the value of N, where the specific value of N can be selected according to actual conditions, which is not limited in the embodiment of the present application.
  • an embodiment of the present application provides an audio stream decoding device 700.
  • the apparatus 700 may include: an obtaining unit 701, a first decoding unit 702, and a determining unit 703.
  • the obtaining unit 701 is configured to support the apparatus 700 to execute S401 in the embodiment shown in FIG. 4.
  • the first decoding unit 702 is configured to support the apparatus 700 to execute S402 in the embodiment shown in FIG. 4.
  • the determining unit 703 is configured to support the apparatus 700 to execute S403 in the embodiment shown in FIG. 4. specific,
  • the acquiring unit 701 is configured to acquire audio features of the audio stream to be decoded, where the audio features are obtained by feature extraction of the audio stream to be decoded;
  • the determining unit 703 is configured to determine the final decoding result of the audio stream to be decoded according to the first intermediate decoding result.
  • the audio feature includes the first sub-audio feature
  • the first intermediate decoding result includes the reset decoding result corresponding to the first sub-audio feature
  • the reset decoding result corresponding to the first sub-audio feature is Generated from the first sub audio feature and the system network state after reset at the corresponding time
  • the device further includes:
  • the second decoding unit is configured to perform a second decoding on the audio feature to obtain a second intermediate decoding result, where the second intermediate decoding result includes a non-reset decoding result corresponding to the first sub-audio feature;
  • the non-reset decoding result is the decoding result generated by the first sub-audio feature and the system network state that has not been reset at the corresponding time.
  • the audio feature includes a second sub-audio feature
  • the first intermediate decoding result includes a non-reset decoding result corresponding to the second sub-audio feature
  • the second decoding unit is also used to decode the audio feature Perform a second decoding to obtain a second intermediate decoding result; where the second intermediate decoding result includes the reset decoding result corresponding to the second sub audio feature, and the reset decoding result corresponding to the second sub audio feature is determined by the second sub audio feature And the system network status after resetting at the corresponding time.
  • the first decoding unit 702 includes:
  • the second reset subunit is used for the second decoding process, when the duration of the audio stream to be decoded at the current moment is reduced by half the preset state reset period, it can be reset by the preset state When divisible, reset the system network state to obtain the reset system network state; perform inference calculations on the reset system network state and the audio characteristics at the current moment to obtain the second decoding result at the current moment;
  • the second obtaining sub-unit is used for when the duration of the audio stream to be decoded at the current moment minus half of the preset state reset period is not evenly divisible by the preset state reset period, the value of the previous moment Perform inference calculations on the system network status and the audio characteristics at the current moment to obtain the second decoding result at the current moment;
  • the second decoding subunit is configured to obtain the second intermediate decoding result according to the second decoding result at the current moment.
  • the preset state reset period is determined according to the duration of the keyword in the audio stream to be decoded.
  • the determining unit is specifically configured to determine the final decoding result of the audio stream to be decoded according to the first intermediate decoding result and the second intermediate decoding result.
  • the audio stream decoding device provided in this embodiment first obtains the audio characteristics of the audio stream to be decoded when decoding the audio stream, and then performs the first decoding on the audio characteristics to obtain the first intermediate decoding result.
  • the audio feature is obtained by feature extraction of the audio stream to be decoded, and the first decoding includes resetting the system network state, and then the final decoding result of the audio stream to be decoded is determined according to the first intermediate decoding result.
  • an embodiment of the present application provides an audio stream decoding device 800, which includes a memory 801, a processor 802, and a communication interface 803.
  • the memory 801 is used to store instructions
  • the communication interface 803 is used for communication.
  • the memory 801, the processor 802, and the communication interface 803 are connected to each other through a bus 804; the bus 804 can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus Wait.
  • PCI peripheral component interconnect
  • EISA extended industry standard architecture
  • the bus can be divided into address bus, data bus, control bus and so on. For ease of representation, only one thick line is used in FIG. 8, but it does not mean that there is only one bus or one type of bus.
  • the processor 802 is configured to first obtain the audio feature of the audio stream to be decoded when decoding the audio stream, and then perform the first decoding on the audio feature to obtain the first intermediate decoding result, where the audio feature It is obtained by extracting features of the audio stream to be decoded, and the first decoding includes resetting the system network state, and then determining the final decoding result of the audio stream to be decoded according to the first intermediate decoding result.
  • the processor 802 please refer to the detailed description of S401, S402, and S403 in the embodiment shown in FIG. 4, which will not be repeated here.
  • the above-mentioned memory 801 may be random-access memory (RAM), flash memory (flash), read only memory (ROM), erasable programmable read only memory (EPROM) ), electrically erasable programmable read only memory (EEPROM), register, hard disk, mobile hard disk, CD-ROM or any other form of storage medium known to those skilled in the art.
  • RAM random-access memory
  • flash flash memory
  • ROM read only memory
  • EPROM erasable programmable read only memory
  • EEPROM electrically erasable programmable read only memory
  • register hard disk, mobile hard disk, CD-ROM or any other form of storage medium known to those skilled in the art.
  • the above-mentioned communication interface 803 may be, for example, an interface card or the like, and may be an ethernet interface or an asynchronous transfer mode (ATM) interface.
  • ATM asynchronous transfer mode
  • An embodiment of the present application also provides a computer-readable storage medium, including instructions, which when run on a computer, cause the computer to execute the above audio stream decoding method.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer readable storage medium.
  • the technical solution of the present application essentially or the part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium , Including several instructions to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), magnetic disks or optical disks and other media that can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • Acoustics & Sound (AREA)
  • Multimedia (AREA)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

一种音频流解码方法、装置、存储介质及设备,涉及人工智能技术领域,方法包括:首先获取待解码的音频流的音频特征(401),然后对该音频特征进行第一解码,得到第一中间解码结果(402),其中,音频特征为对待解码的音频流进行特征提取得到的,且第一次解码包括对系统网络状态进行重置,进而再根据第一中间解码结果,确定待解码的音频流的最终解码结果(403)。可见,由于该方法在对音频流的音频特征进行第一解码时,会对系统网络状态进行重置,从而可以消除系统的状态累积风险,便于后续得到最终的、更为准确的解码结果,使得整个解码过程的网络时延低、计算量小、功耗低且不会引入状态累积风险,并提高了音频流解码的准确性。

Description

一种音频流解码方法、装置、存储介质及设备
本申请要求于2020年04月30日提交中国专利局、申请号为202010362621.X、发明名称为“一种音频流解码方法、装置、存储介质及设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及人工智能技术领域,尤其涉及一种音频流解码方法、装置、存储介质及设备。
背景技术
随着移动互联网、物联网和人工智能(artificial intelligence,AI)技术的快速发展,语音交互作为下一代人机交互方式,已成为了几乎所有终端设备的必备能力。比如,手机、平板电脑、手表、手环等都已经具备了实现语音交互功能的AI系统。由于该AI系统的输入信号是音频流,而音频流作为序列化输入信号,在时域和频域都有很强的相关性,因此,为了提高音频流的处理精度,通常采用循环神经网络(recurrent neural network,RNN)结构作为AI系统的网络结构来实现语音交互功能,基于此,为了提高系统语音交互的实时性并降低系统功耗,需要快速、高效的进行音频流解码。
目前,音频流解码的方法通常有两种:一种是流式解码方法,虽然该方法具有网络时延低、计算量小、功耗低的优点,但由于采用该方法进行解码时,AI系统网络每次进行当前时刻的推理运算时均需要采用前一时刻的系统网络状态信息,导致当前时刻的推理运算结果依赖于从初始化到当前时刻的全部信息,会引入状态累积风险;而另一种常用的解码方法则是滑窗解码方法,该方法虽然不会引入状态累积风险,但该方法的缺点是网络时延高、计算量大、功耗高。
发明内容
本申请实施例提供了一种音频流解码方法、装置、存储介质及设备,有助于克服现有音频流解码方法的缺点,使得解码过程的网络时延低、计算量小、功耗低且不会引入状态累积风险。
第一方面,本申请提供了一种音频流解码方法,该方法包括:在进行音频流解码时,首先获取待解码的音频流的音频特征,然后对该音频特征进行第一解码,得到第一中间解码结果,其中,音频特征为对待解码的音频流进行特征提取得到的,且第一次解码包括对系统网络状态进行重置,进而再根据第一中间解码结果,确定待解码的音频流的最终解码结果。
与传统技术相比,由于本申请实施例在对音频流的音频特征进行第一解码时,会对系统网络状态进行重置,从而可以消除系统的状态累积风险,便于后续得到最终的、更为准确的解码结果,使得整个解码过程的网络时延低、计算量小、功耗低且不会引入状态累积风险,并提高了音频流解码的准确性。
一种可能的实现方式中,音频特征包括第一子音频特征,第一中间解码结果包括第一子音频特征对应的重置解码结果,第一子音频特征对应的重置解码结果是由第一子音频特征和对应时刻重置后的系统网络状态生成的,该方法还包括:对音频特征进行第二解码,得到第二中间解码结果,其中,第二中间解码结果包括第一子音频特征对应的非重置解码结果;第一子音频特征对应的非重置解码结果是由第一子音频特征和对应时刻未进行重置的系统网络状态生成的解码结果。这样,能够保证音频特征解码的完整性,提高解码结果的准确度。
一种可能的实现方式中,音频特征包括第二子音频特征,第一中间解码结果包括第二子音频特征对应的非重置解码结果,该方法还包括:对音频特征进行第二解码,得到第二中间解码结果;其中,第二中间解码结果包括第二子音频特征对应的重置解码结果,第二子音频特征对应的重置解码结果是由第二子音频特征和对应时刻重置后的系统网络状态生成的。这样,能够在保证音频特征解码的完整性的前提下,进一步提高解码结果的准确度。
一种可能的实现方式中,对音频特征进行第一解码,得到第一中间解码结果,包括:在第一解码过程中,当待解码的音频流在当前时刻的持续时间长度能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;当待解码的音频流在当前时刻的持续时间长度不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;根据当前时刻的第一解码结果,得到第一中间解码结果。这样,可以消除网络状态累计风险,提高解码结果的准确度。
一种可能的实现方式中,对音频特征进行第二解码,得到第二中间解码结果,包括:在第二解码过程中,当待解码的音频流在当前时刻的持续时间长度减去一半预设的状态重置周期后,能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果;当待解码的音频流在当前时刻的持续时间长度减去一半预设的状态重置周期后,不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果;根据当前时刻的第二解码结果,得到第二中间解码结果。这样,能够保证音频流中任意持续时间长度小于二分之一状态重置周期的音频特征能够被完整解码,进而在将第一中间解码结果和第二中间解码结果进行综合处理后,得到的解码结果是在消除了状态累计风险的同时,提高了解码结果的准确性。一种可能的实现方式中,预设的状态重置周期是根据待解码的音频流中关键词的持续时间长度确定的。以保证音频特征解码的完整性,进而提高解码结果的准确度。
一种可能的实现方式中,预设的状态重置周期是根据待解码的音频流中关键词的持续时间长度确定的。
一种可能的实现方式中,根据第一中间解码结果,确定待解码的音频流的最终解码结果,包括:根据第一中间解码结果和第二中间解码结果,确定待解码的音频流的最终解码结果。这样,由于第一解码和第二解码对系统网络状态进行重置的时刻是不同的,能够保 证音频流中任意持续时间长度小于二分之一状态重置周期的音频特征能够被完整解码,并且得到的解码结果均在定期消除了状态累计风险,从而在将两个中间解码结果进行综合处理后,能够得到准确性更高的解码结果。
一种可能的实现方式中,该方法还包括:对音频特征继续进行N次解码,得到N个中间解码结果;其中,在第一解码和N次解码中,存在至少一次解码时对系统网络状态进行重置,存在至少一次解码时未对系统网络状态进行重置;N为大于或等于1的正整数。
一种可能的实现方式中,根据第一中间解码结果,确定待解码的音频流的最终解码结果,包括:根据第一中间解码结果和N个中间解码结果,确定待解码的音频流的最终解码结果。
第二方面,本申请还提供了一种音频流解码装置,该装置包括:获取单元,用于获取待解码的音频流的音频特征,其中,音频特征为对待解码的音频流进行特征提取得到的;第一解码单元,用于对音频特征进行第一解码,得到第一中间解码结果;其中,第一解码包括对系统网络状态进行重置;确定单元,用于根据第一中间解码结果,确定待解码的音频流的最终解码结果。
一种可能的实现方式中,音频特征包括第一子音频特征,第一中间解码结果包括第一子音频特征对应的重置解码结果,第一子音频特征对应的重置解码结果是由第一子音频特征和对应时刻重置后的系统网络状态生成的,该装置还包括:第二解码单元,用于对音频特征进行第二解码,得到第二中间解码结果,其中,第二中间解码结果包括第一子音频特征对应的非重置解码结果;第一子音频特征对应的非重置解码结果是由第一子音频特征和对应时刻未进行重置的系统网络状态生成的解码结果。
一种可能的实现方式中,音频特征包括第二子音频特征,第一中间解码结果包括第二子音频特征对应的非重置解码结果,第二解码单元,还用于对音频特征进行第二解码,得到第二中间解码结果;其中,第二中间解码结果包括第二子音频特征对应的重置解码结果,第二子音频特征对应的重置解码结果是由第二子音频特征和对应时刻重置后的系统网络状态生成的。
一种可能的实现方式中,第一解码单元包括:第一重置子单元,用于在第一解码过程中,当待解码的音频流在当前时刻的持续时间长度能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;第一获得子单元,用于当待解码的音频流在当前时刻的持续时间长度不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;第一解码子单元,用于根据当前时刻的第一解码结果,得到第一中间解码结果。
一种可能的实现方式中,第二解码单元包括:第二重置子单元,用于在第二解码过程中,当待解码的音频流在当前时刻的持续时间长度减去一半所述预设的状态重置周期后,能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果;第二获得子单元,用于当待解码的音频流在当前时刻的持续时间长度减去一半预 设的状态重置周期后,不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果;第二解码子单元,用于根据当前时刻的第二解码结果,得到第二中间解码结果。
一种可能的实现方式中,预设的状态重置周期是根据待解码的音频流中关键词的持续时间长度确定的。
一种可能的实现方式中,确定单元具体用于:根据第一中间解码结果和第二中间解码结果,确定待解码的音频流的最终解码结果。
第三方面,本申请还提供了一种音频流解码设备,该音频流解码设备包括:存储器、处理器;
存储器,用于存储指令;处理器,用于执行存储器中的指令,执行上述第一方面及其任意一种可能的实现方式中的方法。
第四方面,本申请还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行上述第一方面及其任意一种可能的实现方式中的方法。
从以上技术方案可以看出,本申请实施例具有以下优点:
本申请实施例在进行音频流解码时,首先获取待解码的音频流的音频特征,然后对该音频特征进行第一解码,得到第一中间解码结果,其中,音频特征为对待解码的音频流进行特征提取得到的,且第一次解码包括对系统网络状态进行重置,进而再根据第一中间解码结果,确定待解码的音频流的最终解码结果。可见,由于本申请实施例在对音频流的音频特征进行第一解码时,会对系统网络状态进行重置,从而可以消除系统的状态累积风险,便于后续得到最终的、更为准确的解码结果,使得整个解码过程的网络时延低、计算量小、功耗低且不会引入状态累积风险,并提高了音频流解码的准确性。
附图说明
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本申请中记载的一些实施例,对于本领域普通技术人员来讲,还可以根据这些附图获得其他的附图。
图1为本申请实施例提供的人工智能主体框架的一种结构示意图;
图2为本申请实施例的应用场景示意图;
图3为本申请实施例的提供的RNN的结构示意图;
图4为本申请实施例提供的一种音频流解码方法的流程图;
图5为本申请实施例的提供的第一解码和第二解码的流程示意图;
图6为本申请实施例的提供的第一解码和第二解码的示例图;
图7为本申请实施例提供的一种音频流解码装置的结构框图;
图8为本申请实施例提供的一种音频流解码设备的结构示意图。
具体实施方式
本申请实施例提供了一种音频流解码方法、装置、存储介质及设备,使得解码过程的 网络时延低、计算量小、功耗低且不会引入状态累积风险。
下面结合附图,对本申请的实施例进行描述。本领域普通技术人员可知,随着技术的发展和新场景的出现,本申请实施例提供的技术方案对于类似的技术问题,同样适用。
首先对人工智能系统总体工作流程进行描述,请参见图1,图1示出的为人工智能主体框架的一种结构示意图,下面从“智能信息链”(水平轴)和“IT价值链”(垂直轴)两个维度对上述人工智能主题框架进行阐述。其中,“智能信息链”反映从数据的获取到处理的一列过程。举例来说,可以是智能信息感知、智能信息表示与形成、智能推理、智能决策、智能执行与输出的一般过程。在这个过程中,数据经历了“数据—信息—知识—智慧”的凝练过程。“IT价值链”从人智能的底层基础设施、信息(提供和处理技术实现)到系统的产业生态过程,反映人工智能为信息技术产业带来的价值。
(1)基础设施
基础设施为人工智能系统提供计算能力支持,实现与外部世界的沟通,并通过基础平台实现支撑。通过传感器与外部沟通;计算能力由智能芯片(CPU、NPU、GPU、ASIC、FPGA等硬件加速芯片)提供;基础平台包括分布式计算框架及网络等相关的平台保障和支持,可以包括云存储和计算、互联互通网络等。举例来说,传感器和外部沟通获取数据,这些数据提供给基础平台提供的分布式计算系统中的智能芯片进行计算。
(2)数据
基础设施的上一层的数据用于表示人工智能领域的数据来源。数据涉及到图形、图像、语音、文本,还涉及到传统设备的物联网数据,包括已有系统的业务数据以及力、位移、液位、温度、湿度等感知数据。
(3)数据处理
数据处理通常包括数据训练,机器学习,深度学习,搜索,推理,决策等方式。
其中,机器学习和深度学习可以对数据进行符号化和形式化的智能信息建模、抽取、预处理、训练等。
推理是指在计算机或智能系统中,模拟人类的智能推理方式,依据推理控制策略,利用形式化的信息进行机器思维和求解问题的过程,典型的功能是搜索与匹配。
决策是指智能信息经过推理后进行决策的过程,通常提供分类、排序、预测等功能。
(4)通用能力
对数据经过上面提到的数据处理后,进一步基于数据处理的结果可以形成一些通用的能力,比如可以是算法或者一个通用系统,例如,翻译,文本的分析,计算机视觉的处理,语音识别,图像的识别等等。
(5)智能产品及行业应用
智能产品及行业应用指人工智能系统在各领域的产品和应用,是对人工智能整体解决方案的封装,将智能信息决策产品化、实现落地应用,其应用领域主要包括:智能终端、智能交通、智能医疗、自动驾驶、平安城市等。
本申请可以应用于人工智能领域的自然语言处理领域中,下面将对落地到产品的应用场景进行介绍。
应用于终端设备中的音频流解码过程如下:
本申请实施例提供的音频流解码方法可以应用于终端设备中的音频流解码过程,具体的,可以应用于终端设备上的语音助手等。参见图2,图2为本申请实施例的应用场景示意图,如图2所示,终端设备201中具备实现语音交互功能的AI系统,如安装在手机中的语音助手等。用以获取待解码的音频流,其中,待解码音频流可以是利用麦克风采集到的音频流(如可以是用户发出的语音)或是从录音段中截取的一段音频流,并且该待解码的音频流可以是用于实现语音唤醒、声纹识别、语音识别等不同语音交互功能的音频流。在对获取到的待解码的音频流进行特征提取得到音频特征后,可以利用该AI语音交互系统继续对得到的音频特征进行第一解码,以得到第一中间解码结果,且第一解码包括对系统网络状态进行重置,用以消除系统网络状态的累计风险,进一步可以对得到的第一中间解码结果进行决策处理,以确定出待解码的音频流的最终的、更为准确的解码结果,比如可以实现语音唤醒,或者得到待解码音频流对应的语音识别结果等。
其中,作为一种示例,终端设备201可以为手机、平板、笔记本电脑、智能穿戴设备等,终端设备可以对获取到的音频流进行解码处理。应当理解,本申请实施例还可以应用于其他需要进行音频流解码的场景中,此处不再对其他应用场景进行一一列举。
由于音频流数据归属于序列化数据,在时域和频域都有很强的相关性,因此,为了提高对待解码音频流的处理精度,通常采用循环神经网络(recurrent neural networks,RNN)结构作为AI系统的网络结构来实现语音交互功能,用以对待解码的音频流进行解码,为了便于理解,下面先对本申请实施例涉及的RNNs的相关术语和概念进行介绍。
RNNs的目的使用来处理序列数据。在传统的神经网络模型中,是从输入层到隐含层再到输出层,层与层之间是全连接的,每层之间的节点是无连接的。但是这种普通的神经网络对于很多问题却无能无力。例如,在预测句子的下一个单词是什么时,一般需要用到前面的单词,因为一个句子中前后单词并不是独立的。RNNs之所以称为循环神经网路,即一个序列当前的输出与前面的输出也有关。具体的表现形式为网络会对前面的信息进行记忆并应用于当前输出的计算中,即隐藏层之间的节点不再无连接而是有连接的,并且隐藏层的输入不仅包括输入层的输出还包括上一时刻隐藏层的输出。理论上,RNNs能够对任何长度的序列数据进行处理。
如图3所示,其示出了本申请实施例的提供的RNN的结构示意图,其中,x t表示t时刻的输入,o t表示t时刻的输出,s t表示t时刻的记忆。因为RNN中当前时刻的输出是由记忆和当前时刻的输入决定的,例如,对于大四的学生来说,该学生的知识是由大四学到的知识(当前输入)和大三以及大三以前学到的知识(记忆)的结合,RNN在这点上也类似,神经网络最擅长做的就是通过一系列参数把很多内容整合到一起,然后学习这个参数,因此可以定义RNN的基础如下:
s t=f(U*x t+W*s t-1)         (1)
其中,f()函数表示神经网络中的激活函数,用于在神经网络中进行信息过滤,该激活函数可根据实际情况进行选择,本申请实施例对此不进行限定,比如,该激活函数可以是双曲正切函数tanh()。
在通过RNN进行预测时,通常可以利用当前时刻的记忆s t以及分类函数softmax进行预测。比如,在预测“我是中国”的下一个词出现的概率时,可以采用softmax来预测下一个词出现的概率,具体预测公式如下:
o t=soft max(Vs t)       (2)
其中,o t表示t时刻的输出;V表示一个权重矩阵;s t表示t时刻的记忆。
基于以上应用场景,本申请实施例提供了一种音频流解码方法,该方法可应用于终端设备201。如图4所示,该方法包括:
S401:获取待解码的音频流的音频特征,其中,音频特征为对待解码的音频流进行特征提取得到的。
在本实施例中,待解码的音频流可以是上述终端设备通过声音采集设备(如麦克风)采集到的音频数据(如用户发出的唤醒语音),或者,该待解码的音频流也可以是从终端设备内部获得的之前存储的录音数据。本申请对待解码的音频流的具体获取方式和具体来源不做限定,可根据实际情况进行选择。
进一步的,终端设备在获取到待解码的音频流后,可以先对待解码的音频流进行分帧处理并生成音频流的音频特征,该音频特征包含了待解码音频流的语音特征和语义信息等特征数据。其中,语义信息可以是表征待解码音频流的语义内容的向量数据,比如,可以是待解码音频流包含的字向量或词向量等;而语音特征则指的是能够反映待解码音频流所具有的语音特点的特征数据,其可以采用向量或其它形式进行表示。
举例说明:终端设备首先可以提取出待解码的音频流的声学特征,比如,待解码的音频流的梅尔频率倒谱系数(mel frequency cepstrum coefficient,MFCC),然后,通过后续步骤S402-403对该声学特征进行解码,以得到解码结果。
或者,在一些实施例中,终端设备在获取到待解码的音频流后,为降低终端设备的计算量,可以将该待解码的音频流发送到云侧,由云侧对待解码的音频流进行特征提取,以得到音频特征,然后再将该音频特征发送至终端设备侧进行解码。
这样,终端设备在接收到待解码的音频流的音频特征后,可以利用部署在其上的AI系统,通过后续步骤S402-S403对该音频特征进行逐帧解码,以得到解码结果。
S402:对音频特征进行第一解码,得到第一中间解码结果;其中,第一解码包括对系统网络状态进行重置。
在本实施例中,由于AI系统采用的是RNN网络结构,根据上述分析可知,RNN网络每次进行当前时刻的推理运算时均需要采用前一时刻的系统网络状态信息,导致当前时刻的推理运算结果依赖于从初始化到当前时刻的全部信息,会引入状态累积风险,其中,当前时刻的系统网络状态是当前时刻AI系统网络输出结果之一,表征的是当前时刻之前所有的音频特征的状态信息汇总,比如第10分钟对应的系统网络状态表征的是之前所有10分钟内的音频信息的累计状态,且系统网络状态可以是由向量或矩阵来表示,每一时刻的系统网络状态的向量维度是一致的,具体维度数目是由AI系统的RNN网络结构决定的。
由此,本申请为了消除网络状态累计风险,终端设备在利用基于RNN结构的AI系统对获取到的音频特征进行解码(此处将其定义为第一解码)时,会在解码过程中对系统网 络状态进行重置,比如,可以在第一解码时,基于预设周期,定期对系统网络状态进行重置,如定期将系统网络状态清零,并利用每次清零后的系统网络状态向量或矩阵进行推理计算,具体推理计算过程与现有流式解码方法一致,在此不再赘述。这样,可以在第一解码过程中定期消除网络状态累计风险,进而可以在对所有音频特征解码完成后,得到一个中间解码结果(此处将其定义为第一中间解码结果),用以执行后续步骤S403。
在本实施例的一种可能的实现方式中,音频特征包括第一子音频特征,第一中间解码结果包括该第一子音频特征对应的重置解码结果,其中,第一子音频特征对应的重置解码结果是由第一子音频特征和对应时刻重置后的系统网络状态生成的,则本申请可以对音频特征进行第二解码,得到第二中间解码结果,其中,第二中间解码结果包括第一子音频特征对应的非重置解码结果,且该非重置解码结果是由第一子音频特征和对应时刻未进行重置的系统网络状态生成的解码结果。
在本实现方式中,在第一解码时,将对系统网络状态进行重置时对应的音频特征定义为第一子音频特征,也就是说,终端设备利用AI系统在对第一子音频特征时,不再采用前一时刻的系统网络状态和第一子帧音频特征进行推理计算,而是先将此时系统网络状态进行重置,比如,将此时的系统网络状态对应的状态向量清零,得到重置后的系统网络状态为零向量,再利用该零向量和第一子音频特征进行推理计算,以生成第一子音频特征对应的重置解码结果,该重置解码结果包括第一子音频特征对应时刻推理计算后的系统网络状态和网络推理计算结果,进而可利用其中的系统网络状态进行下一时刻的推理计算,并在所有音频特征解码完成后,将各个时刻对应的网络推理计算结果进行汇总,得到最终的第一中间解码结果。具体推理计算过程与现有流式解码方法一致,在此不再赘述。
由于在本实现方式中,第一解码未对第一音频特征进行正常的解码运算,因此,为了保证音频特征解码的完整性,提高解码结果的准确度,可以对音频特征进行第二解码,得到第二中间解码结果,并且保证第二解码对第一音频特征进行正常的解码运算,即,利用第一子音频特征和对应时刻未进行重置的系统网络状态生成非重置解码结果,从而使得第二中间解码结果中能够包括第一子音频特征对应的非重置解码结果。具体的,在第二解码时,可以仅需要在第一子音频特征对应时刻进行非重置解码,或者,在第二解码时,也可以对所有音频流都进行非重置解码,以保证对音频流的完整解码。这样,可以利用第一中间解码结果和第二中间解码结果进行综合运算,以得到更为准确的解码结果。
在此基础上,为了进一步提高解码结果的准确度,一种可选的实施例中,音频特征还包括第二子音频特征,且第一子音频特征与第二子音频特征之间的交集为空集,第一中间解码结果包括第二子音频特征对应的非重置解码结果,则本申请可以对音频特征进行第二解码,得到第二中间解码结果;其中,第二中间解码结果包括第二子音频特征对应的重置解码结果,第二子音频特征对应的重置解码结果是由第二子音频特征和对应时刻重置后的系统网络状态生成的。
在本实现方式中,为了更大程度的消除网络状态累计风险,以进一步提高解码结果的准确度,可以在第二解码时,也对系统网络状态进行重置,并将重置时刻对应的音频特征定义为第二子音频特征,也就是说,终端设备利用AI系统在对第二子音频特征时,不再采 用前一时刻的系统网络状态和第二子帧音频特征进行推理计算,而是先将此时的系统网络状态进行重置,比如,将此时的系统网络状态对应的状态向量清零,得到重置后的系统网络状态为零向量,再利用该零向量和第二子音频特征生成第二子音频特征对应的重置解码结果,该重置解码结果包括第二子音频特征对应时刻推理计算后的系统网络状态和网络推理计算结果,进而可利用其中的系统网络状态进行下一时刻的推理计算,并在所有音频特征解码完成后,将各个时刻对应的网络推理计算结果进行汇总,得到最终的第二中间解码结果。具体推理计算过程与现有流式解码方法一致,在此不再赘述。
需要说明的是,为了保证解码的完整性,第一解码和第二解码对系统网络状态进行重置的时刻是不同的,相应的,第一子音频特征和第二子音频特征也是不同的,即,二者之间的交集为空集,这样,在对音频特征进行第一解码和第二解码后,得到的第二中间解码结果能够包括第二子音频特征对应的重置解码结果,而第一中间解码结果包括的是第二子音频特征对应的非重置解码结果。
接下来,本申请实施例将通过下述步骤A1-A3对第一解码的具体实现过程进行介绍,以及通过下述步骤B1-B3对第二解码的具体实现过程进行介绍。
(1)第一解码的具体实现过程如下:
步骤A1:在第一解码过程中,当待解码的音频流在当前时刻的持续时间长度能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果。
在本实施例中,通过上述步骤S401获取到待解码的音频流的音频特征后,可分别对音频特征逐帧进行第一解码和第二解码,如图5所示,可以理解的是,第一解码和第二解码的可以是并行进行的。在第一解码过程中,首先判断待解码的音频流在当前时刻的持续时间长度(此处将其定义为t)是否被预设的状态重置周期(此处将其定义为s)整除,若是,则可以在当前时刻对系统网络状态进行重置,得到重置后的系统网络状态,并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的解码结果(此处将其定义为当前时刻的第一解码结果)。比如,在当前时刻对系统网络状态进行清零,得到重置后的系统网络状态为零向量或零矩阵,进而可以利用该零向量或零矩阵和当前时刻对应的音频特征进行推理计算,得到当前时刻的第一解码结果,包括当前时刻的系统网络状态和推理计算的解码结果。
其中,预设的状态重置周期s是根据待解码的音频流中关键词的持续时间长度确定的。为了能够保证待解码的音频流中关键词被完整解码,以保证解码结果的准确性,通常可以将状态重置周期s预先设置为关键词的持续时间长度的2倍,以保证在通过步骤A1-A3的第一解码和通过后续步骤B1-B3的第二解码后,音频流中任意持续时间长度小于二分之一状态重置周期s的音频特征能够被完整解码,进而保证了解码结果的准确性。比如,以语音唤醒音频流为例,其中唤醒词(即关键词)的持续时间长度通常为2秒,则可以将状态重置周期s设定为4秒。
举例说明:以待解码的音频流为用户进行语音唤醒时发出的音频流为例,在获取到该音频流的音频特征(如MFCC等声学特征)后,可分别对该音频特征逐帧进行第一解码和 第二解码,并在第一解码时,首先判断从接收该音频流的起始时刻,到当前时刻为止,音频流的持续时间长度t是否被预设的状态重置周期s整除,比如,可以将接收该音频流的起始时刻定义为第0秒,若当前时刻已经接收了7秒的音频流,则此时音频流的持续时间长度为7秒,即t=7。若状态重置周期s设定为4秒,则此时t不能被s整除,可以执行后续步骤A2。若t=8,即,若当前时刻已经接收了8秒的音频流,则此时t能够被s整除,即8能够被4整除,可以在当前时刻对系统网络状态进行重置,得到重置后的系统网络状态,并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果。
步骤A2:在第一解码过程中,当待解码的音频流在当前时刻的持续时间长度不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果。
在本实施例中,若在第一解码过程中判断出待解码的音频流在当前时刻的持续时间长度t是不能被预设的状态重置周期s整除的,则无需在当前时刻对系统网络状态进行重置,而是进行正常的流式解码,即,可以对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果,包括当前时刻的系统网络状态和推理计算的解码结果。
步骤A3:根据当前时刻的第一解码结果,得到第一中间解码结果。
在本实施例中,在通过步骤A1或A2得到当前时刻的第一解码结果后,进一步可以将其中当前时刻的系统网络状态用于下一时刻的推理计算,并将每一时刻得到推理计算的解码结果进行汇总,以构成第一中间解码结果。
(2)第二解码的具体实现过程包括:
步骤B1:在第二解码过程中,当待解码的音频流在当前时刻的持续时间长度减去一半预设的状态重置周期后,能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果。
在本实施例中,如图5所示,在第二解码过程中,首先在将待解码的音频流在当前时刻的持续时间长度t减去一半预设的状态重置周期(即s/2),得到相减结果(即t-s/2)后,判断该相减结果是否被预设的状态重置周期s整除,若是,则可以对系统网络状态进行重置,得到重置后的系统网络状态,并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的解码结果(此处将其定义为当前时刻的第二解码结果)。其中,预设的状态重置周期s与第一解码中s的取值是一致的。比如,在当前时刻对系统网络状态进行清零,得到重置后的系统网络状态为零向量或零矩阵,进而可以利用该零向量或零矩阵和当前时刻对应的音频特征进行推理计算,得到当前时刻的第二解码结果,包括当前时刻的系统网络状态和推理计算的解码结果。
举例说明:仍以待解码的音频流为用户进行语音唤醒时发出的音频流为例,在获取到该音频流的音频特征(如MFCC等声学特征)后,在对其进行第二解码时,若当前时刻已经接收了6秒的音频流,则此时音频流的持续时间长度为6秒,即t=6。若状态重置周 期s仍设定为4秒,则此时t-s/2=6-4/2=4,能够被4整除,可以对系统网络状态进行重置,得到重置后的系统网络状态,并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果。若t=7,即,若当前时刻已经接收了7秒的音频流,则此时t-s/2=7-4/2=5,不能被4整除,则可以执行后续步骤B2。
步骤B2:在第二解码过程中,当待解码的音频流在当前时刻的持续时间长度减去一半预设的状态重置周期后,不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果。
在本实施例中,若在第二解码过程中判断出待解码的音频流在当前时刻的持续时间长度减去一半预设的状态重置周期后,是不能被预设的状态重置周期整除的,则无需在当前时刻对系统网络状态进行重置,而是进行正常的流式解码,即,可以对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果,包括当前时刻的系统网络状态和推理计算的解码结果。
步骤B3:根据当前时刻的第二解码结果,得到第二中间解码结果。
在本实施例中,在通过步骤B1或B2得到当前时刻的第二解码结果后,进一步可以将其中当前时刻的系统网络状态用于下一时刻的推理计算,并将每一时刻得到推理计算的解码结果进行汇总,以构成第二中间解码结果。
需要说明的是,通过上述步骤A1-A3进行第一解码和通过步骤B1-B3进行第二解码时,二者对系统网络状态重置的时间点是不同的,其中,第一解码对系统网络状态重置的时间点为状态重置周期s的整数倍,例如,假设状态重置周期s为4秒,则在第一解码过程中,会在接收音频流的第4秒、8秒等4秒的整数倍时刻对系统网络状态进行重置(如清零)。而第二解码对系统网络状态重置的时间点则为状态重置周期s的n+1/2倍,其中,n为整数,例如,假设状态重置周期s仍为4秒,则在第二解码过程中,会在接收音频流的第2秒、6秒等4秒的n+1/2倍时刻对系统网络状态进行重置(如清零)。这样,使得在第一解码进行系统网络状态重置时,第二解码是在进行正常的流式解码,且在第二解码进行系统网络状态重置时,第一解码是在进行正常的流式解码,从而能够保证音频流中任意持续时间长度小于二分之一状态重置周期s的音频特征能够被完整解码,进而在将两个中间解码结果进行综合处理后,得到的解码结果是在消除了状态累计风险的同时,得到准确性更高的解码结果。
举例说明:以待解码的音频流为用户进行语音唤醒时发出的音频流为例,在获取到该音频流的音频特征(如MFCC等声学特征)后,可分别对该音频特征逐帧进行第一解码和第二解码,如图6所示,图6中黑色的粗箭头代表待解码的音频流,该粗箭头上方的白色长方框代表第一解码,该粗箭头下方的白色长方框代表第二解码,并将接收该待解码的音频流的起始时刻定义为第0秒,将状态重置周期s设定为4秒。则从图6可以看出,在第一解码过程中,在音频流的持续时间长度为4秒时,即t=4时,t能够被s整除,即4能够被4整除,此时需要对系统网络状态进行重置,同理,在音频流的持续时间长度为8秒时,即t=8时,t能够被s整除,即8能够被4整除,此时也需要对系统网络状态进行重置,依 次类推,直至对该音频流的所有音频特征完成第一解码,得到第一中间解码结果。在第二解码过程中,在音频流的持续时间长度为2秒时,即t=2时,t-s/2=2-4/2=0能够被4整除,此时需要对系统网络状态进行重置,同理,在音频流的持续时间长度为6秒时,即t=6时,t-s/2=6-4/2=4能够被4整除,此时也需要对系统网络状态进行重置,依次类推,直至对该音频流的所有音频特征完成第二解码,得到第二中间解码结果。
S403:根据第一中间解码结果,确定待解码的音频流的最终解码结果。
在本实施例中,通过步骤S402对音频特征进行第一解码得到第一中间解码结果后,进一步可以利用预先设定的决策规则对第一中间解码结果进行决策处理,以确定出待解码的音频流的最终解码结果。需要说明的是,预先设置的决策规则可根据实际情况进行选择,本申请实施例对此不进行限定,比如,可以将预先设置的决策规则设定为权重比例或预先训练好的决策模型等。
在本实施例的一种可能的实现方式中,在通过上述步骤A1-A3和步骤B1-B3分别对待解码的音频流进行第一解码和第二解码,得到第一中间解码结果和第二中间解码结果后,进一步可以根据第一中间解码结果和第二中间解码结果,确定待解码的音频流的最终解码结果。
在本实现方式中,由于第一解码和第二解码对系统网络状态进行重置的时刻是不同的,并使得第一中间解码结果和第二中间解码结果中分别包含了不同子音频特征的重置解码结果,因此,为了提高解码结果的准确性,可以利用预先设置的决策规则对这两个中间解码结果进行决策处理,以在消除了状态累计风险的同时,得到准确性更高的最终的解码结果。比如,可以将预先设置的决策规则设定为已知的固定权重分配,则可以利用该权重分配规则对这两个中间解码结果进行决策处理,并将处理结果作为最终的解码结果。
其中,每个中间解码结果和最终的解码结果均可以是一个向量,该向量中每一维度的值可以为区间[0,1]中的一个数值,不同维度的值分别代表了不同类型解码结果的概率值,概率值越大,表明待解码的音频的最终解码结果越可能是该概率值对应的解码结果类型。
举例说明:基于上述举例,仍以图6所示的待解码的音频流为用户进行语音唤醒时发出的音频流为例,假设得到的中间解码结果和最终的解码结果均是一个二维向量,且该二维向量中第一维度的值代表该待解码音频流为语音唤醒的概率值,第二维度的值代表该待解码音频流不为语音唤醒的概率值。又假设第一中间解码结果为向量[0.9,0.1],第二中间解码结果为向量[0.7,0.3],且预先设置的权重分配规则为第一中间解码结果的权重占比为0.6,第二中间解码结果的权重占比为0.4,则按权重占比对这两个中间解码结果进行决策处理后,得到的最终的解码结果为向量[0.82,0.18],可见,第一维度的值0.82较大,则其对应的解码结果类型即为该待解码音频流的解码结果类型,即该待解码音频流为语音唤醒的音频流。
在本实施例的另一种可能的实现方式中,为了进一步提高解码结果的准确度,还可以对音频特征继续进行N次解码,得到N个中间解码结果;其中,在第一解码和这N次解码中,存在至少一次解码时对系统网络状态进行重置,存在至少一次解码时未对系统网络状态进行重置;其中,N为大于或等于1的正整数,进而,可以根据得到的第一中间解码结果和这N个中间解码结果,确定待解码的音频流的最终解码结果。
具体来讲,由于本申请是采用对系统网络状态进行重置的方式来消除网络状态累计风险,由此可见,在解码过程中,对系统网络状态重置的频率越高,消除效率网络状态累计风险的效果就越好。因此,可以对音频特征进行多次(即N次)解码,其中,N为大于等于1的正整数,并保证在某一解码对系统网络状态进行重置时,至少存在一个其他解码是对该时刻的系统网络状态未进行重置,以保证音频特征解码的完整性,并提高解码结果的准确度。进而可以根据预先设置的决策规则对更多的中间解码结果进行决策处理,以确定出待解码的音频流的最终的、更为准确的解码结果。
需要说明的是,若对音频特征进行多次(即N次)解码,则也会增加解码的功耗,由此,需要保证这N次解码的总功耗不大于相同条件下采用滑窗解码方法进行解码时的功耗,来选择N的取值,其中,N的具体取值可根据实际情况进行选择,本申请实施例对此不进行限定。
这样,本申请实施例提供的音频流解码方法是在流式解码的基础上增加了对系统网络状态进行重置的步骤,从而能够在保存了流式解码方法具有的网络时延低、计算量小、功耗低的优点的基础上,消除了网络状态累计风险,提高了音频流解码的准确性。.
综上,本实施例提供的一种音频流解码方法,在进行音频流解码时,首先获取待解码的音频流的音频特征,然后对该音频特征进行第一解码,得到第一中间解码结果,其中,音频特征为对待解码的音频流进行特征提取得到的,且第一次解码包括对系统网络状态进行重置,进而再根据第一中间解码结果,确定待解码的音频流的最终解码结果。可见,由于本申请实施例在对音频流的音频特征进行第一解码时,会对系统网络状态进行重置,从而可以消除系统的状态累积风险,便于后续得到最终的、更为准确的解码结果,使得整个解码过程的网络时延低、计算量小、功耗低且不会引入状态累积风险,并提高了音频流解码的准确性。
为便于更好的实施本申请实施例的上述方案,下面还提供用于实施上述方案的相关装置。请参见图7所示,本申请实施例提供了一种音频流解码装置700。该装置700可以包括:获取单元701、第一解码单元702和确定单元703。其中,获取单元701用于支持装置700执行图4所示实施例中的S401。第一解码单元702用于支持装置700执行图4所示实施例中的S402。确定单元703用于支持装置700执行图4所示实施例中的S403。具体的,
获取单元701,用于获取待解码的音频流的音频特征,音频特征为对待解码的音频流进行特征提取得到的;
第一解码单元702,用于对音频特征进行第一解码,得到第一中间解码结果;其中,第一解码包括对系统网络状态进行重置;
确定单元703,用于根据第一中间解码结果,确定待解码的音频流的最终解码结果。
在本实施例的一种实现方式中,音频特征包括第一子音频特征,第一中间解码结果包括第一子音频特征对应的重置解码结果,第一子音频特征对应的重置解码结果是由第一子音频特征和对应时刻重置后的系统网络状态生成的,该装置还包括:
第二解码单元,用于对音频特征进行第二解码,得到第二中间解码结果,其中, 第二中间解码结果包括第一子音频特征对应的非重置解码结果;第一子音频特征对应的非重置解码结果是由第一子音频特征和对应时刻未进行重置的系统网络状态生成的解码结果。
在本实施例的一种实现方式中,音频特征包括第二子音频特征,第一中间解码结果包括第二子音频特征对应的非重置解码结果,第二解码单元,还用于对音频特征进行第二解码,得到第二中间解码结果;其中,第二中间解码结果包括第二子音频特征对应的重置解码结果,第二子音频特征对应的重置解码结果是由第二子音频特征和对应时刻重置后的系统网络状态生成的。
在本实施例的一种实现方式中,第一解码单元702包括:
第一重置子单元,用于在第一解码过程中,当待解码的音频流在当前时刻的持续时间长度能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;
第一获得子单元,用于当待解码的音频流在当前时刻的持续时间长度不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;
第一解码子单元,用于根据当前时刻的第一解码结果,得到第一中间解码结果。
在本实施例的一种实现方式中,第二解码单元包括:
第二重置子单元,用于在第二解码过程中,当待解码的音频流在当前时刻的持续时间长度减去一半预设的状态重置周期后,能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果;
第二获得子单元,用于当待解码的音频流在当前时刻的持续时间长度减去一半预设的状态重置周期后,不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果;
第二解码子单元,用于根据当前时刻的第二解码结果,得到第二中间解码结果。
在本实施例的一种实现方式中,预设的状态重置周期是根据待解码的音频流中关键词的持续时间长度确定的。
在本实施例的一种实现方式中,确定单元具体用于:根据第一中间解码结果和第二中间解码结果,确定待解码的音频流的最终解码结果。
综上,本实施例提供的一种音频流解码装置,在进行音频流解码时,首先获取待解码的音频流的音频特征,然后对该音频特征进行第一解码,得到第一中间解码结果,其中,音频特征为对待解码的音频流进行特征提取得到的,且第一次解码包括对系统网络状态进行重置,进而再根据第一中间解码结果,确定待解码的音频流的最终解码结果。可见,由于本申请实施例在对音频流的音频特征进行第一解码时,会对系统网络状态进行重置,从而可以消除系统的状态累积风险,便于后续得到最终的、更为准确的解码结果,使得整个解码过程的网络时延低、计算量小、功耗低且不会引入状态 累积风险,并提高了音频流解码的准确性。
参见图8,本申请实施例提供了一种音频流解码设备800,该设备包括存储器801、处理器802和通信接口803,
存储器801,用于存储指令;
处理器802,用于执行存储器801中的指令,执行上述应用于图4所示实施例中的音频流解码方法;
通信接口803,用于进行通信。
存储器801、处理器802和通信接口803通过总线804相互连接;总线804可以是外设部件互连标准(peripheral component interconnect,简称PCI)总线或扩展工业标准结构(extended industry standard architecture,简称EISA)总线等。总线可以分为地址总线、数据总线、控制总线等。为便于表示,图8中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。
在具体实施例中,处理器802用于在进行音频流解码时,首先获取待解码的音频流的音频特征,然后对该音频特征进行第一解码,得到第一中间解码结果,其中,音频特征为对待解码的音频流进行特征提取得到的,且第一次解码包括对系统网络状态进行重置,进而再根据第一中间解码结果,确定待解码的音频流的最终解码结果。该处理器802的详细处理过程请参考上述图4所示实施例中S401、S402和S403的详细描述,这里不再赘述。
上述存储器801可以是随机存取存储器(random-access memory,RAM)、闪存(flash)、只读存储器(read only memory,ROM)、可擦写可编程只读存储器(erasable programmable read only memory,EPROM)、电可擦除可编程只读存储器(electrically erasable programmable read only memory,EEPROM)、寄存器(register)、硬盘、移动硬盘、CD-ROM或者本领域技术人员知晓的任何其他形式的存储介质。
上述处理器802例如可以是中央处理器(central processing unit,CPU)、通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application-specific integrated circuit,ASIC)、现场可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、晶体管逻辑器件、硬件部件或者其任意组合。其可以实现或执行结合本申请实施例公开内容所描述的各种示例性的逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,DSP和微处理器的组合等等。
上述通信接口803例如可以是接口卡等,可以为以太(ethernet)接口或异步传输模式(asynchronous transfer mode,ATM)接口。
本申请实施例还提供了一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得计算机执行上述音频流解码方法。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的术语在适当情况下可以互换,这仅仅是描述本申请的实施例中对相同属性的对象在描述时所 采用的区分方式。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,以便包含一系列单元的过程、方法、系统、产品或设备不必限于那些单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它单元。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (16)

  1. 一种音频流解码方法,其特征在于,所述方法包括:
    获取待解码的音频流的音频特征,所述音频特征为对所述待解码的音频流进行特征提取得到的;
    对所述音频特征进行第一解码,得到第一中间解码结果;其中,所述第一解码包括对系统网络状态进行重置;
    根据所述第一中间解码结果,确定所述待解码的音频流的最终解码结果。
  2. 根据权利要求1所述的方法,其特征在于,所述音频特征包括第一子音频特征,所述第一中间解码结果包括所述第一子音频特征对应的重置解码结果,所述第一子音频特征对应的重置解码结果是由所述第一子音频特征和对应时刻重置后的系统网络状态生成的,所述方法还包括:
    对所述音频特征进行第二解码,得到第二中间解码结果,其中,所述第二中间解码结果包括所述第一子音频特征对应的非重置解码结果;所述第一子音频特征对应的非重置解码结果是由所述第一子音频特征和对应时刻未进行重置的系统网络状态生成的解码结果。
  3. 根据权利要求1所述的方法,其特征在于,所述音频特征包括第二子音频特征,所述第一中间解码结果包括所述第二子音频特征对应的非重置解码结果,所述方法还包括:
    对所述音频特征进行第二解码,得到第二中间解码结果;其中,第二中间解码结果包括所述第二子音频特征对应的重置解码结果,所述第二子音频特征对应的重置解码结果是由所述第二子音频特征和对应时刻重置后的系统网络状态生成的。
  4. 根据权利要求2或3所述的方法,其特征在于,所述对所述音频特征进行第一解码,得到第一中间解码结果,包括:
    在所述第一解码过程中,当所述待解码的音频流在当前时刻的持续时间长度能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对所述重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;
    当所述待解码的音频流在当前时刻的持续时间长度不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;
    根据所述当前时刻的第一解码结果,得到第一中间解码结果。
  5. 根据权利要求2或3所述的方法,其特征在于,所述对所述音频特征进行第二解码,得到第二中间解码结果,包括:
    在所述第二解码过程中,当所述待解码的音频流在当前时刻的持续时间长度减去一半所述预设的状态重置周期后,能被所述预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对所述重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果;
    当所述待解码的音频流在当前时刻的持续时间长度减去一半所述预设的状态重置周期后,不能被所述预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音 频特征进行推理计算,得到当前时刻的第二解码结果;
    根据所述当前时刻的第二解码结果,得到第二中间解码结果。
  6. 根据权利要求4所述的方法,其特征在于,所述预设的状态重置周期是根据所述待解码的音频流中关键词的持续时间长度确定的。
  7. 根据权利要求1至6任一所述的方法,其特征在于,所述根据所述第一中间解码结果,确定所述待解码的音频流的最终解码结果,包括:
    根据所述第一中间解码结果和所述第二中间解码结果,确定所述待解码的音频流的最终解码结果。
  8. 一种音频流解码装置,其特征在于,所述装置包括:
    获取单元,用于获取待解码的音频流的音频特征,所述音频特征为对所述待解码的音频流进行特征提取得到的;
    第一解码单元,用于对所述音频特征进行第一解码,得到第一中间解码结果;其中,所述第一解码包括对系统网络状态进行重置;
    确定单元,用于根据所述第一中间解码结果,确定所述待解码的音频流的最终解码结果。
  9. 根据权利要求8所述的装置,其特征在于,所述音频特征包括第一子音频特征,所述第一中间解码结果包括所述第一子音频特征对应的重置解码结果,所述第一子音频特征对应的重置解码结果是由所述第一子音频特征和对应时刻重置后的系统网络状态生成的,所述装置还包括:
    第二解码单元,用于对所述音频特征进行第二解码,得到第二中间解码结果,其中,所述第二中间解码结果包括所述第一子音频特征对应的非重置解码结果;所述第一子音频特征对应的非重置解码结果是由所述第一子音频特征和对应时刻未进行重置的系统网络状态生成的解码结果。
  10. 根据权利要求8所述的装置,其特征在于,所述音频特征包括第二子音频特征,所述第一中间解码结果包括所述第二子音频特征对应的非重置解码结果,
    所述第二解码单元,还用于对所述音频特征进行第二解码,得到第二中间解码结果;其中,第二中间解码结果包括所述第二子音频特征对应的重置解码结果,所述第二子音频特征对应的重置解码结果是由所述第二子音频特征和对应时刻重置后的系统网络状态生成的。
  11. 根据权利要求9或10所述的装置,其特征在于,所述第一解码单元包括:
    第一重置子单元,用于在所述第一解码过程中,当所述待解码的音频流在当前时刻的持续时间长度能被预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对所述重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;
    第一获得子单元,用于当所述待解码的音频流在当前时刻的持续时间长度不能被预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第一解码结果;
    第一解码子单元,用于根据所述当前时刻的第一解码结果,得到第一中间解码结果。
  12. 根据权利要求9或10所述的装置,其特征在于,所述第二解码单元包括:
    第二重置子单元,用于在所述第二解码过程中,当所述待解码的音频流在当前时刻的持续时间长度减去一半所述预设的状态重置周期后,能被所述预设的状态重置周期整除时,对系统网络状态进行重置,得到重置后的系统网络状态;并对所述重置后的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果;
    第二获得子单元,用于当所述待解码的音频流在当前时刻的持续时间长度减去一半所述预设的状态重置周期后,不能被所述预设的状态重置周期整除时,对前一时刻的系统网络状态和当前时刻的音频特征进行推理计算,得到当前时刻的第二解码结果;
    第二解码子单元,用于根据所述当前时刻的第二解码结果,得到第二中间解码结果。
  13. 根据权利要求11所述的装置,其特征在于,所述预设的状态重置周期是根据所述待解码的音频流中关键词的持续时间长度确定的。
  14. 根据权利要求8至13任一所述的装置,其特征在于,所述确定单元具体用于:
    根据所述第一中间解码结果和所述第二中间解码结果,确定所述待解码的音频流的最终解码结果。
  15. 一种音频流解码设备,其特征在于,所述设备包括存储器、处理器;
    所述存储器,用于存储指令;
    所述处理器,用于执行所述存储器中的所述指令,执行权利要求1-7任意一项所述的方法。
  16. 一种计算机可读存储介质,包括指令,当其在计算机上运行时,使得所述计算机执行以上权利要求1-7任意一项所述的方。
PCT/CN2021/071635 2020-04-30 2021-01-14 一种音频流解码方法、装置、存储介质及设备 WO2021218240A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010362621.XA CN111640440B (zh) 2020-04-30 2020-04-30 一种音频流解码方法、装置、存储介质及设备
CN202010362621.X 2020-04-30

Publications (1)

Publication Number Publication Date
WO2021218240A1 true WO2021218240A1 (zh) 2021-11-04

Family

ID=72332433

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/071635 WO2021218240A1 (zh) 2020-04-30 2021-01-14 一种音频流解码方法、装置、存储介质及设备

Country Status (2)

Country Link
CN (1) CN111640440B (zh)
WO (1) WO2021218240A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111640440B (zh) * 2020-04-30 2022-12-30 华为技术有限公司 一种音频流解码方法、装置、存储介质及设备

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170192956A1 (en) * 2015-12-31 2017-07-06 Google Inc. Generating parse trees of text segments using neural networks
CN110222225A (zh) * 2019-06-11 2019-09-10 苏州思必驰信息科技有限公司 Gru编解码器训练方法、音频的摘要生成方法及装置
CN110223429A (zh) * 2019-06-19 2019-09-10 上海应用技术大学 语音门禁系统
CN110544484A (zh) * 2019-09-23 2019-12-06 中科超影(北京)传媒科技有限公司 高阶Ambisonic音频编解码方法及装置
CN110619871A (zh) * 2018-06-20 2019-12-27 阿里巴巴集团控股有限公司 语音唤醒检测方法、装置、设备以及存储介质
CN110913229A (zh) * 2018-09-18 2020-03-24 腾讯科技(深圳)有限公司 基于rnn的解码器隐状态确定方法、设备和存储介质
CN111640440A (zh) * 2020-04-30 2020-09-08 华为技术有限公司 一种音频流解码方法、装置、存储介质及设备

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3616196A4 (en) * 2017-04-28 2021-01-20 DTS, Inc. AUDIO ENCODER WINDOW AND TRANSFORMATION IMPLEMENTATIONS

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170192956A1 (en) * 2015-12-31 2017-07-06 Google Inc. Generating parse trees of text segments using neural networks
CN110619871A (zh) * 2018-06-20 2019-12-27 阿里巴巴集团控股有限公司 语音唤醒检测方法、装置、设备以及存储介质
CN110913229A (zh) * 2018-09-18 2020-03-24 腾讯科技(深圳)有限公司 基于rnn的解码器隐状态确定方法、设备和存储介质
CN110222225A (zh) * 2019-06-11 2019-09-10 苏州思必驰信息科技有限公司 Gru编解码器训练方法、音频的摘要生成方法及装置
CN110223429A (zh) * 2019-06-19 2019-09-10 上海应用技术大学 语音门禁系统
CN110544484A (zh) * 2019-09-23 2019-12-06 中科超影(北京)传媒科技有限公司 高阶Ambisonic音频编解码方法及装置
CN111640440A (zh) * 2020-04-30 2020-09-08 华为技术有限公司 一种音频流解码方法、装置、存储介质及设备

Also Published As

Publication number Publication date
CN111640440B (zh) 2022-12-30
CN111640440A (zh) 2020-09-08

Similar Documents

Publication Publication Date Title
CN110600017B (zh) 语音处理模型的训练方法、语音识别方法、系统及装置
CN110211574B (zh) 基于瓶颈特征和多尺度多头注意力机制的语音识别模型建立方法
JP6903129B2 (ja) ささやき声変換方法、装置、デバイス及び可読記憶媒体
CN108305617B (zh) 语音关键词的识别方法和装置
CN109785824B (zh) 一种语音翻译模型的训练方法及装置
CN111312245B (zh) 一种语音应答方法、装置和存储介质
CN115641543B (zh) 一种多模态抑郁情绪识别方法及装置
CN108320738A (zh) 语音数据处理方法及装置、存储介质、电子设备
CN114127849A (zh) 语音情感识别方法和装置
CN111653275A (zh) 基于lstm-ctc尾部卷积的语音识别模型的构建方法及装置、语音识别方法
CN113361258A (zh) 基于图卷积网络和选择注意力的方面级情感分析方法及系统
Zhou et al. ICRC-HIT: A deep learning based comment sequence labeling system for answer selection challenge
WO2021127982A1 (zh) 语音情感识别方法、智能装置和计算机可读存储介质
WO2023226239A1 (zh) 对象情绪的分析方法、装置和电子设备
CN113656563A (zh) 一种神经网络搜索方法及相关设备
WO2021218240A1 (zh) 一种音频流解码方法、装置、存储介质及设备
CN109635282B (zh) 用于多方对话的篇章解析方法、装置、介质及计算设备
CN113763966A (zh) 一种端到端的文本无关声纹识别方法及系统
CN107622769A (zh) 号码修改方法及装置、存储介质、电子设备
CN112349294A (zh) 语音处理方法及装置、计算机可读介质、电子设备
CN110717022A (zh) 一种机器人对话生成方法、装置、可读存储介质及机器人
CN112669824B (zh) 构建声学模型的方法、语音识别系统和语音识别方法
CN110188367B (zh) 一种数据处理方法及装置
CN109446518B (zh) 语言模型的解码方法及解码器
Mohammed Ameen et al. Deep Learning Methods for Arabic Autoencoder Speech Recognition System for Electro-Larynx Device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21795575

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21795575

Country of ref document: EP

Kind code of ref document: A1