Data processing method and electronic device

By negotiating voice codec methods and using corresponding call algorithms between electronic devices and Bluetooth devices, the problem of poor voice call quality is solved, thus improving the user experience.

CN114697926BActive Publication Date: 2026-05-01HUAWEI TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HUAWEI TECH CO LTD
Filing Date
2020-12-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In certain voice call scenarios, when making voice calls using Bluetooth devices connected to electronic devices, the call quality is poor, affecting the user experience.

Method used

By negotiating and selecting an appropriate voice codec between electronic devices and Bluetooth devices, such as switching from narrowband voice codec to wideband voice codec, or disconnecting the existing path and re-establishing the narrowband voice codec path, the voice data processing algorithm and the codec method are matched, thereby improving the quality of voice calls.

Benefits of technology

It improves voice call quality, resolves the issue of poor call quality caused by incompatible codecs, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114697926B_ABST
    Figure CN114697926B_ABST
Patent Text Reader

Abstract

The application provides a data processing method and device. In the method, a first electronic device acquires a first speech codec mode, which is a speech codec mode of a first speech channel established between the first electronic device and a network side device; the first electronic device acquires a second speech codec mode, which is a speech codec mode negotiated for a second speech channel to be established between the first electronic device and a Bluetooth device; the first electronic device determines that the second speech codec mode is a wideband speech codec mode and the first speech codec mode is a narrowband speech codec mode, and establishes the second speech channel based on the narrowband speech codec mode with the Bluetooth device, and the second speech channel and the first speech channel are used to transmit speech data in a first speech call. The application can optimize the call effect and improve the user experience when the speech call is performed by means of the Bluetooth device connected to the electronic device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of smart terminal technology, and in particular to data processing methods and electronic devices. Background Technology

[0002] Currently, it's increasingly common for users to make voice calls using Bluetooth devices connected to their electronic devices. For example, connecting a phone to a Bluetooth headset enables voice calls, as does connecting a phone to a car's in-car communication system. However, in certain voice call scenarios, using a Bluetooth device connected to an electronic device may not provide satisfactory call quality, impacting the user experience. Summary of the Invention

[0003] This application provides a data processing method and an electronic device that can optimize call quality and improve user experience when making voice calls using a Bluetooth device connected to the electronic device.

[0004] Firstly, this application provides a data processing method, comprising: a first electronic device acquiring a first voice codec, wherein the first voice codec is the voice codec of a first voice channel already established between the first electronic device and a network-side device; the first voice channel is used to transmit voice data in a first voice call; the first electronic device acquiring a second voice codec, wherein the second voice codec is the voice codec negotiated between the first electronic device and a Bluetooth device for a second voice channel to be established; the first electronic device determining that the second voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and establishing a second voice channel with the Bluetooth device based on the narrowband voice codec, wherein the second voice channel is used to transmit voice data in the first voice call. In this method, the first electronic device selects the case where the second voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec. The mobile phone and the Bluetooth headset establish a second voice channel based on the narrowband voice codec. Correspondingly, the Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the voice data of the other end of the voice call, thus solving the problem of poor voice call quality in this situation.

[0005] In one possible implementation, the method further includes: the first electronic device determines that the second voice codec is a wideband voice codec and the first voice codec is a wideband voice codec, and establishes a second voice path with the Bluetooth device based on the wideband voice codec.

[0006] In one possible implementation, the method further includes: the first electronic device determines that the second voice codec is a narrowband voice codec, and establishes a second voice path with the Bluetooth device based on the narrowband voice codec.

[0007] In one possible implementation, before the first electronic device acquires the first voice codec, it further includes: the first electronic device, as the called party in the first voice call, establishing a first voice path with the network-side device.

[0008] In one possible implementation, before the first electronic device acquires the first voice codec, it further includes: the first electronic device receiving the initiation operation of the first voice call, and establishing a first voice path between the calling end of the first voice call and the network-side device.

[0009] In one possible implementation, after establishing a second voice path with the Bluetooth device based on narrowband voice codec, the method further includes: the Bluetooth device using a first call algorithm to process the voice data of the other end in the first voice call, wherein the first call algorithm is the call algorithm corresponding to the narrowband voice codec.

[0010] In one possible implementation, after establishing a second voice channel with the Bluetooth device based on wideband voice codec, the method further includes: the Bluetooth device using a second call algorithm to process the voice data of the other end in the first voice call, wherein the second call algorithm is the call algorithm corresponding to the wideband voice codec.

[0011] Secondly, this application provides a data processing method, comprising: a first electronic device acquiring a first voice codec, the first voice codec being a voice codec for a first voice channel already established between the first electronic device and a network-side device; the first voice channel being used to transmit voice data in a first voice call; the first electronic device acquiring a second voice codec, the second voice codec being a voice codec negotiated between the first electronic device and a Bluetooth device for a second voice channel to be established; the first electronic device determining that the second voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, establishing a second voice channel with the Bluetooth device based on the narrowband voice codec, the second voice channel being used to transmit voice data in the first voice call. Data; The Bluetooth device processes the voice data of the other end in the first voice call using a first call algorithm, where the first call algorithm is a call algorithm corresponding to narrowband voice codec; The first electronic device determines that the second voice codec is wideband voice codec, and the first voice codec is wideband voice codec, and establishes a second voice path with the Bluetooth device based on wideband voice codec; The Bluetooth device processes the voice data of the other end in the first voice call using the second call algorithm, where the second call algorithm is a call algorithm corresponding to wideband voice codec; The first electronic device determines that the second voice codec is narrowband voice codec, and establishes a second voice path with the Bluetooth device based on narrowband voice codec; The Bluetooth device processes the voice data of the other end in the first voice call using the first call algorithm;

[0012] Before the first electronic device acquires the first voice codec method, the method further includes: the first electronic device, as the called party of the first voice call, establishing a first voice channel with the network-side device; or, the first electronic device, upon receiving the initiation operation of the first voice call, establishing a first voice channel with the network-side device as the calling party of the first voice call.

[0013] In this method, the first electronic device selects a case where the second voice codec is wideband voice codec and the first voice codec is narrowband voice codec. The mobile phone and the Bluetooth headset establish a second voice path based on the narrowband voice codec. Correspondingly, the Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the voice data of the other end of the voice call, thus solving the problem of poor voice call quality in this case.

[0014] Thirdly, this application provides a data processing method, comprising: a first electronic device acquiring a third voice codec, the third voice codec being the voice codec of a second voice channel established between the first electronic device and a Bluetooth device; the second voice channel being used to transmit voice data in a first voice call; the first electronic device acquiring a first voice codec, the first voice codec being the voice codec of a first voice channel established between the first electronic device and a network-side device; the first voice channel being used to transmit voice data in the first voice call; the first electronic device determining that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and sending a second message to the Bluetooth device, the second message being used to instruct the Bluetooth device to use a first call algorithm to process the voice data of the other end in the first voice call, the first call algorithm being a call algorithm corresponding to the narrowband voice codec; the Bluetooth device responding to the second message, using the first call algorithm to process the voice data of the other end in the first voice call. In this method, when the first electronic device selects a case where the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, the mobile phone sends a second message to the Bluetooth headset. The Bluetooth headset then uses the call algorithm corresponding to the narrowband voice codec to process the voice data of the other end of the voice call, thus solving the problem of poor voice call quality in this case.

[0015] In one possible implementation, the voice data of the other end in the first voice call is processed using a first call algorithm, including: switching the parameters used by the preset call algorithm from those corresponding to wideband voice codecs to those corresponding to narrowband voice codecs to obtain the first call algorithm; and using the first call algorithm to process the voice data of the other end in the first voice call.

[0016] In one possible implementation, before the first electronic device acquires the third voice codec, the method further includes: the Bluetooth device receiving the initiation operation of the first voice call and sending a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party; a second voice path is established between the first electronic device and the Bluetooth device; the first electronic device, as the calling party of the first voice call, establishes a first voice path with the network-side device.

[0017] In one possible implementation, before the first electronic device acquires the third voice codec, the following steps are included: the first electronic device receives an initiation operation for the first voice call; the first electronic device establishes a second voice path with the Bluetooth device; and the first electronic device, as the calling end of the first voice call, establishes a first voice path with the network-side device.

[0018] Fourthly, this application provides a data processing method, comprising: a first electronic device acquiring a third voice codec, the third voice codec being a voice codec of a second voice channel already established between the first electronic device and a Bluetooth device; the second voice channel being used to transmit voice data in a first voice call; the first electronic device acquiring a first voice codec, the first voice codec being a voice codec of a first voice channel already established between the first electronic device and a network-side device; the first voice channel being used to transmit voice data in the first voice call; the first electronic device determining that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and sending a second message to the Bluetooth device, the second message being used to instruct the Bluetooth device to use a first call algorithm to process the voice data of the other end in the first voice call, the first call algorithm being a call algorithm corresponding to the narrowband voice codec; the Bluetooth device responding to the second message, using the first call algorithm to process the voice data of the other end in the first voice call;

[0019] The first call algorithm is used to process the voice data of the other end in the first voice call, including: switching the parameters used by the preset call algorithm from the parameters corresponding to the wideband voice codec to the parameters corresponding to the narrowband voice codec, to obtain the first call algorithm; and using the first call algorithm to process the voice data of the other end in the first voice call.

[0020] Before the first electronic device acquires the third voice codec, the method further includes: the Bluetooth device receiving the initiation operation of the first voice call and sending a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party; a second voice path is established between the first electronic device and the Bluetooth device; the first electronic device, as the calling party of the first voice call, establishes a first voice path with the network-side device; or...

[0021] The first electronic device receives the initiation operation of the first voice call; the first electronic device establishes a second voice channel with the Bluetooth device; the first electronic device, as the calling end of the first voice call, establishes a first voice channel with the network-side device.

[0022] In this method, when the first electronic device selects a case where the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, the mobile phone sends a second message to the Bluetooth headset. The Bluetooth headset then uses the call algorithm corresponding to the narrowband voice codec to process the voice data of the other end of the voice call, thus solving the problem of poor voice call quality in this case.

[0023] Fifthly, embodiments of this application provide a data processing method, comprising: a first electronic device acquiring a third voice codec, wherein the third voice codec is the voice codec of a second voice channel already established between the first electronic device and a Bluetooth device; the second voice channel is used to transmit voice data in a first voice call; the first electronic device acquiring a first voice codec, wherein the first voice codec is the voice codec of a first voice channel already established between the first electronic device and a network-side device; the first voice channel is used to transmit voice data in the first voice call; the first electronic device determining that the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, disconnecting the second voice channel already established with the Bluetooth device; and establishing a second voice channel between the first electronic device and the Bluetooth device based on the narrowband voice codec. In this method, the first electronic device selects the case where the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, disconnects the second voice channel and re-establishes the second voice channel based on the narrowband voice codec, and the Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the voice data of the other end of the voice call, thereby solving the problem of poor voice call quality in this situation.

[0024] In one possible implementation, after the first electronic device and the Bluetooth device establish a second voice path based on narrowband voice codec, the method further includes: the Bluetooth device using a first call algorithm to process the voice data of the other end in the first voice call, wherein the first call algorithm is a call algorithm corresponding to the narrowband voice codec.

[0025] In one possible implementation, before the first electronic device acquires the third voice codec, the method further includes: the Bluetooth device receiving the initiation operation of the first voice call and sending a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party; a second voice path is established between the first electronic device and the Bluetooth device; the first electronic device, as the calling party of the first voice call, establishes a first voice path with the network-side device.

[0026] In one possible implementation, before the first electronic device acquires the third voice codec, the following steps are included: the first electronic device receives an initiation operation for the first voice call; the first electronic device establishes a second voice path with the Bluetooth device; and the first electronic device, as the calling end of the first voice call, establishes a first voice path with the network-side device.

