A method and system for processing 16k sampling rate audio by an AMR codec

By using the AMR-NB codec library in embedded devices, the PCM audio data with a 16k sampling rate is split and coded, which solves the problems of resource density and compatibility limitations, and achieves efficient and highly compatible audio processing effects.

CN118430550BActive Publication Date: 2025-06-10SHENZHEN JIWEI TIMES TECHNOLOGY CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410768399.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-14
Publication Date
2025-06-10
Estimated Expiration
2044-06-14

AI Technical Summary

Technical Problem

When processing PCM data at different sampling rates, the prior art faces the problems of resource density, compatibility limitations, increased software complexity and integration difficulty, especially in embedded devices.

Method used

By using the AMR-NB codec library, the PCM audio data with a 16k sample rate is split and processed, and converted into two 8k sample rate data, and the AMR-NB library is used for encoding and decoding, so as to achieve efficient processing of 16k audio data.

Benefits of technology

Significantly save hardware resources, enhance system compatibility, optimize storage utilization, improve resource management efficiency, enhance application flexibility and versatility, and simplify development integration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118430550B_ABST
    Figure CN118430550B_ABST
Patent Text Reader

Abstract

The present invention provides a method and system for processing 16k sampling rate audio with AMR encoding and decoding. The system includes: an embedded device configured with a hardware module for collecting 16k sampling rate PCM audio data and encoding the PCM data into AMR data; a mobile device containing a decoding module and a player for receiving the encoded AMR data, decoding and playing it as PCM audio; an AMR-NB encoding and decoding library installed on the embedded device and the mobile device, capable of efficiently encoding and decoding 8k and processed 16k PCM data. The technology of the present invention not only solves the problem of high sampling rate audio processing for devices with tight hardware resources, but also effectively improves the efficiency, compatibility, resource utilization rate and development convenience of the system through a series of innovative designs, bringing substantial improvements to voice communication and recording systems.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of AMR audio coding and decoding, and particularly to a method and system for processing 16k sampling rate audio by AMR coding and decoding. Background Art

[0002] Current audio coding and decoding technologies face specific limitations when processing PCM data with different sampling rates. Specifically, PCM audio data with a sampling rate of 16 kHz usually needs to be processed using the AMR-WB (Adaptive Multi-Rate Wideband) coding and decoding library, while data with a sampling rate of 8 kHz relies on the AMR-NB (Adaptive Multi-Rate Narrow Band) library. As industry standards, AMR-WB and AMR-NB are designed for different application scenarios. The former focuses on broadband audio to improve sound quality, while the latter is more used for narrowband communication, emphasizing resource efficiency and compatibility. However, this distinction causes embedded devices with limited hardware resources to have to use the resource-consuming AMR-WB library when facing 16 kHz audio data, which not only increases the computational burden but may also affect the overall performance and battery life of the device due to storage and energy limitations.

[0003] Deficiencies of the prior art:

[0004] 1. Resource-intensive problem: Since the AMR-WB library processes broadband audio data, it has high requirements for hardware resources, especially computational power and storage space, which is particularly disadvantageous in embedded systems, especially in devices where energy consumption and cost need to be strictly controlled.

[0005] 2. Compatibility limitations: Although the separate use of AMR-NB and AMR-WB libraries meets the coding and decoding requirements for different sampling rates, for old or resource-constrained systems, there may be a lack of support for AMR-WB, resulting in the inability to directly process 16 kHz audio and affecting the popularity and continuity of services.

[0006] 3. Increased software complexity: Maintaining two separate coding and decoding libraries (AMR-NB and AMR-WB) not only increases the complexity of software development and maintenance but may also lead to an increase in the application size, which is an issue that cannot be ignored in the embedded environment where storage space is precious.

[0007] 4. Integration difficulty: For developers, to integrate the audio processing capabilities that support different sampling rates in an application, they often need to deeply understand the working principles and interfaces of different coding and decoding libraries, which raises the technical threshold and extends the product development cycle.

[0008] Therefore, there are deficiencies in the prior art and further improvement is needed. Summary of the Invention

