A standardized Bluetooth voice codec method, apparatus, system, and storage medium
By standardizing Bluetooth voice codec methods and regulating codec algorithms, the complex integration and adaptation issues of Bluetooth voice products have been resolved, achieving efficient and accurate voice recognition that is applicable to multiple platforms and categories of Bluetooth voice devices.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- E-SURFING DIGITAL LIFE TECH CO LTD
- Filing Date
- 2022-11-24
- Publication Date
- 2026-07-17
AI Technical Summary
There are many different voice codec schemes for existing Bluetooth voice products, which makes integration difficult and adaptation complex. Furthermore, different codec schemes may lead to a decrease in recognition rate, affecting user experience.
This paper provides a standardized Bluetooth voice codec method. By sending start and end packets, the codec algorithm is standardized, SBC encoding and CRC check are used, and audio data is sent in packets to ensure compatibility and decoding accuracy.
It achieves a unified encoding and decoding scheme for Bluetooth voice devices, improves integration and adaptation efficiency and recognition accuracy, supports multiple platforms and multiple categories of Bluetooth voice products, and has strong adaptability and extensibility.
Smart Images

Figure CN115831134B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Bluetooth voice technology, and in particular to a standardized Bluetooth voice encoding and decoding method, apparatus, system, and storage medium. Background Technology
[0002] With the development of Bluetooth communication and AI voice recognition technology, various Bluetooth voice products are gradually entering households, helping users to achieve voice recognition, voice interaction, and voice control of devices such as smart set-top boxes and smart screens.
[0003] However, the various voice codec schemes used in Bluetooth voice products on the market are numerous. When users use Bluetooth voice transmission devices such as voice remote controls, they need to meet conditions such as prior compatibility with the voice codec schemes of various Bluetooth voice receiving devices; otherwise, the voice function cannot be used normally. Simultaneously integrating various voice codec schemes would create a huge workload, increasing integration difficulty and scenario complexity. Even if the Bluetooth voice transmission device has completed integration and adaptation with the voice codec schemes of multiple Bluetooth voice receiving devices, different codecs may still cause encoding / decoding failures, reduced recognition rates, and other problems, affecting the user experience. Summary of the Invention
[0004] This invention provides a standardized Bluetooth voice codec method, apparatus, system, and storage medium, solving the technical problem of how to achieve unified standardization of voice codec for various Bluetooth voice products in order to improve the efficiency of Bluetooth voice integration and adaptation.
[0005] The first aspect of this invention provides a standardized Bluetooth voice codec method, the method comprising:
[0006] Upon receiving a voice sampling start command, a start packet is sent to the Bluetooth voice receiving device; the start packet includes audio transmission and encoding parameters.
[0007] Collect audio data, encode the audio data according to the audio transmission and encoding parameters, and transmit the encoded audio data to the Bluetooth voice receiving device;
[0008] Upon receiving a voice sampling end command, an end packet is sent to the Bluetooth voice receiving device, so that the Bluetooth voice receiving device can decode the encoded audio data according to the corresponding audio decoding scheme; the audio decoding scheme is a symmetric encoding scheme obtained by parsing the start packet.
[0009] According to one feasible method of the first aspect of the present invention, the acquisition of audio data includes:
[0010] Audio data is collected after a preset delay following the completion of the initial packet transmission.
[0011] According to one aspect of the invention, the audio transmission and encoding parameters include an audio encoding parameter table for SBC (sub-band coding), and the encoding of the audio data according to the audio transmission and encoding parameters includes:
[0012] The audio data is SBC encoded based on the audio encoding parameter table, and a synchronization byte and CRC check value are embedded.
[0013] According to one aspect of the present invention, the encoding of the audio data according to the audio transmission and encoding parameters further includes:
[0014] Set the synchronization byte to 0x9C and the CRC checksum value to 0x00.
[0015] According to one aspect of the present invention, the audio transmission method corresponding to the encoded audio data uses the standard BLE GATT service, the audio transmission and encoding parameters include the data frame length, and the transmission of the encoded audio data to the Bluetooth voice receiving device includes:
[0016] When the length of the data frame exceeds the minimum MTU specified by the GATT service, each data frame corresponding to the encoded audio data will be sent in packets.
[0017] A second aspect of the present invention provides a standardized Bluetooth voice codec device, comprising:
[0018] A memory for storing instructions; wherein the instructions are used to implement the standardized Bluetooth voice codec method as described in any of the above-mentioned ways;
[0019] A processor for executing instructions in the memory.
[0020] A third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the standardized Bluetooth voice codec method as described in any of the above embodiments.
[0021] A fourth aspect of the present invention provides a standardized Bluetooth voice codec device, the device comprising:
[0022] The start packet sending module is used to send a start packet to the Bluetooth voice receiving device when a voice sampling start command is received; the start packet includes audio transmission and encoding parameters.
[0023] The encoding module is used to collect audio data, encode the audio data according to the audio transmission and encoding parameters, and transmit the encoded audio data to the Bluetooth voice receiving device.
[0024] The termination packet sending module is used to send a termination packet to the Bluetooth voice receiving device when a voice sampling termination command is received, so that the Bluetooth voice receiving device can decode the encoded audio data according to the corresponding audio decoding scheme; the audio decoding scheme is an encoding symmetric scheme obtained by parsing the start packet.
[0025] According to one achievable embodiment of the fourth aspect of the present invention, the encoding module comprises:
[0026] The acquisition unit is used to acquire audio data after a preset delay following the completion of the initial packet transmission.
[0027] According to a fourth aspect of the present invention, the audio transmission and encoding parameters include an SBC-encoded audio encoding parameter table, and the encoding module includes:
[0028] The encoding unit is used to perform SBC encoding on the audio data based on the audio encoding parameter table, and to embed synchronization bytes and CRC check values.
[0029] According to one achievable embodiment of the fourth aspect of the invention, the encoding module further includes:
[0030] The setting unit is used to set the synchronization byte to 0x9C and the CRC check value to 0x00.
[0031] According to a fourth aspect of the present invention, the audio transmission method corresponding to the encoded audio data uses the GATT service of standard BLE, the audio transmission and encoding parameters include the data frame length, and the encoding module includes:
[0032] The sending unit is configured to send each data frame corresponding to the encoded audio data in packets when the length of the data frame exceeds the minimum MTU specified by the GATT service.
[0033] The fifth aspect of this invention provides a standardized Bluetooth voice codec system, including a Bluetooth voice transmission device and a Bluetooth voice receiving device;
[0034] The Bluetooth voice transmission device integrates an audio acquisition device and audio encoding firmware; the audio encoding firmware is used to send a start packet including audio transmission and encoding parameters to the Bluetooth voice receiving device when a voice sampling start command is received, to acquire audio data, to encode the acquired audio data according to the audio transmission and encoding parameters, and to transmit the encoded audio data to the Bluetooth voice receiving device, and to send an end packet to the Bluetooth voice receiving device when a voice sampling end command is received.
[0035] The Bluetooth voice receiving device integrates an audio decoding algorithm; the audio decoding algorithm is used to decode the encoded audio data according to the corresponding audio decoding scheme; the audio decoding scheme is an encoding symmetric scheme obtained by parsing the starting packet.
[0036] According to one embodiment of the fifth aspect of the present invention, the Bluetooth voice receiving device includes a connected Bluetooth receiving module, a receiving voice assistant, and a voice recognition processing module, and the Bluetooth voice transmitting device further includes a Bluetooth transmitting module connected to the Bluetooth receiving module;
[0037] The Bluetooth receiving module is used to receive the encoded audio data;
[0038] The audio decoding algorithm is integrated into the receiver's voice assistant;
[0039] The speech recognition processing module is used to send the decoded audio data to the cloud, receive the speech recognition results fed back from the cloud, and display them.
[0040] According to one achievable method of the fifth aspect of the present invention, the audio encoding firmware is specifically used for:
[0041] After the initial packet is sent, a preset delay is applied to drive the audio acquisition device to acquire audio data.
[0042] According to a fifth aspect of the present invention, the audio transmission and encoding parameters include an SBC-encoded audio encoding parameter table, and the audio encoding firmware is specifically used for:
[0043] The audio data is SBC encoded based on the audio encoding parameter table, and a synchronization byte and CRC check value are embedded.
[0044] According to one achievable method of the fifth aspect of the invention, the audio encoding firmware is further specifically used for:
[0045] Set the synchronization byte to 0x9C and the CRC checksum value to 0x00.
[0046] According to a fifth aspect of the present invention, the audio transmission method corresponding to the encoded audio data uses the GATT service of standard BLE, the audio transmission and encoding parameters include the data frame length, and the audio encoding firmware is further specifically used for:
[0047] When the length of the data frame exceeds the minimum MTU specified by the GATT service, each data frame corresponding to the encoded audio data will be sent in packets.
[0048] As can be seen from the above technical solutions, the present invention has the following advantages:
[0049] This invention involves a Bluetooth voice transmission device sending a start packet containing audio transmission and encoding parameters to a Bluetooth voice receiving device upon receiving a voice sampling start command. The device then encodes the collected audio data according to these parameters and transmits the encoded audio data to the Bluetooth voice receiving device. Upon receiving a voice sampling end command, the device sends an end packet to the Bluetooth voice receiving device, enabling the receiving device to decode the encoded audio data using a corresponding audio decoding scheme. This audio decoding scheme is a symmetrical encoding scheme obtained by parsing the start packet. This invention standardizes the encoding and decoding algorithms through Bluetooth voice algorithm protocol interaction between the transmission and receiving devices, achieving a unified encoding and decoding scheme for Bluetooth voice devices. This effectively improves Bluetooth voice integration and adaptation efficiency, supports Bluetooth chip solutions on different platforms and various types of Bluetooth voice products, and exhibits strong adaptability and scalability. Attached Figure Description
[0050] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0051] Figure 1 A flowchart illustrating a standardized Bluetooth voice encoding / decoding method provided in an optional embodiment of the present invention;
[0052] Figure 2 A structural connection block diagram of a standardized Bluetooth voice codec device is provided as an optional embodiment of the present invention;
[0053] Figure 3 The diagram below shows the structural connection of a standardized Bluetooth voice codec system, which is provided as an optional embodiment of the present invention.
[0054] Figure label:
[0055] Figure 2 In the diagram, 1-start packet sending module; 2-encoding module; 3-end packet sending module;
[0056] Figure 3 In the diagram, 10-Bluetooth voice transmission device; 20-Bluetooth voice receiving device; 101-Audio acquisition device; 102-Audio encoding firmware; 103-Bluetooth transmitting module; 201-Bluetooth receiving module; 202-Receiver voice assistant; 203-Voice recognition processing module. Detailed Implementation
[0057] This invention provides a standardized Bluetooth voice codec method, apparatus, system, and storage medium to address the technical problem of how to achieve unified standardization of voice codecs for various Bluetooth voice products, thereby improving the efficiency of Bluetooth voice integration and adaptation.
[0058] To make the objectives, features, and advantages of this invention more apparent and understandable, the technical solutions of the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the embodiments described below are only some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0059] This invention provides a standardized Bluetooth voice codec method. This method can help various Bluetooth voice products integrate according to the standardized Bluetooth voice codec, reducing the workload of adaptation while further improving the efficiency and accuracy of Bluetooth voice recognition, and enhancing user perception and experience.
[0060] Please see Figure 1 , Figure 1 A flowchart of a standardized Bluetooth voice codec method provided by an embodiment of the present invention is shown.
[0061] This invention provides a standardized Bluetooth voice codec method, comprising:
[0062] Step S1: When a voice sampling start command is received, a start packet is sent to the Bluetooth voice receiving device; the start packet includes audio transmission and encoding parameters.
[0063] The voice sampling start command is initiated by the user, and the initiation method can be set according to the actual situation. For example, when the method is executed by a Bluetooth voice transmission device, the voice sampling start command can be generated by the user pressing the voice button.
[0064] As a specific implementation method, the length of the starting packet is set to 18 bytes. The format of the starting packet is shown in Table 1.
[0065] Table 1:
[0066]
[0067] Step S2: Collect audio data, encode the audio data according to the audio transmission and encoding parameters, and transmit the encoded audio data to the Bluetooth voice receiving device.
[0068] When performing step S2, the encoded audio data is transmitted according to the encoding format, encoding parameters and data packet size negotiated in the initial packet.
[0069] In one feasible manner, the acquisition of audio data includes:
[0070] Audio data is collected after a preset delay following the completion of the initial packet transmission.
[0071] As a specific implementation, the preset time can be set to 100ms. Thus, audio data is acquired and encoded 100ms after the initial packet transmission ends.
[0072] When encoding audio data, Apt-X (audio data reduction technology), SBC, or AAC (Advanced Audio Coding) can be used. SBC is an audio codec specifically designed for Bluetooth, with low complexity, and can achieve high audio quality at medium bitrates. As one possible approach, the audio transmission and encoding parameters include an audio encoding parameter table for SBC encoding. Encoding the audio data according to the audio transmission and encoding parameters includes:
[0073] The audio data is SBC encoded based on the aforementioned audio encoding parameter table, and a synchronization byte and CRC checksum are embedded. In a specific implementation, the synchronization byte is set to 0x9C, and the CRC checksum is set to 0x00.
[0074] In this embodiment, audio data is encoded based on the SBC encoding algorithm. The corresponding audio encoding parameters include block length, allocation method, and number of sub-bands. The audio encoding parameter table is shown in Table 2.
[0075] Table 2:
[0076]
[0077] In one feasible implementation, the audio transmission method corresponding to the encoded audio data uses the GATT service of standard BLE. The audio transmission and encoding parameters include the data frame length. When transmitting the encoded audio data to the Bluetooth voice receiving device, if the data frame length exceeds the minimum MTU (Maximum Transmission Unit) specified by the GATT service, each data frame corresponding to the encoded audio data is sent in packets. Each data frame contains a frame number and the encoded audio data.
[0078] In this embodiment, sending excessively long data frames in packets can effectively reduce the packet loss rate of audio data.
[0079] Among them, due to the use of GATT services, the transmitted services and feature values are standardized, as shown in Table 3.
[0080] Table 3:
[0081]
[0082] Based on Table 3, the universally unique identifiers corresponding to the start packet, data frame, and end packet can be set as follows:
[0083] UUID=FFFFB002-0001-1000-8000-00805F9B34FB.
[0084] To prevent audio data frames from losing synchronization after packet loss, the length of the data frame is not set to an integer multiple of the minimum MTU value. This allows the length of the last data packet after packetization to be used as the synchronization basis for the next audio data frame.
[0085] The audio data packets in the data frame can adopt various data formats, including SBC long packet data format, SBC multi-frame audio combination packet format, and SBC short packet format.
[0086] The structure of the SBC long packet data format is shown in Table 4.
[0087] Table 4:
[0088] Package number Encoded audio data 1 byte, incrementing cyclically Audio data, the length of a single frame of audio data obtained by extracting the starting packet.
[0089] For the SBC multi-frame audio packet format, when the transmitted packet is long enough, multiple frames can be used to transmit data. The length of one frame that can be transmitted by a single data packet is: n = (data packet length - 1) / (audio frame length); where the data packet length is the length of each transmitted data packet, and the audio frame length represents the length of one frame used for decoding. The structure of this SBC multi-frame audio packet format is shown in Table 5.
[0090] Table 5:
[0091] Package number Audio data Audio data 1 byte, incrementing cyclically Frame length of an audio data frame Frame length of an audio data frame
[0092] For the SBC short packet format, audio data packets are obtained by short packet frequency interleaving. Therefore, during packet segmentation, the first byte of each packet is labeled with the frame encoding. Since the data packets are short, one frame of audio data needs to be composed of several data packets. Thus, the structure of the SBC short packet format is shown in Table 6.
[0093] Table 6:
[0094]
[0095] Step S3: Upon receiving the voice sampling end command, an end packet is sent to the Bluetooth voice receiving device so that the Bluetooth voice receiving device can decode the encoded audio data according to the corresponding audio decoding scheme; the audio decoding scheme is an encoding symmetric scheme obtained by parsing the start packet.
[0096] The voice sampling end command is initiated by the user, and the initiation method can be set according to the actual situation. For example, when this method is executed by a Bluetooth voice transmission device, the voice sampling end command can be generated by the user releasing the voice button.
[0097] In a specific implementation, the end packet is 8 bytes long and contains the ASCII code corresponding to the string "AUDIOEND".
[0098] The above embodiments of the present invention have the following advantages:
[0099] (1) It can standardize encoding and decoding algorithms, realize the unification of encoding and decoding schemes for Bluetooth voice devices, and improve the efficiency of Bluetooth voice integration and adaptation;
[0100] (2) It can support Bluetooth voice practices across manufacturers. It has been verified that this function supports multiple mainstream chip manufacturers and is easy to scale up.
[0101] (3) This method has the scalability of multiple types of terminals. Through standard protocols, it can realize the use of smart Bluetooth devices in one-to-many and many-to-many ways. It has irreplaceable value in various scenarios of users using smart AI voice and has strong universal applicability.
[0102] The present invention also provides a standardized Bluetooth voice codec device, comprising:
[0103] A memory for storing instructions; wherein the instructions are used to implement the standardized Bluetooth voice codec method as described in any of the above embodiments;
[0104] A processor for executing instructions in the memory.
[0105] The present invention also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the standardized Bluetooth voice encoding and decoding method as described in any of the above embodiments.
[0106] The present invention also provides a standardized Bluetooth voice codec device, which can be used to execute the standardized Bluetooth voice codec method described in any of the above embodiments of the present invention.
[0107] Please see Figure 2 , Figure 2 The diagram shows a structural connection block diagram of a standardized Bluetooth voice codec device provided in an embodiment of the present invention.
[0108] An embodiment of the present invention provides a standardized Bluetooth voice codec device, comprising:
[0109] The start packet sending module 1 is used to send a start packet to the Bluetooth voice receiving device when a voice sampling start command is received; the start packet includes audio transmission and encoding parameters.
[0110] Encoding module 2 is used to collect audio data, encode the audio data according to the audio transmission and encoding parameters, and transmit the encoded audio data to the Bluetooth voice receiving device.
[0111] The end packet sending module 3 is used to send an end packet to the Bluetooth voice receiving device when it receives a voice sampling end command, so that the Bluetooth voice receiving device can decode the encoded audio data according to the corresponding audio decoding scheme; the audio decoding scheme is an encoding symmetric scheme obtained by parsing the start packet.
[0112] In one feasible implementation, the encoding module 2 includes:
[0113] The acquisition unit is used to acquire audio data after a preset delay following the completion of the initial packet transmission.
[0114] In one feasible implementation, the audio transmission and encoding parameters include an SBC-encoded audio encoding parameter table, and the encoding module 2 includes:
[0115] The encoding unit is used to perform SBC encoding on the audio data based on the audio encoding parameter table, and to embed synchronization bytes and CRC check values.
[0116] In one feasible implementation, the encoding module 2 further includes:
[0117] The setting unit is used to set the synchronization byte to 0x9C and the CRC check value to 0x00.
[0118] In one feasible implementation, the audio transmission method corresponding to the encoded audio data uses the standard BLE GATT service, and the audio transmission and encoding parameters include the data frame length. The encoding module 2 includes:
[0119] The sending unit is configured to send each data frame corresponding to the encoded audio data in packets when the length of the data frame exceeds the minimum MTU specified by the GATT service.
[0120] This invention also provides a standardized Bluetooth voice codec system.
[0121] Please see Figure 3 , Figure 3 The diagram shows a structural connection block diagram of a standardized Bluetooth voice codec system provided by an embodiment of the present invention.
[0122] The standardized Bluetooth voice codec system described in this embodiment includes a Bluetooth voice transmission device 10 and a Bluetooth voice receiving device 20; a Bluetooth receiving module 201, a receiving voice assistant 202, and a voice recognition processing module 203.
[0123] The Bluetooth voice transmission device 10 integrates an audio acquisition device 101 and an audio encoding firmware 102. The audio encoding firmware 102 is used to send a start packet including audio transmission and encoding parameters to the Bluetooth voice receiving device 20 when a voice sampling start command is received, to acquire audio data, to encode the acquired audio data according to the audio transmission and encoding parameters, and to transmit the encoded audio data to the Bluetooth voice receiving device 20. It also sends an end packet to the Bluetooth voice receiving device 20 when a voice sampling end command is received.
[0124] The Bluetooth voice receiving device 20 integrates an audio decoding algorithm; the audio decoding algorithm is used to decode the encoded audio data according to the corresponding audio decoding scheme; the audio decoding scheme is an encoding symmetric scheme obtained by parsing the starting packet.
[0125] In this embodiment, the encoding algorithm can be integrated into the firmware of the Bluetooth voice transmission device 10 by developing a software SDK (Software Development Kit), thereby obtaining the audio encoding firmware 102 and realizing the unification of the voice encoding scheme of the Bluetooth voice transmission device. Similarly, the decoding algorithm can be integrated into the Bluetooth voice receiving device 20 by developing a software SDK, for example, by integrating it into the system APK (Application Program) of the Bluetooth voice receiving device 20, thereby realizing the unification of the decoding scheme of the Bluetooth voice receiving device.
[0126] In one specific implementation, the audio acquisition device 101 can be a microphone device. It should be noted that in other implementations, the audio acquisition device 101 can also be other existing devices capable of audio acquisition.
[0127] In one possible implementation, the Bluetooth voice receiving device 20 includes a connected Bluetooth receiving module 201, a receiving voice assistant 202, and a voice recognition processing module 203, and the Bluetooth voice transmitting device 10 further includes a Bluetooth transmitting module 103 connected to the Bluetooth receiving module 201.
[0128] The Bluetooth receiving module 201 is used to receive the encoded audio data;
[0129] The audio decoding algorithm is integrated into the receiving end voice assistant 202;
[0130] The speech recognition processing module 203 is used to send the decoded audio data to the cloud, receive the speech recognition results fed back from the cloud, and display them.
[0131] In one feasible manner, the audio encoding firmware 102 is specifically used for:
[0132] After the initial packet is sent, a preset delay time is applied to drive the audio acquisition device 101 to acquire audio data.
[0133] In one feasible implementation, the audio transmission and encoding parameters include an SBC-encoded audio encoding parameter table, and the audio encoding firmware 102 is specifically used for:
[0134] The audio data is SBC encoded based on the audio encoding parameter table, and a synchronization byte and CRC check value are embedded.
[0135] In one feasible implementation, the audio encoding firmware 102 is further specifically used for:
[0136] Set the synchronization byte to 0x9C and the CRC checksum value to 0x00.
[0137] In one feasible implementation, the Bluetooth voice transmission device 10 uses the standard BLE GATT service for audio transmission, and the audio transmission and encoding parameters include the data frame length. The audio encoding firmware 102 is further specifically used for:
[0138] When the length of the data frame exceeds the minimum MTU specified by the GATT service, each data frame corresponding to the encoded audio data will be sent in packets.
[0139] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the devices, systems, and modules described above can be referred to the corresponding processes in the foregoing method embodiments, and the specific beneficial effects of the devices, systems, and modules described above can be referred to the corresponding beneficial effects in the foregoing method embodiments, and will not be repeated here.
[0140] In the several embodiments provided in this application, it should be understood that the disclosed apparatus, system, and method can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another device, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or modules may be electrical, mechanical, or other forms.
[0141] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0142] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated modules described above can be implemented in hardware or as software functional modules.
[0143] If the integrated module is implemented as a software functional module 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 invention, in essence, 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. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0144] The above-described embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A standardized Bluetooth voice codec method, characterized in that, The method includes: Upon receiving a voice sampling start command, a start packet is sent to the Bluetooth voice receiving device; the start packet includes audio transmission and encoding parameters. The system collects audio data, encodes the audio data according to the audio transmission and encoding parameters, and transmits the encoded audio data to the Bluetooth voice receiving device; it also transmits the encoded audio data according to the encoding format, encoding parameters, and data packet size negotiated in the start packet. Upon receiving a voice sampling end command, an end packet is sent to the Bluetooth voice receiving device, so that the Bluetooth voice receiving device can decode the encoded audio data according to the corresponding audio decoding scheme; the audio decoding scheme is a symmetric encoding scheme obtained by parsing the start packet; The audio transmission and encoding parameters include an SBC encoding audio encoding parameter table, and the encoding of the audio data according to the audio transmission and encoding parameters includes: The audio data is SBC encoded based on the audio encoding parameter table, and a synchronization byte and CRC check value are embedded; the audio data is encoded based on the SBC encoding to generate corresponding audio encoding parameters, which include block length, allocation method and number of subbands; The encoded audio data is transmitted using the standard BLE GATT service. The audio transmission and encoding parameters include the data frame length. Transmitting the encoded audio data to the Bluetooth voice receiving device includes: When the length of the data frame exceeds the minimum MTU specified by the GATT service, each data frame corresponding to the encoded audio data is sent in packets; the data frame includes a frame number and the encoded audio data.
2. The standardized Bluetooth voice codec method according to claim 1, characterized in that, The collected audio data includes: Audio data is collected after a preset delay following the completion of the initial packet transmission.
3. The standardized Bluetooth voice codec method according to claim 1, characterized in that, The step of encoding the audio data according to the audio transmission and encoding parameters further includes: Set the synchronization byte to 0x9C and the CRC checksum value to 0x00.
4. A standardized Bluetooth voice codec device, characterized in that, include: A memory for storing instructions; wherein the instructions are used to implement the standardized Bluetooth voice codec method as described in any one of claims 1-3; A processor for executing instructions in the memory.
5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the standardized Bluetooth voice codec method as described in any one of claims 1-3.
6. A standardized Bluetooth voice codec device, characterized in that, The device is used in the method as described in any one of claims 1-3, comprising: The start packet sending module is used to send a start packet to the Bluetooth voice receiving device when a voice sampling start command is received; the start packet includes audio transmission and encoding parameters. The encoding module is used to collect audio data, encode the audio data according to the audio transmission and encoding parameters, and transmit the encoded audio data to the Bluetooth voice receiving device. The termination packet sending module is used to send a termination packet to the Bluetooth voice receiving device when a voice sampling termination command is received, so that the Bluetooth voice receiving device can decode the encoded audio data according to the corresponding audio decoding scheme; the audio decoding scheme is an encoding symmetric scheme obtained by parsing the start packet.
7. A standardized Bluetooth voice codec system, characterized in that, The system is applied to the method as described in any one of claims 1-3, including a Bluetooth voice transmission device and a Bluetooth voice receiving device; The Bluetooth voice transmission device integrates an audio acquisition device and audio encoding firmware; the audio encoding firmware is used to send a start packet including audio transmission and encoding parameters to the Bluetooth voice receiving device when a voice sampling start command is received, to acquire audio data, to encode the acquired audio data according to the audio transmission and encoding parameters, and to transmit the encoded audio data to the Bluetooth voice receiving device, and to send an end packet to the Bluetooth voice receiving device when a voice sampling end command is received. The Bluetooth voice receiving device integrates an audio decoding algorithm; the audio decoding algorithm is used to decode the encoded audio data according to the corresponding audio decoding scheme; the audio decoding scheme is an encoding symmetric scheme obtained by parsing the starting packet.
8. The standardized Bluetooth voice codec system according to claim 7, characterized in that, The Bluetooth voice receiving device includes a connected Bluetooth receiving module, a receiving voice assistant, and a voice recognition processing module; the Bluetooth voice transmitting device also includes a Bluetooth transmitting module connected to the Bluetooth receiving module. The Bluetooth receiving module is used to receive the encoded audio data; The audio decoding algorithm is integrated into the receiver's voice assistant; The speech recognition processing module is used to send the decoded audio data to the cloud, receive the speech recognition results fed back from the cloud, and display them.