[0027] In a sixth aspect, embodiments of this application provide a data processing method, comprising: a first electronic device acquiring a third voice codec, wherein the third voice codec is a voice codec of a second voice channel already established between the first electronic device and a Bluetooth device; the second voice channel is used to transmit voice data in a first voice call; the first electronic device acquiring a first voice codec, wherein the first voice codec is a voice codec of a first voice channel already established between the first electronic device and a network-side device; the first voice channel is used to transmit voice data in the first voice call; the first electronic device determining that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, disconnecting the second voice channel already established with the Bluetooth device; and the first electronic device and the Bluetooth device establishing a second voice channel based on the narrowband voice codec.

[0028] After the first electronic device and the Bluetooth device establish a second voice path based on narrowband voice codec, the method further includes: the Bluetooth device using a first call algorithm to process the voice data of the other end in the first voice call, wherein the first call algorithm is the call algorithm corresponding to the narrowband voice codec.

[0029] Before the first electronic device acquires the third voice codec, the method further includes: the Bluetooth device receiving the initiation operation of the first voice call and sending a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party; a second voice path is established between the first electronic device and the Bluetooth device; the first electronic device, as the calling party of the first voice call, establishes a first voice path with the network-side device; or...

[0030] The first electronic device receives the initiation operation of the first voice call; the first electronic device establishes a second voice channel with the Bluetooth device; the first electronic device, as the calling end of the first voice call, establishes a first voice channel with the network-side device.

[0031] In this method, the first electronic device selects a case where the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec. It then disconnects the second voice path and re-establishes the second voice path based on the narrowband voice codec. The Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the voice data of the other end of the voice call, thereby solving the problem of poor voice call quality in this case.

[0032] In a seventh aspect, embodiments of this application provide a data processing method, comprising: a Bluetooth device acquiring a third voice codec, wherein the third voice codec is the voice codec of a second voice path established between the Bluetooth device and a first electronic device; the second voice path is used to transmit voice data in a first voice call; the Bluetooth device determining a first voice codec based on the voice data of the other end in the first voice call, wherein the first voice codec is the voice codec of a first voice path established between the first electronic device and a network-side device; the first voice path is used to transmit voice data in the first voice call; the Bluetooth device determining that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and using a first call algorithm to process the voice data of the other end in the first voice call, wherein the first call algorithm is a call algorithm corresponding to the narrowband voice codec. In this method, when the Bluetooth device selects a case where the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, the Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the voice data of the other end in the voice call, thereby solving the problem of poor voice call quality in this situation.

[0033] In one possible implementation, the Bluetooth device determines a first voice codec method based on the voice data of the other end in the first voice call, including: acquiring a first number of voice frames in the voice data of the other end; obtaining a first spectral feature of the voice frame, wherein the first spectral feature is wideband or narrowband; and determining the first voice codec method based on the first spectral feature with a higher proportion among the first spectral features of the first number of voice frames.

[0034] In one possible implementation, the voice data of the other end in the first voice call is processed using a first call algorithm, including: switching the parameters used by the preset call algorithm from those corresponding to wideband voice codecs to those corresponding to narrowband voice codecs to obtain the first call algorithm; and using the first call algorithm to process the voice data of the other end in the first voice call.

[0035] In one possible implementation, after the Bluetooth device determines that the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, before processing the voice data of the other end in the first voice call using the first call algorithm, the method further includes: the Bluetooth device disconnecting the established second voice path with the first electronic device; and the Bluetooth device establishing a second voice path with the first electronic device based on narrowband voice codec.

[0036] Eighthly, embodiments of this application provide a data processing method, comprising: a Bluetooth device acquiring a third voice codec, the third voice codec being a voice codec of a second voice path established between the Bluetooth device and a first electronic device; the second voice path being used to transmit voice data in a first voice call; the Bluetooth device determining a first voice codec based on the voice data of the peer in the first voice call, the first voice codec being a voice codec of a first voice path established between the first electronic device and a network-side device; the first voice path being used to transmit voice data in the first voice call; the Bluetooth device determining that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and processing the voice data of the peer in the first voice call using a first call algorithm, the first call algorithm being a call algorithm corresponding to the narrowband voice codec;

[0037] The Bluetooth device determines a first voice codec method based on the voice data of the other end in the first voice call, including: acquiring a first number of voice frames in the voice data of the other end; obtaining a first spectral feature of the voice frame, wherein the first spectral feature is wideband or narrowband; and determining the first voice codec method based on the first spectral feature with a higher proportion among the first spectral features of the first number of voice frames.

[0038] The first call algorithm is used to process the voice data of the other end in the first voice call, including: switching the parameters used by the preset call algorithm from the parameters corresponding to the wideband voice codec to the parameters corresponding to the narrowband voice codec, to obtain the first call algorithm; and using the first call algorithm to process the voice data of the other end in the first voice call.

[0039] After the Bluetooth device determines that the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, before processing the voice data of the other end in the first voice call using the first call algorithm, the process further includes: the Bluetooth device disconnecting the established second voice path with the first electronic device; and the Bluetooth device establishing a second voice path with the first electronic device based on narrowband voice codec.

[0040] In this method, when the Bluetooth device selects a case where the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, the Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the voice data of the other end of the voice call, thereby solving the problem of poor voice call quality in this case.

[0041] Ninthly, embodiments of this application provide an electronic device, including: a processor and a transceiver, wherein the processor is configured to acquire a first voice codec, the first voice codec being a voice codec for a first voice channel already established between the first electronic device and a network-side device; the first voice channel is used to transmit voice data in a first voice call; acquire a second voice codec, the second voice codec being a voice codec negotiated between the first electronic device and a Bluetooth device for a second voice channel to be established; determine that the second voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and instruct the transceiver to establish a second voice channel with the Bluetooth device based on the narrowband voice codec; the transceiver is configured to establish a second voice channel with the Bluetooth device based on the narrowband voice codec, the second voice channel being used to transmit voice data in the first voice call.

[0042] In one possible implementation, the processor is further configured to: determine that the second voice codec is a wideband voice codec and the first voice codec is a wideband voice codec, and instruct the transceiver and the Bluetooth device to establish a second voice path based on the wideband voice codec; the transceiver is further configured to: establish a second voice path with the Bluetooth device based on the wideband voice codec.

[0043] In one possible implementation, the processor is further configured to: determine that the second voice codec is a narrowband voice codec, and instruct the transceiver and the Bluetooth device to establish a second voice path based on the narrowband voice codec; the transceiver is further configured to: establish a second voice path with the Bluetooth device based on the narrowband voice codec.

[0044] In one possible implementation, the transceiver is also used to: establish a first voice path with the network-side device as the called party in the first voice call.

[0045] In one possible implementation, the processor is further configured to: receive an initiation operation of a first voice call, instruct the transceiver to establish a first voice path between the transceiver as the calling party of the first voice call and the network-side device; the transceiver is further configured to: establish a first voice path between the transceiver as the calling party of the first voice call and the network-side device.

[0046] In a tenth aspect, embodiments of this application provide a Bluetooth device, including: a transceiver, configured to establish a second voice path with a first electronic device based on narrowband voice codec, the second voice path being used to transmit voice data in a first voice call; the second voice path is established after the first electronic device acquires a first voice codec, acquires a second voice codec, and determines that the second voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, the first voice codec being the voice codec of the first voice path already established between the first electronic device and a network-side device; the first voice path being used to transmit voice data in the first voice call; the second voice codec being the voice codec negotiated between the first electronic device and the Bluetooth device for the second voice path to be established.

[0047] In one possible implementation, the transceiver is also used to: establish a second voice path with the first electronic device based on broadband voice codec, the second voice path being established after the first electronic device determines that the second voice codec is broadband voice codec and the first voice codec is broadband voice codec.

[0048] In one possible implementation, the transceiver is also used to: establish a second voice path with the first electronic device based on narrowband voice codec, the second voice path being established after the first electronic device determines that the second voice codec is narrowband voice codec.

[0049] In one possible implementation, it further includes: a processor, used to process the voice data of the other end in the first voice call using a first call algorithm after a second voice channel is established between the transceiver and the first electronic device based on narrowband voice codec, wherein the first call algorithm is a call algorithm corresponding to narrowband voice codec.

[0050] In one possible implementation, it further includes: a processor, used to process the voice data of the other end in the first voice call using a second call algorithm after a voice channel is established between the transceiver and the first electronic device based on broadband voice codec, wherein the second call algorithm is a call algorithm corresponding to broadband voice codec.

[0051] Eleventhly, embodiments of this application provide an electronic device, comprising: a processor, configured to acquire a third voice codec, wherein the third voice codec is the voice codec of a second voice channel established between a first electronic device and a Bluetooth device; the second voice channel is used to transmit voice data in a first voice call; acquire a first voice codec, wherein the first voice codec is the voice codec of a first voice channel established between the first electronic device and a network-side device; the first voice channel is used to transmit voice data in the first voice call; determine that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec; instruct a transceiver to send a second message to the Bluetooth device, wherein the second message is used to instruct the Bluetooth device to use a first call algorithm to process the voice data of the other end in the first voice call, wherein the first call algorithm is a call algorithm corresponding to the narrowband voice codec; and a transceiver, configured to send the second message to the Bluetooth device.

[0052] In one possible implementation, the transceiver is further configured to: receive a first message sent by a Bluetooth device, the first message being sent by the Bluetooth device after receiving an initiation operation for a first voice call; the first message being used to request a first electronic device to initiate a first voice call as the calling party; establish a second voice channel with the first electronic device; and establish a first voice channel with the network-side device as the calling party of the first voice call.

[0053] In one possible implementation, the processor is further configured to: receive the initiation operation of the first voice call; the transceiver is further configured to: after receiving the initiation operation of the first voice call, establish a second voice path with the Bluetooth device, and as the calling end of the first voice call, establish a first voice path with the network-side device.

[0054] In a twelfth aspect, embodiments of this application provide a Bluetooth device, comprising: a transceiver, configured to receive a second message sent by a first electronic device, the second message instructing the Bluetooth device to process voice data of the peer in a first voice call using a first call algorithm, the first call algorithm being a call algorithm corresponding to a narrowband voice codec; the second message being sent after the first electronic device acquires a third voice codec method, acquires the first voice codec method, and determines that the third voice codec method is a wideband voice codec and the first voice codec method is a narrowband voice codec; the third voice codec method is the voice codec method of a second voice path already established between the first electronic device and the Bluetooth device; the second voice path is used to transmit voice data in the first voice call; the first voice codec method is the voice codec method of a first voice path already established between the first electronic device and a network-side device; the first voice path is used to transmit voice data in the first voice call; and a processor, configured to, in response to the second message, process the voice data of the peer in the first voice call using the first call algorithm.

[0055] In one possible implementation, the processor is specifically used to: switch the parameters used by the preset call algorithm from those corresponding to wideband voice codecs to those corresponding to narrowband voice codecs to obtain a first call algorithm; and use the first call algorithm to process the voice data of the other end in the first voice call.

[0056] In one possible implementation, the processor is further configured to: receive a first voice call initiation operation and instruct the transceiver to send a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party; the transceiver is further configured to: send the first message to the first electronic device and establish a second voice channel with the first electronic device.

[0057] In one possible implementation, the transceiver is also used to: establish a second voice channel with the first electronic device, the second voice channel being established after the first electronic device receives the initiation operation of the first voice call.

[0058] In a thirteenth aspect, embodiments of this application provide an electronic device, comprising: a processor configured to acquire a third voice codec, wherein the third voice codec is a voice codec of a second voice channel already established between a first electronic device and a Bluetooth device; the second voice channel is used to transmit voice data in a first voice call; acquire a first voice codec, wherein the first voice codec is a voice codec of a first voice channel already established between the first electronic device and a network-side device; the first voice channel is used to transmit voice data in the first voice call; determine that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and instruct a transceiver to disconnect the second voice channel already established with the Bluetooth device and establish a second voice channel with the Bluetooth device based on the narrowband voice codec; and a transceiver configured to disconnect the second voice channel already established with the Bluetooth device and establish a second voice channel with the Bluetooth device based on the narrowband voice codec; and a transceiver configured to disconnect the second voice channel already established with the Bluetooth device and establish a second voice channel with the Bluetooth device based on the narrowband voice codec.