[0009] In view of the problems existing in the prior art, the present invention provides a method and system for processing 16k sampling rate audio using AMR encoding and decoding.

[0010] To achieve the above object, the specific solution of the present invention is as follows:

[0011] The present invention provides a system for processing 16k sampling rate audio using AMR encoding and decoding, which includes:

[0012] An embedded device, configured with a hardware module for collecting 16k sampling rate PCM audio data, and encoding the PCM data into AMR data;

[0013] A mobile device, including a decoding module and a player, for receiving the encoded AMR data, decoding and playing it as PCM audio;

[0014] An AMR-NB encoding and decoding library, installed on the embedded device and the mobile device, capable of efficiently encoding and decoding 8k and processed 16k PCM data.

[0015] Further, the embedded device further includes a data processing unit for splitting the 16k sampling rate PCM data into two 8k data to adapt to the AMR-NB encoding and decoding library.

[0016] Further, the mobile device is equipped with a data separation and merging module to achieve correct splitting and merging processing of the received AMR data.

[0017] Further, the system further includes a network communication module for efficient and stable AMR data transmission between the embedded device and the mobile device.

[0018] Further, the system also provides a user interface, allowing users to intuitively monitor the audio encoding and decoding status and adjust audio settings on the mobile device, enhancing the user interaction experience.

[0019] Further, the embedded device is configured with a power management module to optimize the energy consumption during the AMR-NB encoding and decoding process, and extend the device battery life when processing 16k sampling rate audio.

[0020] The present invention also provides a method for processing 16k sampling rate PCM audio data using the AMR-NB encoding and decoding library. Using the above system, the method includes the steps of:

[0021] S1, the embedded device collects 16k sampling rate PCM audio data;

[0022] S2. Split the PCM data with a sampling rate of 16k into two portions of PCM data with a sampling rate of 8k;

[0023] S3. Use the AMR-NB codec library to encode the two portions of PCM data with a sampling rate of 8k respectively;

[0024] S4. Merge the two encoded AMR data at the embedded device side and send them to the mobile device;

[0025] S5. After receiving the merged AMR data, the mobile device splits it into two portions and decodes it into PCM data through the AMR-NB codec library;

[0026] S6. Merge the two decoded PCM data on the mobile device and transmit them to the player for playback.

[0027] Furthermore, in step S2, it also includes the embedded device performing preprocessing on the PCM data with a sampling rate of 16k so that the data is suitable for subsequent splitting and encoding operations.

[0028] Furthermore, in step S3, the AMR-NB codec library adaptively adjusts the encoding rate during the encoding process to optimize the audio quality and transmission efficiency.

[0029] Furthermore, in step S5, it further includes implementing voice activity detection (VAD) on the mobile device to dynamically adjust the decoding parameters and save bandwidth and energy consumption.

[0030] Adopting the technical solution of the present invention has the following beneficial effects:

[0031] 1. Significantly save hardware resources: Since the AMR-NB codec library requires less computing resources than the AMR-WB when processing audio of the same length, this technology can effectively reduce the computing burden on the embedded device, which is extremely beneficial for devices with limited battery life or processing capabilities (such as Internet of Things devices, old mobile phones), and helps to extend the device running time and reduce energy consumption.

[0032] 2. Enhance system compatibility: By only relying on the AMR-NB codec library, this technology enhances compatibility on various platforms and devices, especially for those old systems that do not support AMR-WB or have tight hardware resources, ensuring service continuity and a wider scope of application.

[0033] 3. Optimize storage utilization: Avoids the need to deploy both the AMR-NB and AMR-WB codec libraries simultaneously, significantly reducing software storage occupancy, which is particularly important for embedded systems with limited storage space and helps to more efficiently utilize valuable resources.

[0034] 4. Improve resource management efficiency: Through innovative algorithm design, resources can be efficiently utilized even when processing audio with a high sampling rate, maintaining high efficiency in resource-constrained environments and optimizing the overall system performance.

