Audio encoding and decoding method and related device, equipment, and storage medium
By integrating multiple microphones into the sound pickup device and introducing the sound pickup mode field, the problem that the sound pickup device in the existing technology cannot adapt to multiple scenarios is solved, audio coding and decoding in multiple sound pickup modes are realized, and the equipment is improved. adaptability and battery life, and meet the needs of non-aware users.
Patent Information
- Application Number
- CN202111481150.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-06
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2041-12-06
AI Technical Summary
Existing sound pickup equipment can only support one sound pickup mode and cannot adapt to multiple scenarios. Existing audio encoding and decoding methods cannot naturally adapt to multiple sound pickup modes.
By integrating multiple microphones in the sound pickup device and introducing the pickup pattern field in audio signal processing, the collected audio signals are converted into digital signals and encoded based on the pickup pattern to generate audio containing pickup pattern information. Data, the terminal device selects the appropriate noise reduction mode according to the mode field when decoding.
It realizes audio encoding and decoding in multiple pickup modes, reduces the size of the device, improves battery life, meets the needs of non-aware users, and avoids the complexity of encoding and decoding in different modes.
Smart Images

Figure CN114333858B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of audio coding and decoding technology, and in particular to an audio coding and decoding method and related devices, equipment, and storage media. Background Art
[0002] Sound pickup devices such as voice recorders are widely used in work, study, and life. For example, in the work process, the sound pickup device can be used to pick up and record training audio, while in the study process, the sound pickup device can be used to pick up and record lecture audio.
[0003] At present, the existing sound pickup devices are often equipped with only one type of sound pickup hardware, such as only an omnidirectional microphone or only a unidirectional microphone. The functions of the sound pickup devices are relatively simple, and they cannot provide multiple sound pickup modes and cannot adapt to multiple scene switching. However, if multiple sound pickup hardware is simply equipped, the existing audio codec method cannot adapt naturally. In view of this, how to perform audio codec when the sound pickup device supports multiple sound pickup modes has become an urgent problem to be solved. Summary of the invention
[0004] The main technical problem solved by the present application is to provide an audio encoding and decoding method and related devices, equipment, and storage media, which can perform audio encoding and decoding when the sound pickup device supports multiple sound pickup modes.
[0005] In order to solve the above technical problems, the first aspect of the present application provides an audio encoding method, including: converting a collected audio signal into a digital signal; encoding the digital signal based on the pickup mode of the sound pickup device when collecting the audio signal to obtain audio data; wherein the pickup mode is used to characterize the type of microphones that are respectively connected to each channel of the sound pickup device, and each frame of audio data includes a first field and a second field, the first field is used to characterize the pickup mode, and the second field is obtained based on digital signal processing, and after the terminal device obtains the audio data, it decodes based on the second field in the audio data to obtain a digital signal.
[0006] In order to solve the above technical problems, the second aspect of the present application provides an audio decoding method, including: obtaining audio data; wherein the audio data is obtained by encoding a digital signal converted from an audio signal based on a pickup mode of a pickup device when collecting audio signals, the pickup mode is used to characterize the type of microphones that are respectively connected to each channel of the pickup device, and each frame of audio data contains a first field and a second field, the first field is used to characterize the pickup mode, and the second field is obtained based on digital signal processing; decoding is performed based on the second field in the audio data to obtain a digital signal.
[0007] In order to solve the above technical problems, the third aspect of the present application provides an audio encoding device, including: a signal conversion module and an audio encoding module, the signal conversion module is used to convert the collected audio signal into a digital signal; the audio encoding module is used to encode the digital signal based on the pickup mode of the sound pickup device when collecting the audio signal to obtain audio data; wherein the pickup mode is used to characterize the type of microphones that are respectively connected to each channel of the sound pickup device, and each frame of audio data contains a first field and a second field, the first field is used to characterize the pickup mode, and the second field is obtained based on digital signal processing, and after the terminal device obtains the audio data, it decodes based on the second field in the audio data to obtain a digital signal.
[0008] In order to solve the above technical problems, the fourth aspect of the present application provides an audio decoding device, including: a data acquisition module and an audio decoding module, the data acquisition module is used to acquire audio data; wherein the audio data is obtained by encoding a digital signal converted from an audio signal based on a pickup mode of a pickup device when collecting an audio signal, the pickup mode is used to characterize the type of microphones that are respectively connected to each channel of the pickup device, and each frame of audio data contains a first field and a second field, the first field is used to characterize the pickup mode, and the second field is obtained based on digital signal processing; the audio decoding module is used to decode based on the second field in the audio data to obtain a digital signal.
[0009] In order to solve the above technical problems, the fifth aspect of the present application provides a sound pickup device, including: multiple microphones, a selection circuit, an analog-to-digital conversion circuit, a communication circuit, a memory and a processor, the communication circuit and the memory are coupled to the processor, the input end of the selection circuit is coupled to at least two microphones, the control end of the selection circuit is coupled to the processor, the output end of the selection circuit is coupled to the input end of the analog-to-digital conversion circuit, the output end of the analog-to-digital conversion circuit is coupled to the processor, and program instructions are stored in the memory, and the processor is used to execute the program instructions to implement the audio encoding method in the above first aspect.
[0010] In order to solve the above technical problems, the sixth aspect of the present application provides a terminal device, including: a memory, a communication circuit and a processor, the memory and the communication circuit are coupled to the processor, the memory stores program instructions, and the processor is used to execute the program instructions to implement the audio decoding method in the above second aspect.
[0011] In order to solve the above technical problems, the seventh aspect of the present application provides a computer-readable storage medium, which stores program instructions that can be executed by a processor, and the program instructions are used to implement the audio encoding method in the above first aspect, or to implement the audio decoding method in the above second aspect.
[0012] The above scheme converts the collected audio signal into a digital signal, and encodes the digital signal based on the pickup mode of the pickup device when collecting the audio signal to obtain audio data, and the pickup mode is used to characterize the type of microphones that are respectively turned on in each channel of the pickup device, and each frame of audio data contains a first field and a second field, the first field is used to characterize the pickup mode, and the second field is obtained based on digital signal processing, and after the terminal device obtains the audio data, it decodes based on the second field in the audio data to obtain a digital signal, and can encode the audio signal into several frames of audio data, and each frame of audio data is set with a field for characterizing its pickup mode when it is collected, so that when decoding, it is only necessary to select a noise reduction mode that matches the pickup mode according to the field for noise reduction, so that not only can audio encoding and decoding be performed when the pickup device supports multiple pickup modes, but also there is no need to encode and save them as separate audio files in different pickup modes for decoding, so it can meet the needs of users who are not aware of it in the later audio processing process. In addition, the decoding is completed by the terminal device, which also helps to reduce the size of the pickup device and improve the battery life of the pickup device. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a flowchart of an embodiment of the audio encoding method of the present application;
[0014] Figure 2 is a schematic diagram of a framework of an embodiment of a sound pickup device;
[0015] Figure 3 It is a process diagram of an embodiment of the audio encoding method of the present application;
[0016] Figure 4 It is a process diagram of an embodiment of a second-level encoding;
[0017] Figure 5 It is a flowchart of an embodiment of an audio decoding method of the present application;
[0018] Figure 6 It is a process diagram of an embodiment of an audio decoding method of the present application;
[0019] Figure 7 It is a schematic diagram of the framework of an embodiment of an audio encoding device of the present application;
[0020] Figure 8 It is a schematic diagram of the framework of an embodiment of an audio decoding device of the present application;
[0021] Fig. 9 is a schematic diagram of a framework of another embodiment of the sound pickup device of the present application;
[0022] Fig.10 It is a schematic diagram of the framework of an embodiment of a terminal device of the present application;
[0023] Fig.11 It is a schematic diagram of a framework of an embodiment of a computer-readable storage medium of the present application. DETAILED DESCRIPTION
[0024] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0025] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0026] The terms "system" and "network" are often used interchangeably in this article. The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.
[0027] See also Figure 1 , Figure 1 It is a flowchart of an embodiment of the audio encoding method of the present application.
[0028] Specifically, the following steps may be included:
[0029] Step S11: converting the collected audio signal into a digital signal.
[0030] In the embodiment of the present disclosure, once the sound pickup device detects the sound pickup start instruction, it starts to pick up the audio signal. Specifically, the sound pickup device can be integrated with multiple microphones, and the multiple microphones include at least two different types of microphones to support multiple sound pickup modes.
[0031] In an implementation scenario, please refer to Figure 2 , Figure 2 is a schematic diagram of a framework of an embodiment of a sound pickup device. Figure 2As shown, the multi-channel microphone may include a first omnidirectional microphone, a second omnidirectional microphone and a unidirectional microphone, and the sound pickup device may support two sound pickup modes, which are respectively referred to as the first mode and the second mode for ease of description. In the first mode, the first omnidirectional microphone and the unidirectional microphone may be in a conducting state, and in the second mode, the first omnidirectional microphone and the second omnidirectional microphone may be in a conducting state. It should be noted that the omnidirectional microphone is used to pick up all-round sound to ensure the integrity of the information, while the unidirectional microphone can pick up sound of a specific direction and shield other surrounding sounds, ensuring that only valid information in a specific direction is collected to improve the signal-to-noise ratio. In addition, the multi-channel microphone may also be set to other forms according to actual conditions, such as the multi-channel microphone may include a first omnidirectional microphone, a second omnidirectional microphone, a third omnidirectional microphone and a unidirectional microphone. In the case where the sound pickup device supports two sound pickup modes, they may be respectively referred to as the first mode and the second mode, and in the first mode, the first omnidirectional microphone, the second omnidirectional microphone and the third omnidirectional microphone may be in a conducting state, and in the second mode, the first omnidirectional microphone, the second omnidirectional microphone and the unidirectional microphone may be in a conducting state. The above examples of multi-channel microphones are only several possible implementation methods in actual application, and do not limit the actual setting method of the multi-channel microphone. In the above method, the sound pickup device is configured to include a first omnidirectional microphone, a second omnidirectional microphone and a unidirectional microphone, and the sound pickup mode of the sound pickup device includes a first mode and a second mode. In the first mode, the first omnidirectional microphone and the unidirectional microphone are in a conductive state, and in the second mode, the first omnidirectional microphone and the second omnidirectional microphone are in a conductive state. Therefore, the sound pickup device can support multiple sound pickup modes based on the multi-channel microphone to improve the adaptability of the sound pickup device to multiple scenarios.
[0032] In one implementation scenario, the sound pickup device may be provided with a start button. When it is detected that the user presses the start button, a sound pickup start instruction may be generated to enable the sound pickup device to start picking up the audio signal. Figure 2 The start key (not shown) can be connected to the processor. After the user presses the start key, the pin connected to the processor can detect a level signal (e.g., a digital signal "11"). At this time, the processor can generate a driving signal in response to the level signal to turn on the corresponding microphone according to the currently set pickup mode.
[0033] In an implementation scenario, please continue to refer to Figure 2 ,like Figure 2As shown, the sound pickup device can also be provided with communication circuits such as Bluetooth (e.g., Bluetooth Low Energy BLE), WiFi (Wireless Fidelity), USB (Universal Serial Bus), and the sound pickup device can be connected to the terminal device through the communication circuit. Exemplarily, the terminal device may include but is not limited to: a mobile phone, a tablet computer, a microcomputer, etc., which are not limited here. For example, the sound pickup device can be wirelessly connected to the terminal device via Bluetooth, WiFi, etc., and of course the sound pickup device can also be wired to the terminal device via USB, which is not limited here. On this basis, the user can send a sound pickup start instruction to the sound pickup device through the communication link between the sound pickup device and the terminal device by controlling the terminal device, so that the sound pickup device starts to pick up the audio signal.
[0034] In an implementation scenario, please refer to Figure 2 The sound pickup device may also include an analog-to-digital conversion circuit. For example, the sound pickup device may include a CODEC chip (i.e., a voice codec chip) that can be used to convert the audio signal picked up by the microphone into a digital signal. The specific process of analog-to-digital conversion can be referred to the relevant technical details about CODEC, which will not be repeated here.
[0035] Step S12: based on the sound pickup pattern of the sound pickup device when collecting the audio signal, encode the digital signal to obtain audio data.
[0036] In the embodiment of the present disclosure, the sound pickup mode is used to characterize the type of microphones that are connected to each channel of the sound pickup device. For example, the sound pickup device can be provided with two left and right channels, which are respectively referred to as the first channel and the second channel for ease of description. Figure 2 , the first channel is fixedly picked up by the first omnidirectional microphone, and the second channel can selectively pick up the audio signal by the second omnidirectional microphone or the unidirectional microphone. Other situations can be deduced by analogy, and no examples are given here. It should be noted that the sound pickup device can also be set with three, four, or even more channels as needed, which is not limited here.
[0037] In one implementation scenario, the sound pickup device may also be provided with a switch key for switching the sound pickup mode, and the switch key may be set to a sliding switch, a pressing switch, or other operation forms, which are not limited here. For example, taking the sound pickup mode of the sound pickup device including the first mode and the second mode as an example, when the user selects the first mode through the switch key, the pin connected to the processor and the switch key may detect a level signal (e.g., a digital signal "01"), and the processor may generate a selection signal (e.g., a digital signal "01") in response to the level signal, and the pin (CTRL) connected to the processor and the selection circuit is output to the selection circuit, and the selection circuit selects to turn on the unidirectional microphone in response to the selection signal; similarly, when the user selects the second mode through the switch key, the pin connected to the processor and the switch key may see a level signal (e.g., a digital signal "10"), and the processor may generate a selection signal (e.g., a digital signal "10") in response to the level signal, and the pin (CTRL) connected to the processor and the selection circuit is output to the selection circuit, and the selection circuit selects to turn on the second omnidirectional microphone in response to the selection signal. The same can be said for other situations, which will not be listed here one by one.
[0038] In an implementation scenario, as described above, the sound pickup device can establish a communication link with the terminal device through a communication circuit such as Bluetooth, WiFi, USB, etc., and on this basis, the user can switch the sound pickup mode of the sound pickup device by manipulating the terminal device. Exemplarily, taking the sound pickup mode of the sound pickup device including the first mode and the second mode as an example, when the user sends a mode switching instruction to select the first mode to the sound pickup device through the terminal device, the processor can generate a selection signal (such as a digital signal "01") in response to the mode switching instruction, and the pin (CTRL) connected to the selection circuit by the processor is output to the selection circuit, and the selection circuit responds to the selection signal to select the unidirectional microphone to be turned on; similarly, when the user sends a mode switching instruction to select the second mode to the sound pickup device through the terminal device, the processor can generate a selection signal (such as a digital signal "10") in response to the mode switching instruction, and the pin (CTRL) connected to the selection circuit by the processor is output to the selection circuit, and the selection circuit responds to the selection signal to select the second omnidirectional microphone to be turned on. Other situations can be deduced by analogy, and no examples are given one by one here.
[0039] In the disclosed embodiment, each frame of audio data includes a first field and a second field, the first field is used to characterize the sound pickup mode, and the second field is obtained based on digital signal processing. It should be noted that, for ease of processing, each frame of audio data can be set to a first length, and the first length can be specifically set to 1024 bits, 2048 bits, etc., which is not limited here. In addition, the first field can be represented by a binary value of a preset bit position, and the preset bit position can also be set to 1 bit, 2 bits, etc., which is not limited here.
[0040] In one implementation scenario, when the pickup mode of the pickup device includes a first mode and a second mode, the preset bit position can be set to one bit. At this time, in the first mode, the first field can be marked as a first character, and in the second mode, the first field can be marked as a second character, and the first character is different from the second character. Exemplarily, the first character can be set to 1 and the second character can be set to 0, which is not limited here. In the above manner, in the first mode, the first field is marked as the first character, and in the second mode, the first field is marked as the second character, and the first character is different from the second character, which can reduce the encoding complexity of the first field while distinguishing different pickup modes.
[0041] In one implementation scenario, the digital signal can be compressed and encoded to obtain a compressed signal, and the compressed signal can be divided to obtain a plurality of second fields. On this basis, the first field representing the sound pickup pattern is combined with each second field to obtain each frame of audio data. In the above manner, each frame of audio data can be encoded through compression encoding, signal division and field combination, which is conducive to greatly reducing the encoding complexity.
[0042] In a specific implementation scenario, as described above, each frame of audio data can be set to the first length. In this case, the compressed signal can be divided according to the second length to obtain several second fields, and the sum of the length of the first field and the second length is the first length.
[0043] In a specific implementation scenario, the sound pickup device may further include a processor for continuing to encode the digital signal to obtain audio data. Specifically, as mentioned above, the sound pickup device may include an analog-to-digital conversion circuit such as a CODEC, and the analog-to-digital conversion circuit may be connected to the processor via an audio interface such as I2S to transmit the digital signal to the processor for the next step of encoding. It should be noted that during the analog-to-digital conversion process, the audio signals picked up by each microphone are respectively converted into analog-to-digital signals to obtain their respective corresponding digital signals. Exemplarily, taking the first mode as the pickup mode, the first omnidirectional microphone can pick up an audio signal, and the unidirectional microphone can also pick up an audio signal. Based on this, the audio signal picked up by the first omnidirectional microphone can be converted into analog-to-digital to obtain a corresponding digital signal, and the audio signal picked up by the unidirectional microphone can be converted into analog-to-digital to obtain a corresponding digital signal; or, taking the second mode as the pickup mode, the first omnidirectional microphone can pick up an audio signal, and the second omnidirectional microphone can also pick up an audio signal. Based on this, the audio signal picked up by the first omnidirectional microphone can be converted into analog-to-digital to obtain a corresponding digital signal, and the audio signal picked up by the second omnidirectional microphone can be converted into analog-to-digital to obtain a corresponding digital signal. Other situations can be deduced by analogy, and examples are not given one by one here. In addition, the digital signal obtained after the analog-to-digital conversion may include but is not limited to PCM (Pulse Code Modulation) format, which is not limited here.
[0044] In a specific implementation scenario, during the compression encoding process, for each digital signal, it can be encoded with a preset value (such as 256) sampling points as a frame, so that for each channel, several frames of encoded data can be obtained. On this basis, each channel of encoded data is compressed into a compressed signal according to a preset compression ratio (such as 6).
[0045] In a specific implementation scenario, after the compressed signal is obtained through compression encoding, the compressed signal can be divided according to the second length, each segment of the signal can be regarded as a second field, and the second length is the difference between the first length and the length of the first field. On this basis, by combining the first field and each second field representing the pickup mode when collecting the audio signal, each frame of audio data can be obtained. Therefore, in the audio encoding process, it is only necessary to clarify the pickup mode of the pickup device when collecting the currently encoded audio signal, which greatly reduces the complexity of audio encoding when supporting multiple pickup modes.
[0046] In a specific implementation scenario, please refer to Figure 3 , Figure 3 1 is a process diagram of an embodiment of the audio encoding method of the present application. Figure 3As shown, taking the case where the sound pickup device picks up two audio signals, two digital signals (such as PCM audio) can be obtained by performing analog-to-digital conversion on the two audio signals respectively. On this basis, primary encoding (such as using the IBC voice encoding algorithm) can be performed to compress the two digital signals into one compressed signal, and then secondary encoding can be performed. Specifically, the compressed signal can be divided according to the second length to obtain the second field and combined with the first field to obtain each frame of audio data. Please continue to refer to Figure 4 , Figure 4 Schematic diagram of the process of the second level coding embodiment. Figure 4 As shown, in the actual application process, when performing secondary encoding, the character marked by the first field can be set according to the signal of the processor CTRL pin. Still taking the pickup mode including the first mode and the second mode as an example, as mentioned above, when the first mode is selected, the CTRL pin outputs the selection signal "01", then at this time, according to the selection signal "01", the character marked by the first field can be set to "1", similarly, when the second mode is selected, the CTRL pin outputs the selection signal "10", then at this time, according to the selection signal "10", the character marked by the first field can be set to "0", and other situations can be deduced by analogy, and no examples are given here one by one.
[0047] In one implementation scenario, when a mode switching instruction is detected during the sound pickup process, the mode switching instruction can be parsed to obtain a new sound pickup mode, and the sound pickup device can be switched to the new sound pickup mode, and the above-mentioned steps of converting the collected audio signal into a digital signal and subsequent steps can be re-executed to continue to pick up the audio signal in the new sound pickup mode and convert it into a digital signal, and continue to encode the new digital signal based on the new sound pickup mode, without temporarily combining the audio data in the previous sound pickup mode and saving it as an audio file, thereby keeping the user unaware throughout the sound pickup process and improving the user experience.
[0048] In a specific implementation scenario, the mode switching instruction can be triggered by a button, or by a terminal device that establishes a communication connection with the sound pickup device. For details, please refer to the above-mentioned related description, which will not be repeated here.
[0049] In a specific implementation scenario, taking the current sound pickup mode as the first mode as an example, the first field in each frame of audio data obtained by encoding the digital signal is marked as the first character (e.g., 1). When a mode switching instruction is detected and the new sound pickup mode is parsed to be the second mode, the sound pickup device can switch on the second omnidirectional microphone, and at the same time the first omnidirectional microphone remains on. After the switch, the newly picked up audio signal is converted into a digital signal, and the first field in each frame of audio data obtained by encoding the digital signal is changed to be marked as the second character (e.g., 0). Other situations can be deduced by analogy and are not given examples one by one here.
[0050] In the disclosed embodiment, after the terminal device obtains the audio data, it can decode based on the second field in the audio data to obtain a digital signal. Further, after the digital signal is decoded, the digital signal can be denoised based on a noise reduction mode that matches the sound pickup mode. The specific process can be referred to in the following disclosed embodiment, which will not be described here.
[0051] In one implementation scenario, the sound pickup device can transmit an audio stream to a terminal device in real time so that the audio stream can be decoded in real time by the terminal device. That is, at this time, the sound pickup device sends each frame of audio data to the terminal device for decoding in real time. It should be noted that, as mentioned above, the sound pickup device can establish a communication connection with the terminal device through Bluetooth, WiFi, USB, etc., and accordingly, the sound pickup device can send each frame of audio data to the terminal device in real time through Bluetooth, WiFi, USB, etc. In the above manner, the sound pickup device sends each frame of audio data to the terminal device for decoding in real time, which can help improve the real-time performance of audio decoding.
[0052] In one implementation scenario, when the sound pickup device detects the sound pickup end instruction, the audio data of each frame encoded in the sound pickup process can be merged in time sequence to obtain an audio file corresponding to the sound pickup process. Furthermore, the audio file can be saved locally in the sound pickup device or sent to the terminal device for decoding. In the above method, when the sound pickup end instruction is detected, the audio file corresponding to the current sound pickup is saved, and the audio file can be saved locally in the sound pickup device or sent to the terminal device for decoding. Therefore, when supporting multiple sound pickup modes, one sound pickup process corresponds to one audio file, which can make the user remain unaware during the use of the sound pickup device, which is conducive to improving the user experience.
[0053] In a specific implementation scenario, the above-mentioned timing sequence specifically refers to the encoding timing sequence of each frame of audio data, such as Figure 4As shown, the audio data with subscript 0 is the first encoded audio data in this sound pickup process, the audio data with subscript 1 is the second encoded audio data in this sound pickup process, and so on, the audio data with subscript N is the N+1th encoded audio data in this sound pickup process.
[0054] In a specific implementation scenario, as mentioned above, the sound pickup device can establish a communication connection with the terminal device through Bluetooth, WiFi, USB, etc., then correspondingly, the user can control the terminal device to send a sound pickup end instruction to the sound pickup device, so as to transmit the sound pickup end instruction to the sound pickup device through Bluetooth, WiFi, USB, etc. Of course, the sound pickup device can also be provided with an end key, and when it is detected that the user presses the end key, a sound pickup end instruction can be generated to make the sound pickup device stop picking up audio signals. The specific process of ending sound pickup by key control can refer to the aforementioned description related to starting sound pickup, which will not be repeated here.
[0055] In a specific implementation scenario, please refer to Figure 2 The sound pickup device may also be provided with a memory, which may be an EMMC (Embedded Multi Media Card), etc., which is not limited here. That is, each frame of audio data obtained by encoding may be stored in the memory first, and after detecting the sound pickup end instruction, each frame of audio data stored in the sound pickup process may be merged to obtain an audio file, which is then sent to the terminal device via methods such as Bluetooth, WiFi, USB, etc., so as to be decoded by the terminal device. The specific process of audio decoding may refer to the following public embodiments, which will not be described here.
[0056] The above scheme converts the collected audio signal into a digital signal, and encodes the digital signal based on the pickup mode of the pickup device when collecting the audio signal to obtain audio data, and the pickup mode is used to characterize the type of microphones that are respectively turned on in each channel of the pickup device, and each frame of audio data includes a first field and a second field, the first field is used to characterize the pickup mode, and the second field is obtained based on digital signal processing, and after the terminal device obtains the audio data, it decodes based on the second field in the audio data to obtain a digital signal, and can encode the audio signal into several frames of audio data, and each frame of audio data is set with a field for characterizing its pickup mode when it is collected, so that when decoding, it only needs to select a noise reduction mode that matches the pickup mode according to the field for noise reduction, so it can not only perform audio encoding and decoding when the pickup device supports multiple pickup modes, but also does not need to be encoded and saved as separate audio files in different pickup modes for decoding, so it can meet the needs of users who are not aware of it in the later audio processing process. In addition, the decoding is completed by the terminal device, which also helps to reduce the size of the pickup device and improve the battery life of the pickup device.
[0057] See also Figure 5 , Figure 5 It is a flowchart of an embodiment of the audio decoding method of the present application.
[0058] Specifically, the following steps may be included:
[0059] Step S51: Acquire audio data.
[0060] In the disclosed embodiment, the audio data is obtained by encoding the digital signal converted from the audio signal based on the pickup mode of the sound pickup device when collecting the audio signal. The pickup mode is used to characterize the type of microphones that are respectively connected to each channel of the sound pickup device, and each frame of audio data includes a first field and a second field. The first field is used to characterize the pickup mode, and the second field is obtained based on digital signal processing. For details, please refer to the relevant description in the aforementioned disclosed embodiment, which will not be repeated here.
[0061] In an implementation scenario, as described above, the sound pickup device can send each frame of audio data to the terminal device in real time. At this time, the terminal device can also obtain each frame of audio data in real time and decode each frame of audio data respectively.
[0062] In one implementation scenario, as described above, after detecting the sound pickup end instruction, the sound pickup device can merge the frames of audio data encoded in the sound pickup process in a time sequence to obtain an audio file corresponding to the sound pickup process, and send the audio file to the terminal device. The terminal device can receive the audio file from the sound pickup device. On this basis, each frame of audio data can be extracted from the audio file according to the first length. Please refer to Figure 4 , Figure 4 The figure shows an audio file obtained by merging N frames of audio data in sequence, and then the audio data frame length (i.e., the first length) can be divided in sequence to obtain a frame of audio data with a subscript of 0, a frame of audio data with a subscript of 1, ..., and a frame of audio data with a subscript of N. Other situations can be deduced by analogy, and no examples are given here one by one. In the above method, by receiving an audio file from a sound pickup device, and after the sound pickup device detects a sound pickup end instruction during the sound pickup process, each frame of audio data is merged in sequence in sequence, and then each frame of audio data is extracted from the audio file according to the first length, so that each frame of audio data can be restored from the audio file in an orderly and convenient manner, which is conducive to improving the efficiency of obtaining audio data during the decoding process.
[0063] Step S52: Decode based on the second field in the audio data to obtain a digital signal.
[0064] In an implementation scenario, please refer to Figure 3, in contrast to the encoding process, after obtaining the audio data, the second field in the audio data can be extracted as a compressed signal, and the compressed signal can be decompressed and decoded to obtain a digital signal. Taking the encoding process as an example of encoding two audio signals at the same time, in the decoding process, the second field in the audio data can be extracted as a compressed signal, and after decompressing and decoding the compressed signal, two digital signals (such as PCM audio) can be obtained. Other situations can be deduced by analogy, and no examples are given here one by one.
[0065] In one implementation scenario, after the digital signal is decoded, the digital signal can also be subjected to noise reduction based on a noise reduction mode that matches the pickup mode. Specifically, the first field in the audio data can be extracted, and the pickup mode of the pickup device when collecting the audio signal can be learned through the first field, so that the noise reduction mode that matches the pickup mode can be used to perform noise reduction processing on the digital signal. Specifically, the pickup mode of the pickup device when collecting the audio signal can be learned based on the first field, and as mentioned above, the pickup mode indicates the type of microphone that is respectively turned on for each channel of the pickup device, so when performing noise reduction processing on the digital signal of each channel, a noise reduction mode that matches the type of microphone that is respectively turned on for each channel can be used to perform noise reduction on the digital signal of each channel. Exemplarily, when it is detected that the first field is marked as "1", it can be learned that the pickup mode of the sound pickup device when collecting audio signals is the first mode, and the noise reduction algorithm corresponding to the unidirectional microphone can be used to reduce the noise of the digital signal of the second channel. When it is detected that the first field is marked as "0", it can be learned that the pickup mode of the sound pickup device when collecting audio signals is the second mode, and the noise reduction algorithm corresponding to the omnidirectional microphone can be used to reduce the noise of the digital signal of the second channel. Regardless of the first mode or the second mode, the digital signal of the first channel can be uniformly reduced by the noise reduction algorithm corresponding to the omnidirectional microphone. Other situations can be deduced by analogy, and examples are not given one by one here. Therefore, after decoding, the first field can be used to automatically identify the noise reduction algorithm to be used subsequently, without the user manually telling the terminal device which noise reduction algorithm to use, which is conducive to further ensuring that users are not aware of the entire cycle and improving the user experience.
[0066] In an implementation scenario, please refer to Figure 6 , Figure 6 1 is a process diagram of an embodiment of the audio decoding method of the present application. Figure 6 As shown, after decoding and noise reduction, the user can choose to audition on the terminal device.
[0067] In an implementation scenario, please continue to refer to Figure 6After decoding and noise reduction, the terminal device can also transcribe to obtain the corresponding recognized text, and display the recognized text on the terminal device. In addition, since it is linked with the terminal device and noise reduction and transcription are performed by the terminal device, it is helpful to reduce the cost of the sound pickup equipment, and since the computing power of the terminal device is usually high, it also helps to improve the transcription rate.
[0068] The above scheme can encode the audio signal into several frames of audio data, and each frame of audio data is set with a field for characterizing the sound pickup mode during acquisition, so that when decoding, it is only necessary to select the noise reduction mode that matches the sound pickup mode according to the field for noise reduction. Therefore, it is not only possible to perform audio encoding and decoding when the sound pickup device supports multiple sound pickup modes, but also does not need to encode and save them as separate audio files for decoding separately under different sound pickup modes, so it can meet the needs of users who are not aware of it in the later audio processing process. In addition, the decoding is completed by the terminal device, which also helps to reduce the size of the sound pickup device and improve the battery life of the sound pickup device.
[0069] See also Figure 7 , Figure 7 It is a schematic diagram of a framework of an embodiment of an audio encoding device 70 of the present application. The audio encoding device 70 includes: a signal conversion module 71 and an audio encoding module 72. The signal conversion module 71 is used to convert the collected audio signal into a digital signal; the audio encoding module 72 is used to encode the digital signal based on the sound pickup mode of the sound pickup device when collecting the audio signal to obtain audio data; wherein the sound pickup mode is used to characterize the type of microphones that are respectively turned on for each channel of the sound pickup device, and each frame of audio data includes a first field and a second field, the first field is used to characterize the sound pickup mode, and the second field is obtained based on digital signal processing, and after the terminal device obtains the audio data, it decodes based on the second field in the audio data to obtain a digital signal.
[0070] The above scheme can encode the audio signal into several frames of audio data, and each frame of audio data is set with a field for characterizing the sound pickup mode during acquisition, so that when decoding, it is only necessary to select the noise reduction mode that matches the sound pickup mode according to the field for noise reduction. Therefore, it is not only possible to perform audio encoding and decoding when the sound pickup device supports multiple sound pickup modes, but also does not need to encode and save them as separate audio files for decoding separately under different sound pickup modes, so it can meet the needs of users who are not aware of it in the later audio processing process. In addition, the decoding is completed by the terminal device, which also helps to reduce the size of the sound pickup device and improve the battery life of the sound pickup device.
[0071] In some disclosed embodiments, the sound pickup device includes a first omnidirectional microphone, a second omnidirectional microphone and a unidirectional microphone, and the sound pickup mode of the sound pickup device includes a first mode and a second mode; wherein, in the first mode, the first omnidirectional microphone and the unidirectional microphone are in a conductive state, and in the second mode, the first omnidirectional microphone and the second omnidirectional microphone are in a conductive state.
[0072] Therefore, the sound pickup device is configured to include a first omnidirectional microphone, a second omnidirectional microphone and a unidirectional microphone, and the sound pickup mode of the sound pickup device includes a first mode and a second mode. In the first mode, the first omnidirectional microphone and the unidirectional microphone are in an on state, and in the second mode, the first omnidirectional microphone and the second omnidirectional microphone are in an on state. Therefore, the sound pickup device can support multiple sound pickup modes based on the multi-channel microphones to enhance the adaptability of the sound pickup device to multiple scenarios.
[0073] In some disclosed embodiments, in a first mode, the first field is marked with a first character, and in a second mode, the first field is marked with a second character, and the first character is different from the second character.
[0074] Therefore, in the first mode, the first field is marked as the first character, and in the second mode, the first field is marked as the second character, and the first character is different from the second character, which can reduce the encoding complexity of the first field while distinguishing different pickup modes.
[0075] In some disclosed embodiments, the audio encoding device 70 includes a data merging module for merging the frames of audio data encoded during the sound pickup process in a time sequence in response to detecting an instruction to end sound pickup, so as to obtain an audio file corresponding to the sound pickup process; wherein the audio file is stored locally in the sound pickup device, and / or the audio file is sent to a terminal device for decoding.
[0076] Therefore, when the sound pickup end instruction is detected, the audio file corresponding to this sound pickup is saved, and the audio file can be saved locally in the sound pickup device or sent to the terminal device for decoding. Therefore, while supporting multiple sound pickup modes, one sound pickup process corresponds to one audio file, which can enable the user to remain unaware of the process of using the sound pickup device, which is conducive to improving the user experience.
[0077] In some disclosed embodiments, the audio encoding module 72 includes a compression encoding submodule for compressing and encoding a digital signal to obtain a compressed signal; the audio encoding module 72 includes a signal division submodule for dividing the compressed signal to obtain a plurality of second fields; the audio encoding module 72 includes a field combination submodule for combining the first field representing the pickup pattern with each second field to obtain each frame of audio data.
[0078] Therefore, through compression coding, signal division and field combination, each frame of audio data can be encoded, which is beneficial to greatly reduce the coding complexity.
[0079] In some disclosed embodiments, the audio encoding module 72 includes a mode switching module for responding to a mode switching instruction detected during the sound pickup process, parsing the mode switching instruction to obtain a new sound pickup mode, and switching the sound pickup device to the new sound pickup mode; the audio encoding module 72 includes a loop execution module for combining the signal conversion module 71 and the audio encoding module 72 to re-execute the step of converting the collected audio signal into a digital signal and subsequent steps.
[0080] Therefore, there is no need to temporarily combine and save the audio data in the previous sound pickup mode as an audio file, so that the user can remain unaware of the entire sound pickup process, thereby improving the user experience.
[0081] See also Figure 8 , Figure 8 1 is a schematic diagram of a framework of an embodiment of an audio decoding device 80 of the present application. The audio decoding device 80 includes: a data acquisition module 81, an audio decoding module 82 and an audio noise reduction module 83, wherein the data acquisition module 81 is used to acquire audio data; wherein the audio data is obtained by encoding a digital signal converted from an audio signal based on a sound pickup mode when the sound pickup device collects the audio signal, the sound pickup mode is used to characterize the type of microphones that are respectively turned on for each channel of the sound pickup device, and each frame of audio data includes a first field and a second field, the first field is used to characterize the sound pickup mode, and the second field is obtained based on digital signal processing; the audio decoding module 82 is used to decode based on the second field in the audio data to obtain a digital signal.
[0082] The above scheme can encode the audio signal into several frames of audio data, and each frame of audio data is set with a field for characterizing the sound pickup mode during acquisition, so that when decoding, it is only necessary to select the noise reduction mode that matches the sound pickup mode according to the field for noise reduction. Therefore, it is not only possible to perform audio encoding and decoding when the sound pickup device supports multiple sound pickup modes, but also does not need to encode and save them as separate audio files for decoding separately under different sound pickup modes, so it can meet the needs of users who are not aware of it in the later audio processing process. In addition, the decoding is completed by the terminal device, which also helps to reduce the size of the sound pickup device and improve the battery life of the sound pickup device.
[0083] In some disclosed embodiments, the data acquisition module 81 includes a file receiving submodule for receiving an audio file from a sound pickup device; wherein the audio file is obtained by merging each frame of audio data in a time sequence after the sound pickup device detects a sound pickup end instruction during the sound pickup process; the data acquisition module 81 includes a data extraction submodule for extracting each frame of audio data from the audio file according to a first length.
[0084] Therefore, by receiving the audio file from the sound pickup device, and after the sound pickup device detects the sound pickup end instruction during the sound pickup process, each frame of audio data is merged in time sequence, and then each frame of audio data is extracted from the audio file according to the first length. Therefore, each frame of audio data can be restored from the audio file in an orderly and convenient manner, which is conducive to improving the efficiency of obtaining audio data during the decoding process.
[0085] In some disclosed embodiments, the audio decoding module 82 includes a signal extraction submodule for extracting the second field in the audio data as a compressed signal; the audio decoding module 82 includes a decompression and decoding submodule for decompressing and decoding the compressed signal to obtain a digital signal.
[0086] Therefore, digital signals can be recovered from audio data through operations such as field extraction, decompression and decoding, which can greatly reduce the decoding complexity while supporting multiple pickup modes.
[0087] In some disclosed embodiments, the audio decoding device 80 further includes an audio noise reduction module 83 for performing noise reduction on the digital signal based on a noise reduction pattern that matches the sound pickup pattern.
[0088] Therefore, after decoding to obtain a digital signal, the digital signal can be further subjected to noise reduction based on a noise reduction mode that matches the sound pickup mode, thereby improving the noise reduction effect.
[0089] See also Fig. 9 , Fig. 9 1 is a schematic diagram of a framework of an embodiment of a sound pickup device 90 of the present application. The sound pickup device 90 includes: a multi-channel microphone 91, a selection circuit 92, an analog-to-digital conversion circuit 93, a communication circuit 94, a memory 95 and a processor 96, wherein the communication circuit 94 and the memory 95 are coupled to the processor 96, the input end 921 of the selection circuit 92 is coupled to at least two microphones 91, the control end 922 of the selection circuit 92 is coupled to the processor 96, the output end 923 of the selection circuit 92 is coupled to the input end 931 of the analog-to-digital conversion circuit 93, the output end 932 of the analog-to-digital conversion circuit 93 is coupled to the processor 96, and the memory 95 stores program instructions, and the processor 96 is used to execute the program instructions to implement the steps in any of the above-mentioned audio encoding method embodiments. Specifically, the sound pickup device 90 may include, but is not limited to, a voice recorder, etc., which is not limited here.
[0090] Specifically, the processor 96 is used to control itself and the multi-channel microphone 91, the selection circuit 92, the analog-to-digital conversion circuit 93, the communication circuit 94, and the memory 95 to implement the steps in any of the above-mentioned audio encoding method embodiments. The processor 96 can also be called a CPU (Central Processing Unit). The processor 96 may be an integrated circuit chip with signal processing capabilities. The processor 96 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 96 can be implemented by an integrated circuit chip.
[0091] In a common implementation scenario, please continue to refer to Fig. 9 The multi-way microphone 91 may include a first omnidirectional microphone 911, a second omnidirectional microphone 912 and a unidirectional microphone 913. The first omnidirectional microphone 911 is coupled to the analog-to-digital conversion circuit 93, and the second omnidirectional microphone 912 and the unidirectional microphone 913 are coupled to the input terminal 921 of the selection circuit 92.
[0092] In one implementation scenario, the sound pickup device 90 may further include a button (not shown), which may include but is not limited to a start button, an end button, etc. For details, please refer to the relevant description in the aforementioned disclosed embodiment, which will not be repeated here. In addition, the sound pickup device 90 may also include a screen (not shown), which can be used to display the current sound pickup mode of the sound pickup device 90.
[0093] The above scheme can encode the audio signal into several frames of audio data, and each frame of audio data is set with a field for characterizing the sound pickup mode during acquisition, so that when decoding, it is only necessary to select the noise reduction mode that matches the sound pickup mode according to the field for noise reduction. Therefore, it is not only possible to perform audio encoding and decoding when the sound pickup device supports multiple sound pickup modes, but also does not need to encode and save them as separate audio files for decoding separately under different sound pickup modes, so it can meet the needs of users who are not aware of it in the later audio processing process. In addition, the decoding is completed by the terminal device, which also helps to reduce the size of the sound pickup device and improve the battery life of the sound pickup device.
[0094] See also Fig.10 , Fig.101 is a schematic diagram of a framework of an embodiment of a terminal device 100 of the present application. The terminal device 100 includes a memory 101, a communication circuit 102 and a processor 103. The memory 101 and the communication circuit 102 are coupled to the processor 103. The memory 101 stores program instructions. The processor 103 is used to execute the program instructions to implement the steps in any of the above audio decoding method embodiments. Specifically, the terminal device 100 may include but is not limited to: a mobile phone, a tablet computer, a microcomputer, etc., which are not limited here.
[0095] Specifically, the processor 103 is used to control itself, the memory 101, and the communication circuit 102 to implement the steps in any of the above-mentioned audio decoding method embodiments. The processor 103 can also be called a CPU (Central Processing Unit). The processor 103 may be an integrated circuit chip with signal processing capabilities. The processor 103 can also be a general-purpose processor, a digital signal processor (Digital Signal Processor, DSP), an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), a field-programmable gate array (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. In addition, the processor 103 can be implemented by an integrated circuit chip.
[0096] The above scheme can encode the audio signal into several frames of audio data, and each frame of audio data is set with a field for characterizing the sound pickup mode during acquisition, so that when decoding, it is only necessary to select the noise reduction mode that matches the sound pickup mode according to the field for noise reduction. Therefore, it is not only possible to perform audio encoding and decoding when the sound pickup device supports multiple sound pickup modes, but also does not need to encode and save them as separate audio files for decoding separately under different sound pickup modes, so it can meet the needs of users who are not aware of it in the later audio processing process. In addition, the decoding is completed by the terminal device, which also helps to reduce the size of the sound pickup device and improve the battery life of the sound pickup device.
[0097] See also Fig.11 , Fig.11 1 is a schematic diagram of a framework of an embodiment of a computer-readable storage medium 110 of the present application. The computer-readable storage medium 110 stores program instructions 111 that can be executed by a processor, and the program instructions 111 are used to implement the steps in any of the above message reply method embodiments.
[0098] The above scheme can encode the audio signal into several frames of audio data, and each frame of audio data is set with a field for characterizing the sound pickup mode during acquisition, so that when decoding, it is only necessary to select the noise reduction mode that matches the sound pickup mode according to the field for noise reduction. Therefore, it is not only possible to perform audio encoding and decoding when the sound pickup device supports multiple sound pickup modes, but also does not need to encode and save them as separate audio files for decoding separately under different sound pickup modes, so it can meet the needs of users who are not aware of it in the later audio processing process. In addition, the decoding is completed by the terminal device, which also helps to reduce the size of the sound pickup device and improve the battery life of the sound pickup device.
[0099] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0100] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0101] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0102] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0103] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0104] If 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. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art 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 a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
Claims
1. An audio encoding method, It is characterized in that include: Convert the collected audio signal into a digital signal; Based on the sound pickup mode of the sound pickup device when collecting the audio signal, encoding the digital signal to obtain audio data; In response to detecting a mode switching instruction during the sound pickup process, parsing the mode switching instruction to obtain a new sound pickup mode, and switching the sound pickup device to the new sound pickup mode; Re-execute the step of converting the collected audio signal into a digital signal and subsequent steps; Among them, the pickup mode is used to characterize the type of microphones that are respectively turned on for each channel of the pickup device, and each frame of the audio data contains a first field and a second field, the first field is used to characterize the pickup mode, and the second field is obtained based on the digital signal processing, and after the terminal device obtains the audio data, it decodes based on the second field in the audio data to obtain the digital signal, and the first field is used to determine a matching noise reduction mode when reducing the noise of the digital signal.
2. The method according to claim 1, It is characterized in that The sound pickup device comprises a first omnidirectional microphone, a second omnidirectional microphone and a unidirectional microphone, and the sound pickup mode of the sound pickup device comprises a first mode and a second mode; Wherein, in the first mode, the first omnidirectional microphone and the unidirectional microphone are in a conducting state, and in the second mode, the first omnidirectional microphone and the second omnidirectional microphone are in a conducting state.
3. The method according to claim 2, It is characterized in that In the first mode, the first field is marked with a first character, and in the second mode, the first field is marked with a second character, and the first character is different from the second character.
4. The method according to claim 1, It is characterized in that After encoding the digital signal based on the sound pickup pattern of the sound pickup device when collecting the audio signal to obtain the audio data, the method further includes: In response to detecting a sound pickup end instruction, the audio data of each frame encoded in the sound pickup process is merged in time sequence to obtain an audio file corresponding to the sound pickup process; The audio file is stored locally in the sound pickup device, and / or the audio file is sent to a terminal device for decoding.
5. The method according to claim 1, It is characterized in that The step of encoding the digital signal based on the sound pickup mode of the sound pickup device when collecting the audio signal to obtain the audio data comprises: Compressing and encoding the digital signal to obtain a compressed signal; dividing the compressed signal to obtain a plurality of second fields; The first field representing the sound pickup pattern is combined with each of the second fields to obtain the audio data of each frame.
6. An audio decoding method, It is characterized in that include: Acquire audio data; wherein the audio data is obtained by encoding a digital signal converted from an audio signal based on a sound pickup mode when the sound pickup device collects the audio signal, the sound pickup mode is used to characterize the type of microphones that are respectively turned on for each channel of the sound pickup device, in response to detecting a mode switching instruction during the sound pickup process, the sound pickup device parses the mode switching instruction to obtain a new sound pickup mode, switches to the new sound pickup mode, and re-encodes the digital signal converted from the audio signal based on the new sound pickup mode when the audio signal is collected to obtain audio data, and each frame of the audio data includes a first field and a second field, the first field is used to characterize the sound pickup mode, the second field is obtained based on the digital signal processing, and the first field is used to determine a matching noise reduction mode when the digital signal is denoised; Decoding is performed based on the second field in the audio data to obtain the digital signal.
7. The method according to claim 6, It is characterized in that The obtaining of audio data comprises: Receiving an audio file from the sound pickup device; wherein the audio file is obtained by merging the audio data of each frame in time sequence after the sound pickup device detects a sound pickup end instruction during the sound pickup process; The audio data of each frame is extracted from the audio file according to the first length.
8. The method according to claim 6, It is characterized in that The decoding based on the second field in the audio data to obtain the digital signal includes: Extracting the second field in the audio data as a compressed signal; The compressed signal is decompressed and decoded to obtain a digital signal.
9. The method according to claim 6, It is characterized in that After decoding based on the second field in the audio data to obtain the digital signal, the method further includes: The digital signal is subjected to noise reduction based on a noise reduction pattern that matches the sound pickup pattern represented by the first field.
10. An audio encoding device, It is characterized in that include: A signal conversion module, used for converting the collected audio signal into a digital signal; An audio encoding module, used to encode the digital signal based on the sound pickup mode of the sound pickup device when collecting the audio signal to obtain audio data; A mode switching module, for responding to a mode switching instruction detected during the sound pickup process, parsing the mode switching instruction to obtain a new sound pickup mode, and switching the sound pickup device to the new sound pickup mode; A loop execution module, used for re-executing the step of converting the collected audio signal into a digital signal and subsequent steps; Among them, the pickup mode is used to characterize the type of microphones that are respectively turned on for each channel of the pickup device, and each frame of the audio data contains a first field and a second field, the first field is used to characterize the pickup mode, and the second field is obtained based on the digital signal processing, and after the terminal device obtains the audio data, it decodes based on the second field in the audio data to obtain the digital signal, and the first field is used to determine a matching noise reduction mode when reducing the noise of the digital signal.
11. An audio decoding device, It is characterized in that include: A data acquisition module, used for acquiring audio data; wherein the audio data is obtained by encoding a digital signal converted from the audio signal based on a sound pickup mode when the sound pickup device collects the audio signal, the sound pickup mode is used to characterize the type of microphones respectively connected to each channel of the sound pickup device, in response to detecting a mode switching instruction during the sound pickup process, the sound pickup device parses the mode switching instruction to obtain a new sound pickup mode, switches to the new sound pickup mode, and re-encodes the digital signal converted from the audio signal based on the new sound pickup mode when the audio signal is collected to obtain audio data, and each frame of the audio data includes a first field and a second field, the first field is used to characterize the sound pickup mode, the second field is obtained based on the digital signal processing, and the first field is used to determine a matching noise reduction mode when the digital signal is denoised; The audio decoding module is used to decode based on the second field in the audio data to obtain the digital signal.
12. A sound pickup device, It is characterized in that include: Multiple microphones, a selection circuit, an analog-to-digital conversion circuit, a communication circuit, a memory and a processor, wherein the communication circuit and the memory are coupled to the processor, the input end of the selection circuit is coupled to at least two of the microphones, the control end of the selection circuit is coupled to the processor, the output end of the selection circuit is coupled to the input end of the analog-to-digital conversion circuit, the output end of the analog-to-digital conversion circuit is coupled to the processor, and program instructions are stored in the memory, and the processor is used to execute the program instructions to implement the audio encoding method described in any one of claims 1 to 5.
13. The device according to claim 12, It is characterized in that The multi-channel microphone includes a first omnidirectional microphone, a second omnidirectional microphone and a unidirectional microphone, the first omnidirectional microphone is coupled to the analog-to-digital conversion circuit, and the second omnidirectional microphone and the unidirectional microphone are coupled to the input end of the selection circuit.
14. A terminal device, It is characterized in that include: A memory, a communication circuit and a processor, wherein the memory and the communication circuit are coupled to the processor, the memory stores program instructions, and the processor is used to execute the program instructions to implement the audio decoding method according to any one of claims 6 to 9.
15. A computer-readable storage medium, It is characterized in that Program instructions that can be executed by a processor are stored, and the program instructions are used to implement the audio encoding method described in any one of claims 1 to 5, or to implement the audio decoding method described in any one of claims 6 to 9.
Citation Information
Patent Citations
Sound-recording apparatus
CN101727965A
Audio processing device
CN103841493A
A mobile terminal and a voice input method and apparatus thereof
CN106782589A
Distributed audio capture and mixing
CN108369811A
Spatial audio parameters
CN112513982A