[0059] In one possible implementation, the transceiver is further configured to: receive a first message sent by a Bluetooth device, the first message being sent by the Bluetooth device after receiving an initiation operation for a first voice call; the first message being used to request a first electronic device to initiate a first voice call as the calling party; establish a second voice channel with the first electronic device; and establish a first voice channel with the network-side device as the calling party of the first voice call.

[0060] In one possible implementation, the processor is also used to: receive the initiation operation of the first voice call;

[0061] The transceiver is also used for: after the processor receives the initiation operation of the first voice call, establishing a second voice channel with the Bluetooth device, acting as the calling end of the first voice call, and establishing a first voice channel with the network-side device.

[0062] In a fourteenth aspect, embodiments of this application provide a Bluetooth device, comprising: a transceiver, configured to disconnect an established second voice path with a first electronic device, and establish a second voice path with the first electronic device based on narrowband voice codec; disconnecting the second voice path is performed after the first electronic device acquires a third voice codec, acquires a first voice codec, and determines that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec; the third voice codec is the voice codec of the established second voice path between the first electronic device and the Bluetooth device; the second voice path is used to transmit voice data in a first voice call; the first voice codec is the voice codec of the established first voice path between the first electronic device and a network-side device; the first voice path is used to transmit voice data in the first voice call.

[0063] In one possible implementation, it further includes: a processor for processing the voice data of the other end in the first voice call using a first call algorithm, wherein the first call algorithm is a call algorithm corresponding to narrowband voice codec.

[0064] In one possible implementation, the processor is further configured to: receive a first voice call initiation operation and instruct the transceiver to send a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party; the transceiver is further configured to: send the first message to the first electronic device and establish a second voice channel with the first electronic device.

[0065] In one possible implementation, the transceiver is also used to: establish a second voice channel with the first electronic device, the second voice channel being established after the first electronic device receives the initiation operation of the first voice call.

[0066] In a fifteenth aspect, embodiments of this application provide a Bluetooth device, comprising: a processor configured to acquire a third voice codec, wherein the third voice codec is a voice codec of a second voice path established between the Bluetooth device and a first electronic device; the second voice path is used to transmit voice data in a first voice call; determine a first voice codec based on the voice data of the other end in the first voice call, wherein the first voice codec is a voice codec of a first voice path established between the first electronic device and a network-side device; the first voice path is used to transmit voice data in the first voice call; determine that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec; and process the voice data of the other end in the first voice call using a first call algorithm, wherein the first call algorithm is a call algorithm corresponding to the narrowband voice codec.

[0067] In one possible implementation, the processor is specifically used to: acquire a first number of voice frames from the voice data of the peer; obtain a first spectral feature of the voice frame, wherein the first spectral feature is wideband or narrowband; and determine a first voice encoding / decoding method based on the first spectral feature with a higher proportion among the first spectral features of the first number of voice frames.

[0068] In one possible implementation, the processor is specifically used to: switch the parameters used by the preset call algorithm from those corresponding to wideband voice codecs to those corresponding to narrowband voice codecs to obtain a first call algorithm; and use the first call algorithm to process the voice data of the other end in the first voice call.

[0069] In one possible implementation, it further includes: a transceiver, used to disconnect the established second voice path with the first electronic device after the processor determines that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec; and to establish a second voice path with the first electronic device based on the narrowband voice codec.

[0070] In a sixteenth aspect, embodiments of this application provide a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to perform the method of any one of the first to eighth aspects.

[0071] In a seventeenth aspect, this application provides a computer program that, when executed by a computer, performs the method of the first aspect.

[0072] In one possible design, the program in aspect seventeen can be stored wholly or partially on a storage medium packaged with the processor, or it can be stored wholly or partially on a memory not packaged with the processor. Attached Figure Description

[0073] Figure 1 This is a schematic diagram of the structure of the electronic device according to an embodiment of this application;

[0074] Figure 2 This is a schematic diagram of the structure of a Bluetooth device according to an embodiment of this application;

[0075] Figure 3 This is a schematic diagram of the network architecture of an embodiment of this application;

[0076] Figure 4 This is a flowchart of one embodiment of the data processing method of this application;

[0077] Figure 5 A schematic diagram of the user interface (UI) for the pairing process in this application;

[0078] Figure 6 This is a flowchart of another embodiment of the data processing method of this application;

[0079] Figure 7 This is a flowchart of yet another embodiment of the data processing method of this application;

[0080] Figure 8 This is a flowchart of yet another embodiment of the data processing method of this application;

[0081] Figure 9A This is a flowchart of yet another embodiment of the data processing method of this application;

[0082] Figure 9B This is a flowchart of yet another embodiment of the data processing method of this application;

[0083] Figure 10 This is a flowchart of yet another embodiment of the data processing method of this application;

[0084] Figure 11 This is a flowchart of yet another embodiment of the data processing method of this application;

[0085] Figure 12 This is a structural diagram of one embodiment of the data processing apparatus of this application;

[0086] Figure 13 This is a structural diagram of another embodiment of the data processing apparatus of this application;

[0087] Figure 14 This is a structural diagram of another embodiment of the data processing apparatus of this application;

[0088] Figure 15 This is a structural diagram of another embodiment of the data processing apparatus of this application;

[0089] Figure 16This is a structural diagram of another embodiment of the data processing apparatus of this application;

[0090] Figure 17 This is a structural diagram of another embodiment of the data processing apparatus of this application;

[0091] Figure 18 This is a structural diagram of another embodiment of the data processing apparatus of this application. Detailed Implementation

[0092] The terminology used in the implementation section of this application is for the purpose of explaining specific embodiments of this application only, and is not intended to limit this application.

[0093] Taking a mobile phone as an electronic device and a Bluetooth headset as a Bluetooth device as an example, when making a voice call using a Bluetooth headset connected to the phone, the headset receives the voice data sent by the phone, decodes the voice data to obtain the voice signal from the other end of the call, and then uses a call algorithm to adjust the frequency response, gain, and other aspects of the voice signal. The processed voice signal is then converted into an analog signal and played through a speaker. Currently, common voice codec methods include narrowband voice codec and wideband voice codec. To accommodate the processing of voice data decoded by these two methods, the call algorithm in the Bluetooth headset has two sets of algorithm parameters: one set corresponding to wideband voice codec, used when processing voice data between the phone and the Bluetooth headset using wideband voice codec, and another set corresponding to narrowband voice codec, used when processing voice data between the phone and the Bluetooth headset using narrowband voice codec.

[0094] If a user makes a voice call using a Bluetooth headset connected to their phone, the voice codec used to transmit voice data between the phone and the carrier's network may be narrowband or wideband voice codec, and the voice codec used to transmit voice data between the phone and the Bluetooth headset may also be narrowband or wideband voice codec. Since most mobile phones nowadays have broadband voice codec capabilities, when Bluetooth headsets also have broadband voice codec capabilities, except in special cases such as very poor network conditions, regardless of whether the voice codec between the phone and the operator's network is narrowband or broadband, the voice data transmitted between the phone and the Bluetooth headset will be encoded and decoded using broadband voice codec. In this case, if the phone and operator's network use narrowband voice codec for voice data transmission, while the phone and Bluetooth headset use broadband voice codec for voice data transmission, then the call algorithm on the Bluetooth headset side will use the algorithm parameters corresponding to broadband voice codec to process the other end's voice signal. However, because the phone and operator's network use narrowband voice codec for voice data transmission, even if the phone and Bluetooth headset use broadband voice codec, the decoded voice signal from the other end obtained by the Bluetooth headset is actually a narrowband voice signal. This will result in poor processing of the other end's voice signal by the call algorithm, leading to poor call quality and a reduced user experience.

[0095] Therefore, this application provides a data processing method that can solve the above problems, optimize the voice call effect when using Bluetooth devices, and improve the user experience.

[0096] The method provided in this application can be applied to electronic devices capable of making voice calls, such as mobile phones; it can also be applied to Bluetooth devices that can assist electronic devices in making voice calls, such as Bluetooth headsets, wearable devices such as smartwatches, and in-vehicle communication devices.

[0097] For example, Figure 1A schematic diagram of the structure of electronic device 100 is shown. Electronic device 100 may include a processor 110, a wireless communication module 160, and an audio module 170; the wireless communication module 160 includes a Bluetooth module. Optionally, electronic device 100 may also include: an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, antenna 1, antenna 2, a mobile communication module 150, a speaker 170A, a receiver 170B, a microphone 170C, a headphone jack 170D, a sensor module 180, buttons 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an accelerometer sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0098] It is understood that the structures illustrated in the embodiments of the present invention do not constitute a specific limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may include more or fewer components than illustrated, or combine some components, or split some components, or have different component arrangements. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0099] Processor 110 may include one or more processing units, such as application processors (APs), modem processors, graphics processing units (GPUs), image signal processors (ISPs), controllers, video codecs, digital signal processors (DSPs), baseband processors, and / or neural network processing units (NPUs). These different processing units may be independent devices or integrated into one or more processors.

[0100] The controller can generate operation control signals based on the instruction opcode and timing signals to complete the control of instruction fetching and execution.

[0101] The processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory can store instructions or data that the processor 110 has just used or that are used repeatedly. If the processor 110 needs to use the instruction or data again, it can retrieve it directly from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.

[0102] In some embodiments, the processor 110 may include one or more interfaces. Interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.

[0103] The I2S interface can be used for audio communication. In some embodiments, the processor 110 may include multiple I2S buses. The processor 110 can be coupled to the audio module 170 via the I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the I2S interface to enable the function of answering phone calls through a Bluetooth headset.

[0104] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 can be coupled via the PCM bus interface. In some embodiments, the audio module 170 can also transmit audio signals to the wireless communication module 160 via the PCM interface, enabling the function of answering phone calls through a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.

[0105] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface is typically used to connect the processor 110 and the wireless communication module 160. For example, the processor 110 communicates with the Bluetooth module in the wireless communication module 160 via the UART interface to implement Bluetooth functionality. In some embodiments, the audio module 170 can transmit audio signals to the wireless communication module 160 via the UART interface to enable music playback through Bluetooth headphones.

[0106] The GPIO interface can be configured via software. It can be configured as a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor 110 to a camera 193, a display screen 194, a wireless communication module 160, an audio module 170, a sensor module 180, etc. The GPIO interface can also be configured as an I2C interface, an I2S interface, a UART interface, a MIPI interface, etc.

[0107] It is understood that the interface connection relationships between the modules illustrated in the embodiments of the present invention are merely illustrative and do not constitute a structural limitation on the electronic device 100. In other embodiments of this application, the electronic device 100 may also employ different interface connection methods or combinations of multiple interface connection methods as described in the above embodiments.

[0108] The wireless communication function of electronic device 100 can be realized through antenna 1, antenna 2, mobile communication module 150, wireless communication module 160, modem processor and baseband processor, etc.

[0109] Antenna 1 and antenna 2 are used to transmit and receive electromagnetic wave signals. Each antenna in electronic device 100 can be used to cover one or more communication frequency bands. Different antennas can also be multiplexed to improve antenna utilization. For example, antenna 1 can be multiplexed as a diversity antenna for a wireless local area network. In some other embodiments, the antennas can be used in conjunction with tuning switches.

[0110] The mobile communication module 150 can provide solutions for wireless communication, including 2G / 3G / 4G / 5G, applied to the electronic device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves via antenna 1, and perform filtering, amplification, and other processing on the received electromagnetic waves before transmitting them to a modem processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modem processor and convert it into electromagnetic waves for radiation via antenna 1. In some embodiments, at least some functional modules of the mobile communication module 150 may be housed in the processor 110. In some embodiments, at least some functional modules of the mobile communication module 150 and at least some modules of the processor 110 may be housed in the same device.

[0111] The modem processor may include a modulator and a demodulator. The modulator modulates the low-frequency baseband signal to be transmitted into a mid-to-high frequency signal. The demodulator demodulates the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After processing by the baseband processor, the low-frequency baseband signal is transmitted to the application processor. The application processor outputs sound signals through audio devices (not limited to speaker 170A, receiver 170B, etc.) or displays images or videos through the display screen 194. In some embodiments, the modem processor may be a separate device. In other embodiments, the modem processor may be independent of the processor 110 and may be housed in the same device as the mobile communication module 150 or other functional modules.