[0035] 5. Enhance application flexibility and versatility: By expanding the functions of the AMR-NB codec library, it can handle both traditional narrowband speech and adapt to 16kHz wideband audio, broadening the technical application scenarios and enhancing the versatility and market adaptability of the system.

[0036] 6. Simplify development and integration: Provide highly encapsulated APIs or libraries, reducing the threshold for developers to integrate this technology. Without in-depth understanding of complex technical details, they can quickly integrate the audio processing function across sampling rates, accelerating the product R & D progress and shortening the product time to market. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 is the swimlane diagram of 16k audio encoding and decoding using the AMR-NB library in the present invention;

[0038] Figure 2 is the system block diagram of the present invention;

[0039] Figure 3 is the overall flowchart of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0040] The present invention will be further described in detail below with reference to the drawings and embodiments; it can be understood that the specific embodiments described herein are only for explaining the present invention and not for limiting the present invention; in addition, it should be noted that only parts related to the present invention are shown in the drawings for the convenience of description rather than all.

[0041] Combined with Figures 1 - 3 As shown, the present invention provides a system for processing 16k sampling rate audio with AMR encoding and decoding, and the system includes:

[0042] An embedded device, configured with a hardware module for collecting 16k sampling rate PCM audio data and encoding the PCM data into AMR data;

[0043] A mobile device, including a decoding module and a player, for receiving the encoded AMR data, decoding and playing it as PCM audio;

[0044] An AMR-NB codec library, installed on the embedded device and the mobile device, capable of efficiently encoding and decoding 8k and processed 16k PCM data.

[0045] The embedded device further includes a data processing unit for splitting 16k sampling rate PCM data into two portions of 8k data to adapt to the AMR-NB codec library.

[0046] The mobile device is equipped with a data separation and merging module to achieve correct splitting and merging processing of the received AMR data.

[0047] The system further includes a network communication module for efficient and stable AMR data transmission between the embedded device and the mobile device.

[0048] The system also provides a user interface that allows users to intuitively monitor the audio codec status and adjust audio settings on the mobile device, enhancing the user interaction experience.

[0049] The embedded device is configured with a power management module to optimize power consumption during the AMR-NB codec process and extend the device's battery life when processing 16k sampling rate audio.

[0050] The present invention also provides a method for processing 16k sampling rate PCM audio data using the AMR-NB codec library. Using the above system, the method includes the steps:

[0051] S1, the embedded device collects 16k sampling rate PCM audio data;

[0052] S2, splitting the 16k sampling rate PCM data into two portions of 8k sampling rate PCM data;

[0053] S3, using the AMR-NB codec library to encode the two portions of 8k sampling rate PCM data respectively;

[0054] S4, merging the two encoded AMR data at the embedded device side and sending them to the mobile device;

[0055] S5, after receiving the merged AMR data, the mobile device splits it into two portions and decodes it into PCM data through the AMR-NB codec library;

[0056] S6, merging the two decoded PCM data on the mobile device and transmitting them to the player for playback.

[0057] In step S2, it further includes the embedded device performing preprocessing on the 16k sampling rate PCM data so that the data is suitable for subsequent splitting and encoding operations.

[0058] In step S3, the AMR-NB codec library adaptively adjusts the coding rate during the encoding process to optimize audio quality and transmission efficiency.

[0059] In step S5, it further includes implementing voice activity detection (VAD) on the mobile device to dynamically adjust the decoding parameters, saving bandwidth and energy consumption. Specific embodiments:

[0061] When using AMR to encode and decode Pulse Code Modulation (hereinafter referred to as PCM) data, PCM audio data with a sampling rate of 16k can only be encoded and decoded using the AMR-WB (Adaptive Multi-Rate Wideband, hereinafter referred to as AMR-WB) wideband library, and 8k can only be encoded using the AMR-NB (Adaptive Multi-Rate Narrow Band, hereinafter referred to as AMR-NB) library. However, for some embedded devices with relatively tight hardware resources, it is necessary to save hardware resources as much as possible. In this scenario, this method can be used to only integrate the AMR-NB library to encode and decode 8K and 16K PCM audio data simultaneously.