[0112] The wireless communication module 160 can provide solutions for wireless communication applications on the electronic device 100, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), and infrared (IR) technologies. The wireless communication module 160 can be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via antenna 2, performs frequency modulation and filtering of the electromagnetic wave signals, and sends the processed signal to processor 110. The wireless communication module 160 can also receive signals to be transmitted from processor 110, perform frequency modulation and amplification, and convert them into electromagnetic waves for radiation via antenna 2.

[0113] In some embodiments, antenna 1 of electronic device 100 is coupled to mobile communication module 150, and antenna 2 is coupled to wireless communication module 160, enabling electronic device 100 to communicate with networks and other devices via wireless communication technology. The wireless communication technology may include Global System for Mobile Communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Time Division Code Division Multiple Access (TD-SCDMA), Long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technologies, etc. The GNSS may include the Global Positioning System (GPS), the Global Navigation Satellite System (GLONASS), the BeiDou Navigation Satellite System (BDS), the Quasi-Zenith Satellite System (QZSS), and / or satellite-based augmentation systems (SBAS).

[0114] Internal memory 121 can be used to store computer executable program code, which includes instructions. Internal memory 121 may include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback, image playback, etc.), etc. The data storage area may store data created during the use of electronic device 100 (such as audio data, phonebook, etc.). Furthermore, internal memory 121 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, universal flash storage (UFS), etc. Processor 110 executes various functional applications and data processing of electronic device 100 by running instructions stored in internal memory 121 and / or instructions stored in memory located in the processor.

[0115] Electronic device 100 can implement audio functions, such as music playback and recording, through audio module 170, speaker 170A, receiver 170B, microphone 170C, headphone jack 170D, and application processor.

[0116] The audio module 170 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 170 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 170 may be located in the processor 110, or some functional modules of the audio module 170 may be located in the processor 110.

[0117] The speaker 170A, also known as a "loudspeaker," is used to convert audio electrical signals into sound signals. The electronic device 100 can listen to music or make hands-free calls through the speaker 170A.

[0118] The receiver 170B, also known as the "earpiece," is used to convert audio electrical signals into sound signals. When the electronic device 100 answers a telephone call or voice message, the receiver 170B can be brought close to the ear to listen to the voice.

[0119] Microphone 170C, also known as a "microphone" or "voice transducer," is used to convert sound signals into electrical signals. When making a phone call or sending a voice message, the user can speak by bringing their mouth close to microphone 170C, inputting the sound signal into microphone 170C. Electronic device 100 may have at least one microphone 170C. In some embodiments, electronic device 100 may have two microphones 170C, which, in addition to collecting sound signals, can also perform noise reduction. In other embodiments, electronic device 100 may also have three, four, or more microphones 170C, which can collect sound signals, reduce noise, identify the sound source, and perform directional recording, etc.

[0120] The SIM card interface 195 is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface 195 to make contact with and separate from the electronic device 100. The electronic device 100 can support one or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, etc. Multiple cards can be inserted into the same SIM card interface 195 simultaneously. The multiple cards can be of the same or different types. The SIM card interface 195 is also compatible with different types of SIM cards. The SIM card interface 195 is also compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to realize functions such as calls and data communication. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0121] The software system of electronic device 100 can adopt a layered architecture, event-driven architecture, microkernel architecture, microservice architecture, or cloud architecture. This embodiment of the invention uses the layered architecture Android system as an example to exemplify the software structure of electronic device 100.

[0122] Figure 2 This is a schematic diagram of the structure of a Bluetooth device according to an embodiment of the present invention, as shown below. Figure 2 As shown, the Bluetooth device 200 may include a processor 210, a Bluetooth module 220, and an audio module 230. The processor 210, Bluetooth module 220, and audio module 230 can communicate with each other through internal connection channels to transmit control and / or data signals.

[0123] The Bluetooth module 220 is used in conjunction with the processor 210 to enable Bluetooth communication with other devices.

[0124] The audio module 230 is used to convert digital audio information into analog audio signals for output, and also to convert analog audio input into digital audio signals. The audio module 230 can also be used for encoding and decoding audio signals. In some embodiments, the audio module 230 may be located in the processor 210, or some functional modules of the audio module 230 may be located in the processor 210.

[0125] See Figure 3 This is an example diagram illustrating the applicable scenario of the data processing method in the embodiments of this application, such as... Figure 3As shown, it includes: Bluetooth device 310, electronic device 320, and network-side device 330; electronic device 320 can establish a voice channel with the operator's network through network-side device 330 to realize voice calls with other electronic devices; Bluetooth device 310 can establish a voice channel with electronic device 320, and users can realize voice calls on the side of electronic device 320 through Bluetooth device 310.

[0126] In this embodiment, the Bluetooth device can be a Bluetooth headset, a smartwatch with Bluetooth communication function, etc. The electronic device can be a mobile phone or other electronic device with voice call capability. In the following embodiments, a mobile phone as the electronic device and a Bluetooth headset as the Bluetooth device are used as examples for illustrative purposes.

[0127] Figure 4 This is a flowchart of one embodiment of the data processing method of this application, as shown below. Figure 4 As shown, the method may include:

[0128] Step 401: The mobile phone and Bluetooth headset are successfully paired.

[0129] See Figure 5 This section explains the pairing process between the phone and the Bluetooth headset. Bluetooth functionality is typically a feature within the phone's operating system. Users access the Bluetooth settings interface within their phone's operating system, for example... Figure 5 As shown in the first image, the user turns on their phone's Bluetooth by selecting the "Open" control. The phone detects this, searches for nearby electronic devices that can be paired, and displays the found devices to the user. If the Bluetooth headset is also enabled, the phone can display the headset on the screen. For example... Figure 5 As shown in the second image, when the user selects the "Bluetooth Headset" control, the phone receives a pairing instruction for the Bluetooth headset, and the pairing process begins between the phone and the headset. The specific pairing process will not be detailed here. Afterwards, for example... Figure 5 As shown in the third image, after the mobile phone and Bluetooth headset are paired, a pairing confirmation message can be displayed to the user.

[0130] Step 402: The mobile phone, as the called party in the voice call, establishes a voice channel with the operator's network through the network-side equipment, and obtains and stores the first voice codec method. The first voice codec method is the voice codec method used between the mobile phone and the operator's network in this voice call.

[0131] In this process, the mobile phone receives an incoming call and prompts the user. If the user chooses to answer the call, the mobile phone receives the user's call answering action. This serves as the parameter negotiation process for the voice channel between the called party and the network-side device, as well as the voice channel establishment process. This voice channel is used to transmit voice data during the voice call. During the voice channel establishment process, the signaling sent from the network-side device to the mobile phone can carry the necessary parameters used for the voice channel. One of these parameters is the aforementioned first voice encoding / decoding method. Accordingly, the mobile phone can obtain the first voice encoding method from this signaling. The specific parameter negotiation process for the voice channel is not detailed in this embodiment.

[0132] The mobile phone can set bandwidth status information for this voice call to store the aforementioned first voice codec. The bandwidth status information set in the phone can have different values ​​to represent different voice codecs used in the voice call, and its value corresponds to the acquired first voice codec. For example, a bandwidth status information value of 4 indicates narrowband voice codec, and a bandwidth status information value of 8 indicates wideband voice codec. Accordingly, if the acquired first voice codec is narrowband voice codec, the bandwidth status information in the phone can be set to 4; if the acquired first voice codec is wideband voice codec, the bandwidth status information in the phone can be set to 8.

[0133] Step 403: The mobile phone obtains the voice codec supported by the Bluetooth headset, and determines the second voice codec based on the voice codec supported by the mobile phone and the Bluetooth headset.

[0134] The second voice codec method is the voice codec method negotiated between the mobile phone and the Bluetooth headset for the voice channel to be established.

[0135] The mobile phone can obtain the voice codecs supported by the Bluetooth headset, which may include:

[0136] The mobile phone sends a negotiation request message to the Bluetooth headset. The negotiation request message is used to request the voice codec supported by the Bluetooth headset.

[0137] In response to the negotiation request message, the Bluetooth headset sends a negotiation response message to the mobile phone. This response message includes the voice codecs supported by the Bluetooth headset. The supported codecs can be carried in the BCS field of the negotiation response message. A BCS value of 1 indicates that the Bluetooth headset supports narrowband voice codecs, while a value of 2 indicates that the Bluetooth headset supports wideband voice codecs.

[0138] In related technologies, the establishment of a voice channel between a mobile phone and a Bluetooth headset typically involves a parameter negotiation process and a voice channel establishment process. The parameter negotiation process enables the mobile phone to obtain the relevant parameters of the voice channel supported by the Bluetooth headset. Specifically, this process may include: the mobile phone sending a parameter negotiation request message to the Bluetooth headset, requesting the parameters supported by the Bluetooth headset; and the Bluetooth headset responding to the parameter negotiation request message by sending a parameter negotiation response message, which indicates to the mobile phone the relevant parameters of the voice channel supported by the Bluetooth headset. These parameters generally include the voice codecs supported by the Bluetooth headset. Therefore, the negotiation request message and response message used to obtain the voice codecs supported by the Bluetooth headset can be implemented using the aforementioned parameter negotiation request message and response message.

[0139] The phone can determine the second voice codec based on the voice codec supported by the phone and the Bluetooth headset. Specifically, if both the phone and the Bluetooth headset support wideband voice codec, then the second voice codec is determined to be wideband voice codec. If at least one of the phone and the Bluetooth headset only supports narrowband voice codec, then the second voice codec is determined to be narrowband voice codec.

[0140] Step 404: The mobile phone determines whether the second voice codec is wideband voice codec. If yes, proceed to step 405; otherwise, proceed to step 407.

[0141] Step 405: The mobile phone determines whether the first voice codec recorded in the mobile phone is a narrowband voice codec. If yes, proceed to step 406; otherwise, proceed to step 408.

[0142] Step 406: The mobile phone sends a codec instruction message to the Bluetooth headset. The voice codec method carried in the codec instruction message is narrowband voice codec.

[0143] The codec indication message can be implemented using existing signaling or newly defined signaling. For example, the codec indication message can be a newly defined signaling based on transmission protocols such as AT, Serial Port Profile (SPP), ECHO, or Bluetooth Low Energy (BLE) broadcasting. This newly defined signaling sets a band field, and the value of the band field indicates that the voice codec method is narrowband voice codec. Continuing the example in step 402, the value of the band field can be 4.

[0144] This step is optional.

[0145] Step 407: The mobile phone and Bluetooth headset establish a voice path based on narrowband voice codec. The mobile phone and Bluetooth headset respectively use narrowband voice codec to encode and decode the voice data between the mobile phone and Bluetooth headset. The Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the decoded voice data. This branch of the process ends.

[0146] Establishing a voice path between a mobile phone and a Bluetooth headset based on narrowband voice codec can include:

[0147] The mobile phone sends a channel establishment request message to the Bluetooth headset; the voice codec method carried in the channel establishment request message is narrowband voice codec.

[0148] The Bluetooth headset sends a channel establishment response message to the mobile phone.

[0149] The decoded voice data is the same as the voice data from the other end of the voice call. Bluetooth headsets can obtain a call algorithm corresponding to the narrowband voice codec by setting the parameters of the call algorithm to those of the narrowband voice codec.

[0150] Step 408: The mobile phone and Bluetooth headset establish a voice channel based on the wideband voice codec. The mobile phone and Bluetooth headset respectively use the wideband voice codec to encode and decode the voice data between the mobile phone and the Bluetooth headset; the Bluetooth headset uses the call algorithm corresponding to the wideband voice codec to process the decoded voice data; this branch of the process ends.

[0151] Bluetooth headsets can obtain a call algorithm corresponding to narrowband voice codec by setting the parameters of the call algorithm to those of wideband voice codec.

[0152] In the prior art, after the mobile phone and Bluetooth headset negotiate the second voice codec in step 403, a voice path is directly established between the mobile phone and Bluetooth headset based on the second voice codec. At this point, if the second voice codec negotiated between the mobile phone and Bluetooth headset is wideband voice codec, while the first voice codec between the mobile phone and the operator network is narrowband voice codec, then the actual voice data obtained by the Bluetooth headset from the other end of the voice call is narrowband voice data. Since the Bluetooth headset uses the call algorithm corresponding to wideband voice codec to process the narrowband voice data, it will affect the voice call quality. Figure 4In the method shown, after the mobile phone and Bluetooth headset negotiate the second voice codec, the mobile phone further selects the case where the second voice codec is wideband voice codec and the first voice codec is narrowband voice codec through the judgment in steps 404 and 405. The voice channel established between the mobile phone and Bluetooth headset uses narrowband voice codec to transmit voice data. Correspondingly, the Bluetooth headset uses the call algorithm corresponding to narrowband voice codec to process the voice data of the other end of the voice call, which solves the problem of poor voice call quality in this case.

[0153] In this application, the voice codec used in the established voice channel between the mobile phone and the Bluetooth headset is also referred to as the third voice codec. For example, the third voice codec in step 407 is narrowband voice codec, and the third voice codec in step 408 is wideband voice codec.

[0154] Different from Figure 4 The method shown is that the mobile phone acts as the called party in a voice call. Figure 6 In the data processing method shown, the mobile phone acts as the calling end of the voice call, and the user initiates the voice call by operating the Bluetooth headset. For example... Figure 6 As shown, the method may include:

[0155] Step 601: The mobile phone and Bluetooth headset are successfully paired.

[0156] The implementation of this step can be referred to the description in step 401, and will not be repeated here.

[0157] Step 602: The Bluetooth headset receives a call instruction and sends a call request message to the mobile phone. The call request message is used to request a voice call and includes the voice codec supported by Bluetooth.

[0158] If the Bluetooth headset supports wideband voice codec, the voice codec method carried in the call request message is wideband voice codec; otherwise, it is narrowband voice codec.

[0159] Currently, many Bluetooth headsets support making calls from the headset side. When a user makes a call from the Bluetooth headset side, the Bluetooth headset can receive call instructions.

[0160] Step 603: In response to the call request message, the mobile phone determines the second voice codec method according to the voice codec methods supported by the mobile phone and the Bluetooth headset respectively, and establishes a voice channel with the Bluetooth headset based on the second voice codec method.

[0161] In this step, the third voice codec method of the established voice channel is the second voice codec method negotiated between the mobile phone and the Bluetooth headset.

[0162] Step 604: The mobile phone establishes a voice channel with the operator's network through the network-side equipment and obtains the first voice codec.

[0163] For instructions on how to implement this step, please refer to [link / reference]. Figure 4 The corresponding description in [the document] will not be repeated here.

[0164] Step 605: The mobile phone determines whether the second voice codec is a broadband voice codec. If it is, proceed to step 606; otherwise, this branch of the process ends.

[0165] If the result is negative, it means that the second voice codec is a narrowband voice codec. In this case, there is no need to adjust the voice path already established between the mobile phone and the Bluetooth headset. You can continue to make voice calls on the existing voice path.

[0166] Step 606: The mobile phone determines whether the first voice codec is narrowband voice codec. If yes, proceed to step 607; otherwise, this branch of the process ends.

[0167] If the result is negative, it means that the first voice codec is wideband voice codec, and the second voice codec is also wideband voice codec. There is no need to adjust the voice codec on the Bluetooth headset side; you can continue to make voice calls on the existing voice channel.

[0168] Step 607: The mobile phone sends a codec instruction message to the Bluetooth headset. The voice codec method carried in the codec instruction message is narrowband voice codec. Then proceed to step 608.

[0169] Step 608: The Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the decoded voice data.

[0170] Specifically, Bluetooth headsets can switch the parameters in the call algorithm from those corresponding to wideband voice codecs to those corresponding to narrowband voice codecs to obtain the call algorithm corresponding to narrowband voice codecs.

[0171] Figure 6 The method shown selects a case where the second voice codec is wideband voice codec and the first voice codec is narrowband voice codec. Then, the call algorithm is switched in the Bluetooth headset. This solves the problem of mismatch between the call algorithm and the bandwidth of the voice data to be processed when the mobile phone is the calling end and the user initiates a voice call on the Bluetooth headset side. This is because the second voice codec is wideband voice codec and the first voice codec is narrowband voice codec. As a result, the problem of poor voice call quality is solved.

[0172] The above Figure 4 In the method shown, the mobile phone acts as the called party in the voice call. Figure 6 In the method shown, the mobile phone acts as the calling end of the voice call, and the user initiates the voice call from the Bluetooth headset. This differs from the methods described above. Figure 7 and Figure 8 In the data processing method of the present application embodiment, the mobile phone acts as the calling end of the voice call, and the user initiates the voice call from the mobile phone side.

[0173] When a user initiates a voice call from their mobile phone, the phone needs to establish voice pathways with both the network device and the Bluetooth headset. This can result in two scenarios:

[0174] Scenario 1: The voice communication channel between the mobile phone and the network device is established earlier than the voice communication channel between the mobile phone and the Bluetooth device.

[0175] Scenario 2: The establishment of the voice channel between the mobile phone and the network-side device is later than the establishment of the voice channel between the mobile phone and the Bluetooth device.

[0176] Figure 7 The data processing method shown in the embodiment of this application is applicable to case one, and... Figure 4 The main difference between the methods shown is that: Figure 4 Step 402 is replaced with step 701 below, specifically,

[0177] Step 701: The mobile phone receives the call instruction operation, acts as the calling end of the voice call, establishes a voice channel with the operator's network through the network-side equipment, and obtains and stores the first voice codec.

[0178] When a user makes a call on their mobile phone, the phone receives corresponding call instructions.

[0179] Similar to the description in step 402, during the process of establishing a voice channel between the mobile phone and the operator's network through the network-side device, the network-side device sends signaling to the mobile phone to indicate the parameters necessary for establishing the voice channel. The mobile phone can obtain the first voice codec from the signaling.

[0180] Figure 7 The method shown involves the mobile phone selecting a wideband voice codec as the second voice codec and a narrowband voice codec as the first voice codec. Then, a voice path is established based on the narrowband voice codec. The Bluetooth headset uses the narrowband voice codec for voice data encoding and decoding, and the corresponding call algorithm is used to process the voice data at the other end. This solves the problem of mismatch between the call algorithm in the Bluetooth headset and the voice data bandwidth at the other end when the mobile phone is the calling end and the user initiates the voice call on the mobile phone side, due to the wideband voice codec being used for the second voice codec and the narrowband voice codec being used for the first voice codec. This effectively solves the problem of poor voice call quality.

[0181] Figure 8 The data processing method shown in the embodiment of this application is applicable to case two, and... Figure 6 The main difference between the methods shown is: Figure 6 Steps 602 to 604 in the method shown are replaced by the following steps 801 to 802, specifically:

[0182] Step 801: The mobile phone receives a call instruction, obtains the voice codec supported by the Bluetooth headset, determines the second voice codec based on the voice codec supported by the mobile phone and the Bluetooth headset, and establishes a voice channel with the Bluetooth headset based on the second voice codec.

[0183] When a user makes a call on their mobile phone, the phone receives corresponding call instructions.

[0184] In this step, the implementation of the mobile phone obtaining the voice codec supported by the Bluetooth headset and determining the second voice codec can be referred to the corresponding description in step 403. The implementation of the establishment of a voice path between the mobile phone and the Bluetooth headset based on the second voice codec can be referred to the corresponding description in step 407, which will not be repeated here.

[0185] Step 802: The mobile phone, as the calling end of the voice call, establishes a voice path with the operator's network through the network-side equipment and obtains the first voice codec.

[0186] The implementation of this step can be referred to the corresponding description in step 701, and will not be repeated here.

[0187] Figure 8 The method shown involves the mobile phone selecting a wideband voice codec as the second voice codec and a narrowband voice codec as the first voice codec. Then, it instructs the Bluetooth headset to switch call algorithms. This solves the problem of mismatch between the call algorithm in the Bluetooth headset and the other end's voice data bandwidth when the mobile phone is the calling end and the user initiates the call on the mobile phone side, provided that the second voice codec is wideband and the first is narrowband. This resolves the issue of poor voice call quality.

[0188] Different from Figure 6 and Figure 8 In the method shown, the mobile phone instructs the Bluetooth headset on the voice codec mode, and the Bluetooth headset switches the voice codec mode accordingly. In another data processing method provided in this application embodiment, the voice codec mode conversion is achieved by disconnecting the original voice path and establishing a new voice path. See also Figure 9A and Figure 9B As shown, respectively Figure 6 and Figure 8Steps 607-608 in the original text are replaced with step 901 below:

[0189] Step 901: The mobile phone disconnects the voice path between itself and the Bluetooth headset, and re-establishes the voice path between the mobile phone and the Bluetooth headset based on narrowband voice codec. The mobile phone and the Bluetooth headset respectively use narrowband voice codec to encode and decode the voice data between the mobile phone and the Bluetooth headset; the Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the decoded voice data.

[0190] Re-establishing the voice path between the mobile phone and Bluetooth headset based on narrowband voice codecs can include:

[0191] The mobile phone sends a channel establishment request message to the Bluetooth headset. The voice codec method carried in the channel establishment request message is narrowband voice codec.

[0192] In response to the channel establishment request message, the Bluetooth headset sends a channel establishment response message to the mobile phone.

[0193] By disconnecting and reconnecting the voice channel in step 901, the voice codec used in the Bluetooth headset is switched from wideband voice codec to narrowband voice codec. Consequently, the call algorithm used in the Bluetooth headset is switched from the call algorithm corresponding to wideband voice codec to the call algorithm corresponding to narrowband voice codec, thus realizing the switching of the call algorithm.

[0194] If the Bluetooth headset has a preset call algorithm, and preset parameters for narrowband voice codec and wideband voice codec for the call algorithm, the above call algorithm switching can be achieved by switching the parameters used by the preset call algorithm.

[0195] Figure 9A and Figure 9B The method shown selects a case where the second voice codec is wideband voice codec and the first voice codec is narrowband voice codec. Then, by disconnecting and re-establishing the voice path, the call algorithm in the Bluetooth headset is switched. This solves the problem of mismatch between the call algorithm in the Bluetooth headset and the voice data bandwidth of the other end when the second voice codec is wideband voice codec and the first voice codec is narrowband voice codec, thereby solving the problem of poor voice call quality.

[0196] Figure 10 This is a flowchart of one embodiment of the data processing method of this application, as shown below. Figure 10 As shown, the method may include:

[0197] Step 1001: The mobile phone and Bluetooth headset are successfully paired.

[0198] Step 1002: Establish a second voice channel between the mobile phone and the Bluetooth headset, and establish a first voice channel between the mobile phone and the network-side device.

[0199] The second voice codec method for establishing a second voice channel between the mobile phone and the Bluetooth headset can be determined based on the voice codec methods supported by the mobile phone and the Bluetooth headset; the mobile phone can act as the calling or called party in a voice call, and establish a first voice channel with the operator's network through network-side equipment; the voice call initiated by the mobile phone as the calling party can be initiated by the user operating on the mobile phone side or by the user operating on the Bluetooth headset side.

[0200] The above process for establishing the speech pathway can be implemented by referring to relevant methods, and will not be elaborated here.

[0201] Step 1003: The Bluetooth headset receives the voice signal from the other end of the voice call through the second voice channel mentioned above.

[0202] Step 1004: The Bluetooth headset calculates whether the spectral characteristics of each of the first number of voice frames in the voice signal are narrowband or wideband, and determines the first voice encoding / decoding method based on the spectral characteristics of the first number of voice frames.

[0203] The Bluetooth headset calculates whether the spectral characteristics of each speech frame in the first number of speech frames of the speech signal are narrowband or wideband, which may include:

[0204] The Bluetooth headset performs a Fourier transform (FFT) on the voice frame to convert the voice frame from a time domain signal to a frequency domain signal; it calculates the energy sum of the frequency domain signal between 5kHz and 8kHz in the voice frame's frequency domain signal, and determines that if the energy sum is less than a preset threshold, the spectral characteristics of the voice frame are narrowband; otherwise, the spectral characteristics of the voice frame are wideband.

[0205] Generally, Bluetooth headsets can take the first number of voice frames from the other end of a voice call, starting from the first voice frame, as the processing object in order to quickly determine the voice codec used between the mobile phone and the operator's network, and then determine whether to adjust the voice codec between the mobile phone and the Bluetooth headset.

[0206] The first quantity can be a natural number. If the first quantity is 1, calculating whether the spectral characteristics of a voice frame are narrowband or wideband, and determining whether the voice codec between the mobile phone and the network device is narrowband or wideband, may result in calculation errors. To improve accuracy, the spectral characteristics of more than one voice frame can be calculated. Accordingly, the Bluetooth headset can select the spectral characteristics that appear more frequently from the spectral characteristics of multiple voice frames to determine the voice codec between the mobile phone and the network device.

[0207] Step 1005: The Bluetooth headset determines whether the third voice codec is wideband voice codec. If it is, proceed to step 1006; otherwise, this branch of the process ends.

[0208] The third voice codec method is the voice codec method used in the second voice channel already established between the Bluetooth headset and the mobile phone.

[0209] If the judgment result is negative, it means that the third voice codec is a narrowband voice codec. In this case, the established second voice channel will continue to be used for the transmission of voice signals in the voice call, and the narrowband voice codec will be used for the encoding and decoding of the voice signals.

[0210] Step 1006: The Bluetooth headset determines whether the first voice codec is narrowband voice codec. If yes, proceed to step 1007; otherwise, this branch of the process ends.

[0211] If the result is negative, it means that the bandwidth between the mobile phone and the Bluetooth headset, and between the mobile phone and the network device, is broadband. In this case, the established voice channel will continue to be used for the transmission of voice signals during the voice call, and broadband voice codecs will be used for the encoding and decoding of voice signals during the voice call.

[0212] Step 1007: The Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the decoded voice data.

[0213] Figure 10 The method shown involves the Bluetooth headset determining the first voice codec based on the spectral characteristics of the voice frames in the peer's voice signal. Then, it selects a third voice codec that is wideband voice codec while the first voice codec is narrowband voice codec. The Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the decoded voice data. This solves the problem of bandwidth mismatch between the call algorithm in the Bluetooth headset and the peer's voice data when the third voice codec is wideband voice codec while the first voice codec is narrowband voice codec, thus resolving the issue of poor voice call quality.

[0214] Different from Figure 10 In the method shown, the Bluetooth headset switches the voice codec from wideband voice codec to narrowband voice codec. Figure 11 In the method shown, the conversion of the speech encoding and decoding method is achieved by disconnecting the original second speech path, re-negotiating the relevant parameters of the speech path, and establishing a new speech path. Specifically, steps 1007-1008 are replaced with the following step 1101:

[0215] Step 1101: The Bluetooth headset disconnects the second voice channel with the mobile phone, and re-establishes the voice channel between the mobile phone and the Bluetooth headset based on narrowband voice codec. The mobile phone and the Bluetooth headset respectively use narrowband voice codec to encode and decode the voice data between the mobile phone and the Bluetooth headset; the Bluetooth headset uses the call algorithm corresponding to the narrowband voice codec to process the decoded voice data.

[0216] In this process, the Bluetooth module typically disconnects the second voice channel between the Bluetooth headset and the mobile phone. Specifically, the audio module of the Bluetooth headset can send an instruction message to the Bluetooth module of the Bluetooth headset to instruct the Bluetooth module to disconnect the voice channel between the Bluetooth module and the mobile phone and re-establish the voice channel based on narrowband voice codec. The Bluetooth module then disconnects and re-establishes the voice channel according to the above instruction.

[0217] The process of re-establishing the voice path between the mobile phone and the Bluetooth headset based on narrowband voice codec can be referred to in step 901, which will not be repeated here.

[0218] Figure 11 The method shown involves the Bluetooth headset determining the first voice codec based on the spectral characteristics of the voice frames in the peer's voice signal. Then, it selects a case where the third voice codec is wideband voice codec while the first voice codec is narrowband voice codec. By re-establishing the voice path, the Bluetooth headset switches between voice codec methods, thereby enabling the switching of the call algorithm. This solves the problem of mismatch between the call algorithm and the peer's voice data bandwidth when the third voice codec is wideband and the first voice codec is narrowband, thus resolving the issue of poor voice call quality.

[0219] It is understood that some or all of the steps or operations in the above embodiments are merely examples, and other operations or variations thereof can be performed in the embodiments of this application. Furthermore, the steps may be performed in different orders as presented in the above embodiments, and it is not necessary to perform all the operations in the above embodiments.

[0220] Figure 12 This is a schematic diagram of the structure of one embodiment of the data processing apparatus of this application. This apparatus can be applied to electronic devices, such as... Figure 12 As shown, the device 1200 may include:

[0221] The acquisition unit 1210 is used to acquire a first voice codec, which is the voice codec of the first voice channel established between the first electronic device and the network-side device; the first voice channel is used to transmit voice data in the first voice call; and to acquire a second voice codec, which is the voice codec negotiated between the first electronic device and the Bluetooth device for the second voice channel to be established.

[0222] The channel management unit 1220 is used to determine that the second voice codec is wideband voice codec and the first voice codec is narrowband voice codec, and to establish a second voice channel with the Bluetooth device based on narrowband voice codec. The second voice channel is used to transmit voice data in the first voice call.

[0223] In one possible implementation, the path management unit 1220 can also be used to: determine that the second voice codec is a wideband voice codec and the first voice codec is a wideband voice codec, and establish a second voice path with the Bluetooth device based on the wideband voice codec.

[0224] In one possible implementation, the path management unit 1220 can also be used to: determine that the second voice codec is a narrowband voice codec, and establish a second voice path with the Bluetooth device based on the narrowband voice codec.

[0225] In one possible implementation, the path management unit 1220 can also be used to: establish a first voice path with the network-side device as the called party in the first voice call.

[0226] In one possible implementation, the path management unit 1220 can also be used to: receive the initiation operation of the first voice call, and establish a first voice path between the calling end of the first voice call and the network-side device.

[0227] Figure 13 This is a schematic diagram of the structure of one embodiment of the data processing apparatus of this application. This apparatus can be applied to Bluetooth devices, such as... Figure 13 As shown, the device 1300 may include:

[0228] The channel management unit 1310 is used to establish a second voice channel with the first electronic device based on narrowband voice codec. The second voice channel is used to transmit voice data in the first voice call. The second voice channel is established after the first electronic device obtains the first voice codec method, obtains the second voice codec method, and determines that the second voice codec method is wideband voice codec and the first voice codec method is narrowband voice codec. The first voice codec method is the voice codec method of the first voice channel already established between the first electronic device and the network-side device. The first voice channel is used to transmit voice data in the first voice call. The second voice codec method is the voice codec method negotiated between the first electronic device and the Bluetooth device for the second voice channel to be established.

[0229] In one possible implementation, the path management unit 1310 can also be used to: establish a second voice path with the first electronic device based on broadband voice codec, the second voice path being established after the first electronic device determines that the second voice codec is broadband voice codec and the first voice codec is broadband voice codec.

[0230] In one possible implementation, the path management unit 1310 can also be used to: establish a second voice path with the first electronic device based on narrowband voice codec, the second voice path being established after the first electronic device determines that the second voice codec is narrowband voice codec.

[0231] In one possible implementation, the device 1300 may further include:

[0232] The processing unit 1320 is used to process the voice data of the other end in the first voice call using a first call algorithm, wherein the first call algorithm is a call algorithm corresponding to narrowband voice codec.

[0233] In one possible implementation, the processing unit 1320 can also be used to process the voice data of the other end in the first voice call using a second call algorithm, wherein the second call algorithm is a call algorithm corresponding to a broadband voice codec.

[0234] Figure 14 This is a schematic diagram of the structure of one embodiment of the data processing apparatus of this application. This apparatus can be applied to electronic devices, such as... Figure 14 As shown, the device 1400 may include:

[0235] The acquisition unit 1410 is used to acquire a third voice codec, which is the voice codec of the second voice channel established between the first electronic device and the Bluetooth device; the second voice channel is used to transmit voice data in the first voice call; and to acquire a first voice codec, which is the voice codec of the first voice channel established between the first electronic device and the network-side device; the first voice channel is used to transmit voice data in the first voice call.

[0236] The message transmission unit 1420 is used to determine that the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, and to send a second message to the Bluetooth device. The second message is used to instruct the Bluetooth device to use the first call algorithm to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec.

[0237] In one possible implementation, the message transmission unit 1420 may also be used to: receive a first message sent by a Bluetooth device, the first message being sent by the Bluetooth device after receiving the initiation operation of the first voice call; the first message is used to request the first electronic device to initiate the first voice call as the calling party; establish a second voice channel with the first electronic device; and establish a first voice channel with the network-side device as the calling party of the first voice call.

[0238] In one possible implementation, it may further include: an operation receiving unit, used to receive the initiation operation of the first voice call;

[0239] The channel management unit can also be used to: establish a second voice channel with a Bluetooth device, act as the calling end of the first voice call, and establish a first voice channel with a network-side device.

[0240] Figure 15 This is a schematic diagram of the structure of one embodiment of the data processing apparatus of this application. This apparatus can be applied to Bluetooth devices, such as... Figure 15 As shown, the device 1500 may include:

[0241] The message transmission unit 1510 is used to receive a second message sent by the first electronic device. The second message instructs the Bluetooth device to process the voice data of the peer in the first voice call using a first call algorithm, where the first call algorithm is a call algorithm corresponding to narrowband voice codec. The second message is sent after the first electronic device obtains a third voice codec, obtains the first voice codec, and determines that the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec. The third voice codec is the voice codec of the second voice channel already established between the first electronic device and the Bluetooth device. The second voice channel is used to transmit voice data in the first voice call. The first voice codec is the voice codec of the first voice channel already established between the first electronic device and the network-side device. The first voice channel is used to transmit voice data in the first voice call.

[0242] The processing unit 1520 is configured to process the voice data of the other end in the first voice call using the first call algorithm in response to the second message.

[0243] In one possible implementation, the processing unit 1520 may be used to: switch the parameters used by the preset call algorithm from those corresponding to the broadband voice codec to those corresponding to the narrowband voice codec, thereby obtaining a first call algorithm; and use the first call algorithm to process the voice data of the other end in the first voice call.

[0244] In one possible implementation, it may further include: an operation receiving unit, used to receive the initiation operation of the first voice call;

[0245] The message transmission unit 1510 can also be used to: send a first message to the first electronic device; the first message is used to request the first electronic device to initiate a first voice call as the calling party;

[0246] The channel management unit is used to establish a second voice channel with the first electronic device.

[0247] In one possible implementation, the channel management unit can also be used to: establish a second voice channel with the first electronic device, the second voice channel being established after the first electronic device receives the initiation operation of the first voice call.

[0248] Figure 16 This is a schematic diagram of the structure of one embodiment of the data processing apparatus of this application. This apparatus can be applied to electronic devices, such as... Figure 16 As shown, the device 1600 may include:

[0249] The acquisition unit 1610 is used to acquire a third voice codec, which is the voice codec of the second voice channel established between the first electronic device and the Bluetooth device; the second voice channel is used to transmit voice data in the first voice call; and to acquire a first voice codec, which is the voice codec of the first voice channel established between the first electronic device and the network-side device; the first voice channel is used to transmit voice data in the first voice call.

[0250] The path management unit 1620 is used to determine that the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, disconnect the second voice path already established with the Bluetooth device, and establish a second voice path with the Bluetooth device based on narrowband voice codec.