[0062] Role introduction:

[0063] Embedded device: Collects audio data and encodes PCM data into AMR data;

[0064] Mobile device: Receives AMR audio data, decodes the AMR data into PCM data and plays it;

[0065] AMR-NB audio encoding and decoding library: Responsible for the AMR data encoding and decoding function.

[0066] Figure 1 , 16k audio uses the AMR-NB library for encoding and decoding swim lane diagram.

[0067] This figure is a flowchart that describes the audio data processing process among the embedded device, the AMR-NB encoding and decoding library, and the mobile device. The specific steps are as follows:

[0068] The embedded device collects PCM audio data with a sampling rate of 16K;

[0069] These data are split into two 8K data;

[0070] The AMR-NB encoding and decoding library performs secondary audio encoding on these two 8K data;

[0071] The embedded device merges the data after two encodings and sends it to the mobile device;

[0072] The mobile device, after receiving the 8K encoded AMR audio frame, splits it into two 8K data and encodes them separately;

[0073] AMR-NB codec library, which decodes AMR audio into PCM data;

[0074] Mobile device, which merges these two pieces of PCM data and sends them to the player for playback;

[0075] This process is used to implement the audio compression and transmission functions in a voice communication or recording system.

[0076] The audio codec used in this technology is the AMR-NB codec technology. AMR-NB is an audio codec technology used for voice communication, especially in the field of mobile communication. It was initially developed by 3GPP (Third Generation Partnership Project) for voice codec in mobile communication standards such as GSM (Global System for Mobile Communications) and UMTS (Universal Mobile Telecommunications System).

[0077] The following are some of the main features and working principles of AMR-NB:

[0078] Adaptive Bit Rate: AMR-NB dynamically adjusts the coding rate according to network conditions and the characteristics of the voice signal. This means that when the network bandwidth is low or the signal quality is poor, the coding rate can be reduced to ensure the stability and quality of the call; while when the network conditions are good, the coding rate can be increased to provide better sound quality.

[0079] Narrowband voice codec: AMR-NB is mainly for narrowband voice communication, with an audio bandwidth of 200 - 3400Hz, suitable for voice communication applications such as telephone calls.

[0080] Codec Modes: AMR-NB defines a series of different coding modes, ranging from 4.75kbps to 12.2kbps, for balancing the requirements of sound quality and bandwidth under different network conditions. Lower coding rates are usually used to ensure that the call can still be made under poor network quality, while higher coding rates provide better sound quality.

[0081] Voice Activity Detection (VAD): AMR-NB also includes a voice activity detection function, which is used to detect voice activity during a call and adjust the coding parameters accordingly to save bandwidth and reduce power consumption.

[0082] Low latency: AMR-NB is designed to have low codec latency, which is very important for real-time communication because it can reduce the perceived latency between the two parties of the call and improve the call quality and interactivity.

[0083] Generally speaking, AMR-NB is a widely used and optimized speech codec technology applicable to the field of mobile communication, providing the ability to balance audio quality, bandwidth, and latency under different network conditions.

[0084] When using AMR codec for PCM data, PCM audio data with a sampling rate of 16k can only be encoded and decoded using the AMR-WB wideband library, while that with a sampling rate of 8k can only be encoded using the AMR-NB library. However, for some embedded devices with limited hardware resources, it is necessary to save hardware resources as much as possible. In such a scenario, this method can be used to integrate only the AMR-NB library, which can encode and decode 8K and 16K PCM audio data simultaneously.

[0085] As Figure 1 shown, the encoding and decoding of 16k sampling rate audio using the AMR-NB library proposed in this application mainly consists of the following steps:

[0086] Step 1: The embedded device collects PCM audio data at a sampling rate of 16k.

[0087] Step 2: Split a frame of 16K PCM audio into 2 portions of PCM data.

[0088] Step 3: Send the 2 portions of PCM data to the AMR-NB encoding library respectively to be encoded into 2 portions of AMR data