[0251] In one possible implementation, it may further include: a message transmission unit, configured to receive a first message sent by a Bluetooth device, the first message being sent by the Bluetooth device after receiving an initiation operation for a first voice call; the first message is used to request the first electronic device to initiate the first voice call as the calling party;

[0252] The channel management unit 1620 can also be used to: establish a second voice channel with the first electronic device; and, as the calling end of the first voice call, establish a first voice channel with the network-side device.

[0253] In one possible implementation, it further includes: an operation receiving unit, used to receive the initiation operation of the first voice call;

[0254] The channel management unit 1620 can also be used to: establish a second voice channel with a Bluetooth device, act as the calling end of the first voice call, and establish a first voice channel with a network-side device.

[0255] Figure 17 This is a schematic diagram of the structure of one embodiment of the data processing apparatus of this application. This apparatus can be applied to Bluetooth devices, such as... Figure 17 As shown, the device 1700 may include:

[0256] The channel management unit 1710 is used to disconnect the established second voice channel with the first electronic device and establish a second voice channel with the first electronic device based on narrowband voice codec. The disconnection of the second voice channel is performed after the first electronic device obtains the third voice codec method, obtains the first voice codec method, and determines that the third voice codec method is wideband voice codec and the first voice codec method is narrowband voice codec. The third voice codec method is the voice codec method of the established second voice channel between the first electronic device and the Bluetooth device. The second voice channel is used to transmit voice data in the first voice call. The first voice codec method is the voice codec method of the established first voice channel between the first electronic device and the network-side device. The first voice channel is used to transmit voice data in the first voice call.

[0257] In one possible implementation, the device 1700 may further include:

[0258] The processing unit 1720 is used to process the voice data of the other end in the first voice call using a first call algorithm, wherein the first call algorithm is the call algorithm corresponding to the narrowband voice codec.

[0259] In one possible implementation, it may further include: an operation receiving unit, used to receive the initiation operation of the first voice call;

[0260] The message transmission unit is used to send a first message to the first electronic device; the first message is used to request the first electronic device to initiate a first voice call as the calling party;

[0261] The channel management unit 1710 can also be used to establish a second voice channel with the first electronic device.

[0262] In one possible implementation, the channel management unit 1710 can also be used to: establish a second voice channel with the first electronic device, the second voice channel being established after the first electronic device receives the initiation operation of the first voice call.

[0263] Figure 18 This is a schematic diagram of the structure of one embodiment of the data processing apparatus of this application. This apparatus can be applied to Bluetooth devices, such as... Figure 18 As shown, the device 1800 may include:

[0264] The acquisition unit 1810 is used to acquire a third voice codec, which is the voice codec of the second voice channel established between the Bluetooth device and the first electronic device; the second voice channel is used to transmit voice data in the first voice call.

[0265] The determining unit 1820 is used to determine a first voice encoding / decoding method based on the voice data of the other end in the first voice call. The first voice encoding / decoding method is the voice encoding / decoding method of the first voice channel established between the first electronic device and the network side device. The first voice channel is used to transmit voice data in the first voice call.

[0266] The processing unit 1830 is used to determine that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and to process the voice data of the other end in the first voice call using a first call algorithm, wherein the first call algorithm is the call algorithm corresponding to the narrowband voice codec.

[0267] In one possible implementation, the determining unit 1820 may be used to: acquire a first number of voice frames in the voice data of the other end; obtain a first spectral feature of the voice frame, wherein the first spectral feature is wideband or narrowband; and determine a first voice encoding / decoding method based on the first spectral feature with a higher proportion in the first spectral feature of the first number of voice frames.

[0268] In one possible implementation, the processing unit 1830 may be used to: switch the parameters used by the preset call algorithm from those corresponding to the broadband voice codec to those corresponding to the narrowband voice codec, thereby obtaining a first call algorithm; and use the first call algorithm to process the voice data of the other end in the first voice call.

[0269] One possible implementation also includes:

[0270] The channel management unit is used to determine that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and then disconnect the second voice channel already established with the first electronic device; and establish a second voice channel with the first electronic device based on the narrowband voice codec.

[0271] Figures 12-18 The apparatus provided in the illustrated embodiments can be used to execute this application. Figures 4 to 11 The implementation principle and technical effects of the method embodiment shown can be further referred to the relevant description in the method embodiment.

[0272] The above should be understood Figures 12-18The division of the various units in the illustrated device is merely a logical functional division. In actual implementation, they can be fully or partially integrated into a single physical entity, or they can be physically separated. Furthermore, these units can be implemented entirely in software via processing element calls; they can be fully implemented in hardware; or some units can be implemented in software via processing element calls, while others are implemented in hardware. For example, the acquisition unit can be a separate processing element or integrated into a chip in the electronic device. The implementation of other units is similar. Moreover, these units can be fully or partially integrated together, or implemented independently. During implementation, each step of the above method or each of the above units can be completed through integrated logic circuits in the hardware of the processor element or through software instructions.

[0273] This application also provides an electronic device, including: a processor and a transceiver, wherein the processor and transceiver cooperate to implement... Figures 4 to 11 The method provided in the illustrated embodiment.

[0274] This application also provides a Bluetooth device, including: a processor and a transceiver, wherein the processor and transceiver cooperate to implement... Figures 4 to 11 The method provided in the illustrated embodiment.

[0275] This application also provides a computer-readable storage medium storing a computer program that, when run on a computer, causes the computer to execute this application. Figures 4 to 11 The method provided in the illustrated embodiment.

[0276] This application also provides a computer program product, which includes a computer program that, when run on a computer, causes the computer to execute this application. Figures 4 to 11 The method provided in the illustrated embodiment.

[0277] In this application embodiment, "at least one" refers to one or more, and "more than one" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent the existence of A alone, A and B simultaneously, or B alone. A and B can be singular or plural. The character " / " generally indicates that the preceding and following related objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of singular or plural items. For example, at least one of a, b, and c can represent: a, b, c, a and b, a and c, b and c, or a and b and c, where a, b, and c can be single or multiple.

[0278] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0279] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0280] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a 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 this application. 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.

[0281] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. The protection scope of this application should be determined by the protection scope of the claims.

Claims

1. A data processing method, characterized in that, include: The first electronic device acquires the first voice codec method, which is the voice codec method of the first voice channel established between the first electronic device and the network side device. The first voice channel is used to transmit voice data in the first voice call; The first electronic device acquires a second voice codec, which is a voice codec negotiated between the first electronic device and the Bluetooth device for the second voice channel to be established. The first electronic device determines that the second voice codec is wideband voice codec and the first voice codec is narrowband voice codec. It establishes a second voice path with the Bluetooth device based on the narrowband voice codec, so that the Bluetooth device uses a first call algorithm to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec. The second voice path is used to transmit the voice data in the first voice call.

2. The method according to claim 1, characterized in that, Also includes: The first electronic device determines that the second voice codec is wideband voice codec and the first voice codec is wideband voice codec, and establishes the second voice path with the Bluetooth device based on wideband voice codec.

3. The method according to claim 1 or 2, characterized in that, Also includes: The first electronic device determines that the second voice codec is narrowband voice codec, and establishes the second voice path with the Bluetooth device based on narrowband voice codec.

4. The method according to claim 1 or 2, characterized in that, Before the first electronic device acquires the first voice encoding / decoding method, it further includes: The first electronic device, as the called party in the first voice call, establishes the first voice path with the network-side device.

5. The method according to claim 1 or 2, characterized in that, Before the first electronic device acquires the first voice encoding / decoding method, it further includes: The first electronic device receives the initiation operation of the first voice call and establishes the first voice channel with the network-side device as the calling end of the first voice call.

6. The method according to claim 1 or 2, characterized in that, After establishing the second voice path with the Bluetooth device based on narrowband voice codec, the method further includes: The Bluetooth device uses a first call algorithm to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec.

7. The method according to claim 1 or 2, characterized in that, After establishing the second voice path with the Bluetooth device based on wideband voice codec, the method further includes: The Bluetooth device uses a second call algorithm to process the voice data of the other end in the first voice call. The second call algorithm is the call algorithm corresponding to the broadband voice codec.

8. A data processing method, characterized in that, include: The first electronic device acquires a third voice codec, which is the voice codec of the second voice channel already established between the first electronic device and the Bluetooth device; the second voice channel is used to transmit voice data in the first voice call. The first electronic device acquires a first voice codec, which is the voice codec of the first voice channel established between the first electronic device and the network-side device. The first voice channel is used to transmit voice data from the first voice call; The first electronic device determines that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and sends a second message to the Bluetooth device. The second message is used to instruct the Bluetooth device to use a first call algorithm to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec. In response to the second message, the Bluetooth device processes the voice data of the other end in the first voice call using the first call algorithm.

9. The method according to claim 8, characterized in that, The step of processing the voice data of the other end in the first voice call using the first call algorithm includes: The parameters used in the preset call algorithm are switched from those corresponding to broadband voice codec to those corresponding to narrowband voice codec to obtain the first call algorithm. The first call algorithm is used to process the voice data of the other end in the first voice call.

10. The method according to claim 8 or 9, characterized in that, Before the first electronic device acquires the third voice codec, it also includes: Upon receiving the initiation operation of the first voice call, the Bluetooth device sends a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party. The first electronic device establishes a second voice channel with the Bluetooth device; The first electronic device acts as the calling end of the first voice call and establishes the first voice path with the network-side device.

11. The method according to claim 8 or 9, characterized in that, Before the first electronic device acquires the third voice codec, it also includes: The first electronic device receives the initiation operation of the first voice call; The first electronic device establishes a second voice channel with the Bluetooth device; The first electronic device acts as the calling end of the first voice call and establishes the first voice path with the network-side device.

12. A data processing method, characterized in that, include: The first electronic device acquires a third voice codec, which is the voice codec of the second voice channel already established between the first electronic device and the Bluetooth device; the second voice channel is used to transmit voice data in the first voice call. The first electronic device acquires a first voice codec, which is the voice codec of the first voice channel established between the first electronic device and the network-side device. The first voice channel is used to transmit voice data from the first voice call; The first electronic device determines that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, and disconnects the second voice path established with the Bluetooth device; The first electronic device and the Bluetooth device establish a second voice path based on narrowband voice codec, so that the Bluetooth device uses a first call algorithm to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec.

13. The method according to claim 12, characterized in that, After the first electronic device and the Bluetooth device establish the second voice path based on narrowband voice codec, the method further includes: The Bluetooth device uses a first call algorithm to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec.

14. The method according to claim 12 or 13, characterized in that, Before the first electronic device acquires the third voice codec, it also includes: Upon receiving the initiation operation of the first voice call, the Bluetooth device sends a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party. The first electronic device establishes a second voice channel with the Bluetooth device; The first electronic device acts as the calling end of the first voice call and establishes the first voice path with the network-side device.

15. The method according to claim 12 or 13, characterized in that, Before the first electronic device acquires the third voice codec, it also includes: The first electronic device receives the initiation operation of the first voice call; The first electronic device establishes a second voice channel with the Bluetooth device; The first electronic device acts as the calling end of the first voice call and establishes the first voice path with the network-side device.

16. A data processing method, characterized in that, include: The Bluetooth device acquires a third voice codec, which is the voice codec of the second voice channel already established between the Bluetooth device and the first electronic device; the second voice channel is used to transmit voice data in the first voice call. The Bluetooth device determines a first voice codec method based on the voice data from the other end in the first voice call. The first voice codec method is the voice codec method of the first voice channel that has been established between the first electronic device and the network-side device. The first voice channel is used to transmit voice data in the first voice call; The Bluetooth device determines that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec. It then uses a first call algorithm to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec.

17. The method according to claim 16, characterized in that, The Bluetooth device determines the first voice encoding / decoding method based on the voice data from the other end in the first voice call, including: Obtain a first number of voice frames from the voice data of the other end; Obtain the first spectral feature of the speech frame, wherein the first spectral feature is wideband or narrowband; The first speech encoding / decoding method is determined based on the first spectral feature that accounts for a higher proportion among the first spectral features of the first number of speech frames.

18. The method according to claim 16 or 17, characterized in that, The step of processing the voice data of the other end in the first voice call using the first call algorithm includes: The parameters used in the preset call algorithm are switched from those corresponding to broadband voice codec to those corresponding to narrowband voice codec to obtain the first call algorithm. The first call algorithm is used to process the voice data of the other end in the first voice call.

19. The method according to claim 16 or 17, characterized in that, After the Bluetooth device determines that the third voice codec is wideband voice codec and the first voice codec is narrowband voice codec, before processing the voice data of the other end in the first voice call using the first call algorithm, the method further includes: The Bluetooth device disconnects the established second voice channel with the first electronic device; The Bluetooth device and the first electronic device establish a second voice path based on narrowband voice codec.

20. An electronic device, characterized in that, include: Processor and transceiver, among which, The processor is configured to: acquire a first voice codec, which is the voice codec of a first voice channel already established between a first electronic device and a network-side device; the first voice channel is used to transmit voice data in a first voice call; acquire a second voice codec, which is the voice codec negotiated between the first electronic device and a Bluetooth device for a second voice channel to be established; determine that the second voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec; and instruct the transceiver and the Bluetooth device to establish the second voice channel based on the narrowband voice codec. The transceiver is used to establish a second voice path with the Bluetooth device based on narrowband voice codec, so that the Bluetooth device uses a first call algorithm to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec, and the second voice path is used to transmit the voice data in the first voice call.

21. The electronic device according to claim 20, characterized in that, The processor is further configured to: determine that the second voice codec is wideband voice codec and the first voice codec is wideband voice codec, and instruct the transceiver and the Bluetooth device to establish the second voice path based on wideband voice codec; The transceiver is also used to: establish a second voice path with the Bluetooth device based on wideband voice codec.

22. The electronic device according to claim 20 or 21, characterized in that, The processor is further configured to: determine that the second voice codec is a narrowband voice codec, and instruct the transceiver and the Bluetooth device to establish the second voice path based on the narrowband voice codec; The transceiver is also used to: establish a second voice path with the Bluetooth device based on narrowband voice codec.

23. The electronic device according to claim 20 or 21, characterized in that, The transceiver is also used to: act as the called end of the first voice call and establish the first voice path with the network-side device.

24. The electronic device according to claim 20 or 21, characterized in that, The processor is further configured to: receive the initiation operation of the first voice call, and instruct the transceiver to establish the first voice path between the transceiver as the calling end of the first voice call and the network-side device; The transceiver is also used to: establish the first voice path between the calling end of the first voice call and the network-side device.

25. A Bluetooth device, characterized in that, include: A transceiver is used to establish a second voice path with a first electronic device based on narrowband voice codec. The second voice path is used to transmit voice data in the first voice call. The second voice path is established after the first electronic device obtains the first voice codec method, obtains the second voice codec method, and determines that the second voice codec method is wideband voice codec and the first voice codec method is narrowband voice codec. The first voice codec method is the voice codec method of the first voice path already established between the first electronic device and the network side device. The first voice channel is used to transmit voice data in the first voice call; the second voice codec is a voice codec negotiated between the first electronic device and the Bluetooth device for the second voice channel to be established.

26. The Bluetooth device according to claim 25, characterized in that, The transceiver is further configured to: establish a second voice path with the first electronic device based on wideband voice codec, wherein the second voice path is established after the first electronic device determines that the second voice codec method is wideband voice codec and the first voice codec method is wideband voice codec.

27. The Bluetooth device according to claim 25 or 26, characterized in that, The transceiver is also used to: establish a second voice path with the first electronic device based on narrowband voice codec, wherein the second voice path is established after the first electronic device determines that the second voice codec is narrowband voice codec.

28. The Bluetooth device according to claim 25 or 26, characterized in that, Also includes: The processor is configured to, after establishing the second voice path between the transceiver and the first electronic device based on narrowband voice codec, use a first call algorithm to process the voice data of the other end in the first voice call, wherein the first call algorithm is the call algorithm corresponding to the narrowband voice codec.

29. The Bluetooth device according to claim 25 or 26, characterized in that, Also includes: The processor is configured to, after establishing a voice path between the transceiver and the first electronic device based on a wideband voice codec, use a second call algorithm to process the voice data of the other end in the first voice call, wherein the second call algorithm is the call algorithm corresponding to the wideband voice codec.

30. An electronic device, characterized in that, include: The processor is configured to acquire a third voice codec, wherein the third voice codec is the voice codec of the second voice channel established between the first electronic device and the Bluetooth device; the second voice channel is used to transmit voice data in the first voice call; and acquire a first voice codec, wherein the first voice codec is the voice codec of the first voice channel established between the first electronic device and the network-side device. The first voice channel is used to transmit voice data from the first voice call; If the third voice codec is determined to be wideband voice codec and the first voice codec is narrowband voice codec, the transceiver is instructed to send a second message to the Bluetooth device. The second message is used to instruct the Bluetooth device to use a first call algorithm to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec. A transceiver for sending a second message to the Bluetooth device.

31. The electronic device according to claim 30, characterized in that, The transceiver is further configured to: receive a first message sent by the Bluetooth device, the first message being sent by the Bluetooth device after receiving the initiation operation of the first voice call; the first message being configured to request the first electronic device to initiate the first voice call as the calling party; Establish a second voice path with the first electronic device; As the calling party in the first voice call, it establishes the first voice path with the network-side device.

32. The electronic device according to claim 30, characterized in that, The processor is further configured to: receive the initiation operation of the first voice call; The transceiver is further configured to: after the processor receives the initiation operation of the first voice call, establish a second voice channel with the Bluetooth device, and as the calling end of the first voice call, establish the first voice channel with the network-side device.

33. A Bluetooth device, characterized in that, include: A transceiver is used to receive a second message sent by a first electronic device. The second message instructs the Bluetooth device to process the voice data of the peer in the first voice call using a first call algorithm, wherein the first call algorithm is a call algorithm corresponding to a narrowband voice codec. The second message is sent after the first electronic device obtains a third voice codec, obtains the first voice codec, and determines that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec. The third voice codec is the voice codec of the second voice path already established between the first electronic device and the Bluetooth device. The second voice path is used to transmit voice data in the first voice call. The first voice codec is the voice codec of the first voice path already established between the first electronic device and the network-side device. The first voice channel is used to transmit voice data from the first voice call; A processor, configured to, in response to the second message, process the voice data of the other end in the first voice call using the first call algorithm.

34. The Bluetooth device according to claim 33, characterized in that, The processor is specifically used to: switch the parameters used in the preset call algorithm from those corresponding to wideband voice codecs to those corresponding to narrowband voice codecs to obtain the first call algorithm; and use the first call algorithm to process the voice data of the other end in the first voice call.

35. The Bluetooth device according to claim 33 or 34, characterized in that, The processor is further configured to: upon receiving an initiation operation of the first voice call, instruct the transceiver to send a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party; The transceiver is also used to: send a first message to the first electronic device and establish a second voice channel with the first electronic device.

36. The Bluetooth device according to claim 33 or 34, characterized in that, The transceiver is further configured to: establish a second voice channel with the first electronic device, the second voice channel being established after the first electronic device receives the initiation operation of the first voice call.

37. An electronic device, characterized in that, include: The processor is configured to acquire a third voice codec, wherein the third voice codec is the voice codec of the second voice channel established between the first electronic device and the Bluetooth device; the second voice channel is used to transmit voice data in the first voice call; and acquire a first voice codec, wherein the first voice codec is the voice codec of the first voice channel established between the first electronic device and the network-side device. The first voice channel is used to transmit voice data from the first voice call; If the third voice codec is determined to be wideband voice codec and the first voice codec is narrowband voice codec, the transceiver is instructed to disconnect the second voice path established with the Bluetooth device and establish the second voice path with the Bluetooth device based on narrowband voice codec. The transceiver is used to disconnect the established second voice path with the Bluetooth device and establish a second voice path with the Bluetooth device based on narrowband voice codec, so that the Bluetooth device uses a first call algorithm to process the voice data of the other end in the first voice call, wherein the first call algorithm is the call algorithm corresponding to the narrowband voice codec.

38. The electronic device according to claim 37, characterized in that, The transceiver is further configured to: receive a first message sent by the Bluetooth device, the first message being sent by the Bluetooth device after receiving the initiation operation of the first voice call; the first message being configured to request the first electronic device to initiate the first voice call as the calling party; Establish a second voice path with the first electronic device; As the calling party in the first voice call, it establishes the first voice path with the network-side device.

39. The electronic device according to claim 37, characterized in that, The processor is further configured to: receive the initiation operation of the first voice call; The transceiver is further configured to: after the processor receives the initiation operation of the first voice call, establish a second voice channel with the Bluetooth device, and as the calling end of the first voice call, establish the first voice channel with the network-side device.

40. A Bluetooth device, characterized in that, include: A transceiver is used to disconnect the established second voice path with the first electronic device and to establish the second voice path with the first electronic device based on narrowband voice codec. The second voice path is disconnected after the first electronic device acquires the third voice codec, acquires the first voice codec, and determines that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec; the third voice codec is the voice codec of the second voice path already established between the first electronic device and the Bluetooth device; the second voice path is used to transmit voice data in the first voice call; the first voice codec is the voice codec of the first voice path already established between the first electronic device and the network-side device; The first voice channel is used to transmit voice data from the first voice call.

41. The Bluetooth device according to claim 40, characterized in that, Also includes: The processor is used to process the voice data of the other end in the first voice call using a first call algorithm, wherein the first call algorithm is the call algorithm corresponding to the narrowband voice codec.

42. The Bluetooth device according to claim 41, characterized in that, The processor is further configured to: upon receiving an initiation operation of the first voice call, instruct the transceiver to send a first message to the first electronic device; the first message is used to request the first electronic device to initiate the first voice call as the calling party; The transceiver is also used to: send a first message to the first electronic device and establish a second voice channel with the first electronic device.

43. The Bluetooth device according to claim 40 or 41, characterized in that, The transceiver is further configured to: establish a second voice channel with the first electronic device, the second voice channel being established after the first electronic device receives the initiation operation of the first voice call.

44. A Bluetooth device, characterized in that, include: The processor is configured to acquire a third voice codec, wherein the third voice codec is the voice codec of a second voice path already established between the Bluetooth device and the first electronic device; the second voice path is used to transmit voice data in a first voice call; and to determine a first voice codec based on the voice data of the other end in the first voice call, wherein the first voice codec is the voice codec of a first voice path already established between the first electronic device and the network-side device; the first voice path is used to transmit voice data in the first voice call. The third voice codec is determined to be wideband voice codec and the first voice codec is narrowband voice codec. The first call algorithm is used to process the voice data of the other end in the first voice call. The first call algorithm is the call algorithm corresponding to the narrowband voice codec.

45. The Bluetooth device according to claim 44, characterized in that, The processor is specifically used to: acquire a first number of voice frames from the voice data of the peer; obtain a first spectral feature of the voice frame, wherein the first spectral feature is wideband or narrowband; and determine the first voice encoding / decoding method based on the first spectral feature with a higher proportion among the first spectral features of the first number of voice frames.

46. ​​The Bluetooth device according to claim 44 or 45, characterized in that, The processor is specifically used to: switch the parameters used in the preset call algorithm from those corresponding to wideband voice codecs to those corresponding to narrowband voice codecs to obtain the first call algorithm; and use the first call algorithm to process the voice data of the other end in the first voice call.

47. The Bluetooth device according to claim 44 or 45, characterized in that, Also includes: The transceiver is configured to, after the processor determines that the third voice codec is a wideband voice codec and the first voice codec is a narrowband voice codec, disconnect the second voice path already established with the first electronic device; and establish the second voice path with the first electronic device based on the narrowband voice codec.

48. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when run on a computer, causes the computer to perform the method described in any one of claims 1 to 19.

Citation Information

Patent Citations

  • Method, device and apparatus for transmitting voice data

    WO2018103661A1