[0089] Step 4: Merge the 2 portions of AMR data and send them to the mobile device.

[0090] Step 5: The mobile device receives the AMR data.

[0091] Step 6: Split them into 2 portions of 8k AMR data.

[0092] Step 7: Send the 2 portions of AMR data to the AMR-NB library respectively to be decoded into PCM data.

[0093] Step 8: Merge the 2 portions of PCM data and send them to the player for playback.

[0094] This technology realizes the encoding and decoding of 16k and 8k PCM data using AMR-NB. Using the AMR-NB encoding library alone has the following advantages compared with the AMR-WB codec library:

[0095] 1. Lower computational resource requirements: AMR-NB is designed for narrowband voice communication and supports a maximum sampling rate of 8 kHz. Compared with the 16 kHz sampling rate of AMR-WB, it processes less data, so the computational power required during encoding is relatively lower. This is crucial for devices with limited battery life or weak processor performance, such as certain Internet of Things devices, old mobile phones, or low-cost embedded systems, and can effectively extend the device's operating time and reduce energy consumption.

[0096] 2. Compatibility: As a mature technology, AMR-NB has been widely used in many existing communication systems, especially in early mobile communication networks. This means that in some older devices and systems with limited support for new technologies, AMR-NB can provide better downward compatibility, ensuring service continuity and wide coverage.

[0097] 3. Reduced packet size: Selecting a single AMR-NB library to process 8 kHz and 16 kHz PCM data through downsampling means that there is no need to deploy both AMR-NB and AMR-WB codec libraries simultaneously, thus reducing the storage space occupied by the software. In embedded systems, every bit of storage is crucial, and reducing the library size can help optimize the use of storage resources, which is a significant advantage for devices with limited storage capacity.

[0098] This application has the following innovative points:

[0099] 1. Optimized resource management: When processing 16 kHz PCM data, through effective algorithm design and implementation, the computational resources and memory usage are minimized, enabling the AMR-NB encoding to still operate efficiently on resource-constrained devices at a higher sampling rate.

[0100] 2. Compatibility extension: Through innovative software architecture design, the same codec library not only supports traditional 8 kHz narrowband voice but also can flexibly adapt to process 16 kHz broadband echo or high-quality voice, thus broadening the application scenarios of AMR-NB technology and improving the system's compatibility and versatility.

[0101] 3. Integration and encapsulation: Create a highly encapsulated API or library, enabling developers to easily integrate this cross-sampling-rate AMR-NB codec function into their applications without having to deeply understand complex downsampling and encoding details, simplifying the development process and accelerating the product's time to market.

[0102] Working principle:

[0103] The working principle proposed by the present invention revolves around an innovative AMR-NB encoding and decoding method, especially for the processing of PCM audio data with a sampling rate of 16 kHz, aiming to overcome the limitation in traditional technologies that the AMR-WB encoding and decoding library with high resource consumption must be used. The core of this technology lies in how to achieve efficient encoding and decoding of 16k and 8k sampling rate PCM data on embedded devices with limited hardware resources only by integrating the AMR-NB library. Its working principle can be summarized as follows:

[0104] Data acquisition and preprocessing: The embedded device first acquires PCM audio data at a sampling rate of 16 kHz. In order to be able to process it using the AMR-NB encoding and decoding library, the audio data with a 16k sampling rate is ingeniously split into two data streams with an 8k sampling rate. This strategy opens the door for subsequent use of the AMR-NB library that originally only supports an 8k sampling rate.

[0105] AMR-NB encoding and decoding: The two split 8k PCM data are each encoded through the AMR-NB encoding and decoding library to form two AMR-format audio data streams. This process makes full use of the adaptive coding rate characteristic of AMR-NB, dynamically adjusts the coding parameters according to actual needs, balances the audio quality and data volume, and at the same time uses the voice activity detection (VAD) function to further save bandwidth and power consumption.

[0106] Data recombination and transmission: The two encoded AMR data are merged at the embedded device end and then sent to the mobile device; after receiving the data, the mobile device performs reverse operations. First, the received AMR data stream is split into two, and each is decoded through the AMR-NB library to be restored to 8k sampling rate PCM data.

[0107] Audio synthesis and playback: The two decoded 8k PCM data are recombined on the mobile device to form the original 16k sampling rate PCM audio data, which is finally sent to the player for playback; the whole process ensures the audio quality while achieving efficient compression and transmission, and maintains good system performance in resource-constrained environments.

[0108] Application of technological innovation points: Through optimized algorithm design, this technology realizes the processing ability of AMR-NB for higher sampling rate audio without adding too much computational burden, reflecting the optimization of resource management. In addition, the innovation of the software architecture expands the applicable range of AMR-NB and enhances the system compatibility and generality. Finally, it is provided in the form of a highly encapsulated API or library, greatly simplifying the integration work of developers and accelerating the product development cycle.

[0109] In summary, the inventive technology not only solves the problem of efficiently processing 16kHz audio data under the condition of tight hardware resources, but also effectively improves the efficiency, compatibility, usability and development convenience of the system through a series of innovative means, providing a new solution for audio processing in the fields of embedded and mobile communications.

[0110] The above are only the preferred embodiments of the present invention, and do not limit the scope of the present invention. Any equivalent structural transformation made under the inventive concept of the present invention by using the content of the specification and drawings of the present invention, or any direct / indirect application in other related technical fields is included in the protection scope of the present invention.

Claims

1. A system for processing 16k sampling rate audio using AMR codec, characterized in that: The system includes: An embedded device configured with a hardware module for collecting 16k sampling rate PCM audio data and encoding the PCM data into AMR data; The mobile device includes a decoding module and a player, which is used to receive the encoded AMR data, decode it and play it as PCM audio; AMR-NB codec library, installed on embedded devices and mobile devices, can efficiently encode and decode 8k and processed 16k PCM data; The embedded device further includes a data processing unit for splitting the 16k sampling rate PCM data into two 8k data to adapt to the AMR-NB codec library.

2. The system according to claim 1, characterized in that The mobile terminal device is equipped with a data separation and merging module to achieve correct splitting and merging processing of the received AMR data.

3. The system according to claim 1, characterized in that The system also includes a network communication module for efficient and stable AMR data transmission between the embedded device and the mobile device.

4. The system according to claim 1, characterized in that The system also provides a user interface that allows users to intuitively monitor audio codec status and adjust audio settings on mobile devices, enhancing the user interaction experience.

5. The system according to claim 1, wherein: The embedded device is equipped with a power management module to optimize the energy consumption during the AMR-NB encoding and decoding process and extend the device's battery life when processing 16k sampling rate audio.

6. A method for processing 16k sampling rate PCM audio data using an AMR-NB codec library, using the system according to any one of claims 1 to 5, characterized in that: The method comprises the steps of: S1, the embedded device collects PCM audio data with a sampling rate of 16k; S2, splitting the PCM data with a sampling rate of 16k into two PCM data with a sampling rate of 8k; S3, using the AMR-NB codec library to encode two 8k sampling rate PCM data respectively; S4, merging the two encoded AMR data on the embedded device and sending them to the mobile device; S5, after receiving the combined AMR data, the mobile device splits it into two parts and decodes it into PCM data through the AMR-NB codec library; S6, merging the two decoded PCM data on the mobile device and transmitting them to the player for playback.

7. The method as claimed in claim 6 further comprises, in step S2, further comprising the embedded device performing preprocessing on the 16k sampling rate PCM data so that the data is suitable for subsequent splitting and encoding operations.

8. The method according to claim 6, characterized in that In step S3, the AMR-NB codec library adaptively adjusts the coding rate during the encoding process to optimize audio quality and transmission efficiency.

9. The method according to claim 6, characterized in that In step S5, it further includes implementing voice activity detection on the mobile device to dynamically adjust decoding parameters to save bandwidth and energy consumption.

Citation Information

Patent Citations

  • Method and device for realizing ultra wide band voice intercommunication and a terminal

    CN106033982A

  • Voice wake-up method

    CN110047471A