WO2022262262A1 - 终端设备通过蓝牙外设拾音的方法及终端设备 - Google Patents

终端设备通过蓝牙外设拾音的方法及终端设备 Download PDF

Info

Publication number
WO2022262262A1
WO2022262262A1 PCT/CN2022/071055 CN2022071055W WO2022262262A1 WO 2022262262 A1 WO2022262262 A1 WO 2022262262A1 CN 2022071055 W CN2022071055 W CN 2022071055W WO 2022262262 A1 WO2022262262 A1 WO 2022262262A1
Authority
WO
WIPO (PCT)
Prior art keywords
terminal device
bluetooth
microphone
sound effect
bluetooth device
Prior art date
Application number
PCT/CN2022/071055
Other languages
English (en)
French (fr)
Inventor
唐能福
牛永民
王帅起
黄鹏飞
Original Assignee
荣耀终端有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 荣耀终端有限公司 filed Critical 荣耀终端有限公司
Priority to EP22737696.9A priority Critical patent/EP4135302A4/en
Priority to MX2022010408A priority patent/MX2022010408A/es
Priority to US17/793,589 priority patent/US20230370541A1/en
Publication of WO2022262262A1 publication Critical patent/WO2022262262A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72409User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
    • H04M1/72412User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories using two-way short-range wireless interfaces
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6033Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
    • H04M1/6041Portable telephones adapted for handsfree use
    • H04M1/6058Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone
    • H04M1/6066Portable telephones adapted for handsfree use involving the use of a headset accessory device connected to the portable telephone including a wireless connection
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/7243User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
    • H04M1/72433User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for voice messaging, e.g. dictaphones
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6008Substation equipment, e.g. for use by subscribers including speech amplifiers in the transmitter circuit
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M2250/00Details of telephonic subscriber devices
    • H04M2250/02Details of telephonic subscriber devices including a Bluetooth interface
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Definitions

  • the present application relates to the field of communication technologies, and in particular to a method for a terminal device to pick up sound through a Bluetooth peripheral and the terminal device.
  • the voice of the subject is usually picked up by a built-in microphone in the mobile phone or a headset plugged into the mobile phone.
  • the sound pickup effect of the microphone of the mobile phone is better. Smaller and smaller, resulting in poorer sound effects in the captured video. Therefore, when the distance between the person being photographed and the mobile phone is relatively long or the surrounding environment of the mobile phone is too noisy, the sound pickup effect of the microphone of the mobile phone will be affected.
  • This application provides a method for a terminal device to pick up sound through Bluetooth peripherals and the terminal device, which solves the problem of picking up sound through the microphone of the terminal device in some specific scenarios when the terminal device performs audio and video recording or audio and video calls in the prior art. less effective problem.
  • a method for a terminal device to pick up sound through a Bluetooth peripheral includes:
  • the terminal device instructs the target Bluetooth device to record, and the target Bluetooth device is the first Bluetooth device or the second Bluetooth device that has established a Bluetooth connection with the terminal device.
  • the first operation is used to Triggering the first application APP in the terminal device to start the audio and video service, or triggering the recording through the target Bluetooth device when the first APP has started the audio and video service;
  • the terminal device When the terminal device receives the first audio data stream sent by the first Bluetooth device, the terminal device uses the first sound effect dynamic range control DRC parameter to perform sound effect processing on the first audio data stream, and the first audio data stream corresponds to the first Bluetooth
  • the sound data collected by the microphone of the device, the first sound effect DRC parameter is the preset sound effect processing parameter corresponding to the first Bluetooth device;
  • the terminal device When the terminal device receives the second audio data stream sent by the second Bluetooth device, the terminal device uses the second sound effect DRC parameter to perform sound effect processing on the second audio data stream, and the second audio data stream corresponds to the microphone of the second Bluetooth device
  • the second sound effect DRC parameter is a preset sound effect processing parameter corresponding to the second Bluetooth device
  • the device types or device models of the first Bluetooth device and the second Bluetooth device are different, and the first sound effect DRC parameters are different from the second sound effect DRC parameters.
  • different sound effect DRC parameters can be used for sound effect processing, so that the sound effect dynamic range can be adjusted according to specific conditions, thereby better improving the sound effect.
  • the terminal device can pick up sound data through the microphone of the Bluetooth peripheral device, and can use the The preset sound effect DRC parameters corresponding to the Bluetooth peripherals perform targeted sound processing on the sound data picked up by the Bluetooth peripherals to improve the sound effects.
  • the terminal device not only can the terminal device pick up the sound through the Bluetooth peripheral, but also use different preset sound effect DRC parameters for different Bluetooth peripherals to perform sound effect processing, improve the sound effect of the sound picked up by the Bluetooth peripheral, even if the terminal If the device is far away from the subject or the surrounding environment is noisy, it can also achieve a better recording effect and improve the user experience.
  • a sound effect parameter library is preset in the terminal device, and the sound effect parameter library includes a one-to-one correspondence between Bluetooth device information and sound effect processing parameters.
  • the sound effect parameter library may include the corresponding relationship between the device information of the first Bluetooth device and the first sound effect DRC parameter, and the corresponding relationship between the device information of the second Bluetooth device and the second sound effect DRC parameter.
  • the above method further includes: the terminal device determines the target sound effect DRC parameter corresponding to the target Bluetooth device from the sound effect parameter library according to the device information of the target Bluetooth device.
  • the above-mentioned device information includes device name, media access control address (media access control address, MAC) (also referred to as physical address), manufacturer identification and input/output (input/output, I/O) capability information.
  • the above sound effect parameter library may include a one-to-one correspondence between the device type of the target Bluetooth device and the target sound effect DRC parameter.
  • the above sound effect parameter library may include a one-to-one correspondence between the device model of the target Bluetooth device and the target sound effect DRC parameter.
  • the terminal device may determine the device type or device model of the target Bluetooth device according to the device information of the target Bluetooth device, and then determine the sound effect DRC parameters corresponding to the target Bluetooth device according to the device type or device model of the target Bluetooth device.
  • the above-mentioned terminal device determines the target sound effect DRC parameter corresponding to the target Bluetooth device from the sound effect parameter library according to the device information of the target Bluetooth device, including:
  • the terminal device determines the device model of the target Bluetooth device according to the device name, MAC address and manufacturer identification of the target Bluetooth device;
  • the terminal device determines the target sound effect DRC parameter corresponding to the target Bluetooth device from the sound effect parameter library according to the device model of the target Bluetooth device.
  • the terminal device determines the target sound effect DRC parameter corresponding to the target Bluetooth device from the sound effect parameter library according to the device information of the target Bluetooth device, including:
  • the terminal device determines the device type of the target Bluetooth device according to the input and output I/O capability information of the target Bluetooth device;
  • the terminal device determines the target sound effect DRC parameter corresponding to the target Bluetooth device from the sound effect parameter library according to the device type of the target Bluetooth device;
  • the above-mentioned device types may include a screen type and a non-screen type.
  • the terminal device picks up sound (such as recording) through the Bluetooth peripheral
  • different preset sound effect DRC parameters can be used to control the Bluetooth external device. Set the picked up audio stream to perform sound effect processing to achieve a better recording effect.
  • the Bluetooth device without a screen may include an earphone or a speaker with a voice collection function
  • the Bluetooth device with a screen may include a vehicle terminal or a portable terminal with a display screen and a voice collection function. It should be noted that this is an exemplary list, and the present application is not limited thereto, and may also include other possible Bluetooth devices, which may be determined according to actual usage conditions, and are not limited in this embodiment of the present application.
  • the terminal device determines the device type of the target Bluetooth device according to the I/O capability information of the target Bluetooth device, including:
  • the terminal device determines that the target Bluetooth device is a voice output type
  • the terminal device determines that the target Bluetooth device is a voice receiving end type.
  • the terminal device when the terminal device picks up sound (such as recording) through the Bluetooth peripheral, for the Bluetooth peripheral with a screen, it can distinguish whether the Bluetooth peripheral is a voice output type or a voice receiving type, and then adopt the corresponding preset Set the sound effect DRC parameter to perform sound effect processing on the audio stream picked up by the Bluetooth peripheral, which can achieve a better recording effect.
  • the terminal device in response to the user's first operation on the terminal device, instructs the target Bluetooth device to record, including:
  • the terminal device In response to the user's first operation on the terminal device, if the terminal device judges that the target Bluetooth device meets the preset condition, the terminal device instructs the target Bluetooth device to record;
  • the above preset condition may be that the target Bluetooth device is worn by the user, and/or the distance between the target Bluetooth device and the terminal device is greater than a preset distance threshold.
  • the preset distance threshold can be set according to actual usage requirements, which is not limited in this embodiment of the present application.
  • the terminal device when the terminal device finds that a connection has been established with the Bluetooth device, the terminal device can determine whether the Bluetooth peripheral device meets the preset conditions, for example, the Bluetooth device is in the state of being worn by the user and/or the distance between the Bluetooth device and the terminal device is greater than the preset condition. Set the distance threshold.
  • the terminal device prompts the user whether to use the microphone of the bluetooth device to pick up voice data (for example, record), for the user to choose. This can better meet user needs and improve user experience.
  • the terminal device when the terminal device processes audio and video services and picks up voice data through the microphone of the Bluetooth device, the terminal device can judge in real time whether the Bluetooth device meets the above preset conditions.
  • the terminal device prompts the user that the microphone of the bluetooth device needs to pick up the voice data, and switches to the microphone of the terminal device to pick up the voice data for the user choose. This can better meet user needs and improve user experience.
  • the terminal device in response to the user's first operation on the terminal device, instructs the target Bluetooth device to record, including:
  • the terminal device sends a microphone recording instruction to the target Bluetooth device, instructing the target Bluetooth device to record.
  • the Bluetooth peripheral when the Bluetooth peripheral supports HFP, the Bluetooth peripheral can respond to the microphone recording command sent by the terminal device, and directly enable the microphone recording function without manual triggering by the user, which can improve user experience.
  • the terminal device in response to the user's first operation on the terminal device, instructs the target Bluetooth device to record, including:
  • the terminal device In response to the user's first operation on the terminal device, the terminal device prompts the user whether to record through the microphone of the target Bluetooth device;
  • the terminal device receives a second operation of the user, and the second operation is used to confirm the recording through the microphone of the target Bluetooth device;
  • the terminal device In response to the second operation, the terminal device sends a microphone recording instruction to the target Bluetooth device, instructing the target Bluetooth device to record.
  • the above method also includes:
  • the terminal device establishes a synchronous directional connection SCO with the target Bluetooth device
  • the terminal device receives the response message sent by the target Bluetooth device, which is used to indicate that the microphone of the target Bluetooth device is turned on.
  • the terminal device sends a microphone turn-on command to the Bluetooth peripheral, that is, the terminal device initiates the establishment of an SCO connection with the Bluetooth peripheral to instruct the Bluetooth peripheral to turn on the microphone. Further, after the Bluetooth peripheral device turns on the microphone, it may send a response message to the terminal device, which is used to indicate that the microphone of the Bluetooth peripheral device has been turned on.
  • the terminal device establishes an SCO connection with the bluetooth peripheral, which can directly trigger the bluetooth peripheral to turn on the microphone. That is, if the terminal device establishes an SCO connection with the Bluetooth peripheral, the Bluetooth peripheral has turned on the microphone by default. In this case, the Bluetooth peripheral has the function of picking up voice data and transmitting the picked up voice data to the terminal device in real time.
  • the above method also includes:
  • the terminal device In response to the user's first operation, during the process of obtaining the target audio data stream through the recording of the target Bluetooth device, the terminal device captures the first image through the camera;
  • the terminal device synthesizes the first image and the processed target audio data stream to obtain the first video stream.
  • the bluetooth peripheral connected to the terminal device can be used to achieve better Video recording effect to improve user experience.
  • the above method also includes:
  • the terminal device receives a microphone status query request initiated by the first APP, and the microphone status query request is used to query whether the microphone is in an on state;
  • the terminal device responds to the microphone status inquiry request, and detects whether a Bluetooth connection is maintained between the terminal device and the target Bluetooth device;
  • the terminal device If the terminal device has disconnected the Bluetooth connection with the target Bluetooth device, the terminal device detects whether the microphone of the terminal device is turned on, and feeds back the detection result to the first APP;
  • the terminal device feeds back to the first APP that the microphone is turned on.
  • the first APP learns that the microphone is on, it can continue to record audio and video or make a call.
  • the first APP learns that the microphone is turned off it can re-trigger to turn on the microphone, so as to ensure that the audio and video services initiated by the first APP can be carried out normally and improve user experience.
  • the above method also includes:
  • the terminal device receives a microphone off request initiated by the first APP, and the microphone off request is used to trigger off the microphone;
  • the terminal device detects whether a Bluetooth connection is maintained between the terminal device and the target Bluetooth device in response to the microphone off request;
  • the terminal device disconnects the SCO connection between the terminal device and the target Bluetooth device to trigger the target Bluetooth device to turn off the microphone;
  • the terminal device turns off the microphone of the terminal device.
  • the mobile phone can trigger the voice collection function of turning off the microphone according to the actual situation, which can meet the actual needs of the user and improve the user experience.
  • the above method also includes:
  • the terminal device routes the processed first audio data stream or the processed second audio data stream to a storage path corresponding to the first APP.
  • the terminal device performs audio and video services through the first APP, which not only enables the terminal device to pick up sound through the Bluetooth peripheral, but also uses different preset sound effect DRC parameters for different Bluetooth peripherals to perform sound effect processing, and obtains The audio stream with improved sound quality is further available for APP applications.
  • the above method also includes:
  • the terminal device In response to the user's first operation, when the terminal device has not established a Bluetooth connection with the target Bluetooth device, or has established a Bluetooth connection with the target Bluetooth device but the target Bluetooth device does not support the HFP specification, the terminal device turns on the microphone of the terminal device;
  • the terminal device collects sound data through a microphone of the terminal device to obtain a third audio data stream
  • the terminal device processes the third audio data stream to obtain the processed third audio data stream
  • the terminal device routes the processed third audio data stream to a storage path corresponding to the first APP.
  • the terminal device when the terminal device processes audio and video services, it can choose to pick up the sound through the mobile phone microphone or through the Bluetooth peripheral microphone according to the actual application scenario, which can improve the sound pickup effect; and in the embodiment of the present application, it is aimed at the Bluetooth peripheral microphone
  • the picked-up audio stream is processed with sound effect processing parameters preset for the Bluetooth peripheral type, which can improve the audio quality.
  • the present application provides an apparatus for a terminal device to pick up sound through a Bluetooth peripheral, and the apparatus includes a unit for performing the method in the first aspect above.
  • the device may correspond to executing the method described in the first aspect above.
  • the units in the device please refer to the description in the first aspect above, and details are not repeated here for brevity.
  • Hardware or software includes one or more modules or units corresponding to the functions described above. For example, a processing module or unit, a display module or unit, etc.
  • the present application provides a terminal device, the terminal device includes a processor, the processor is coupled with a memory, the memory is used to store computer programs or instructions, and the processor is used to execute the computer programs or instructions stored in the memory, so that the first aspect The method in is executed.
  • the processor is used to execute the computer programs or instructions stored in the memory, so that the apparatus performs the method in the first aspect.
  • the present application provides a computer-readable storage medium on which is stored a computer program (also referred to as an instruction or code) for implementing the method in the first aspect.
  • a computer program also referred to as an instruction or code
  • the computer when the computer program is executed by a computer, the computer can execute the method in the first aspect.
  • the present application provides a chip, including a processor.
  • the processor is used to read and execute the computer program stored in the memory, so as to execute the method in the first aspect and any possible implementation manners thereof.
  • the chip further includes a memory, and the memory is connected to the processor through a circuit or wires.
  • the present application provides a chip system, including a processor.
  • the processor is used to read and execute the computer program stored in the memory, so as to execute the method in the first aspect and any possible implementation manners thereof.
  • the chip system further includes a memory, and the memory is connected to the processor through a circuit or wires.
  • the present application provides a computer program product, which includes a computer program (also referred to as an instruction or code), and when the computer program is executed by a computer, the computer implements the method in the first aspect.
  • a computer program also referred to as an instruction or code
  • FIG. 1 is a system architecture diagram corresponding to a method for a terminal device to pick up sound through a Bluetooth peripheral provided in an embodiment of the present application;
  • FIG. 2 is a schematic diagram of a scenario in which a terminal device picks up sound through a Bluetooth peripheral provided in an embodiment of the present application;
  • FIG. 3 is a schematic flowchart of a method for a terminal device to pick up sound through a Bluetooth peripheral provided in an embodiment of the present application;
  • FIG. 4 is a schematic flow diagram of a method for a terminal device to pick up sound through a Bluetooth peripheral
  • FIG. 5 is one of the schematic flowcharts of a method for a terminal device to pick up sound through a Bluetooth peripheral provided in an embodiment of the present application;
  • FIG. 6 is the second schematic flow diagram of a method for a terminal device to pick up sound through a Bluetooth peripheral provided in an embodiment of the present application;
  • FIG. 7 is the third schematic flow diagram of a method for a terminal device to pick up sound through a Bluetooth peripheral provided in an embodiment of the present application;
  • FIG. 8 is the fourth schematic flow diagram of a method for a terminal device to pick up sound through a Bluetooth peripheral provided in an embodiment of the present application;
  • FIG. 9 is a schematic structural diagram of an apparatus for a terminal device to pick up sound through a Bluetooth peripheral provided in an embodiment of the present application.
  • FIG. 10 is a schematic structural diagram of an electronic device provided by an embodiment of the present application.
  • first and second and the like in the specification and claims herein are used to distinguish different objects, not to describe a specific order of objects.
  • first sound effect processing parameter and the second sound effect processing parameter are used to distinguish different sound effect processing parameters, rather than describing a specific order of the sound effect processing parameters.
  • words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application shall not be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
  • multiple means two or more, for example, multiple processing units refer to two or more processing units, etc.; multiple A component refers to two or more components or the like.
  • SCO Synchronous connection oriented link
  • SCO links or extended SCO (extended SCO, eSCO) links are used to transmit communication data with high time requirements, and are mainly used for synchronous voice transmission (such as audio and video services).
  • SCO link Synchronous connection oriented link
  • eSCO extended SCO
  • SCO links or extended SCO (extended SCO, eSCO) links are used to transmit communication data with high time requirements, and are mainly used for synchronous voice transmission (such as audio and video services).
  • SCO link Synchronous connection oriented link
  • SCO links or extended SCO (extended SCO, eSCO) links are used to transmit communication data with high time requirements, and are mainly used for synchronous voice transmission (such as audio and video services).
  • HFP Hands-free profile
  • the Bluetooth device supports the HFP specification, and the HFP specification is activated between the Bluetooth device and the terminal device, then the audio data stream can be transmitted between the terminal device and the Bluetooth headset based on the HFP specification.
  • A2DP advanced audio distribution profile (A2DP), which supports the transmission of stereo audio data streams.
  • the A2DP specification defines a source end (source, src for short) of an audio data stream and a receiver end (sink for short) of an audio data stream.
  • a device (such as a mobile phone) serving as a source of an audio data stream and a device (such as a Bluetooth headset) serving as a receiving end can transmit high-quality audio information (ie, an audio data stream) based on the A2DP specification.
  • DRC dynamic range control
  • DRC dynamic range control
  • the sound effect processing parameters corresponding to DRC are called sound effect DRC parameters
  • the dynamic range of the sound level can be adjusted to improve the sound effect .
  • the dynamic range of the sound level refers to the range between the maximum volume and the minimum volume, and the difference between the maximum volume and the minimum volume can also be used to measure the size of the dynamic range.
  • the following processing can be performed on the audio data on the time track: for the audio data whose sound level is lower than the preset minimum threshold, the volume is raised according to the preset sound effect DRC parameter; for the audio data whose sound level exceeds the preset maximum threshold For audio data, the volume is reduced according to the preset DRC parameters, so that the dynamic range of the sound level is adjusted, that is, the dynamic range is reduced.
  • the volume is increased due to the sound effect processing, and the processed sound can become clearer; for the part with high sound volume, the volume is appropriately reduced due to the sound effect processing, and the processing The final sound can become softer. Judging from the overall effect, the processed sound effect can better meet the needs of users and improve user experience.
  • Fig. 1 shows a schematic structural diagram of a communication system involved in various exemplary embodiments of the present application.
  • the communication system 10 may include a terminal device 11 and a Bluetooth device 12 (referred to as a Bluetooth peripheral device, which may be referred to as a Bluetooth peripheral device for short). Establish a Bluetooth connection and communicate.
  • the above-mentioned bluetooth communication protocol may be a traditional bluetooth protocol or a bluetooth low energy (bluetooth low energy, BLE) protocol; of course, it may also be other new bluetooth protocol types to be released in the future.
  • BLE bluetooth low energy
  • the terminal device 11 may be an electronic device such as a smart phone, a tablet computer, a personal digital assistant (personal digital assistant, PDA), a TV, or a smart watch.
  • the terminal device 11 is provided with a camera for collecting image data and a microphone for collecting sound data, that is, the terminal device 11 has the function of recording audio and video. In this way, audio and video services such as live broadcast, video call, video recording or audio recording can be realized through the terminal device 11 .
  • the Bluetooth device 12 may be a Bluetooth microphone, a Bluetooth headset, a wireless speaker, a wireless bracelet, a wireless car, wireless smart glasses, a wireless watch, an augmented reality (augmented reality, AR)/virtual reality (virtual reality, VR) device , Media players (such as MP3, MP4, etc.), laptops, PDAs, TVs or smart watches and other electronic devices that support the Bluetooth communication protocol.
  • the Bluetooth device 12 is provided with a microphone and has the function of collecting sound data.
  • the Bluetooth device 12 is a Bluetooth headset as an example for illustration.
  • the Bluetooth headset 12 may be of various types, such as an earplug type, an in-ear type, a head-mounted type, an earmuff type, or an ear-hook type Bluetooth headset.
  • the Bluetooth device 12 may be a true wireless stereo (true wireless stereo, TWS) headset, or a neckband Bluetooth headset.
  • the Bluetooth headset 12 may support one or more of the following applications: HSP (headset profile) application, HFP application, and A2DP application.
  • HSP application represents the headset application, which provides basic functions required for communication between the mobile phone and the Bluetooth headset, and the Bluetooth headset can be used as an audio input and output interface of the mobile phone.
  • HFP application stands for hands-free application.
  • HFP application adds some extended functions on the basis of HSP application.
  • the Bluetooth headset can control the audio and video call or recording process of the mobile phone, such as answering, hanging up, rejecting, voice dialing, etc.
  • the A2DP application is an advanced audio transmission application that supports the transmission of stereo audio streams. In actual implementation, when the Bluetooth headset maintains a Bluetooth connection with the terminal device, the user can wear the Bluetooth headset to perform audio services such as listening to music or answering/making calls.
  • the embodiment of the present application does not specifically limit the device types of the terminal device 11 and the Bluetooth device 12 .
  • the terminal device 11 is a mobile phone and the Bluetooth device 12 is a Bluetooth earphone as an example for illustration below.
  • the following describes the problems existing in the scene where the terminal device performs audio and video services such as live broadcast, video call, video recording, or audio recording with reference to FIG. 2 .
  • the voice of the user 13 is usually picked up by the microphone of the terminal device 11 to obtain
  • the user audio data is referred to as mobile phone mic pickup for short in FIG. 2 .
  • the distance between the terminal device 11 and the user 13 is greater than a certain distance threshold, or the environment around the terminal device 11 and the user 13 is noisy, etc., the volume of the sound picked up by the microphone of the terminal device 11 may be small, and the The sound effect is not good.
  • the solution of this application proposes the following solution.
  • this bluetooth device 12 has established bluetooth connection with terminal equipment 11, can pick up the sound of user 13 by the microphone of bluetooth device 12 so, be referred to as bluetooth mic pick-up in Fig. 2, pick up like this The volume of the sound is greatly increased. Further, the Bluetooth device 12 sends the picked-up user audio data to the terminal device 11 .
  • the Bluetooth peripheral can be used to collect sound and increase the volume.
  • the voice collection functions of the microphones are quite different, or due to the poor quality of the Bluetooth channel or Interference, this will cause the user's audio data picked up by the Bluetooth peripheral to have poor sound effects, fail to meet user needs, and affect user experience.
  • an embodiment of the present application provides a method for a terminal device to pick up sound through a Bluetooth peripheral and the terminal device, which not only enables the terminal device to pick up sound through the Bluetooth peripheral, but also improves the sound effect of picking up sound through the Bluetooth peripheral.
  • the terminal device can pick up sound data through the microphone of the Bluetooth peripheral, and can use the preset sound effect DRC parameters corresponding to the Bluetooth peripheral to pick up the sound data of the Bluetooth peripheral. Carry out targeted sound effect processing on the sound data to improve the sound effect.
  • the terminal device not only can the terminal device pick up the sound through the Bluetooth peripheral, but also use different preset sound effect DRC parameters for different Bluetooth peripherals to perform sound effect processing, improve the sound effect of the sound picked up by the Bluetooth peripheral, even if the terminal If the device is far away from the subject or the surrounding environment is noisy, it can also achieve a better recording effect and improve the user experience.
  • the execution subject of the method for a terminal device to pick up sound through a Bluetooth peripheral provided in the embodiment of the present application may be the above-mentioned terminal device, or may be a functional module and a function module in the terminal device that can realize the method for the terminal device to pick up sound through a Bluetooth peripheral and/or functional entities, and the solution of the present application can be realized by means of hardware and/or software, which can be specifically determined according to actual usage requirements, and is not limited in the embodiment of the present application.
  • the method for picking up sound by a terminal device provided by an embodiment of the present application through a Bluetooth peripheral is exemplarily described below with reference to the accompanying drawings.
  • FIG. 3 is a schematic flowchart of a method for a terminal device to pick up sound through a Bluetooth peripheral provided by an embodiment of the present application.
  • the method 100 includes the following steps S101-S110.
  • the terminal device receives a first operation performed by a user on an audio and video service through a first APP.
  • the terminal device determines whether the terminal device establishes a Bluetooth connection with the Bluetooth device.
  • the above-mentioned audio and video services may include services related to audio and video recording or calls, such as live broadcast, video call, voice call, video recording or recording, etc. It can be understood that this is an example. Any other possible audio and video services are included, which is not limited in this embodiment of the present application.
  • a terminal device processes audio and video services, it involves the collection or pick-up of sound data (such as user voice data), and usually the microphone of the terminal device collects or picks up the sound data by default.
  • sound data such as user voice data
  • a mobile phone records audio and video
  • it usually uses a built-in microphone of the mobile phone or an inserted headset to realize recording by default.
  • the above-mentioned first APP is an application program installed or loaded in the terminal device that supports audio and video services, and may be a system APP or a third-party APP, which is not limited in the embodiment of the present application.
  • the terminal device can detect the user's first operation, and in response to the first operation, instruct the terminal device to turn on the microphone to pass through the microphone of the terminal device Pick up sound data (such as user voice data), or instruct the Bluetooth device connected to the terminal device to turn on the microphone, so as to pick up voice data through the microphone of the Bluetooth device.
  • the terminal device can determine according to specific conditions. A specific situation may be that the terminal device has not established a connection with another Bluetooth device, or that the terminal device maintains a Bluetooth connection with a certain Bluetooth device.
  • the terminal device continues to perform the following steps S103-S106, that is, instructs the Bluetooth device connected to the terminal device to turn on the microphone to pass The microphone of the Bluetooth device picks up the voice data.
  • the intensity of picking up the subject's voice through the microphone of the mobile phone will become smaller and smaller, resulting in poor sound effects of the captured video. If the mobile phone has established a connection with the Bluetooth peripheral at this time, you can choose to pick up the sound through the microphone of the Bluetooth peripheral to improve the sound pickup effect.
  • the terminal device continues to perform the following steps S107-S110, That is, the terminal device is instructed to turn on the microphone, so as to pick up voice data through the microphone of the terminal device.
  • the above-mentioned first operation may be an operation for the user to trigger the activation of audio and video services or services on the terminal device, such as various possible operations triggered by touch or voice, which can be determined according to actual usage requirements. Not limited.
  • the terminal device In the case that the terminal device has established a Bluetooth connection with the Bluetooth device and the Bluetooth device supports the HFP specification, the terminal device sends a microphone activation instruction to the Bluetooth device.
  • the terminal device sends a microphone turn-on command to the Bluetooth device, that is, the terminal device initiates the establishment of an SCO connection with the Bluetooth device to instruct the Bluetooth device to turn on the microphone. Further, after turning on the microphone, the Bluetooth device may send a response message to the terminal device, which is used to indicate that the microphone of the Bluetooth device has been turned on.
  • the terminal device establishes an SCO connection with the Bluetooth device, which can directly trigger the Bluetooth device to turn on the microphone. That is, if the terminal device establishes an SCO connection with the Bluetooth device, the Bluetooth device has turned on the microphone by default. In this case, the Bluetooth device has the function of picking up voice data and transmitting the picked up voice data to the terminal device in real time.
  • the terminal device may first prompt the user whether to use the microphone of the terminal device to pick up voice data, or to use the microphone of the Bluetooth device to pick up voice data. The user chooses. Further, if the user chooses to use the microphone of the Bluetooth device to pick up voice data, the terminal device may respond to the user's selection operation and send a microphone turn-on instruction to the Bluetooth device, instructing the Bluetooth device to turn on the microphone and pick up voice data.
  • the terminal device when the terminal device finds that a connection has been established with the Bluetooth device, the terminal device can determine whether the Bluetooth device meets a preset condition, for example, the Bluetooth device is worn by the user, and/or, the Bluetooth device The distance to the terminal device is greater than the preset distance threshold.
  • the terminal device prompts the user whether to use the microphone of the bluetooth device to pick up voice data for the user to choose. This can better meet user needs and improve user experience.
  • the terminal device when the terminal device processes audio and video services and picks up voice data through the microphone of the Bluetooth device, the terminal device can determine whether the Bluetooth device meets the above preset conditions.
  • the terminal device prompts the user that the microphone of the bluetooth device needs to pick up the voice data, and switches to the microphone of the terminal device to pick up the voice data for the user choose. This can better meet user needs and improve user experience.
  • the terminal device receives the first audio data stream collected by the microphone of the Bluetooth device and sent by the Bluetooth device.
  • the Bluetooth device can pick up the surrounding sound data (such as user voice data) in real time through the microphone, that is, the first audio data stream. Further, the Bluetooth device can send the first audio data stream to the terminal device through the SCO connection.
  • the terminal device processes the first audio data stream by using the first sound effect processing parameter corresponding to the Bluetooth device, to obtain the processed first audio data stream.
  • the terminal device performs audio and video services, although the sound can be collected through the Bluetooth peripheral and the volume can be raised, due to various reasons, the voice data picked up by the terminal device through the Bluetooth The sound effects cannot meet user needs, so after receiving the first audio data stream sent by the Bluetooth device, the terminal device needs to perform specific sound effect processing on the first audio data stream to improve the sound effect of the first audio data stream.
  • a sound effect parameter library may be preset in the terminal device.
  • the sound effect parameter library may include a one-to-one correspondence between Bluetooth device information and sound effect processing parameters.
  • the terminal device can call the corresponding sound effect processing parameters from the sound effect parameter library according to the actual use requirements and according to the Bluetooth device information.
  • the solution of the present application can use the preset sound effect processing parameters for the Bluetooth peripheral type to perform sound effect processing, which can improve the audio quality.
  • the audio processing parameters preset for the Bluetooth headset may include equalization processing parameters and DRC processing parameters, and the equalization processing parameters are used to equalize the sound signals of each frequency band to improve the overall sound effect.
  • the DRC processing parameter improves the sound effect by adjusting the signal amplitude and compressing the dynamic range of the sound level.
  • the sound effect processing parameters preset for the vehicle-mounted Bluetooth device may include noise reduction processing parameters and DRC processing parameters.
  • the noise reduction processing parameters can be used to reduce the noise level in the sound signal, and increase the speech level in the sound signal, so as to achieve the purpose of increasing the signal-to-noise ratio.
  • corresponding sound effect processing parameters can be preset for different types of Bluetooth devices according to actual needs. Specifically, they can be determined according to actual use needs. limited.
  • the terminal device may first acquire the device information of the Bluetooth device, and then determine the first sound effect processing parameter corresponding to the Bluetooth device from the sound effect parameter library according to the device information of the Bluetooth device.
  • the device information of the Bluetooth device may include the device name of the Bluetooth device, the physical MAC address, the manufacturer's identification, and the input and output capability information (referred to as I/O capability information), and of course may also include other device information, such as microphone performance information, Specifically, it may be determined according to actual usage requirements, and is not limited in this embodiment of the application.
  • the terminal device can determine the corresponding first sound effect processing parameter according to the device information of the Bluetooth headset, and then the terminal device can use the first sound effect processing parameter to process the voice data picked up by the Bluetooth headset. Sound processing.
  • the sound effect parameter library may include a one-to-one correspondence between the device type of the Bluetooth device and the sound effect processing parameters.
  • the terminal device may determine the device type of the Bluetooth device according to the I/O capability information of the Bluetooth device. Further, corresponding sound effect processing parameters may be called from the sound effect parameter library according to the device type of the Bluetooth device.
  • the Bluetooth device is a Bluetooth device with a screen. If the Bluetooth device does not have a display screen, the Bluetooth device is a screenless Bluetooth device.
  • the screenless bluetooth device may include an earphone or a speaker with a voice collection function, and of course may also include any other possible bluetooth devices, such as VR glasses.
  • the bluetooth device with a screen may include a vehicle-mounted terminal or a portable terminal with a display screen and a voice collection function, and of course may also include any other possible bluetooth devices, such as a smart watch. Specifically, it may be determined according to actual usage requirements, and is not limited in this embodiment of the application.
  • the step of determining the device type of the Bluetooth device according to the I/O capability information of the Bluetooth device may include: if the Bluetooth device is an A2DP The output end of the audio data stream in the specification, the terminal device determines that the Bluetooth device is a voice output end device with a screen type. If the Bluetooth device is used as the receiving end of the audio data stream in the A2DP specification, the terminal device determines that the Bluetooth device is a voice receiving end device with a screen type.
  • the screen-type voice output device can be a PC, PAD or mobile phone with a Bluetooth module (such as a Bluetooth chip), and the screen-type voice receiver device can be a vehicle-mounted Bluetooth device and other devices with a Bluetooth module (such as a bluetooth chip). devices such as Bluetooth chips).
  • a Bluetooth module such as a Bluetooth chip
  • the screen-type voice receiver device can be a vehicle-mounted Bluetooth device and other devices with a Bluetooth module (such as a bluetooth chip). devices such as Bluetooth chips).
  • the sound effect parameter library may include a one-to-one correspondence between the device model of the Bluetooth device and the sound effect processing parameters.
  • the terminal device determines the device type of the Bluetooth device, the terminal device can determine the device model of the Bluetooth device according to the device name, MAC address and manufacturer identification of the Bluetooth device. Further, the terminal device may determine the first sound effect processing parameter corresponding to the Bluetooth device from the sound effect parameter library according to the device model of the Bluetooth device.
  • the above-mentioned first sound effect processing parameters may include sound effect DRC parameters.
  • sound effect DRC parameters can be used, so that the dynamic range of the sound effect can be adjusted according to the specific situation, so as to better improve the sound effect.
  • the above sound effect parameter library may include a one-to-one correspondence between the device type of the target Bluetooth device and the target sound effect DRC parameter.
  • the above sound effect parameter library may include a one-to-one correspondence between the device model of the target Bluetooth device and the target sound effect DRC parameter.
  • the terminal device may determine the device type or device model of the target Bluetooth device according to the device information of the target Bluetooth device, and then determine the sound effect DRC parameters corresponding to the target Bluetooth device according to the device type or device model of the target Bluetooth device.
  • the terminal device can determine the sound effect DRC parameter 0.6 corresponding to the device model xyz of the Bluetooth device 1 according to the device model xyz of the Bluetooth device 1.
  • the terminal device may also determine the sound effect DRC parameter 0.5 corresponding to the device model abc of the Bluetooth device 2 according to the device model abc of the Bluetooth device 2 .
  • the terminal device may perform sound effect processing on the audio data stream 1 by using the sound effect DRC parameter 0.6.
  • the terminal device may perform sound effect processing on the audio data stream 2 by using a sound effect DRC parameter of 0.5.
  • the terminal device routes the processed first audio data stream to a storage path corresponding to the first APP.
  • the processed first audio data stream may be routed through the audio framework interface of the terminal device
  • the storage path corresponding to the first APP is stored, so that the first APP can call the processed first audio data stream under the storage path.
  • the terminal device in response to the user's first operation of recording video through the first APP, captures the first image through the camera during the process of the terminal device collecting the first audio data stream through the Bluetooth device.
  • the terminal device may synthesize the first image and the processed first audio data stream to obtain the first video.
  • the terminal device turns on the microphone of the terminal device.
  • the terminal device collects sound data through a microphone of the terminal device to obtain a second audio data stream.
  • the terminal device turns on the microphone of the terminal device according to the microphone opening instruction, and picks up sound data around the terminal device, such as user voice data, in real time through the microphone of the terminal device.
  • the terminal device processes the second audio data stream to obtain a processed second audio data stream.
  • the terminal device may process the second audio data stream by using the second sound effect processing parameter corresponding to the terminal device to obtain the processed second audio data stream.
  • the second sound effect processing parameter is different from the above-mentioned first sound effect processing parameter.
  • the terminal device routes the processed second audio data stream to a storage path corresponding to the first APP.
  • the terminal device when the terminal device collects sound data through the microphone of the terminal device, the terminal device can route the locally processed first audio data stream to the first APP corresponding to the first APP through the audio framework interface of the terminal device.
  • the storage path is used for storage, so that the first APP can call the processed first audio data stream under the storage path.
  • the first APP in order to ensure that the audio and video services initiated by the first APP can be carried out normally, the first APP will send a microphone status query request to the terminal device to check whether the microphone is in the on state. After the terminal device receives the microphone status query request initiated by the first APP, the terminal device can respond to the microphone status query request to detect whether the Bluetooth connection between the terminal device and the Bluetooth device is maintained, and then further report to the first APP according to the actual situation. Whether the microphone is on or off.
  • the terminal device detects whether the microphone of the terminal device is turned on, and feeds back the detection result to the first APP. Specifically, when it is detected that the microphone of the terminal device is turned on, the terminal device feeds back to the first APP that the microphone is turned on; when it detects that the microphone of the terminal device is turned off, the terminal device feeds back that the microphone is turned off to the first APP. .
  • the terminal device feeds back to the first APP that the microphone is turned on.
  • the first APP learns that the microphone is on, it can continue to record audio and video or make a call.
  • the first APP learns that the microphone is turned off it can re-trigger to turn on the microphone, so as to ensure that the audio and video services initiated by the first APP can proceed normally.
  • the terminal device may receive a microphone turn off request initiated by the first APP to trigger turning off the microphone. Further, the terminal device may respond to the microphone off request, detect whether the Bluetooth connection is maintained between the terminal device and the Bluetooth device, and further turn off the microphone of the terminal device or the microphone of the Bluetooth device according to actual conditions.
  • the terminal device disconnects the SCO connection between the terminal device and the Bluetooth device, so as to trigger the Bluetooth device to turn off the microphone.
  • the terminal device turns off the microphone of the terminal device.
  • the terminal device can trigger the voice collection function of turning off the microphone according to the actual situation, which can meet the actual needs of the user and improve the user experience.
  • FIG. 4 shows the implementation process of the mobile phone processing audio and video services in the prior art.
  • the implementation process 200 includes the following steps S201-S208.
  • the mobile phone invokes the audio interface, triggering the microphone of the mobile phone to be turned on.
  • the mobile phone microphone After the mobile phone microphone is turned on, it can pick up the sound around the mobile phone in real time (referred to as microphone pickup).
  • steps S201-S203 are the process of opening the microphone.
  • the mobile phone picks up sound (for example, picks up user voice data) through a microphone, and obtains an audio data stream (hereinafter referred to as audio stream).
  • sound for example, picks up user voice data
  • audio stream an audio data stream
  • the mobile phone transmits the audio stream to the audio algorithm module of the mobile phone.
  • the audio algorithm module is also referred to as an audio processing module, which is used to perform sound effect processing on the audio stream.
  • the audio algorithm module of the mobile phone performs sound effect processing on the audio stream.
  • the mobile phone calls the audio interface to route the processed audio stream to the APP.
  • the APP stores the processed audio stream.
  • the above steps S204-S208 are the audio stream transmission process.
  • Fig. 5 shows a schematic flowchart of a method for a terminal device to pick up sound through a Bluetooth peripheral provided by an embodiment of the present application. As shown in (a) and (b) in Fig. 5, the method 300 includes the following steps S301 -S319.
  • the mobile phone invokes an audio interface to determine whether the mobile phone establishes a Bluetooth connection with the Bluetooth peripheral.
  • the mobile phone calls the audio interface to determine whether the mobile phone has established a Bluetooth connection with the Bluetooth peripheral, and performs routing processing on the microphone opening command according to the determination result.
  • steps S303-S309 that is, call the audio interface in the mobile phone, trigger the microphone of the mobile phone to open and pass the mobile phone The microphone picks up the sound.
  • step S310-S319 that is, call the audio interface in the mobile phone to realize the bluetooth external communication through the mobile phone bluetooth module. It is assumed that a microphone start command is sent to trigger the mobile phone to establish a SCO connection with the bluetooth peripheral and pick up sound through the microphone of the bluetooth peripheral.
  • the mobile phone invokes the audio interface to trigger the microphone of the mobile phone to be turned on.
  • the mobile phone picks up sound through the microphone to obtain an audio stream.
  • the mobile phone transmits the audio stream to the audio algorithm module of the mobile phone.
  • the audio algorithm module is also referred to as an audio processing module, which is used to perform sound effect processing on the audio stream.
  • the mobile phone performs sound effect processing on the audio stream through the audio algorithm module.
  • the mobile phone calls the audio interface to route the processed audio stream to the APP.
  • the APP stores the processed audio stream.
  • steps S301-S304 are the process of turning on the microphone of the mobile phone
  • steps S305-S309 are the process of picking up sound by the microphone of the mobile phone and transmitting the audio stream.
  • the specific implementation process of S305-S309 in (a) of FIG. 5 is similar to the implementation process of S204-S208 in FIG. 4 , and will not be repeated here.
  • Figure 5 (a) above illustrates the mobile phone microphone opening process, as well as the mobile phone microphone sound pickup and audio stream transmission process, and the following combined with Figure 5 (b) illustrates the Bluetooth peripheral microphone opening process, and the Bluetooth peripheral microphone sound pickup and audio Streaming process.
  • the mobile phone invokes an audio interface to trigger the mobile phone bluetooth module to establish an SCO connection with the bluetooth peripheral.
  • the Bluetooth module of the mobile phone establishes an SCO connection with the Bluetooth peripheral, so that the audio stream picked up by the microphone of the Bluetooth peripheral is synchronously transmitted to the Bluetooth module of the mobile phone.
  • the Bluetooth module of the mobile phone after the Bluetooth module of the mobile phone establishes the SCO connection with the Bluetooth peripheral, the Bluetooth module of the mobile phone feeds back to the APP that the microphone is turned on.
  • the audio algorithm module requests the device information of the Bluetooth peripheral from the Bluetooth module of the mobile phone.
  • step in S313 may be executed after the Bluetooth module of the mobile phone establishes an SCO connection with the Bluetooth peripheral, or may be executed when the Bluetooth module of the mobile phone receives the audio stream sent by the Bluetooth peripheral. It is determined according to actual usage requirements, and is not limited in this embodiment of the application.
  • the Bluetooth module of the mobile phone feeds back the device information of the Bluetooth peripheral to the audio algorithm module, and the audio algorithm module can determine the corresponding sound effect processing parameters of the Bluetooth peripheral from the preset sound effect parameter library according to the device information of the Bluetooth peripheral.
  • the Bluetooth module of the mobile phone receives the sound data picked up by the microphone of the Bluetooth peripheral and sent by the Bluetooth peripheral, that is, the audio stream.
  • the Bluetooth module of the mobile phone transmits the audio stream to the audio algorithm module.
  • the audio algorithm module performs sound effect processing on the audio stream picked up by the Bluetooth peripheral by using the sound effect processing parameters determined in S314 and corresponding to the Bluetooth peripheral.
  • the audio effects picked up by different types of Bluetooth peripherals are processed by using sound effect processing parameters (such as sound effect DRC parameters) corresponding to the type of Bluetooth peripherals, the audio effect can be improved to a certain extent.
  • sound effect processing parameters such as sound effect DRC parameters
  • the mobile phone calls the audio interface to route the processed audio stream to the APP.
  • the APP stores the processed audio stream.
  • steps S301-S302 and S310-S312 are the opening process of the Bluetooth peripheral microphone
  • steps S313-S319 are the process of picking up sound by the microphone of the mobile phone and transmitting the audio stream.
  • the mobile phone in the embodiment of the application shown in FIG. choose to pick up the sound through the mobile phone microphone, or pick up the sound through the Bluetooth peripheral microphone, which can improve the sound pickup effect; and in the embodiment of the application, the audio stream picked up by the Bluetooth peripheral microphone adopts the preset sound effect processing for the Bluetooth peripheral type Parameters for sound processing to improve audio quality.
  • the mobile phone when the Bluetooth peripheral has been connected to the mobile phone, if a third-party APP initiates a recording request, the mobile phone can change the APP’s request to use the mobile phone’s microphone, and route the audio channel to the Bluetooth peripheral, so that the mobile phone can pass Bluetooth peripherals pick up sound, and this application scheme can adopt a more accurate device classification scheme, enable different sound effect DRC parameters for different types of Bluetooth peripherals, and perform sound effect processing on the audio stream picked up by Bluetooth peripherals, so as to improve The purpose of picking up sound through Bluetooth peripherals.
  • some APPs in order to ensure that the audio and video services initiated by the APP can be carried out normally, some APPs will send a microphone status query command to the mobile phone after triggering the microphone to be turned on, to check whether the microphone is in the on state. It should be noted that, due to the improvement in the solution of this application, that is, audio routing conversion, the query of the microphone status of the mobile phone should be switched to the query of the Bluetooth microphone status.
  • the method 300 further includes the following steps S320-S326.
  • the APP initiates a microphone state query instruction.
  • the microphone state query instruction may be initiated by the APP periodically, or may be initiated by the APP in response to a user operation.
  • the mobile phone calls the audio interface to determine whether there is a Bluetooth connection on the mobile phone.
  • the mobile phone detects whether the microphone is in an open state.
  • the mobile phone feeds back to the APP whether the microphone is on.
  • the Bluetooth module of the mobile phone queries whether the SCO connection between the mobile phone and the Bluetooth peripheral is disconnected.
  • the Bluetooth module of the mobile phone feeds back to the APP whether the microphone is in an on state.
  • the Bluetooth module of the mobile phone will report to the APP that the microphone is on. If the SCO connection between the mobile phone and the Bluetooth peripheral is disconnected, the Bluetooth module of the mobile phone will report to the APP that the microphone is turned off.
  • the mobile phone can respond to the microphone status query request to detect whether the Bluetooth connection between the mobile phone and the Bluetooth peripheral is maintained, and then further report to the APP according to the actual situation. Feedback whether the microphone is on or off.
  • the mobile phone and the Bluetooth peripheral have disconnected from the Bluetooth connection, the mobile phone detects whether the microphone is turned on, and feeds back the detection result to the APP.
  • the Bluetooth connection and the SCO connection are maintained between the mobile phone and the Bluetooth device, the mobile phone will feed back to the APP that the microphone is on. In this way, when the APP knows that the microphone is on, it can continue to record audio and video or make a call.
  • the APP learns that the microphone is off it can re-trigger to turn on the microphone to ensure that the audio and video services initiated by the APP can proceed normally.
  • the APP in order to ensure that the audio and video service initiated through the APP can end normally, the APP will send a microphone off command to the mobile phone to instruct the microphone to be turned off. It should be noted that, since the embodiment of the present application has an improvement based on the existing technical solution, that is, audio routing conversion, the action of closing the microphone of the mobile phone should be switched to the action of disconnecting the Bluetooth SCO connection.
  • the method 300 further includes the following steps S327-S334.
  • the APP initiates an instruction to turn off the microphone.
  • the microphone off instruction may be initiated by the APP in response to a user trigger operation.
  • the mobile phone calls the audio interface to determine whether there is a Bluetooth connection on the mobile phone.
  • the mobile phone invokes the audio module to transmit the microphone off instruction to the mobile phone microphone.
  • the mobile phone microphone feeds back to the APP that the microphone is turned off.
  • the mobile phone When the mobile phone maintains a Bluetooth connection with a certain Bluetooth peripheral, the mobile phone calls the audio module to transmit a microphone off command to the mobile phone Bluetooth module, instructing the mobile phone Bluetooth module to disconnect the SCO connection with the Bluetooth peripheral.
  • the Bluetooth module of the mobile phone disconnects the SCO connection between the mobile phone and the Bluetooth peripheral in response to the microphone off instruction.
  • the Bluetooth module of the mobile phone feeds back to the APP that the microphone is turned off.
  • the mobile phone may receive a microphone turn-off instruction initiated by the APP, which is used to trigger turn off the microphone. Further, the mobile phone can respond to the microphone off request, detect whether the Bluetooth connection is maintained between the mobile phone and the Bluetooth peripheral, and further turn off the microphone of the mobile phone or the microphone of the Bluetooth peripheral according to the actual situation.
  • the mobile phone can trigger the voice collection function of turning off the microphone according to the actual situation, which can meet the actual needs of the user and improve the user experience.
  • the implementation process of determining the sound effect processing parameters corresponding to the Bluetooth peripheral device in the method for the terminal device to pick up sound through the Bluetooth peripheral device provided by the embodiment of the present application will be exemplarily described below with reference to FIG. 8 .
  • the implementation process includes the following steps S401-S405.
  • the mobile phone determines whether the Bluetooth peripheral supports the HFP specification.
  • the audio algorithm module of the mobile phone may query the device-related information of the current Bluetooth peripheral device in advance, and judge whether the Bluetooth peripheral device supports the HFP specification according to the device-related information of the Bluetooth peripheral device.
  • step S402 If the Bluetooth peripheral supports the HFP specification, continue to execute the following step S402; if the Bluetooth peripheral does not support the HFP specification, use the microphone of the mobile phone to pick up the sound.
  • the mobile phone determines whether the Bluetooth peripheral supports the display function.
  • the mobile phone can determine that the Bluetooth peripheral is a device type such as car/PC/PDA/mobile phone; if the Bluetooth peripheral does not support the display function, the mobile phone can determine that the Bluetooth peripheral is a device type such as a headset/speaker .
  • the Bluetooth peripheral is a device type such as vehicle/PC/PDA/mobile phone, determine whether the Bluetooth peripheral is the src end (source end) or the sink end (receiver end) of the A2DP specification.
  • the mobile phone can determine that the Bluetooth peripheral is a PC/PDA/mobile phone type; if the Bluetooth peripheral is used as the sink terminal of the A2DP specification, the mobile phone can determine that the Bluetooth peripheral is a vehicle type.
  • the mobile phone determines the specific model of the Bluetooth peripheral from the preset device library according to the device-related information of the Bluetooth peripheral.
  • the mobile phone can determine the specific model of the earphone/the specific model of the speaker from the preset device library.
  • the mobile phone can determine a specific model from a preset device library.
  • the audio algorithm module of the mobile phone pre-queries information such as the manufacturer identification, device type, and I/O capability of the current Bluetooth peripheral, and can distinguish the Bluetooth peripherals into vehicle-mounted Bluetooth devices and ordinary Bluetooth devices (such as Bluetooth headsets). or speakers), and then identify which type of device the Bluetooth peripheral is based on the MAC address, manufacturer's logo, and device name of the Bluetooth peripheral.
  • the Bluetooth peripheral cannot match the model of any manufacturer, then the general parameters of the device type can be enabled.
  • the mobile phone determines the corresponding sound effect processing parameters of the Bluetooth peripheral device from the preset sound effect parameter library according to the specific model of the Bluetooth peripheral device.
  • the solution of the present application increases the sound effect processing flow.
  • a device classification scheme has been added. Different sound effect DRC parameters can be enabled for different types of Bluetooth peripherals, and the general sound effect parameters of this category can be used for devices that cannot be classified into a specific model.
  • the audio algorithm module enables sound effect processing parameters to perform sound effect processing on the audio stream.
  • the audio algorithm module can select corresponding sound effect processing parameters for the Bluetooth peripheral, where the sound effect processing parameters can be embodied as adjusting DRC parameters.
  • the solution of the present application can not only be applied to the TWS spatial stereo effect, but can also be applied to Bluetooth speakers or any other Bluetooth peripherals.
  • the methods and operations implemented by the terminal device in the foregoing method embodiments may also be implemented by components (such as chips or circuits) that can be used in the terminal device.
  • the terminal device implementing the method includes hardware structures and/or software modules corresponding to each function.
  • the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed by hardware or computer software drives hardware depends on the specific application and design constraints of the technical solution. Professionals may use different methods to implement the described functions for each specific application, but such implementation should not be regarded as exceeding the protection scope of the present application.
  • the embodiment of the present application may divide the terminal device into functional modules according to the above method example, for example, each functional module may be divided corresponding to each function, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. It should be noted that the division of modules in the embodiment of the present application is schematic, and is only a logical function division, and there may be other feasible division methods in actual implementation. In the following, description will be made by taking the division of each functional module corresponding to each function as an example.
  • FIG. 9 is a schematic block diagram of an apparatus 700 for a terminal device to pick up sound through a Bluetooth peripheral according to an embodiment of the present application.
  • the apparatus 700 can be used to perform the actions performed by the terminal device in the above method embodiments.
  • the device 700 includes a detection unit 710 , a transceiver unit 720 and a processing unit 730 .
  • the detection unit 710 is configured to detect a first operation of the user on the device 700, and the first operation is used to trigger the first APP in the device 700 to start the audio and video service, or to trigger the audio and video service when the first APP has started the audio and video service Recording via the target Bluetooth device;
  • the transceiver unit 720 is configured to send a microphone recording instruction to the target Bluetooth device in response to the user's first operation, to instruct the target Bluetooth device to record.
  • the target Bluetooth device is the first Bluetooth device or the second Bluetooth device that has established a Bluetooth connection with the device 700. bluetooth device;
  • the processing unit 730 is configured to, when the transceiver unit 720 receives the first audio data stream sent by the first Bluetooth device, use the first sound effect DRC parameter to perform sound effect processing on the first audio data stream, the first audio data stream corresponding to the first audio data stream Sound data collected by a microphone of a bluetooth device, the first sound effect DRC parameter is a preset sound effect processing parameter corresponding to the first bluetooth device;
  • the processing unit 730 is further configured to, when the transceiver unit 720 receives the second audio data stream sent by the second Bluetooth device, use the second sound effect DRC parameter to perform sound effect processing on the second audio data stream, and the second audio data stream corresponds to The sound data collected by the microphone of the second bluetooth device, the second sound effect DRC parameter is the preset sound effect processing parameter corresponding to the second bluetooth device;
  • the device types or device models of the first Bluetooth device and the second Bluetooth device are different, and the first sound effect DRC parameters are different from the second sound effect DRC parameters.
  • different sound effect DRC parameters can be used, so that the sound effect dynamic range can be adjusted according to specific conditions, so as to better improve the sound effect.
  • the device 700 can pick up sound data through the microphone of the Bluetooth peripheral device, and can adopt the same method as the The preset sound effect DRC parameters corresponding to the Bluetooth peripherals perform targeted sound processing on the sound data picked up by the Bluetooth peripherals to improve the sound effects.
  • the device 700 pick up sound through Bluetooth peripherals, but also use different preset sound effect DRC parameters for different Bluetooth peripherals to perform sound effect processing, improve the sound effect of picking up sound through Bluetooth peripherals, even if the device The 700 is far away from the subject or the surrounding environment is noisy, which can also achieve better recording effect and improve user experience.
  • the apparatus 700 is preset with a sound effect parameter library, and the sound effect parameter library includes a one-to-one correspondence between Bluetooth device information and sound effect processing parameters.
  • the sound effect parameter library may include the corresponding relationship between the device information of the first Bluetooth device and the first sound effect DRC parameter, and the corresponding relationship between the device information of the second Bluetooth device and the second sound effect DRC parameter.
  • the processing unit 730 is further configured to determine the target sound effect DRC parameter corresponding to the target Bluetooth device from the sound effect parameter library according to the device information of the target Bluetooth device.
  • the above-mentioned device information includes device name, MAC address, manufacturer identification and input/output I/O capability information.
  • the above sound effect parameter library may include a one-to-one correspondence between the device type of the target Bluetooth device and the target sound effect DRC parameter.
  • the above sound effect parameter library may include a one-to-one correspondence between the device model of the target Bluetooth device and the target sound effect DRC parameter.
  • the processing unit 730 is specifically configured to determine the device type or device model of the target Bluetooth device according to the device information of the target Bluetooth device, and then determine the sound effect DRC corresponding to the target Bluetooth device according to the device type or device model of the target Bluetooth device parameter.
  • processing unit 730 is specifically configured to:
  • the target Bluetooth device determine the target sound effect DRC parameter corresponding to the target Bluetooth device from the sound effect parameter library.
  • processing unit 730 is specifically configured to:
  • the target bluetooth device determine the target sound effect DRC parameter corresponding to the target bluetooth device from the sound effect parameter library;
  • the above-mentioned device types may include a screen type and a non-screen type.
  • the device 700 picks up sound (such as recording) through the Bluetooth peripheral
  • different preset sound effect DRC parameters can be used to control the Bluetooth external device. Set the picked up audio stream to perform sound effect processing to achieve a better recording effect.
  • the Bluetooth device without a screen may include an earphone or a speaker with a voice collection function
  • the Bluetooth device with a screen may include a vehicle terminal or a portable terminal with a display screen and a voice collection function. It should be noted that this is an exemplary list, and the present application is not limited thereto, and may also include other possible Bluetooth devices, which may be determined according to actual usage conditions, and are not limited in this embodiment of the present application.
  • the processing unit 730 is specifically configured to:
  • the target bluetooth device is used as the output end of the audio data stream in the advanced audio distribution specification A2DP, then determine that the target bluetooth device is a voice output end type;
  • the target bluetooth device is the receiving end of the audio data stream in the A2DP specification, it is determined that the target bluetooth device is a type of audio receiving end.
  • the device 700 when the device 700 picks up sound (such as recording) through the Bluetooth peripheral, for the Bluetooth peripheral with a screen, it can distinguish whether the Bluetooth peripheral is a voice output type or a voice receiving type, and then adopts the corresponding preset.
  • the above-mentioned transceiver unit 720 is specifically used for:
  • the processing unit 730 judges that the target Bluetooth device meets the preset condition, then send a microphone recording instruction to the target Bluetooth device, instructing the target Bluetooth device to record;
  • the aforementioned preset condition may be that the target Bluetooth device is in a state of being worn by the user, and/or, the distance between the target Bluetooth device and the apparatus 700 is greater than a preset distance threshold.
  • the preset distance threshold can be set according to actual usage requirements, which is not limited in this embodiment of the present application.
  • the device 700 can determine whether the Bluetooth peripheral meets the preset conditions, for example, the Bluetooth device is in the state of being worn by the user and/or the distance between the Bluetooth device and the device 700 is greater than the preset condition. Set the distance threshold.
  • the device 700 prompts the user whether to use the microphone of the bluetooth device to pick up voice data (for example, record), for the user to choose. This can better meet user needs and improve user experience.
  • the device 700 when the device 700 processes audio and video services and picks up voice data through the microphone of the Bluetooth device, the device 700 can judge in real time whether the Bluetooth device meets the above preset conditions.
  • the Bluetooth device does not meet the preset conditions, for example, the Bluetooth device is not worn by the user, the device 700 prompts the user that the microphone of the Bluetooth device needs to pick up the voice data, and switches to the microphone of the device 700 to pick up the voice data for the user choose. This can better meet user needs and improve user experience.
  • instructing the target Bluetooth device to record in response to the user's first operation on the device 700 includes:
  • the Bluetooth peripheral can respond to the microphone recording command sent by the device 700, and directly enable the microphone recording function without manual triggering by the user, which can improve user experience.
  • the above-mentioned transceiver unit 720 is specifically used for:
  • the second operation is used to confirm the recording through the microphone of the target bluetooth device
  • the Bluetooth peripheral connected to the device 700 can be used to achieve a better sound pickup effect , to improve user experience.
  • the above-mentioned transceiver unit 720 is also used to interact with the target Bluetooth device, so that the apparatus 700 establishes an SCO with the target Bluetooth device;
  • the transceiver unit 720 is further configured to receive a response message sent by the target Bluetooth device, and the response message is used to indicate that the microphone of the target Bluetooth device has been turned on.
  • the device 700 sends a microphone turn-on command to the Bluetooth peripheral, that is, the device 700 initiates the establishment of an SCO connection with the Bluetooth peripheral to instruct the Bluetooth peripheral to turn on the microphone. Further, after the Bluetooth peripheral device turns on the microphone, it may send a response message to the apparatus 700, which is used to indicate that the microphone of the Bluetooth peripheral device has been turned on.
  • the device 700 establishes an SCO connection with the Bluetooth peripheral, which can directly trigger the Bluetooth peripheral to turn on the microphone. That is, if the device 700 establishes an SCO connection with the Bluetooth peripheral, the Bluetooth peripheral has turned on the microphone by default. In this case, the Bluetooth peripheral has the function of picking up voice data and transmitting the picked up voice data to the device 700 in real time.
  • the above-mentioned apparatus 700 further includes an image capturing unit, which is configured to, in response to the user's first operation, record and obtain the target audio data stream through the target Bluetooth device, through the device 700 The first image is captured by the camera;
  • the processing unit 730 is further configured to synthesize the first image and the processed target audio data stream to obtain the first video stream.
  • the Bluetooth peripherals connected to the device 700 can be used to achieve better Video recording effect to improve user experience.
  • the detection unit 710 is also used to:
  • the device 700 If the device 700 has disconnected the Bluetooth connection with the target Bluetooth device, then detect whether the microphone of the device 700 is turned on, and feed back the detection result to the first APP;
  • the Bluetooth connection and the SCO connection are maintained between the device 700 and the target Bluetooth device, it will feed back to the first APP that the microphone is on.
  • the first APP learns that the microphone is on, it can continue to record audio and video or make a call.
  • the first APP learns that the microphone is turned off it can re-trigger to turn on the microphone, so as to ensure that the audio and video services initiated by the first APP can be carried out normally and improve user experience.
  • the detection unit 710 is also used to:
  • processing unit 730 is also used for:
  • the microphone of the device 700 is turned on, then the microphone of the device 700 is turned off.
  • the mobile phone can trigger the voice collection function of turning off the microphone according to the actual situation, which can meet the actual needs of the user and improve the user experience.
  • processing unit 730 is further configured to:
  • the device 700 performs audio and video services through the first APP, which not only enables the device 700 to pick up sound through Bluetooth peripherals, but also uses different preset sound effect DRC parameters for different Bluetooth peripherals to perform sound effect processing, and obtains The audio stream with improved sound quality is further available for APP applications.
  • processing unit 730 is further configured to:
  • the device 700 In response to the user's first operation, when the device 700 has not established a Bluetooth connection with the target Bluetooth device, or has established a Bluetooth connection with the target Bluetooth device but the target Bluetooth device does not support the HFP specification, turn on the microphone of the device 700;
  • the device 700 when the device 700 processes audio and video services, it can choose to pick up the sound through the mobile phone microphone or through the Bluetooth peripheral microphone according to the actual application scenario, which can improve the sound pickup effect; and in the embodiment of the present application, it is aimed at the Bluetooth peripheral microphone
  • the picked-up audio stream is processed with sound effect processing parameters preset for the Bluetooth peripheral type, which can improve the audio quality.
  • the device 700 according to the embodiment of the present application may correspond to the implementation of the method described in the embodiment of the present application, and the above-mentioned and other operations and/or functions of the units in the device 700 are for realizing the corresponding flow of the method, and for the sake of brevity, are not described here Let me repeat.
  • FIG. 10 is a schematic structural diagram of an electronic device 800 provided in an embodiment of the present application.
  • the electronic device 800 may be the terminal device or the Bluetooth device mentioned in the foregoing embodiments.
  • the electronic device 800 may include a processor 810, an external memory interface 820, an internal memory 821, a universal serial bus (universal serial bus, USB) interface 830, a charging management module 840, a power management module 841, a battery 842, an antenna 1, and an antenna 2 , mobile communication module 850, wireless communication module 860, audio module 870, speaker 870A, receiver 870B, microphone 870C, earphone jack 870D, sensor module 880, button 890, motor 891, indicator 892, camera 893, display screen 894, and A subscriber identification module (subscriber identification module, SIM) card interface 895 and the like.
  • SIM subscriber identification module
  • the sensor module 880 may include a pressure sensor 880A, a gyroscope sensor 880B, an air pressure sensor 880C, a magnetic sensor 880D, an acceleration sensor 880E, a distance sensor 880F, a proximity light sensor 880G, a fingerprint sensor 880H, a temperature sensor 880I, a touch sensor 880J, and ambient light Sensor 880K, bone conduction sensor 880L, etc.
  • Electronic device 800 may include more or fewer components than shown, or combine certain components, or separate certain components, or arrange different components.
  • the illustrated components can be realized in hardware, software or a combination of software and hardware.
  • the processor 810 may include one or more processing units, for example: the processor 810 may include an application processor (application processor, AP), a modem processor (modem), a graphics processing unit (graphics processing unit, GPU), an image Signal processor (image signal processor, ISP), controller, video codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural network processor (neural-network processing unit, NPU )Wait. Wherein, different processing units may be independent devices, or may be integrated in one or more processors.
  • a memory may also be provided in the processor 810 for storing instructions and data.
  • the wireless communication function of the electronic device 800 can be realized by the antenna 1, the antenna 2, the mobile communication module 850, the wireless communication module 860, the modem processor and the baseband processor.
  • Antenna 1 and Antenna 2 are used to transmit and receive electromagnetic wave signals.
  • Each antenna in electronic device 800 may be used to cover single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas.
  • Antenna 1 can be multiplexed as a diversity antenna of a wireless local area network.
  • the antenna may be used in conjunction with a tuning switch.
  • the mobile communication module 850 can provide wireless communication solutions including 2G/3G/4G/5G applied on the electronic device 800 .
  • the mobile communication module 850 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA) and the like.
  • the mobile communication module 850 can receive electromagnetic waves through the antenna 1, filter and amplify the received electromagnetic waves, and send them to the modem processor for demodulation.
  • the mobile communication module 850 can also amplify the signal modulated by the modem processor, convert it into electromagnetic wave and radiate it through the antenna 1 .
  • at least part of the functional modules of the mobile communication module 850 may be set in the processor 810 .
  • at least part of the functional modules of the mobile communication module 850 and at least part of the modules of the processor 810 may be set in the same device.
  • a modem processor may include a modulator and a demodulator.
  • the modulator is used for modulating the low-frequency baseband signal to be transmitted into a medium-high frequency signal.
  • the demodulator is used to demodulate the received electromagnetic wave signal into a low frequency baseband signal. Then the demodulator sends the demodulated low-frequency baseband signal to the baseband processor for processing.
  • the low-frequency baseband signal is passed to the application processor after being processed by the baseband processor.
  • the application processor outputs sound signals through audio equipment (not limited to speaker 870A, receiver 870B, etc.), or displays images or videos through display screen 894 .
  • the modem processor may be a stand-alone device.
  • the modem processor may be independent from the processor 810, and be set in the same device as the mobile communication module 850 or other functional modules.
  • the electronic device 800 may include two modem processors, one corresponding to 4G and the other corresponding to 5G.
  • the wireless communication module 860 can provide wireless local area networks (wireless local area networks, WLAN) (such as wireless fidelity (Wi-Fi) network), bluetooth (bluetooth, BT) and other wireless communication functions applied on the electronic device 800. solution.
  • the wireless communication module 860 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 860 receives electromagnetic waves via the antenna 2 , frequency-modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 810 .
  • the wireless communication module 860 can also receive the signal to be sent from the processor 810, frequency-modulate it, amplify it, and convert it into electromagnetic waves through the antenna 2 to radiate out.
  • the antenna 1 of the electronic device 800 is coupled to the mobile communication module 850, and the antenna 2 is coupled to the wireless communication module 860, so that the electronic device 800 can communicate with the network and other devices through wireless communication technology.
  • the wireless communication technology may include GSM, GPRS, CDMA, WCDMA, TD-SCDMA, LTE, NR, BT, WLAN, NFC, FM, and/or IR technology and the like.
  • the electronic device 800 implements a display function through a GPU, a display screen 894, an application processor, and the like.
  • the GPU is a microprocessor for image processing, and is connected to the display screen 894 and the application processor. GPUs are used to perform mathematical and geometric calculations for graphics rendering.
  • Processor 810 may include one or more GPUs that execute program instructions to generate or change display information.
  • the display screen 894 is used to display images, videos and the like.
  • Display 894 includes a display panel.
  • the electronic device 800 can realize the shooting function through an ISP, a camera 893 , a video codec, a GPU, a display screen 894 , and an application processor.
  • the ISP is used to process the data fed back by the camera 893 .
  • Camera 893 is used to capture still images or video.
  • Digital signal processors are used to process digital signals. In addition to digital image signals, they can also process other digital signals. For example, when the electronic device 800 selects a frequency point, the digital signal processor is used to perform Fourier transform on the energy of the frequency point.
  • Video codecs are used to compress or decompress digital video.
  • Internal memory 821 may be used to store computer-executable program code, which includes instructions.
  • the internal memory 821 may include an area for storing programs and an area for storing data.
  • the stored program area can store an operating system, at least one application program required by a function (such as a sound playing function, an image playing function, etc.) and the like.
  • the electronic device 800 may implement an audio function through an audio module 870 , a speaker 870A, a receiver 870B, a microphone 870C, an earphone interface 870D, and an application processor. Such as music playback, recording, etc.
  • the pressure sensor 880A is used to sense the pressure signal and convert the pressure signal into an electrical signal.
  • pressure sensor 880A may be located on display screen 894 .
  • Touch sensor 880J also known as "touch panel”.
  • the touch sensor 880J can be arranged on the display screen 894, and the touch sensor 880J and the display screen 894 form a touch screen, also called “touch screen”.
  • the touch sensor 880J is used to detect a touch operation on or near it.
  • the touch sensor can pass the detected touch operation to the application processor to determine the type of touch event.
  • Visual output related to touch operations can be provided through the display screen 894 .
  • the touch sensor 880J may also be disposed on the surface of the electronic device 800 , which is different from the position of the display screen 894 .
  • the SIM card interface 895 is used for connecting a SIM card.
  • the SIM card can be connected and separated from the electronic device 800 by inserting it into the SIM card interface 895 or pulling it out from the SIM card interface 895 .
  • the electronic device 800 may support 1 or N SIM card interfaces, where N is a positive integer greater than 1.
  • SIM card interface 895 can support Nano SIM card, Micro SIM card, SIM card, etc. Multiple cards can be inserted into the same SIM card interface 895 at the same time. The types of the multiple cards may be the same or different.
  • the SIM card interface 895 is also compatible with different types of SIM cards.
  • the SIM card interface 895 is also compatible with external memory cards.
  • the electronic device 800 interacts with the network through the SIM card to implement functions such as calling and data communication.
  • the electronic device 800 adopts an eSIM, that is, an embedded SIM card.
  • the eSIM card can be embedded in the electronic device 800 and cannot be separated from the electronic device 800 .
  • the SIM card is used to store user information
  • the user information may include an IMSI.
  • the electronic device 800 may use the user information as an identity to register with the network.
  • the electronic device 800 in the embodiment of the present application can be a smart phone (for example, a mobile phone equipped with an Android system or an iOS system, etc.), a tablet computer, a notebook computer, a handheld computer, a mobile internet device (MID, mobile internet device), a wearable device (such as smart watches, smart bracelets, etc.) or other devices that can access the Internet.
  • a smart phone for example, a mobile phone equipped with an Android system or an iOS system, etc.
  • a tablet computer for example, a mobile phone equipped with an Android system or an iOS system, etc.
  • a notebook computer for example, a notebook computer, a handheld computer, a mobile internet device (MID, mobile internet device), a wearable device (such as smart watches, smart bracelets, etc.) or other devices that can access the Internet.
  • MID mobile internet device
  • wearable device Such as smart watches, smart bracelets, etc.
  • FIG. 10 do not constitute a specific limitation on the electronic device 800, and the electronic device 800 may also include more or fewer components than shown in the illustration, or combine some components, or split some components, or different component arrangements.
  • the electronic device 800 may correspond to the device 700 in the embodiment of the present application
  • the processor 810 in the electronic device 800 may correspond to the processing unit 730 in the device 700
  • the sensor module in the electronic device 800 880 may correspond to the detection unit 710 in the device 700
  • the wireless communication module 860 in the electronic device 800 may correspond to the transceiver unit 720 in the device 700 .
  • the above and other operations and/or functions of each unit in the device 700 are respectively used to implement the corresponding process of the above method, and for the sake of brevity, details are not repeated here.
  • the embodiment of the present application also provides a computer-readable medium, the computer-readable medium stores program codes, and when the computer program codes run on the computer, the computer executes the above aspects method in .
  • the embodiment of the present application also provides a chip, the chip includes a processor, the processor is coupled with the memory, and the processor is used to execute the computer program or instructions stored in the memory, so that the chip The methods of the above aspects are performed.
  • the embodiments of the present application further provide a computer program product, the computer program product including: computer program code, when the computer program code is run on the computer, the computer is made to execute the above aspects Methods.
  • the terminal device or the Bluetooth device includes a hardware layer, an operating system layer running on the hardware layer, and an application layer running on the operating system layer.
  • the hardware layer may include hardware such as a central processing unit (central processing unit, CPU), a memory management unit (memory management unit, MMU), and memory (also called main memory).
  • the operating system of the operating system layer can be any one or more computer operating systems that realize business processing through processes, for example, Linux operating system, Unix operating system, Android operating system, iOS operating system, or windows operating system.
  • the application layer may include applications such as browsers, address books, word processing software, and instant messaging software.
  • the embodiment of the present application does not specifically limit the specific structure of the execution subject of the method provided in the embodiment of the present application, as long as the program that records the code of the method provided in the embodiment of the present application can be executed according to the method provided in the embodiment of the present application Just communicate.
  • the execution subject of the method provided by the embodiment of the present application may be a terminal device or a Bluetooth device, or a functional module in the terminal device or the Bluetooth device that can call a program and execute the program.
  • Computer-readable media may include, but are not limited to, magnetic storage devices (for example, hard disks, floppy disks, or tapes, etc.), optical disks (for example, compact discs (compact disc, CD), digital versatile discs (digital versatile disc, DVD), etc. ), smart cards and flash memory devices (for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.).
  • magnetic storage devices for example, hard disks, floppy disks, or tapes, etc.
  • optical disks for example, compact discs (compact disc, CD), digital versatile discs (digital versatile disc, DVD), etc.
  • smart cards and flash memory devices for example, erasable programmable read-only memory (EPROM), card, stick or key drive, etc.
  • Various storage media described herein can represent one or more devices and/or other machine-readable media for storing information.
  • the term "machine-readable medium” may include, but is not limited to, wireless channels and various other media capable of storing, containing and/or carrying instructions and/or data.
  • processors mentioned in the embodiment of the present application may be a central processing unit (central processing unit, CPU), and may also be other general processors, digital signal processors (digital signal processor, DSP), application specific integrated circuits ( application specific integrated circuit (ASIC), off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the memory mentioned in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile and nonvolatile memories.
  • the non-volatile memory can be read-only memory (read-only memory, ROM), programmable read-only memory (programmable ROM, PROM), erasable programmable read-only memory (erasable PROM, EPROM), electrically programmable Erases programmable read-only memory (electrically EPROM, EEPROM) or flash memory.
  • the volatile memory may be random access memory (RAM).
  • RAM can be used as an external cache.
  • RAM may include the following forms: static random access memory (static RAM, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (synchronous DRAM, SDRAM) , double data rate synchronous dynamic random access memory (double data rate SDRAM, DDR SDRAM), enhanced synchronous dynamic random access memory (enhanced SDRAM, ESDRAM), synchronous connection dynamic random access memory (synchlink DRAM, SLDRAM) and Direct memory bus random access memory (direct rambus RAM, DR RAM).
  • static random access memory static random access memory
  • dynamic RAM dynamic random access memory
  • DRAM synchronous dynamic random access memory
  • SDRAM synchronous DRAM
  • double data rate SDRAM double data rate SDRAM
  • DDR SDRAM double data rate SDRAM
  • ESDRAM enhanced synchronous dynamic random access memory
  • SLDRAM synchronous connection dynamic random access memory
  • Direct memory bus random access memory direct rambus RAM, DR RAM
  • the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components
  • the memory storage module may be integrated in the processor.
  • memories described herein are intended to include, but are not limited to, these and any other suitable types of memories.
  • the disclosed systems, devices and methods may be implemented in other ways.
  • the device embodiments described above are only illustrative.
  • the division of the units is only a logical function division. In actual implementation, there may be other division methods.
  • multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions described above are realized in the form of software function units and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the essence of the technical solution of this application, or the part that contributes to the prior art, or the part of the technical solution can be embodied in the form of computer software products, which are stored in a storage
  • the computer software product includes several instructions, which are used to make a computer device (which may be a personal computer, a server, or a Bluetooth device, etc.) execute all or part of the steps of the methods described in various embodiments of the present application.
  • the aforementioned storage medium may include, but is not limited to: various media capable of storing program codes such as U disk, mobile hard disk, ROM, RAM, magnetic disk or optical disk.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Telephone Function (AREA)
  • Soundproofing, Sound Blocking, And Sound Damping (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

本申请提供一种终端设备通过蓝牙外设拾音的方法及终端设备,涉及通信技术领域。在终端设备进行直播、视频通话等音视频业务的场景中,终端设备可以通过蓝牙外设的麦克风拾取声音数据,并且可以采用与该蓝牙外设对应的预设音效DRC参数,对蓝牙外设拾取的声音数据进行针对性地音效处理,改善音效。通过本申请方案,不仅可以实现终端设备通过蓝牙外设拾音,而且还可以针对不同蓝牙外设分别采用不同的预设音效DRC参数进行音效处理,改善通过蓝牙外设拾音的音效,即使终端设备与被拍摄者距离较远或者周围环境噪声较大,也可实现较好的录音效果,提升用户使用体验。

Description

终端设备通过蓝牙外设拾音的方法及终端设备
本申请要求于2021年06月16日提交国家知识产权局、申请号为202110665714.4、申请名称为“终端设备通过蓝牙外设拾音的方法及终端设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信技术领域,尤其涉及一种终端设备通过蓝牙外设拾音的方法及终端设备。
背景技术
目前,在用户使用手机中的应用程序(application,APP)进行直播、拍摄视频、视频通话等音视频场景中,通常是通过手机内置的麦克风或者是插入手机的耳麦拾取被拍摄者的声音。当被拍摄者与手机距离较近时,手机的麦克风拾音效果较好;随着手机与被拍摄者之间的距离越来越远,通过手机的麦克风拾取被拍摄者的声音的强度会越来越小,导致拍摄的视频声音效果较差。因此,当被拍摄者与手机之间的距离较远或者手机周围环境噪声太大时,均会影响手机麦克风拾音的效果。
发明内容
本申请提供一种终端设备通过蓝牙外设拾音的方法及终端设备,解决了现有技术中在终端设备进行音视频录制或者音视频通话时,在一些特定场景下通过终端设备的麦克风拾音效果较差的问题。
为达到上述目的,本申请采用如下技术方案:
第一方面,提供一种终端设备通过蓝牙外设拾音的方法,该方法包括:
响应于用户在终端设备上的第一操作,该终端设备指示目标蓝牙设备录音,该目标蓝牙设备为与终端设备已建立蓝牙连接的第一蓝牙设备或者第二蓝牙设备,该第一操作用于触发终端设备中的第一应用APP开启音视频业务,或者在第一APP已开启音视频业务的情况下触发通过目标蓝牙设备录音;
当终端设备接收到第一蓝牙设备发送的第一音频数据流时,终端设备采用第一音效动态范围控制DRC参数对第一音频数据流进行音效处理,该第一音频数据流对应于第一蓝牙设备的麦克风采集的声音数据,该第一音效DRC参数为第一蓝牙设备对应的预设音效处理参数;
当终端设备接收到第二蓝牙设备发送的第二音频数据流时,终端设备采用第二音效DRC参数对第二音频数据流进行音效处理,该第二音频数据流对应于第二蓝牙设备的麦克风采集的声音数据,该第二音效DRC参数为第二蓝牙设备对应的预设音效处理参数;
其中,上述第一蓝牙设备和第二蓝牙设备的设备类型或者设备型号不同,上述第一音效DRC参数与上述第二音效DRC参数不同。
其中,针对不同类型或者不同型号的蓝牙外设,可以采用不同音效DRC参数进行音 效处理,这样可以根据具体情况调整音效动态范围,从而更好地改善音效。
根据本申请提供的终端设备通过蓝牙外设拾音的方法,在终端设备进行直播、视频通话等音视频业务的场景中,终端设备可以通过蓝牙外设的麦克风拾取声音数据,并且可以采用与该蓝牙外设对应的预设音效DRC参数,对蓝牙外设拾取的声音数据进行针对性地音效处理,改善音效。通过本申请方案,不仅可以实现终端设备通过蓝牙外设拾音,而且还可以针对不同蓝牙外设分别采用不同的预设音效DRC参数进行音效处理,改善通过蓝牙外设拾音的音效,即使终端设备与被拍摄者距离较远或者周围环境噪声较大,也可实现较好的录音效果,提升用户使用体验。
在一种可能实施方式中,终端设备中预设有音效参数库,该音效参数库中包括蓝牙设备信息与音效处理参数的一一对应关系。其中,该音效参数库中可以包括第一蓝牙设备的设备信息与第一音效DRC参数的对应关系,以及第二蓝牙设备的设备信息与第二音效DRC参数的对应关系。
可选地,上述方法还包括:终端设备根据目标蓝牙设备的设备信息,从音效参数库中确定与目标蓝牙设备对应的目标音效DRC参数。其中,上述设备信息包括设备名称,媒体存取控制位址(media access control address,MAC)(也称为物理地址),生产商标识以及输入输出(input/output,I/O)能力信息。
在一种可能实施方式中,上述音效参数库中可以包括目标蓝牙设备的设备类型与目标音效DRC参数的一一对应关系。
在一种可能实施方式中,上述音效参数库中可以包括目标蓝牙设备的设备型号与目标音效DRC参数的一一对应关系。
可选地,终端设备可以根据目标蓝牙设备的设备信息,确定目标蓝牙设备的设备类型或设备型号,然后根据目标蓝牙设备的设备类型或设备型号,确定与目标蓝牙设备对应的音效DRC参数。
示例性地,上述终端设备根据目标蓝牙设备的设备信息,从音效参数库中确定与目标蓝牙设备对应的目标音效DRC参数,包括:
终端设备根据目标蓝牙设备的设备名称,MAC地址和生产商标识,确定目标蓝牙设备的设备型号;
终端设备根据目标蓝牙设备的设备型号,从音效参数库中确定与目标蓝牙设备对应的目标音效DRC参数。
通过上述方案,在终端设备通过蓝牙外设拾音(例如录音)时,针对不同设备型号的蓝牙外设,可以采用不同的预设音效DRC参数对蓝牙外设所拾取的音频流进行音效处理,可实现较好的录音效果。
在一种可能实施方式中,上述终端设备根据目标蓝牙设备的设备信息,从音效参数库中确定与目标蓝牙设备对应的目标音效DRC参数,包括:
终端设备根据目标蓝牙设备的输入输出I/O能力信息,确定目标蓝牙设备的设备类型;
终端设备根据目标蓝牙设备的设备类型,从音效参数库中确定与目标蓝牙设备对应的目标音效DRC参数;
其中,上述设备类型可以包括有屏类型和无屏类型。
通过上述方案,在终端设备通过蓝牙外设拾音(例如录音)时,针对不同设备类型(例 如有屏类型或无屏类型)的蓝牙外设,可以采用不同的预设音效DRC参数对蓝牙外设所拾取的音频流进行音效处理,可实现较好的录音效果。
在一种可能实施方式中,无屏类型的蓝牙设备可以包括具有语音采集功能的耳机或者音箱,有屏类型的蓝牙设备可以包括具有显示屏且具有语音采集功能的车载终端或者携带式终端。需要说明的是,这里为示例性地列举,本申请中不限于此,还可以包括其他可能的蓝牙设备,具体可以根据实际使用情况确定,本申请实施例不作限定。
在一种可能实施方式中,在目标蓝牙设备为有屏类型的蓝牙设备的情况下,上述终端设备根据目标蓝牙设备的I/O能力信息,确定目标蓝牙设备的设备类型,包括:
若目标蓝牙设备作为高级音频分发规范A2DP中音频数据流的输出端,则终端设备确定目标蓝牙设备为语音输出端类型;
或者,若目标蓝牙设备作为A2DP规范中音频数据流的接收端,则终端设备确定目标蓝牙设备为语音接收端类型。
通过上述方案,在终端设备通过蓝牙外设拾音(例如录音)时,针对有屏类型的蓝牙外设,可以区分蓝牙外设是语音输出端类型,还是语音接收端类型,进而采用对应的预设音效DRC参数对蓝牙外设所拾取的音频流进行音效处理,可实现较好的录音效果。
在一种可能实施方式中,上述响应于用户在终端设备上的第一操作,终端设备指示目标蓝牙设备录音,包括:
响应于用户在终端设备上的第一操作,若终端设备判断目标蓝牙设备满足预设条件,则终端设备指示目标蓝牙设备录音;
其中,上述预设条件可以为目标蓝牙设备处于用户佩戴状态,和/或,目标蓝牙设备与终端设备之间的距离大于预设距离阈值。该预设距离阈值可以根据实际使用需求设置,本申请实施例不作限定。
通过上述方案,当终端设备发现与蓝牙设备已建立连接时,终端设备可以判断蓝牙外设是否满足预设条件,例如蓝牙设备处于用户佩戴状态和/或蓝牙设备与终端设备之间的距离大于预设距离阈值。当该蓝牙设备满足预设条件时(例如蓝牙设备处于用户佩戴状态),终端设备提示用户是否需要由蓝牙设备的麦克风进行语音数据拾取(例如录音),供用户选择。这样可以更好地满足用户使用需求,提升用户使用体验。
可选地,在本申请实施例中,在终端设备处理音视频业务,且通过蓝牙设备的麦克风进行语音数据拾取的情况下,终端设备可以实时判断该蓝牙设备是否满足上述预设条件。当该蓝牙设备不满足预设条件时,例如蓝牙设备处于用户未佩戴状态,终端设备提示用户是需要由蓝牙设备的麦克风进行语音数据拾取,切换到由终端设备的麦克风进行语音数据拾取,供用户选择。这样可以更好地满足用户使用需求,提升用户使用体验。
在一种可能实施方式中,上述响应于用户在终端设备上的第一操作,终端设备指示目标蓝牙设备录音,包括:
响应于上述第一操作,当目标蓝牙设备支持免提规范HFP时,终端设备向目标蓝牙设备发送麦克风录音指令,指示目标蓝牙设备录音。
通过上述方案,在蓝牙外设支持HFP的情况下,蓝牙外设可以响应于终端设备发送的麦克风录音指令,直接开启麦克风录音功能,无需用户手动触发,可提升用户使用体验。
在一种可能实施方式中,上述响应于用户在终端设备上的第一操作,终端设备指示目 标蓝牙设备录音,包括:
响应于用户在终端设备上的第一操作,终端设备提示用户是否通过目标蓝牙设备的麦克风录音;
终端设备接收到用户的第二操作,该第二操作用于确认通过目标蓝牙设备的麦克风录音;
响应于第二操作,终端设备向目标蓝牙设备发送麦克风录音指令,指示目标蓝牙设备录音。
通过本申请方案,在终端设备处理音视频业务的过程中,即使终端设备与被拍摄者距离较远,或者周围环境嘈杂,可借助于与终端设备连接的蓝牙外设实现较好的拾音效果,提升用户使用体验。
在一种可能实施方式中,上述方法还包括:
终端设备与目标蓝牙设备建立同步定向连接SCO;
终端设备接收目标蓝牙设备发送的响应消息,用于指示目标蓝牙设备的麦克风已开启。
终端设备向蓝牙外设发送麦克风开启指令,即终端设备发起与蓝牙外设建立SCO连接,以指示蓝牙外设开启麦克风。进一步地,蓝牙外设在开启麦克风之后,可以向终端设备发送响应消息,用于指示蓝牙外设的麦克风已开启。
其中,终端设备与蓝牙外设建立SCO连接,可以直接触发蓝牙外设开启麦克风。即,若终端设备与蓝牙外设建立SCO连接,则默认蓝牙外设已开启麦克风,在此情况下蓝牙外设具有拾取语音数据并将拾取的语音数据实时传输给终端设备的功能。
在一种可能实施方式中,上述方法还包括:
响应于用户的第一操作,在通过目标蓝牙设备录音得到目标音频数据流的过程中,终端设备通过摄像头拍摄得到第一图像;
终端设备将第一图像与处理后的目标音频数据流进行合成,得到第一视频流。
通过本申请方案,在终端设备进行直播、视频通话等音视频业务时,即使终端设备与被拍摄者距离较远,或者周围环境嘈杂,可借助于与终端设备连接的蓝牙外设实现较好的视频录音效果,提升用户使用体验。
在一种可能实施方式中,上述方法还包括:
终端设备接收第一APP发起的麦克风状态查询请求,该麦克风状态查询请求用于查询麦克风是否处于开启状态;
终端设备响应于麦克风状态查询请求,检测终端设备与目标蓝牙设备之间是否保持蓝牙连接;
若终端设备与目标蓝牙设备已断开蓝牙连接,则终端设备检测终端设备的麦克风是否开启,并将检测结果反馈给第一APP;
若终端设备与目标蓝牙设备之间保持蓝牙连接且保持SCO连接,则终端设备向第一APP反馈麦克风处于开启状态。
这样,当第一APP获知麦克风处于开启状态时,可以继续进行音视频录制或通话。当第一APP获知麦克风处于关闭状态时,可以重新触发开启麦克风,以保证第一APP发起的音视频业务能够正常进行,提升用户体验。
在一种可能实施方式中,上述方法还包括:
终端设备接收第一APP发起的麦克风关闭请求,该麦克风关闭请求用于触发关闭麦克风;
终端设备响应于该麦克风关闭请求,检测终端设备与目标蓝牙设备之间是否保持蓝牙连接;
若终端设备与目标蓝牙设备之间保持蓝牙连接,则终端设备断开终端设备与目标蓝牙设备之间的SCO连接,以触发目标蓝牙设备关闭麦克风;
若终端设备与目标蓝牙设备之间已断开蓝牙连接,且终端设备的麦克风处于开启状态,则终端设备关闭终端设备的麦克风。
这样,在通过APP实现的音视频业务结束时,手机可以根据实际情况触发关闭麦克风的语音采集功能,可满足用户实际使用需求,提升用户使用体验。
在一种可能实施方式中,上述方法还包括:
终端设备将处理后的第一音频数据流或者处理后的第二音频数据流,路由至第一APP对应的存储路径。
通过本申请方案,终端设备通过第一APP进行音视频业务,不仅可以实现终端设备通过蓝牙外设拾音,而且还可以针对不同蓝牙外设分别采用不同的预设音效DRC参数进行音效处理,获取音质改善的音频流,进一步供APP应用。
在一种可能实施方式中,上述方法还包括:
响应于用户的第一操作,当终端设备未与目标蓝牙设备建立蓝牙连接,或者与目标蓝牙设备已建立蓝牙连接但目标蓝牙设备不支持HFP规范时,终端设备开启终端设备的麦克风;
终端设备通过终端设备的麦克风采集声音数据,得到第三音频数据流;
终端设备采用对第三音频数据流进行处理,得到处理后的第三音频数据流;
终端设备将处理后的第三音频数据流,路由至第一APP对应的存储路径。
本申请实施例中终端设备处理音视频业务时可以根据实际应用场景选择通过手机麦克风拾音,或者通过蓝牙外设麦克风拾音,可提升拾音效果;并且本申请实施例中针对蓝牙外设麦克风拾取的音频流,采用针对该蓝牙外设类型预设的音效处理参数进行音效处理,可提升音频质量。
第二方面,本申请提供一种终端设备通过蓝牙外设拾音的装置,该装置包括用于执行上述第一方面中的方法的单元。该装置可对应于执行上述第一方面中描述的方法,该装置中的单元的相关描述请参照上述第一方面的描述,为了简洁,在此不再赘述。
其中,上述第一方面描述的方法可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块或单元。例如,处理模块或单元、显示模块或单元等。
第三方面,本申请提供一种终端设备,该终端设备包括处理器,处理器与存储器耦合,存储器用于存储计算机程序或指令,处理器用于执行存储器存储的计算机程序或指令,使得第一方面中的方法被执行。
例如,处理器用于执行存储器存储的计算机程序或指令,使得该装置执行第一方面中的方法。
第四方面,本申请提供一种计算机可读存储介质,其上存储有用于实现第一方面中的 方法的计算机程序(也可称为指令或代码)。
例如,该计算机程序被计算机执行时,使得该计算机可以执行第一方面中的方法。
第五方面,本申请提供一种芯片,包括处理器。处理器用于读取并执行存储器中存储的计算机程序,以执行第一方面及其任意可能的实现方式中的方法。
可选地,该芯片还包括存储器,存储器与处理器通过电路或电线连接。
第六方面,本申请提供一种芯片系统,包括处理器。处理器用于读取并执行存储器中存储的计算机程序,以执行第一方面及其任意可能的实现方式中的方法。
可选地,该芯片系统还包括存储器,存储器与处理器通过电路或电线连接。
第七方面,本申请提供一种计算机程序产品,该计算机程序产品包括计算机程序(也可称为指令或代码),该计算机程序被计算机执行时使得所述计算机实现第一方面中的方法。
可以理解的是,上述第二方面至第七方面的有益效果可以参见上述第一方面中的相关描述,在此不再赘述。
附图说明
图1为本申请实施例提供的终端设备通过蓝牙外设拾音的方法对应的系统架构图;
图2为本申请实施例提供的终端设备通过蓝牙外设拾音的方法应用的场景示意图;
图3为本申请实施例提供的一种终端设备通过蓝牙外设拾音的方法的流程示意图;
图4为一种终端设备通过蓝牙外设拾音的方法的流程示意图;
图5为本申请实施例提供的一种终端设备通过蓝牙外设拾音的方法的流程示意图之一;
图6为本申请实施例提供的一种终端设备通过蓝牙外设拾音的方法的流程示意图之二;
图7为本申请实施例提供的一种终端设备通过蓝牙外设拾音的方法的流程示意图之三;
图8为本申请实施例提供的一种终端设备通过蓝牙外设拾音的方法的流程示意图之四;
图9为本申请实施例提供的一种终端设备通过蓝牙外设拾音的装置的结构示意图;
图10为本申请实施例提供的电子设备的结构示意图。
具体实施方式
为使本申请实施例的目的、技术方案和优点更加清楚,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
本文中术语“和/或”,是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。本文中符号“/”表示关联对象是或者的关系,例如A/B表示A或者B。
本文中的说明书和权利要求书中的术语“第一”和“第二”等是用于区别不同的对象,而不是用于描述对象的特定顺序。例如,第一音效处理参数和第二音效处理参数等是用于区别不同的音效处理参数,而不是用于描述音效处理参数的特定顺序。
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更优选或更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或者两个以上,例如,多个处理单元是指两个或者两个以上的处理单元等;多个元件是指两个或者两个以上的元件等。
为便于理解本申请实施例,以下对本申请实施例的部分用语进行解释说明,以便于本领域技术人员理解。
(1)SCO:同步定向连接(synchronous connection oriented link,SCO),也称为SCO链路。SCO链路或扩展的SCO(extended SCO,eSCO)链路用于传输对时间要求很高的通信数据,主要用于同步话音传送(例如音视频业务)。需要说明的是,本申请实施例提供的方案中不限定SCO链路还是eSCO链路,为了便于说明,下文以SCO链路为例对本方案进行示例性的描述。
(2)HFP:免提规范(hands-free profile,HFP),代表免提功能。如果蓝牙设备支持HFP规范,且蓝牙设备与终端设备之间激活HFP规范,那么终端设备与蓝牙耳机之间可以基于HFP规范传输音频数据流。
(3)A2DP:高级音频分发规范(advanced audio distribution profile,A2DP),支持传输立体声音频数据流。A2DP规范定义了音频数据流的源端(source,简称为src)和音频数据流的接收端(简称为sink)。作为音频数据流的源端的设备(例如手机)和作为接收端的设备(例如蓝牙耳机)可以基于A2DP规范传输高质量音频信息(即音频数据流)。
(4)DRC:动态范围控制(dynamic range control,DRC),一种音效处理方式,DRC对应的音效处理参数称为音效DRC参数,通过调节信号幅度,可调整声音电平的动态范围,改善音效。其中,声音电平的动态范围即指最大音量和最小音量之间的范围,也可以采用最大音量和最小音量的差值来衡量动态范围的大小。
示例性地,可以对时间轨上的音频数据进行以下处理:针对声音电平低于预设最小门限的音频数据,按预先设置的音效DRC参数提升音量;针对声音电平超过预设最高门限的音频数据,按预先设置的DRC参数降低音量,这样调整声音电平的动态范围,即减小了动态范围。在音频处理效果上来看,对于声音音量较低的部分,由于音效处理而音量增大,处理后的声音可变得更加清晰;对于声音音量较高的部分,由于音效处理而音量适当降低,处理后的声音可变得更加柔和。从整体效果来看,处理后的声音效果更能满足用户使用需求,可提升用户体验。
图1示出了本申请的各个示例性实施例所涉及的通信系统的架构示意图。如图1所示,通信系统10可以包括终端设备11和蓝牙设备12(称为蓝牙外围设备,可简称为蓝牙外设),终端设备11和蓝牙设备12可以通过蓝牙(bluetooth,BT)通信协议建立蓝牙连接并通信。其中,上述蓝牙通信协议可以为传统蓝牙协议,也可以为低功耗蓝牙(bluetooth low energy,BLE)协议;当然,还可以是未来推出的其他新的蓝牙协议类型。
可选的,终端设备11可以是智能手机、平板电脑、个人数字助理(personal digital assistant,PDA)、电视或智能手表等电子设备。需要说明的是,在本申请实施例中,终端设备11设置有用于采集图像数据的摄像头,以及用于采集声音数据的麦克风,即终端设备11具有录制音视频的功能。这样,通过终端设备11可以实现直播、视频通话、录像或者录音等音视频业务。
可选的,蓝牙设备12可以是蓝牙麦克风,蓝牙耳机,无线音箱,无线手环,无线车 载,无线智能眼镜,无线手表,增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备,媒体播放器(例如MP3、MP4等)、笔记本电脑、PDA、电视或智能手表等支持蓝牙通信协议的电子设备。需要说明的是,在本申请实施例中,蓝牙设备12设置有麦克风,具有采集声音数据的功能。
示例性的,以蓝牙设备12为蓝牙耳机为例进行说明,蓝牙耳机12可以有多种类型,例如可以是耳塞式、入耳式、头戴式、耳罩式或挂耳式蓝牙耳机等。示例性地,蓝牙设备12可以为真无线立体声(true wireless stereo,TWS)耳机,也可以为颈带式蓝牙耳机。
在一些实施例中,蓝牙耳机12可以支持下述应用中的一种或多种:HSP(headset profile)应用、HFP应用、A2DP应用。其中,HSP应用代表耳机应用,提供手机与蓝牙耳机之间通信所需的基本功能,蓝牙耳机可以作为手机的音频输入和输出接口。HFP应用代表免提应用,HFP应用在HSP应用的基础上增加了某些扩展功能,蓝牙耳机可以控制手机的音视频通话或者录制过程,例如接听、挂断、拒接、语音拨号等。A2DP应用为高级音频传送应用,支持传输立体声音频流。在实际实现时,在蓝牙耳机与终端设备保持蓝牙连接的情况下,用户可以佩戴蓝牙耳机进行听音乐或接/打电话等音频业务。
本申请实施例对终端设备11和蓝牙设备12的设备类型不予具体限定。为了便于说明,下文中以终端设备11为手机,蓝牙设备12为蓝牙耳机为例进行示例性地说明。
下面结合图2说明终端设备在进行直播、视频通话、录像或者录音等音视频业务的场景中存在的问题。
如图2中的(a)所示,在用户13通过终端设备11进行直播、视频通话、录像或者录音等音视频业务的场景中,通常是由终端设备11的麦克风拾取用户13的声音,得到用户音频数据,图2中简称为手机mic拾音。但是,由于终端设备11与用户13之间的距离大于一定距离阈值,或者终端设备11和用户13周围的环境嘈杂等原因,可能会导致通过终端设备11的麦克风拾取到的声音音量较小,拾音效果不佳。
本申请方案提出如下方案,如图2中的(b)所示,在用户13通过终端设备11进行直播、视频通话、录像或者录音等音视频业务的场景中,如果用户13佩戴有蓝牙设备12(例如蓝牙耳机,支持HFP规范)且该蓝牙设备12与终端设备11已建立蓝牙连接,那么可以由蓝牙设备12的麦克风拾取用户13的声音,图2中简称为蓝牙mic拾音,这样拾取到的声音音量大大提升。进一步地,蓝牙设备12将拾取到的用户音频数据发送给终端设备11。
在终端设备进行音视频业务的场景中,可以通过蓝牙外设采集声音,提升音量,但是由于目前蓝牙外设种类众多,其配置的麦克风语音采集功能差异较大,或者由于蓝牙信道质量不佳或者受到干扰,这样会导致通过蓝牙外设拾取到的用户音频数据在音效上并不好,无法满足用户需求,影响用户使用体验。
鉴于此,本申请实施例提供了一种终端设备通过蓝牙外设拾音的方法及终端设备,不仅可以实现终端设备通过蓝牙外设拾音,而且可以改善通过蓝牙外设拾音的音效。在终端设备进行直播、视频通话等音视频业务的场景中,终端设备可以通过蓝牙外设的麦克风拾取声音数据,并且可以采用与该蓝牙外设对应的预设音效DRC参数,对蓝牙外设拾取的声音数据进行针对性地音效处理,改善音效。通过本申请方案,不仅可以实现终端设备通过蓝牙外设拾音,而且还可以针对不同蓝牙外设分别采用不同的预设音效DRC参数进行音效处理,改善通过蓝牙外设拾音的音效,即使终端设备与被拍摄者距离较远或者周围环 境噪声较大,也可实现较好的录音效果,提升用户使用体验。
本申请实施例提供的终端设备通过蓝牙外设拾音的方法的执行主体可以为上述的终端设备,也可以为该终端设备中能够实现该终端设备通过蓝牙外设拾音的方法的功能模块和/或功能实体,并且本申请方案能够通过硬件和/或软件的方式实现,具体的可以根据实际使用需求确定,本申请实施例不作限定。下面以终端设备为例,结合附图对本申请实施例提供的终端设备通过蓝牙外设拾音的方法进行示例性的说明。
图3是本申请实施例提供的终端设备通过蓝牙外设拾音的方法的流程示意图。参照图3所示,该方法100包括下述的步骤S101-S110。
S101,终端设备接收到用户通过第一APP进行音视频业务的第一操作。
S102,终端设备响应于第一操作,判断终端设备是否与蓝牙设备建立蓝牙连接。
其中,上述音视频业务可以包括直播、视频通话、语音通话、录像或者录音等涉及音视频录制或通话的业务,可以理解,这里为示例性地列举,在实际实现时,上述音视频业务还可以包括其他任意可能的音视频业务,本申请实施例对此不作限定。在终端设备处理音视频业务时,会涉及声音数据(例如用户语音数据)的采集或拾取,通常默认由终端设备的麦克风采集或拾取声音数据。例如,在手机录制音视频时通常是默认使用手机内置麦克风或者是插入的耳麦来实现录音的。
在本申请实施例中,上述第一APP为终端设备中安装或加载的支持音视频业务的应用程序,可以是系统APP,也可以是第三方APP,本申请实施例对此不作限定。
当用户在终端设备上操作,触发开启第一APP的音视频业务时,终端设备可以检测到用户的第一操作,并响应于该第一操作,指示终端设备开启麦克风,以通过终端设备的麦克风拾取声音数据(例如用户语音数据),或者指示与终端设备连接的蓝牙设备开启麦克风,以通过蓝牙设备的麦克风拾取语音数据。具体是由终端设备的麦克风拾取语音数据,还是由蓝牙设备的麦克风拾取语音数据,终端设备可以根据具体情况进行确定。具体情况可能是终端设备未与其他蓝牙设备建立连接,也可以是终端设备与某个蓝牙设备保持蓝牙连接。
一方面,若终端设备与某一蓝牙设备已建立蓝牙连接且该蓝牙设备支持HFP规范,则终端设备继续执行下述的步骤S103-S106,即指示与终端设备连接的蓝牙设备开启麦克风,以通过蓝牙设备的麦克风拾取语音数据。
在实际实现时,随着手机与被拍摄者之间的距离越来越远,通过手机的麦克风拾取被拍摄者的声音的强度会越来越小,导致拍摄的视频声音效果较差。如果此时手机与蓝牙外设已建立连接,那么可以选择通过蓝牙外设的麦克风拾取声音,提升拾音效果。
另一方面,若终端设备未与任何蓝牙设备建立蓝牙连接,或者终端设备与某一蓝牙设备已建立蓝牙连接但该蓝牙设备不支持HFP规范,则终端设备继续执行下述的步骤S107-S110,即指示终端设备开启麦克风,以通过终端设备的麦克风拾取语音数据。
其中,上述第一操作可以为用户在终端设备上触发启用音视频业务或服务的操作,例如通过触摸方式触发或者语音方式触发的各种可能操作,具体可以根据实际使用需求确定,本申请实施例不作限定。
S103,在终端设备与蓝牙设备已建立蓝牙连接且蓝牙设备支持HFP规范的情况下,终端设备向蓝牙设备发送麦克风开启指令。
在本申请实施例中,终端设备向蓝牙设备发送麦克风开启指令,即终端设备发起与蓝牙设备建立SCO连接,以指示蓝牙设备开启麦克风。进一步地,蓝牙设备在开启麦克风之后,可以向终端设备发送响应消息,用于指示蓝牙设备的麦克风已开启。
其中,终端设备与蓝牙设备建立SCO连接,可以直接触发蓝牙设备开启麦克风。即,若终端设备与蓝牙设备建立SCO连接,则默认蓝牙设备已开启麦克风,在此情况下蓝牙设备具有拾取语音数据并将拾取的语音数据实时传输给终端设备的功能。
需要说明的是,上文中是以一旦终端设备发现与蓝牙设备已建立连接,就直接触发蓝牙设备的麦克风进行语音数据拾取为例进行示例性说明的,本申请实施例包括但不限于此,可以理解,在实际实现时,当终端设备发现与蓝牙设备已建立连接时,终端设备可以先提示用户是需要由终端设备的麦克风进行语音数据拾取,还是需要由蓝牙设备的麦克风进行语音数据拾取,供用户选择。进一步地,如果用户选择由蓝牙设备的麦克风进行语音数据拾取,那么终端设备可以响应于用户的选择操作,向蓝牙设备发送麦克风开启指令,指示蓝牙设备开启麦克风并进行语音数据拾取。
可选地,在本申请实施例中,当终端设备发现与蓝牙设备已建立连接时,终端设备可以判断该蓝牙设备是否满足预设条件,例如蓝牙设备处于用户佩戴状态,和/或,蓝牙设备与终端设备之间的距离大于预设距离阈值。当该蓝牙设备满足预设条件时(例如蓝牙设备处于用户佩戴状态),终端设备提示用户是否需要由蓝牙设备的麦克风进行语音数据拾取,供用户选择。这样可以更好地满足用户使用需求,提升用户使用体验。
可选地,在本申请实施例中,在终端设备处理音视频业务,且通过蓝牙设备的麦克风进行语音数据拾取的情况下,终端设备可以判断该蓝牙设备是否满足上述预设条件。当该蓝牙设备不满足预设条件时,例如蓝牙设备处于用户未佩戴状态,终端设备提示用户是需要由蓝牙设备的麦克风进行语音数据拾取,切换到由终端设备的麦克风进行语音数据拾取,供用户选择。这样可以更好地满足用户使用需求,提升用户使用体验。
S104,终端设备接收蓝牙设备发送的由蓝牙设备的麦克风采集的第一音频数据流。
在终端设备处理音视频业务的过程中,在终端设备与蓝牙设备建立SCO连接之后,蓝牙设备可以通过麦克风实时拾取周围的声音数据(例如用户语音数据),即第一音频数据流。进一步地,蓝牙设备可以通过SCO连接,将第一音频数据流发送给终端设备。
S105,终端设备采用与蓝牙设备对应的第一音效处理参数对第一音频数据流进行处理,得到处理后的第一音频数据流。
具体到本申请方案,如上文所述,在终端设备进行音视频业务的场景中,尽管可以通过蓝牙外设采集声音,提升音量,但是由于各种原因导致终端设备通过蓝牙设备拾取的语音数据在音效上不能满足用户需求,因此终端设备在接收蓝牙设备发送的第一音频数据流之后,需要对第一音频数据流进行特定的音效处理,以改善第一音频数据流的音效。
在本申请实施例中,终端设备中可以预设有音效参数库。其中,音效参数库中可以包括蓝牙设备信息与音效处理参数的一一对应关系。终端设备可根据实际使用需求,根据蓝牙设备信息从音效参数库中调用对应的音效处理参数。
需要说明的是,不同类型的蓝牙设备可以预设对应的音效处理参数,具体音效处理参数的取值可以根据实验室数据确定。这样,本申请方案针对蓝牙外设麦克风拾取的音频流,可以采用针对该蓝牙外设类型预设的音效处理参数进行音效处理,可提升音频质量。
例如,针对蓝牙耳机预设的音效处理参数可以包括均衡处理参数和DRC处理参数,均衡处理参数用于对各频段的声音信号均衡处理,起到整体音效改善作用。DRC处理参数通过调节信号幅度,压缩声音电平的动态范围,改善音效。
再例如,针对车载蓝牙设备预设的音效处理参数可以包括降噪处理参数和DRC处理参数。降噪处理参数可以用于降低声音信号中的噪声电平,以及增大声音信号中的语音电平,以达到增大信噪比的目的。
需要说明的是,以上为示例性地举例说明,在实际实现时,可以根据实际需求,针对不同类型的蓝牙设备预设对应的音效处理参数,具体可以根据实际使用需求确定,本申请实施例不作限定。
在一些实施例中,终端设备可以先获取蓝牙设备的设备信息,然后根据蓝牙设备的设备信息,从音效参数库中确定与蓝牙设备对应的第一音效处理参数。其中,蓝牙设备的设备信息可以包括蓝牙设备的设备名称,物理MAC地址,生产商标识以及输入输出能力信息(称为I/O能力信息),当然还可能包括其他设备信息,例如麦克风性能信息,具体可以根据实际使用需求确定,本申请实施例不作限定。
示例性地,假设音效参数库中保存有蓝牙耳机的设备信息与第一音效处理参数的对应关系,即蓝牙耳机对应于第一音效处理参数。在已知蓝牙耳机的设备信息的情况下,终端设备可以根据蓝牙耳机的设备信息,确定出对应的第一音效处理参数,进而终端设备可以采用第一音效处理参数对蓝牙耳机拾取的语音数据进行音效处理。
可选地,在一种实施例中,音效参数库中可以包括蓝牙设备的设备类型与音效处理参数的一一对应关系。在本申请实施例中,在终端设备获取蓝牙设备的设备信息之后,终端设备可以根据蓝牙设备的I/O能力信息,确定蓝牙设备的设备类型。进一步地,可以根据蓝牙设备的设备类型从音效参数库中调用对应的音效处理参数。
其中,若蓝牙设备具有显示屏,则蓝牙设备为有屏类型的蓝牙设备。若蓝牙设备不具有显示屏,则蓝牙设备为无屏类型的蓝牙设备。
示例性地,在本申请实施例中,无屏类型的蓝牙设备可以包括具有语音采集功能的耳机或者音箱,当然还可以包括其他任意可能的蓝牙设备,例如VR眼镜。有屏类型的蓝牙设备可以包括具有显示屏且具有语音采集功能的车载终端或者携带式终端,当然还可以包括其他任意可能的蓝牙设备,例如智能手表。具体可以根据实际使用需求确定,本申请实施例不作限定。
在本申请实施例中,在蓝牙设备为有屏类型的蓝牙设备的情况下,上述终端设备根据蓝牙设备的I/O能力信息确定蓝牙设备的设备类型的步骤,可以包括:若蓝牙设备作为A2DP规范中音频数据流的输出端,则终端设备确定蓝牙设备为有屏类型的语音输出端设备。若蓝牙设备作为A2DP规范中音频数据流的接收端,则终端设备确定蓝牙设备为有屏类型的语音接收端设备。
示例性地,有屏类型的语音输出端设备可以为PC,PAD或手机等具有蓝牙模块(例如蓝牙芯片)的设备,有屏类型的语音接收端设备可以为车载蓝牙设备以及其他具有蓝牙模块(例如蓝牙芯片)的设备。
可选地,在另一种实施例中,音效参数库中可以包括蓝牙设备的设备型号与音效处理参数的一一对应关系。在终端设备确定蓝牙设备的设备类型之后,终端设备可以根据蓝牙 设备的设备名称,MAC地址和生产商标识,确定蓝牙设备的设备型号。进一步地,终端设备可以根据蓝牙设备的设备型号,从音效参数库中确定与蓝牙设备对应的第一音效处理参数。
在本申请实施例中,上述第一音效处理参数可以包括音效DRC参数。针对不同类型的蓝牙外设,可以采用不同音效DRC参数,这样可以根据具体情况调整音效动态范围,从而更好地改善音效。
在一种可能实施方式中,上述音效参数库中可以包括目标蓝牙设备的设备类型与目标音效DRC参数的一一对应关系。
在一种可能实施方式中,上述音效参数库中可以包括目标蓝牙设备的设备型号与目标音效DRC参数的一一对应关系。
可选地,终端设备可以根据目标蓝牙设备的设备信息,确定目标蓝牙设备的设备类型或设备型号,然后根据目标蓝牙设备的设备类型或设备型号,确定与目标蓝牙设备对应的音效DRC参数。
示例性地,假设蓝牙设备1的设备型号xyz,蓝牙设备2的设备型号为abc,音效参数库中存储有设备型号xyz与音效DRC参数0.6的对应关系,以及存储有设备型号abc与音效DRC参数0.5的对应关系,那么终端设备可以根据蓝牙设备1的设备型号xyz,确定与蓝牙设备1的设备型号xyz对应的音效DRC参数0.6。终端设备还可以根据蓝牙设备2的设备型号abc,确定与蓝牙设备2的设备型号abc对应的音效DRC参数0.5。
进一步地,当终端设备接收到蓝牙设备1发送的音频数据流1时,终端设备可以采用音效DRC参数0.6对该音频数据流1进行音效处理。或者,当终端设备接收到蓝牙设备2发送的音频数据流2时,终端设备可以采用音效DRC参数0.5对该音频数据流2进行音效处理。
这样针对不同蓝牙外设分别采用不同的预设音效DRC参数进行音效处理,改善通过蓝牙外设拾音的音效,即使终端设备与被拍摄者距离较远或者周围环境噪声较大,也可实现较好的录音效果。
S106,终端设备将处理后的第一音频数据流,路由至第一APP对应的存储路径。
在本申请实施例中,在终端设备采用与蓝牙设备对应的第一音效处理参数对第一音频数据流进行处理之后,可以通过终端设备的音频框架接口,将处理后的第一音频数据流路由至第一APP对应的存储路径进行存储,这样第一APP可以在该存储路径下调用该处理后的第一音频数据流。
在本申请实施例中,响应于用户通过第一APP录制视频的第一操作,在终端设备通过蓝牙设备采集第一音频数据流的过程中,终端设备通过摄像头拍摄得到第一图像。终端设备可以将第一图像与处理后的第一音频数据流进行合成,得到第一视频。
通过本申请方案,在终端设备处理音视频业务的过程中,即使终端设备与被拍摄者距离较远,或者周围环境嘈杂,可借助于与终端设备连接的蓝牙外设实现较好的拾音效果,提升用户使用体验。
S107,在终端设备未与蓝牙设备建立蓝牙连接,或者终端设备与蓝牙设备已建立蓝牙连接但蓝牙设备不支持HFP规范的情况下,终端设备开启终端设备的麦克风。
S108,终端设备通过终端设备的麦克风采集声音数据,得到第二音频数据流。
其中,终端设备根据麦克风开启指令开启终端设备的麦克风,并通过终端设备的麦克风实时拾取终端设备周围的声音数据,例如用户语音数据。
S109,终端设备对第二音频数据流进行处理,得到处理后的第二音频数据流。
在本申请实施例中,终端设备可以采用与终端设备对应的第二音效处理参数对第二音频数据流进行处理,得到处理后的第二音频数据流。这里,第二音效处理参数不同于上述第一音效处理参数。
S110,终端设备将处理后的第二音频数据流,路由至第一APP对应的存储路径。
在本申请实施例中,在终端设备通过终端设备的麦克风采集声音数据的情况下,终端设备可以通过终端设备的音频框架接口,将本地处理后的第一音频数据流路由至第一APP对应的存储路径进行存储,这样第一APP可以在该存储路径下调用该处理后的第一音频数据流。
可选地,在本申请实施例中,为了保证第一APP发起的音视频业务能够正常进行,第一APP会向终端设备发送麦克风状态查询请求,用于查询麦克风是否处于开启状态。在终端设备接收到第一APP发起的麦克风状态查询请求之后,终端设备可以响应于该麦克风状态查询请求,检测终端设备与蓝牙设备之间是否保持蓝牙连接,再进一步根据实际情况向第一APP反馈麦克风是处于开启状态还是处于关闭状态。
一方面,若终端设备与蓝牙设备已断开蓝牙连接,则终端设备检测终端设备的麦克风是否开启,并将检测结果反馈给第一APP。具体地,当检测到终端设备的麦克风处于开启状态,则终端设备向第一APP反馈麦克风处于开启状态;当检测到终端设备的麦克风处于关闭状态,则终端设备向第一APP反馈麦克风处于关闭状态。
另一方面,若终端设备与蓝牙设备之间保持蓝牙连接且保持SCO连接,则终端设备向第一APP反馈麦克风处于开启状态。
这样,当第一APP获知麦克风处于开启状态时,可以继续进行音视频录制或通话。当第一APP获知麦克风处于关闭状态时,可以重新触发开启麦克风,以保证第一APP发起的音视频业务能够正常进行。
可选地,在本申请实施例中,当用户触发停止通过第一APP实现的音视频业务时,终端设备可以接收到第一APP发起的麦克风关闭请求,用于触发关闭麦克风。进一步地,终端设备可以响应于该麦克风关闭请求,检测终端设备与蓝牙设备之间是否保持蓝牙连接,再进一步根据实际情况关闭终端设备的麦克风或者蓝牙设备的麦克风。
一方面,若终端设备与蓝牙设备之间保持蓝牙连接,则终端设备断开终端设备与蓝牙设备之间的SCO连接,以触发蓝牙设备关闭麦克风。
另一方面,若终端设备与蓝牙设备之间已断开蓝牙连接,且终端设备的麦克风处于开启状态,则终端设备关闭终端设备的麦克风。
这样,在通过第一APP实现的音视频业务结束时,终端设备可以根据实际情况触发关闭麦克风的语音采集功能,可满足用户实际使用需求,提升用户使用体验。
下面结合图4至图7,以终端设备为手机为例,示例性地描述本申请实施例提供的终端设备通过蓝牙外设拾音的方法的具体实现方式。
图4示出了现有技术中手机处理音视频业务时的实现过程,如图4所示,该实现过程200包括下述的步骤S201-S208。
S201,当用户通过手机中的APP发起音视频业务时,该APP发起手机麦克风开启指令。
S202,手机调用音频接口,触发开启手机麦克风。
手机麦克风在开启之后,可实时拾取手机周围的声音(简称麦克风拾音)。
S203,手机麦克风在开启之后,向APP反馈麦克风已开启。
上述步骤S201-S203为麦克风开启流程。
S204,手机通过麦克风拾音(例如拾取用户语音数据),得到音频数据流(以下简称音频流)。
S205,手机将音频流传输给手机的音频算法模块。
其中,音频算法模块还称为音频处理模块,用于对音频流进行音效处理。
S206,手机的音频算法模块对音频流进行音效处理。
S207,手机调用音频接口将该处理后的音频流路由给该APP。
S208,该APP对该处理后的音频流进行存储。
上述步骤S204-S208为音频流传输流程。
图5示出了本申请实施例提供的终端设备通过蓝牙外设拾音的方法的示意性流程图,如图5中的(a)和(b)所示,方法300包括下述的步骤S301-S319。
S301,当用户通过手机中的APP发起音视频业务时,该APP发起麦克风开启指令。
S302,响应于麦克风开启指令,手机调用音频接口判断手机是否与蓝牙外设建立蓝牙连接。
其中,手机调用该音频接口判断手机是否与蓝牙外设建立蓝牙连接,并根据判断结果,对麦克风开启指令进行路由处理。
若判断手机没有与其他蓝牙外设建立蓝牙连接(对应于图5中的(a)中的否),则继续执行步骤S303-S309,即调用手机中的音频接口,触发手机麦克风开启并通过手机麦克风拾音。
若判断手机与某一蓝牙设备建立蓝牙连接(对应于图5中的(b)中的是),则继续执行步骤S310-S319,即调用手机中的音频接口来实现通过手机蓝牙模块向蓝牙外设发送麦克风开启指令,触发手机与蓝牙外设建立SCO连接并通过蓝牙外设的麦克风拾音。
S303,在手机未连接蓝牙外设的情况下,手机调用该音频接口触发手机麦克风开启。
S304,手机麦克风在开启之后,向APP反馈麦克风已开启。
S305,手机通过麦克风拾音,得到音频流。
S306,手机将音频流传输给手机的音频算法模块。
其中,音频算法模块还称为音频处理模块,用于对音频流进行音效处理。
S307,手机通过音频算法模块对音频流进行音效处理。
S308,手机调用音频接口将该处理后的音频流路由给该APP。
S309,该APP对该处理后的音频流进行存储。
上述步骤S301-S304为手机麦克风开启流程,步骤S305-S309为手机麦克风拾音及音频流传输流程。其中,图5的(a)中的S305-S309的具体实现过程类似于图4中S204-S208的实现过程,此处不予赘述。
上面图5的(a)说明手机麦克风开启流程,以及手机麦克风拾音及音频流传输流程, 下面再结合图5的(b)说明蓝牙外设麦克风开启流程,以及蓝牙外设麦克风拾音及音频流传输流程。
S310,在手机连接着某个蓝牙外设且该蓝牙外设支持HFP规范的情况下,手机调用音频接口,触发手机蓝牙模块与蓝牙外设建立SCO连接。
S311,手机蓝牙模块与蓝牙外设建立SCO连接,这样蓝牙外设麦克风拾取的音频流会同步传输给手机蓝牙模块。
S312,在手机蓝牙模块与蓝牙外设建立SCO连接之后,手机蓝牙模块向APP反馈麦克风已开启。
S313,音频算法模块向手机蓝牙模块请求蓝牙外设的设备信息。
需要说明的是,S313中的步骤可以是在手机蓝牙模块与蓝牙外设建立SCO连接之后执行的,也可以是在手机蓝牙模块接收到蓝牙外设发送的音频流的情况下执行的,具体可以根据实际使用需求确定,本申请实施例不作限定。
S314,手机蓝牙模块向音频算法模块反馈蓝牙外设的设备信息,音频算法模块可以根据蓝牙外设的设备信息从预设的音效参数库中确定该蓝牙外设对应的音效处理参数。
S315,手机蓝牙模块接收到蓝牙外设发送的由蓝牙外设的麦克风拾取的声音数据,即音频流。
S316,手机蓝牙模块将音频流传输给音频算法模块。
S317,音频算法模块采用上述S314中所确定的与该蓝牙外设对应的音效处理参数,对蓝牙外设拾取的音频流进行音效处理。
由于针对不同类型的蓝牙外设拾取的音频流,采用与蓝牙外设类型对应的音效处理参数(例如音效DRC参数)进行音频流处理,可以在一定程度上提升音频效果。
S318,手机调用音频接口将该处理后的音频流路由给该APP。
S319,该APP对该处理后的音频流进行存储。
上述步骤S301-S302以及S310-S312为蓝牙外设麦克风开启流程,步骤S313-S319为手机麦克风拾音及音频流传输流程。
参考上述图5中的(a)和(b)可知,当第三方APP(小视频应用或平台等)在调用音频接口以打开手机麦克风进行拾音(例如录音)时,手机先判断当前是否有连着支持HFP特性的蓝牙外设,如果否,则手机继续走原有流程打开手机麦克风,通过手机麦克风进行拾音;如果是,则手机调用蓝牙模块与蓝牙外设建立SCO通路,触发通过蓝牙外设麦克风拾音。
与上述图4示出的现有技术中手机处理音视频业务时通过手机麦克风拾音的实现过程相比,图5中示出的本申请实施例中手机处理音视频业务时可以根据实际应用场景选择通过手机麦克风拾音,或者通过蓝牙外设麦克风拾音,可提升拾音效果;并且本申请实施例中针对蓝牙外设麦克风拾取的音频流,采用针对该蓝牙外设类型预设的音效处理参数进行音效处理,可提升音频质量。
在本申请实施例中,在蓝牙外设已经连接手机的情况下,如果第三方APP发起录音请求,那么手机可以更改APP使用手机麦克风的请求,将音频通道路由为蓝牙外设,从而手机可以通过蓝牙外设拾音,并且本申请方案可以采用一种更加准确的设备分类方案,针对不同类型的蓝牙外设启用不同的音效DRC参数,对蓝牙外设拾取的音频流进行音效处理, 从而达到提升通过蓝牙外设拾音效果的目的。
可选地,在本申请实施例中,为了保证通过APP发起的音视频业务能够正常进行,某些APP在触发开启麦克风之后会向手机发送麦克风状态查询指令,以查询麦克风是否处于开启状态。需要说明的是,由于本申请方案中有改进,即音频路由转换,因此对手机麦克风状态的查询,要切换至对蓝牙麦克风状态的查询。
下面参考图6示例性地描述本申请实施例提供的终端设备通过蓝牙外设拾音的方法中的麦克风状态查询流程。结合图5,如图6所示,方法300还包括下述的步骤S320-S326。
S320,APP发起麦克风状态查询指令。
其中,该麦克风状态查询指令可以是APP周期性地发起的,也可以是APP响应于用户操作而发起的。
S321,手机调用音频接口判断手机是否存在蓝牙连接。
若否,则执行下述的步骤S322-S323;若是,则执行下述的步骤S324-S326。
S322,在手机不存在蓝牙连接的情况下,手机检测麦克风是否处于打开状态。
S323,手机向APP反馈麦克风是否处于开启状态。
S324,在手机与某一蓝牙外设保持蓝牙连接的情况下,指示手机蓝牙模块查询SCO连接情况。
S325,手机蓝牙模块查询手机与蓝牙外设之间是否SCO连接已断开。
S326,手机蓝牙模块向APP反馈麦克风是否处于开启状态。
若手机与蓝牙外设之间SCO连接未断开,则手机蓝牙模块向APP反馈麦克风处于开启状态。若手机与蓝牙外设之间SCO连接已断开,则手机蓝牙模块向APP反馈麦克风已关闭。
在本申请实施例中,在手机接收到APP发起的麦克风状态查询请求之后,手机可以响应于该麦克风状态查询请求,检测手机与蓝牙外设之间是否保持蓝牙连接,再进一步根据实际情况向APP反馈麦克风是处于开启状态还是处于关闭状态。一方面,若手机与蓝牙外设已断开蓝牙连接,则手机检测的麦克风是否开启,并将检测结果反馈给APP。另一方面,若手机与蓝牙设备之间保持蓝牙连接且保持SCO连接,则手机向APP反馈麦克风处于开启状态。这样,当APP获知麦克风处于开启状态时,可以继续进行音视频录制或通话。当APP获知麦克风处于关闭状态时,可以重新触发开启麦克风,以保证APP发起的音视频业务能够正常进行。
可选地,在本申请实施例中,为了保证通过APP发起的音视频业务能够正常结束,APP会向手机发送麦克风关闭指令,用于指示麦克风关闭。需要说明的是,由于本申请实施例基于现有技术方案有改进,即音频路由转换,因此对手机麦克风的关闭动作,要切换至对蓝牙SCO连接的断开动作。
下面参考图7示例性地描述本申请实施例提供的终端设备通过蓝牙外设拾音的方法中的麦克风关闭流程。结合图5,如图7所示,方法300还包括下述的步骤S327-S334。
S327,APP发起麦克风关闭指令。
其中,该麦克风关闭指令可以是APP响应于用户触发操作而发起的。
S328,手机调用音频接口判断手机是否存在蓝牙连接。
若否,则执行下述的步骤S329-S330;若是,则执行下述的步骤S331-S332。
S329,在手机不存在蓝牙连接的情况下,手机调用音频模块将麦克风关闭指令传输给手机麦克风。
S330,响应于麦克风关闭指令,手机麦克风关闭。
S331,手机麦克风向APP反馈麦克风已关闭。
综合S329-S331可知,若手机与蓝牙外设之间已断开蓝牙连接,且手机的麦克风处于开启状态,则关闭手机的麦克风。
S332,在手机与某一蓝牙外设保持蓝牙连接的情况下,手机调用音频模块将麦克风关闭指令传输给手机蓝牙模块,指示手机蓝牙模块断开与蓝牙外设之间的SCO连接。
S333,手机蓝牙模块响应于麦克风关闭指令,断开手机与蓝牙外设之间的SCO连接。
S334,手机蓝牙模块向APP反馈麦克风已关闭。
综合S332-S334可知,若手机与蓝牙外设之间保持蓝牙连接,则断开手机与蓝牙外设之间的SCO连接,以触发蓝牙外设关闭麦克风。
参考图7可知,当用户触发停止通过APP实现的音视频业务时,手机可以接收到APP发起的麦克风关闭指令,用于触发关闭麦克风。进一步地,手机可以响应于该麦克风关闭请求,检测手机与蓝牙外设之间是否保持蓝牙连接,再进一步根据实际情况关闭手机的麦克风或者蓝牙外设的麦克风。
这样,在通过APP实现的音视频业务结束时,手机可以根据实际情况触发关闭麦克风的语音采集功能,可满足用户实际使用需求,提升用户使用体验。
下面再结合图8,示例性地说明本申请实施例提供的终端设备通过蓝牙外设拾音的方法中确定蓝牙外设对应的音效处理参数的实现过程。如图8所示,该实现过程包括下述的步骤S401-S405。
S401,手机判断蓝牙外设是否支持HFP规范。
示例性地,手机的音频算法模块可以预先查询当前蓝牙外设的设备相关信息,根据蓝牙外设的设备相关信息可以判断蓝牙外设是否支持HFP规范。
若蓝牙外设支持HFP规范,则继续执行下述的步骤S402;若蓝牙外设不支持HFP规范,则采用手机麦克风拾音。
S402,手机判断蓝牙外设是否支持显示功能。
若蓝牙外设支持显示功能,则手机可以确定蓝牙外设为车载/PC/PDA/手机等设备类型;若蓝牙外设不支持显示功能,则手机可以确定蓝牙外设为耳机/音箱等设备类型。
S403,在确定蓝牙外设为车载/PC/PDA/手机等设备类型的情况下,判断蓝牙外设作为A2DP规范的src端(源端)还是sink端(接收端)。
若蓝牙外设作为A2DP规范的src端,则手机可以确定蓝牙外设为PC/PDA/手机等类型;若蓝牙外设作为A2DP规范的sink端,则手机可以确定蓝牙外设为车载类型。
S404,手机根据蓝牙外设的设备相关信息,从预设的设备库中确定蓝牙外设的具体型号。
例如,假设蓝牙外设为耳机/音箱等设备类型,手机可以从预设的设备库中确定耳机具体型号/音箱具体型号。
再例如,假设蓝牙外设为车载设备类型,手机可以从预设的设备库中确定具体车型。
在本申请实施例中,手机的音频算法模块预先查询当前蓝牙外设的厂家标识、设备类 型、I/O能力等信息,可以将蓝牙外设区分为车载蓝牙设备以及普通蓝牙设备(例如蓝牙耳机或音箱),再通过蓝牙外设的MAC地址、厂家标识和设备名称,识别出蓝牙外设具体是哪个型号的设备。
需要说明的是,如果该蓝牙外设无法与任何一个厂家的型号匹配,那么可以启用该设备类型的通用参数。
S405,手机根据蓝牙外设的具体型号,从预设的音效参数库中确定蓝牙外设对应的音效处理参数。
与现有技术相比,本申请方案增加了音效处理流程。其中,新增了设备分类方案,针对不同类型的蓝牙外设可以启用不同音效DRC参数,并且对于无法归并到某个具体型号的设备可以使用该类别的通用音效参数。
这样,在手机蓝牙模块将音频流输入给音频算法模块之后,音频算法模块启用音效处理参数对音频流进行音效处理。具体地,音频算法模块可以针对蓝牙外设选取对应的音效处理参数,其中音效处理参数可以体现为调整DRC参数。
在本申请实施例中,本申请方案不仅可以应用于TWS空间立体声效果,也可以推广应用于蓝牙音箱或者其他任意蓝牙外设。
还需要说明的是,在本申请实施例中,“大于”可以替换为“大于或等于”,“小于或等于”可以替换为“小于”,或者,“大于或等于”可以替换为“大于”,“小于”可以替换为“小于或等于”。
本文中描述的各个实施例可以为独立的方案,也可以根据内在逻辑进行组合,这些方案都落入本申请的保护范围中。
可以理解的是,上述各个方法实施例中由终端设备实现的方法和操作,也可以由可用于终端设备的部件(例如芯片或者电路)实现。
上文描述了本申请提供的方法实施例,下文将描述本申请提供的装置实施例。应理解,装置实施例的描述与方法实施例的描述相互对应,因此,未详细描述的内容可以参见上文方法实施例,为了简洁,这里不再赘述。
上文主要从方法步骤的角度对本申请实施例提供的方案进行了描述。可以理解的是,为了实现上述功能,实施该方法的终端设备包含了执行各个功能相应的硬件结构和/或软件模块。本领域技术人员应该可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,本申请能够以硬件或硬件和计算机软件的结合形式来实现。某个功能究竟以硬件还是计算机软件驱动硬件的方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的保护范围。
本申请实施例可以根据上述方法示例,对终端设备进行功能模块的划分,例如,可以对应各个功能划分各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。需要说明的是,本申请实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有其它可行的划分方式。下面以采用对应各个功能划分各个功能模块为例进行说明。
图9为本申请实施例提供的终端设备通过蓝牙外设拾音的装置700的示意性框图。该 装置700可以用于执行上文方法实施例中终端设备所执行的动作。该装置700包括检测单元710、收发单元720和处理单元730。
检测单元710,用于检测用户在装置700上的第一操作,该第一操作用于触发装置700中的第一APP开启音视频业务,或者在第一APP已开启音视频业务的情况下触发通过目标蓝牙设备录音;
收发单元720,用于响应于用户的第一操作,向目标蓝牙设备发送麦克风录音指令,以指示目标蓝牙设备录音,该目标蓝牙设备为与装置700已建立蓝牙连接的第一蓝牙设备或者第二蓝牙设备;
处理单元730,用于当收发单元720接收到第一蓝牙设备发送的第一音频数据流时,采用第一音效DRC参数对第一音频数据流进行音效处理,该第一音频数据流对应于第一蓝牙设备的麦克风采集的声音数据,该第一音效DRC参数为第一蓝牙设备对应的预设音效处理参数;
处理单元730,还用于当收发单元720接收到第二蓝牙设备发送的第二音频数据流时,采用第二音效DRC参数对第二音频数据流进行音效处理,该第二音频数据流对应于第二蓝牙设备的麦克风采集的声音数据,该第二音效DRC参数为第二蓝牙设备对应的预设音效处理参数;
其中,上述第一蓝牙设备和第二蓝牙设备的设备类型或者设备型号不同,上述第一音效DRC参数与上述第二音效DRC参数不同。
其中,针对不同类型或者不同型号的蓝牙外设,可以采用不同音效DRC参数,这样可以根据具体情况调整音效动态范围,从而更好地改善音效。
根据本申请提供的装置700通过蓝牙外设拾音的方法,在装置700进行直播、视频通话等音视频业务的场景中,装置700可以通过蓝牙外设的麦克风拾取声音数据,并且可以采用与该蓝牙外设对应的预设音效DRC参数,对蓝牙外设拾取的声音数据进行针对性地音效处理,改善音效。通过本申请方案,不仅可以实现装置700通过蓝牙外设拾音,而且还可以针对不同蓝牙外设分别采用不同的预设音效DRC参数进行音效处理,改善通过蓝牙外设拾音的音效,即使装置700与被拍摄者距离较远或者周围环境噪声较大,也可实现较好的录音效果,提升用户使用体验。
在一种可能实施方式中,装置700中预设有音效参数库,该音效参数库中包括蓝牙设备信息与音效处理参数的一一对应关系。其中,该音效参数库中可以包括第一蓝牙设备的设备信息与第一音效DRC参数的对应关系,以及第二蓝牙设备的设备信息与第二音效DRC参数的对应关系。
可选地,处理单元730,还用于根据目标蓝牙设备的设备信息,从音效参数库中确定与目标蓝牙设备对应的目标音效DRC参数。其中,上述设备信息包括设备名称,MAC地址,生产商标识以及输入输出I/O能力信息。
在一种可能实施方式中,上述音效参数库中可以包括目标蓝牙设备的设备类型与目标音效DRC参数的一一对应关系。
在一种可能实施方式中,上述音效参数库中可以包括目标蓝牙设备的设备型号与目标音效DRC参数的一一对应关系。
可选地,处理单元730具体用于根据目标蓝牙设备的设备信息,确定目标蓝牙设备的 设备类型或设备型号,然后根据目标蓝牙设备的设备类型或设备型号,确定与目标蓝牙设备对应的音效DRC参数。
示例性地,处理单元730,具体用于:
根据目标蓝牙设备的设备名称,MAC地址和生产商标识,确定目标蓝牙设备的设备型号;
根据目标蓝牙设备的设备型号,从音效参数库中确定与目标蓝牙设备对应的目标音效DRC参数。
通过上述方案,在装置700通过蓝牙外设拾音(例如录音)时,针对不同设备型号的蓝牙外设,可以采用不同的预设音效DRC参数对蓝牙外设所拾取的音频流进行音效处理,可实现较好的录音效果。
在一种可能实施方式中,处理单元730,具体用于:
根据目标蓝牙设备的输入输出I/O能力信息,确定目标蓝牙设备的设备类型;
根据目标蓝牙设备的设备类型,从音效参数库中确定与目标蓝牙设备对应的目标音效DRC参数;
其中,上述设备类型可以包括有屏类型和无屏类型。
通过上述方案,在装置700通过蓝牙外设拾音(例如录音)时,针对不同设备类型(例如有屏类型或无屏类型)的蓝牙外设,可以采用不同的预设音效DRC参数对蓝牙外设所拾取的音频流进行音效处理,可实现较好的录音效果。
在一种可能实施方式中,无屏类型的蓝牙设备可以包括具有语音采集功能的耳机或者音箱,有屏类型的蓝牙设备可以包括具有显示屏且具有语音采集功能的车载终端或者携带式终端。需要说明的是,这里为示例性地列举,本申请中不限于此,还可以包括其他可能的蓝牙设备,具体可以根据实际使用情况确定,本申请实施例不作限定。
在一种可能实施方式中,在目标蓝牙设备为有屏类型的蓝牙设备的情况下,处理单元730具体用于:
若目标蓝牙设备作为高级音频分发规范A2DP中音频数据流的输出端,则确定目标蓝牙设备为语音输出端类型;
或者,若目标蓝牙设备作为A2DP规范中音频数据流的接收端,则确定目标蓝牙设备为语音接收端类型。
通过上述方案,在装置700通过蓝牙外设拾音(例如录音)时,针对有屏类型的蓝牙外设,可以区分蓝牙外设是语音输出端类型,还是语音接收端类型,进而采用对应的预设音效DRC参数对蓝牙外设所拾取的音频流进行音效处理,可实现较好的录音效果。
在一种可能实施方式中,上述收发单元720具体用于:
响应于用户在装置700上的第一操作,若处理单元730判断目标蓝牙设备满足预设条件,则向目标蓝牙设备发送麦克风录音指令,指示目标蓝牙设备录音;
其中,上述预设条件可以为目标蓝牙设备处于用户佩戴状态,和/或,目标蓝牙设备与装置700之间的距离大于预设距离阈值。该预设距离阈值可以根据实际使用需求设置,本申请实施例不作限定。
通过上述方案,当装置700发现与蓝牙设备已建立连接时,装置700可以判断蓝牙外设是否满足预设条件,例如蓝牙设备处于用户佩戴状态和/或蓝牙设备与装置700之间的距 离大于预设距离阈值。当该蓝牙设备满足预设条件时(例如蓝牙设备处于用户佩戴状态),装置700提示用户是否需要由蓝牙设备的麦克风进行语音数据拾取(例如录音),供用户选择。这样可以更好地满足用户使用需求,提升用户使用体验。
可选地,在本申请实施例中,在装置700处理音视频业务,且通过蓝牙设备的麦克风进行语音数据拾取的情况下,装置700可以实时判断该蓝牙设备是否满足上述预设条件。当该蓝牙设备不满足预设条件时,例如蓝牙设备处于用户未佩戴状态,装置700提示用户是需要由蓝牙设备的麦克风进行语音数据拾取,切换到由装置700的麦克风进行语音数据拾取,供用户选择。这样可以更好地满足用户使用需求,提升用户使用体验。
在一种可能实施方式中,上述响应于用户在装置700上的第一操作,指示目标蓝牙设备录音,包括:
响应于上述第一操作,当目标蓝牙设备支持免提规范HFP时,向目标蓝牙设备发送麦克风录音指令,指示目标蓝牙设备录音。
通过上述方案,在蓝牙外设支持HFP的情况下,蓝牙外设可以响应于装置700发送的麦克风录音指令,直接开启麦克风录音功能,无需用户手动触发,可提升用户使用体验。
在一种可能实施方式中,上述收发单元720具体用于:
响应于用户在装置700上的第一操作,提示用户是否通过目标蓝牙设备的麦克风录音;
接收到用户的第二操作,该第二操作用于确认通过目标蓝牙设备的麦克风录音;
响应于第二操作,向目标蓝牙设备发送麦克风录音指令,指示目标蓝牙设备录音。
通过本申请方案,在装置700处理音视频业务的过程中,即使装置700与被拍摄者距离较远,或者周围环境嘈杂,可借助于与装置700连接的蓝牙外设实现较好的拾音效果,提升用户使用体验。
在一种可能实施方式中,上述收发单元720还用于目标蓝牙设备进行交互,使得装置700与目标蓝牙设备建立SCO;
收发单元720还用于接收目标蓝牙设备发送的响应消息,该响应消息用于指示目标蓝牙设备的麦克风已开启。
在本申请实施例中,装置700向蓝牙外设发送麦克风开启指令,即装置700发起与蓝牙外设建立SCO连接,以指示蓝牙外设开启麦克风。进一步地,蓝牙外设在开启麦克风之后,可以向装置700发送响应消息,用于指示蓝牙外设的麦克风已开启。
其中,装置700与蓝牙外设建立SCO连接,可以直接触发蓝牙外设开启麦克风。即,若装置700与蓝牙外设建立SCO连接,则默认蓝牙外设已开启麦克风,在此情况下蓝牙外设具有拾取语音数据并将拾取的语音数据实时传输给装置700的功能。
在一种可能实施方式中,上述装置700还包括图像拍摄单元,该图像拍摄单元用于响应于用户的第一操作,在通过目标蓝牙设备录音得到目标音频数据流的过程中,通过装置700的摄像头拍摄得到第一图像;
处理单元730还用于将第一图像与处理后的目标音频数据流进行合成,得到第一视频流。
通过本申请方案,在装置700进行直播、视频通话等音视频业务时,即使装置700与被拍摄者距离较远,或者周围环境嘈杂,可借助于与装置700连接的蓝牙外设实现较好的视频录音效果,提升用户使用体验。
在一种可能实施方式中,检测单元710还用于:
接收第一APP发起的麦克风状态查询请求,该麦克风状态查询请求用于查询麦克风是否处于开启状态;
响应于麦克风状态查询请求,检测装置700与目标蓝牙设备之间是否保持蓝牙连接;
若装置700与目标蓝牙设备已断开蓝牙连接,则检测装置700的麦克风是否开启,并将检测结果反馈给第一APP;
若装置700与目标蓝牙设备之间保持蓝牙连接且保持SCO连接,则向第一APP反馈麦克风处于开启状态。
这样,当第一APP获知麦克风处于开启状态时,可以继续进行音视频录制或通话。当第一APP获知麦克风处于关闭状态时,可以重新触发开启麦克风,以保证第一APP发起的音视频业务能够正常进行,提升用户体验。
在一种可能实施方式中,检测单元710还用于:
接收第一APP发起的麦克风关闭请求,该麦克风关闭请求用于触发关闭麦克风;
响应于该麦克风关闭请求,检测装置700与目标蓝牙设备之间是否保持蓝牙连接;
进一步地,处理单元730还用于:
若装置700与目标蓝牙设备之间保持蓝牙连接,则断开装置700与目标蓝牙设备之间的SCO连接,以触发目标蓝牙设备关闭麦克风;
若装置700与目标蓝牙设备之间已断开蓝牙连接,且装置700的麦克风处于开启状态,则关闭装置700的麦克风。
这样,在通过APP实现的音视频业务结束时,手机可以根据实际情况触发关闭麦克风的语音采集功能,可满足用户实际使用需求,提升用户使用体验。
在一种可能实施方式中,处理单元730还用于:
将处理后的第一音频数据流或者处理后的第二音频数据流,路由至第一APP对应的存储路径。
通过本申请方案,装置700通过第一APP进行音视频业务,不仅可以实现装置700通过蓝牙外设拾音,而且还可以针对不同蓝牙外设分别采用不同的预设音效DRC参数进行音效处理,获取音质改善的音频流,进一步供APP应用。
在一种可能实施方式中,处理单元730还用于:
响应于用户的第一操作,当装置700未与目标蓝牙设备建立蓝牙连接,或者与目标蓝牙设备已建立蓝牙连接但目标蓝牙设备不支持HFP规范时,开启装置700的麦克风;
通过装置700的麦克风采集声音数据,得到第三音频数据流;
采用对第三音频数据流进行处理,得到处理后的第三音频数据流;
将处理后的第三音频数据流,路由至第一APP对应的存储路径。
本申请实施例中装置700处理音视频业务时可以根据实际应用场景选择通过手机麦克风拾音,或者通过蓝牙外设麦克风拾音,可提升拾音效果;并且本申请实施例中针对蓝牙外设麦克风拾取的音频流,采用针对该蓝牙外设类型预设的音效处理参数进行音效处理,可提升音频质量。
根据本申请实施例的装置700可对应于执行本申请实施例中描述的方法,并且装置700中的单元的上述和其它操作和/或功能分别为了实现方法的相应流程,为了简洁,在此不再 赘述。
参考图10,图10为本申请实施例提供的电子设备800的结构示意图。该电子设备800可以为上述实施例提及的终端设备或者蓝牙设备。
电子设备800可以包括处理器810,外部存储器接口820,内部存储器821,通用串行总线(universal serial bus,USB)接口830,充电管理模块840,电源管理模块841,电池842,天线1,天线2,移动通信模块850,无线通信模块860,音频模块870,扬声器870A,受话器870B,麦克风870C,耳机接口870D,传感器模块880,按键890,马达891,指示器892,摄像头893,显示屏894,以及用户标识模块(subscriber identification module,SIM)卡接口895等。其中传感器模块880可以包括压力传感器880A,陀螺仪传感器880B,气压传感器880C,磁传感器880D,加速度传感器880E,距离传感器880F,接近光传感器880G,指纹传感器880H,温度传感器880I,触摸传感器880J,环境光传感器880K,骨传导传感器880L等。
可以理解的是,本申请实施例示意的结构并不构成对电子设备800的具体限定。电子设备800可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器810可以包括一个或多个处理单元,例如:处理器810可以包括应用处理器(application processor,AP),调制解调处理器(modem),图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的器件,也可以集成在一个或多个处理器中。处理器810中还可以设置存储器,用于存储指令和数据。
电子设备800的无线通信功能可以通过天线1,天线2,移动通信模块850,无线通信模块860,调制解调处理器以及基带处理器等实现。
天线1和天线2用于发射和接收电磁波信号。电子设备800中的每个天线可用于覆盖单个或多个通信频带。不同的天线还可以复用,以提高天线的利用率。例如:可以将天线1复用为无线局域网的分集天线。在另外一些实施例中,天线可以和调谐开关结合使用。
移动通信模块850可以提供应用在电子设备800上的包括2G/3G/4G/5G等无线通信的解决方案。移动通信模块850可以包括至少一个滤波器,开关,功率放大器,低噪声放大器(low noise amplifier,LNA)等。移动通信模块850可以由天线1接收电磁波,并对接收的电磁波进行滤波,放大等处理,传送至调制解调处理器进行解调。移动通信模块850还可以对经调制解调处理器调制后的信号放大,经天线1转为电磁波辐射出去。在一些实施例中,移动通信模块850的至少部分功能模块可以被设置于处理器810中。在一些实施例中,移动通信模块850的至少部分功能模块可以与处理器810的至少部分模块被设置在同一个器件中。
调制解调处理器可以包括调制器和解调器。其中,调制器用于将待发送的低频基带信号调制成中高频信号。解调器用于将接收的电磁波信号解调为低频基带信号。随后解调器将解调得到的低频基带信号传送至基带处理器处理。低频基带信号经基带处理器处理后,被传递给应用处理器。应用处理器通过音频设备(不限于扬声器870A,受话器870B等)输出声音信号,或通过显示屏894显示图像或视频。在一些实施例中,调制解调处理器可 以是独立的器件。在另一些实施例中,调制解调处理器可以独立于处理器810,与移动通信模块850或其他功能模块设置在同一个器件中。在一些实施例中,电子设备800可以包括两个调制解调处理器,一个对应于4G,另一个对应于5G。
无线通信模块860可以提供应用在电子设备800上的包括无线局域网(wireless local area networks,WLAN)(如无线保真(wireless fidelity,Wi-Fi)网络),蓝牙(bluetooth,BT)等无线通信的解决方案。无线通信模块860可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块860经由天线2接收电磁波,将电磁波信号调频以及滤波处理,将处理后的信号发送到处理器810。无线通信模块860还可以从处理器810接收待发送的信号,对其进行调频,放大,经天线2转为电磁波辐射出去。
在一些实施例中,电子设备800的天线1和移动通信模块850耦合,天线2和无线通信模块860耦合,使得电子设备800可以通过无线通信技术与网络以及其他设备通信。所述无线通信技术可以包括GSM,GPRS,CDMA,WCDMA,TD-SCDMA,LTE,NR,BT,WLAN,NFC,FM,和/或IR技术等。
电子设备800通过GPU,显示屏894,以及应用处理器等实现显示功能。GPU为图像处理的微处理器,连接显示屏894和应用处理器。GPU用于执行数学和几何计算,用于图形渲染。处理器810可包括一个或多个GPU,其执行程序指令以生成或改变显示信息。
显示屏894用于显示图像,视频等。显示屏894包括显示面板。
电子设备800可以通过ISP,摄像头893,视频编解码器,GPU,显示屏894以及应用处理器等实现拍摄功能。ISP用于处理摄像头893反馈的数据。摄像头893用于捕获静态图像或视频。数字信号处理器用于处理数字信号,除了可以处理数字图像信号,还可以处理其他数字信号。例如,当电子设备800在频点选择时,数字信号处理器用于对频点能量进行傅里叶变换等。频编解码器用于对数字视频压缩或解压缩。
内部存储器821可以用于存储计算机可执行程序代码,所述可执行程序代码包括指令。内部存储器821可以包括存储程序区和存储数据区。其中,存储程序区可存储操作系统,至少一个功能所需的应用程序(比如声音播放功能,图像播放功能等)等。
电子设备800可以通过音频模块870,扬声器870A,受话器870B,麦克风870C,耳机接口870D,以及应用处理器等实现音频功能。例如音乐播放,录音等。
压力传感器880A用于感受压力信号,可以将压力信号转换成电信号。在一些实施例中,压力传感器880A可以设置于显示屏894。
触摸传感器880J,也称“触控面板”。触摸传感器880J可以设置于显示屏894,由触摸传感器880J与显示屏894组成触摸屏,也称“触控屏”。触摸传感器880J用于检测作用于其上或附近的触摸操作。触摸传感器可以将检测到的触摸操作传递给应用处理器,以确定触摸事件类型。可以通过显示屏894提供与触摸操作相关的视觉输出。在另一些实施例中,触摸传感器880J也可以设置于电子设备800的表面,与显示屏894所处的位置不同。
SIM卡接口895用于连接SIM卡。SIM卡可以通过插入SIM卡接口895,或从SIM卡接口895拔出,实现和电子设备800的接触和分离。电子设备800可以支持1个或N个SIM卡接口,N为大于1的正整数。SIM卡接口895可以支持Nano SIM卡,Micro SIM卡,SIM卡等。同一个SIM卡接口895可以同时插入多张卡。所述多张卡的类型可以相同,也可以不同。SIM卡接口895也可以兼容不同类型的SIM卡。SIM卡接口895也可以兼容外 部存储卡。电子设备800通过SIM卡和网络交互,实现通话以及数据通信等功能。在一些实施例中,电子设备800采用eSIM,即:嵌入式SIM卡。eSIM卡可以嵌在电子设备800中,不能和电子设备800分离。
在本申请实施例中,SIM卡用于存储用户信息,该用户信息可包括IMSI。电子设备800可以使用该用户信息作为身份标识,注册到网络。
本申请实施例中的电子设备800可以为智能手机(例如搭载Android系统或iOS系统的手机等)、平板电脑、笔记本电脑、掌上电脑、移动互联网设备(MID,mobile internet device)、可穿戴设备(例如智能手表、智能手环等)或其他可以接入互联网的设备。
可以理解,图10所示的部件并不构成对电子设备800的具体限定,电子设备800还可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。
应理解,根据本申请实施例的电子设备800可对应于本申请实施例中的装置700,电子设备800中的处理器810可对应于装置700中的处理单元730,电子设备800中的传感器模块880可对应于装置700中的检测单元710,电子设备800中的无线通信模块860可对应于装置700中的收发单元720。装置700中的各个单元的上述和其它操作和/或功能分别用于实现上述方法的相应流程,为了简洁,在此不再赘述。
可选地,在一些实施例中,本申请实施例还提供了一种计算机可读介质,该计算机可读介质存储有程序代码,当计算机程序代码在计算机上运行时,使得计算机执行上述各方面中的方法。
可选地,在一些实施例中,本申请实施例还提供了一种芯片,该芯片包括处理器,处理器与存储器耦合,该处理器用于执行存储器中存储的计算机程序或指令,以使得芯片执行上述各方面中的方法。
可选地,在一些实施例中,本申请实施例还提供了一种计算机程序产品,该计算机程序产品包括:计算机程序代码,当计算机程序代码在计算机上运行时,使得计算机执行上述各方面中的方法。
在本申请实施例中,终端设备或蓝牙设备包括硬件层、运行在硬件层之上的操作系统层,以及运行在操作系统层上的应用层。其中,硬件层可以包括中央处理器(central processing unit,CPU)、内存管理单元(memory management unit,MMU)和内存(也称为主存)等硬件。操作系统层的操作系统可以是任意一种或多种通过进程(process)实现业务处理的计算机操作系统,例如,Linux操作系统、Unix操作系统、Android操作系统、iOS操作系统或windows操作系统等。应用层可以包含浏览器、通讯录、文字处理软件、即时通信软件等应用。
本申请实施例并未对本申请实施例提供的方法的执行主体的具体结构进行特别限定,只要能够通过运行记录有本申请实施例提供的方法的代码的程序,以根据本申请实施例提供的方法进行通信即可。例如,本申请实施例提供的方法的执行主体可以是终端设备或蓝牙设备,或者,是终端设备或蓝牙设备中能够调用程序并执行程序的功能模块。
本申请的各个方面或特征可以实现成方法、装置或使用标准编程和/或工程技术的制品。本文中使用的术语“制品”可以涵盖可从任何计算机可读器件、载体或介质访问的计算机程序。例如,计算机可读介质可以包括但不限于:磁存储器件(例如,硬盘、软盘或磁带等), 光盘(例如,压缩盘(compact disc,CD)、数字通用盘(digital versatile disc,DVD)等),智能卡和闪存器件(例如,可擦写可编程只读存储器(erasable programmable read-only memory,EPROM)、卡、棒或钥匙驱动器等)。
本文描述的各种存储介质可代表用于存储信息的一个或多个设备和/或其它机器可读介质。术语“机器可读介质”可以包括但不限于:无线信道和能够存储、包含和/或承载指令和/或数据的各种其它介质。
应理解,本申请实施例中提及的处理器可以是中央处理单元(central processing unit,CPU),还可以是其他通用处理器、数字信号处理器(digital signal processor,DSP)、专用集成电路(application specific integrated circuit,ASIC)、现成可编程门阵列(field programmable gate array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
还应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(read-only memory,ROM)、可编程只读存储器(programmable ROM,PROM)、可擦除可编程只读存储器(erasable PROM,EPROM)、电可擦除可编程只读存储器(electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(random access memory,RAM)。例如,RAM可以用作外部高速缓存。作为示例而非限定,RAM可以包括如下多种形式:静态随机存取存储器(static RAM,SRAM)、动态随机存取存储器(dynamic RAM,DRAM)、同步动态随机存取存储器(synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(double data rate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(direct rambus RAM,DR RAM)。
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。
还需要说明的是,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本申请的保护范围。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。此外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接 耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上,或者说对现有技术做出贡献的部分,或者该技术方案的部分,可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,该计算机软件产品包括若干指令,该指令用以使得一台计算机设备(可以是个人计算机,服务器,或者蓝牙设备等)执行本申请各个实施例所述方法的全部或部分步骤。前述的存储介质可以包括但不限于:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
除非另有定义,本文所使用的所有的技术和科学术语与属于本申请的技术领域的技术人员通常理解的含义相同。本文中在本申请的说明书中所使用的术语只是为了描述具体的实施例的目的,不是旨在于限制本申请。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以所述权利要求的保护范围为准。

Claims (18)

  1. 一种终端设备通过蓝牙外设拾音的方法,其特征在于,包括:
    响应于用户在终端设备上的第一操作,所述终端设备指示目标蓝牙设备录音,所述目标蓝牙设备为与所述终端设备已建立蓝牙连接的第一蓝牙设备或者第二蓝牙设备,所述第一操作用于触发所述终端设备中的第一应用APP开启音视频业务,或者在所述第一APP已开启音视频业务的情况下触发通过所述目标蓝牙设备录音;
    当所述终端设备接收到所述第一蓝牙设备发送的第一音频数据流时,所述终端设备采用第一音效动态范围控制DRC参数对所述第一音频数据流进行音效处理,所述第一音频数据流对应于所述第一蓝牙设备的麦克风采集的声音数据,所述第一音效DRC参数为所述第一蓝牙设备对应的预设音效处理参数;
    当所述终端设备接收到所述第二蓝牙设备发送的第二音频数据流时,所述终端设备采用第二音效DRC参数对所述第二音频数据流进行音效处理,所述第二音频数据流对应于所述第二蓝牙设备的麦克风采集的声音数据,所述第二音效DRC参数为所述第二蓝牙设备对应的预设音效处理参数;
    其中,所述第一蓝牙设备和所述第二蓝牙设备的设备类型或者设备型号不同,所述第一音效DRC参数与所述第二音效DRC参数不同。
  2. 根据权利要求1所述的方法,其特征在于,所述终端设备中预设有音效参数库,所述音效参数库中包括蓝牙设备信息与音效处理参数的一一对应关系,所述音效参数库中包括所述第一蓝牙设备的设备信息与所述第一音效DRC参数的对应关系,以及所述第二蓝牙设备的设备信息与所述第二音效DRC参数的对应关系;
    所述方法还包括:
    所述终端设备根据所述目标蓝牙设备的设备信息,从所述音效参数库中确定与所述目标蓝牙设备对应的目标音效DRC参数;
    其中,所述设备信息包括以下至少一项:设备名称,物理MAC地址,生产商标识以及输入输出I/O能力信息。
  3. 根据权利要求2所述的方法,其特征在于,所述终端设备根据所述目标蓝牙设备的设备信息,从所述音效参数库中确定与所述目标蓝牙设备对应的目标音效DRC参数,包括:
    所述终端设备根据所述目标蓝牙设备的设备名称,MAC地址和生产商标识,确定所述目标蓝牙设备的设备型号;
    所述终端设备根据所述目标蓝牙设备的设备型号,从所述音效参数库中确定与所述目标蓝牙设备对应的目标音效DRC参数;
    其中,所述音效参数库中包括所述目标蓝牙设备的设备型号与所述目标音效DRC参数的一一对应关系。
  4. 根据权利要求2或3所述的方法,其特征在于,所述终端设备根据所述目标蓝牙设备的设备信息,从所述音效参数库中确定与所述目标蓝牙设备对应的目标音效DRC参数,包括:
    所述终端设备根据所述目标蓝牙设备的输入输出I/O能力信息,确定所述目标蓝 牙设备的设备类型;
    所述终端设备根据所述目标蓝牙设备的设备类型,从所述音效参数库中确定与所述目标蓝牙设备对应的目标音效DRC参数;
    其中,所述设备类型包括有屏类型和无屏类型。
  5. 根据权利要求4所述的方法,其特征在于,无屏类型的蓝牙设备包括具有语音采集功能的耳机或者音箱,有屏类型的蓝牙设备包括具有显示屏且具有语音采集功能的车载终端或者携带式终端。
  6. 根据权利要求4或5所述的方法,其特征在于,在所述目标蓝牙设备为有屏类型的蓝牙设备的情况下,所述终端设备根据所述目标蓝牙设备的I/O能力信息,确定所述目标蓝牙设备的设备类型,包括:
    若所述目标蓝牙设备作为高级音频分发规范A2DP中音频数据流的输出端,则所述终端设备确定所述目标蓝牙设备为语音输出端类型;或者,
    若所述目标蓝牙设备作为所述A2DP规范中音频数据流的接收端,则所述终端设备确定所述目标蓝牙设备为语音接收端类型。
  7. 根据权利要求1至6中任一项所述的方法,其特征在于,所述响应于用户在终端设备上的第一操作,所述终端设备指示目标蓝牙设备录音,包括:
    响应于用户在所述终端设备上的第一操作,若所述终端设备判断目标蓝牙设备满足预设条件,则所述终端设备指示所述目标蓝牙设备录音;
    其中,所述预设条件为所述目标蓝牙设备处于用户佩戴状态,和/或,所述目标蓝牙设备与所述终端设备之间的距离大于预设距离阈值。
  8. 根据权利要求1至7中任一项所述的方法,其特征在于,所述响应于用户在所述终端设备上的第一操作,所述终端设备指示目标蓝牙设备录音,包括:
    响应于所述第一操作,当所述目标蓝牙设备支持免提规范HFP时,所述终端设备向所述目标蓝牙设备发送麦克风录音指令,指示所述目标蓝牙设备录音。
  9. 根据权利要求1至8中任一项所述的方法,其特征在于,所述响应于用户在终端设备上的第一操作,所述终端设备指示目标蓝牙设备录音,包括:
    响应于用户在所述终端设备上的第一操作,所述终端设备提示用户是否通过所述目标蓝牙设备的麦克风录音;
    所述终端设备接收到用户的第二操作,所述第二操作用于确认通过所述目标蓝牙设备的麦克风录音;
    响应于所述第二操作,所述终端设备向所述目标蓝牙设备发送麦克风录音指令,指示所述目标蓝牙设备录音。
  10. 根据权利要求1至9中任一项所述的方法,其特征在于,所述方法还包括:
    所述终端设备与所述目标蓝牙设备建立同步定向连接SCO;
    所述终端设备接收所述目标蓝牙设备发送的响应消息,所述响应消息用于指示所述目标蓝牙设备的麦克风已开启。
  11. 根据权利要求1至10中任一项所述的方法,其特征在于,所述方法还包括:
    响应于用户的第一操作,在通过所述目标蓝牙设备录音得到目标音频数据流的过程中,所述终端设备通过摄像头拍摄得到第一图像;
    所述终端设备将所述第一图像与所述处理后的目标音频数据流进行合成,得到第一视频流。
  12. 根据权利要求1至11中任一项所述的方法,其特征在于,所述方法还包括:
    所述终端设备接收第一APP发起的麦克风状态查询请求,所述麦克风状态查询请求用于查询麦克风是否处于开启状态;
    所述终端设备响应于所述麦克风状态查询请求,检测所述终端设备与所述目标蓝牙设备之间是否保持蓝牙连接;
    若所述终端设备与所述目标蓝牙设备已断开蓝牙连接,则所述终端设备检测所述终端设备的麦克风是否开启,并将检测结果反馈给第一APP;
    若所述终端设备与所述目标蓝牙设备之间保持蓝牙连接且保持SCO连接,则所述终端设备向所述第一APP反馈麦克风处于开启状态。
  13. 根据权利要求1至12中任一项所述的方法,其特征在于,所述方法还包括:
    所述终端设备接收第一APP发起的麦克风关闭请求,所述麦克风关闭请求用于触发关闭麦克风;
    所述终端设备响应于所述麦克风关闭请求,检测所述终端设备与所述目标蓝牙设备之间是否保持蓝牙连接;
    若所述终端设备与所述目标蓝牙设备之间保持蓝牙连接,则所述终端设备断开所述终端设备与所述目标蓝牙设备之间的SCO连接,以触发所述目标蓝牙设备关闭麦克风;
    若所述终端设备与所述目标蓝牙设备之间已断开蓝牙连接,且所述终端设备的麦克风处于开启状态,则所述终端设备关闭所述终端设备的麦克风。
  14. 根据权利要求1至13中任一项所述的方法,其特征在于,所述方法还包括:
    所述终端设备将处理后的第一音频数据流或者处理后的第二音频数据流,路由至所述第一APP对应的存储路径。
  15. 根据权利要求1至14中任一项所述的方法,其特征在于,所述方法还包括:
    响应于所述第一操作,当所述终端设备未与所述目标蓝牙设备建立蓝牙连接,或者与所述目标蓝牙设备已建立蓝牙连接但所述目标蓝牙设备不支持HFP规范时,所述终端设备开启所述终端设备的麦克风;
    所述终端设备通过所述终端设备的麦克风采集声音数据,得到第三音频数据流;
    所述终端设备采用对所述第三音频数据流进行处理,得到处理后的第三音频数据流;
    所述终端设备将处理后的第三音频数据流,路由至所述第一APP对应的存储路径。
  16. 一种终端设备,其特征在于,包括处理器,所述处理器与存储器耦合,所述处理器用于执行所述存储器中存储的计算机程序或指令,以使得所述终端设备实现如权利要求1至15中任一项所述的方法。
  17. 一种系统芯片,其特征在于,所述系统芯片与存储器耦合,所述系统芯片用于读取并执行所述存储器中存储的计算机程序,以实现如权利要求1至15中任一项所述的方法。
  18. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计 算机程序,当所述计算机程序在终端设备上运行时,使得所述终端设备执行如权利要求1至15中任一项所述的方法。
PCT/CN2022/071055 2021-06-16 2022-01-10 终端设备通过蓝牙外设拾音的方法及终端设备 WO2022262262A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP22737696.9A EP4135302A4 (en) 2021-06-16 2022-01-10 METHOD OF RECORDING SOUND BY A TERMINAL WITH A BLUETOOTH PERIPHERAL DEVICE AND TERMINAL
MX2022010408A MX2022010408A (es) 2021-06-16 2022-01-10 Metodo de obtencion de sonido para dispositivo terminal a traves de un dispositivo periferico bluetooth y terminal.
US17/793,589 US20230370541A1 (en) 2021-06-16 2022-01-10 Sound Pickup Method For Terminal Device Through Bluetooth Peripheral And Terminal Device

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110665714.4A CN113794797B (zh) 2021-06-16 2021-06-16 终端设备通过蓝牙外设拾音的方法及终端设备
CN202110665714.4 2021-06-16

Publications (1)

Publication Number Publication Date
WO2022262262A1 true WO2022262262A1 (zh) 2022-12-22

Family

ID=79181183

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/071055 WO2022262262A1 (zh) 2021-06-16 2022-01-10 终端设备通过蓝牙外设拾音的方法及终端设备

Country Status (5)

Country Link
US (1) US20230370541A1 (zh)
EP (1) EP4135302A4 (zh)
CN (1) CN113794797B (zh)
MX (1) MX2022010408A (zh)
WO (1) WO2022262262A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116828102A (zh) * 2023-08-29 2023-09-29 荣耀终端有限公司 录音方法、设备及存储介质

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113794797B (zh) * 2021-06-16 2022-08-26 荣耀终端有限公司 终端设备通过蓝牙外设拾音的方法及终端设备
CN114143765B (zh) * 2022-02-08 2022-07-08 荣耀终端有限公司 蓝牙回连方法、装置和存储介质
CN114466283A (zh) * 2022-02-08 2022-05-10 维沃移动通信有限公司 音频采集方法、装置、电子设备及外设组件方法
CN114422710B (zh) * 2022-03-29 2022-08-16 荣耀终端有限公司 电子设备的录像控制方法、电子设备及可读介质
CN114913882A (zh) * 2022-05-25 2022-08-16 维沃移动通信有限公司 录音方法及录音装置
CN117640599A (zh) * 2022-08-19 2024-03-01 华为云计算技术有限公司 一种音频数据处理方法及装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102014224883A1 (de) * 2014-12-04 2016-06-09 Sennheiser Electronic Gmbh & Co. Kg Verfahren zur drahtlosen Übertragung von Audiosignalen basierend auf dem Bluetooth-Standard und Drahtlos-Mikrofoneinheit
CN106792449A (zh) * 2016-12-15 2017-05-31 北京塞宾科技有限公司 一种基于蓝牙音频的网络直播方法
CN107040832A (zh) * 2017-04-22 2017-08-11 广州市比丽普电子有限公司 一种基于蓝牙技术的手持终端式麦克风系统
CN110662207A (zh) * 2018-07-01 2020-01-07 张德明 一种基于蓝牙的高质量音乐及语音传输操作方法
EP3629561A1 (en) * 2018-09-30 2020-04-01 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Data transmission method and system, and bluetooth headphone
CN111370012A (zh) * 2020-05-27 2020-07-03 北京小米移动软件有限公司 一种蓝牙语音音频采集方法及系统
CN113794797A (zh) * 2021-06-16 2021-12-14 荣耀终端有限公司 终端设备通过蓝牙外设拾音的方法及终端设备

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11120818B2 (en) * 2010-11-12 2021-09-14 Nokia Technologies Oy Processing audio with a visual representation of an audio source
KR101349477B1 (ko) * 2011-10-27 2014-01-08 엘지이노텍 주식회사 블루투스 장치 및 그를 이용한 통화품질 개선 방법
US9112986B2 (en) * 2012-06-08 2015-08-18 Apple Inc. Supplemental audio signal processing for a bluetooth audio link
CN106332132B (zh) * 2015-07-03 2021-05-04 中兴通讯股份有限公司 一种自适应式蓝牙性能调节的通讯终端及方法
CN105827849A (zh) * 2016-04-28 2016-08-03 维沃移动通信有限公司 一种音效调节方法及移动终端
CN205754811U (zh) * 2016-05-12 2016-11-30 惠州Tcl移动通信有限公司 移动终端及其音频处理系统
CN106936987B (zh) * 2017-02-24 2019-12-20 田力 一种可识别蓝牙耳机语音来源的方法及设备
CN110493751A (zh) * 2019-08-12 2019-11-22 深圳市尼欧科技有限公司 基于语音识别技术接打电话的方法及车载电子装置
CN112911566B (zh) * 2019-12-25 2022-06-07 华为终端有限公司 蓝牙通信方法和装置

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102014224883A1 (de) * 2014-12-04 2016-06-09 Sennheiser Electronic Gmbh & Co. Kg Verfahren zur drahtlosen Übertragung von Audiosignalen basierend auf dem Bluetooth-Standard und Drahtlos-Mikrofoneinheit
CN106792449A (zh) * 2016-12-15 2017-05-31 北京塞宾科技有限公司 一种基于蓝牙音频的网络直播方法
CN107040832A (zh) * 2017-04-22 2017-08-11 广州市比丽普电子有限公司 一种基于蓝牙技术的手持终端式麦克风系统
CN110662207A (zh) * 2018-07-01 2020-01-07 张德明 一种基于蓝牙的高质量音乐及语音传输操作方法
EP3629561A1 (en) * 2018-09-30 2020-04-01 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Data transmission method and system, and bluetooth headphone
CN111370012A (zh) * 2020-05-27 2020-07-03 北京小米移动软件有限公司 一种蓝牙语音音频采集方法及系统
CN113794797A (zh) * 2021-06-16 2021-12-14 荣耀终端有限公司 终端设备通过蓝牙外设拾音的方法及终端设备

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP4135302A4 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116828102A (zh) * 2023-08-29 2023-09-29 荣耀终端有限公司 录音方法、设备及存储介质
CN116828102B (zh) * 2023-08-29 2023-11-21 荣耀终端有限公司 录音方法、设备及存储介质

Also Published As

Publication number Publication date
US20230370541A1 (en) 2023-11-16
EP4135302A4 (en) 2023-08-30
CN113794797A (zh) 2021-12-14
EP4135302A1 (en) 2023-02-15
CN113794797B (zh) 2022-08-26
MX2022010408A (es) 2023-01-24

Similar Documents

Publication Publication Date Title
WO2022262262A1 (zh) 终端设备通过蓝牙外设拾音的方法及终端设备
CN112789867B (zh) 一种蓝牙连接方法及设备
CN112313929B (zh) 一种自动切换蓝牙音频编码方式的方法及电子设备
WO2020133183A1 (zh) 音频数据的同步方法及设备
US12047760B2 (en) Bluetooth communication method and apparatus
WO2021180083A1 (zh) 蓝牙通信系统和无线通信系统
CN114499587B (zh) 音频同步的通信方法、系统、无线耳机、终端及存储介质
CN113039822B (zh) 一种数据信道的建立方法及设备
CN114466097A (zh) 防漏音的移动终端及移动终端的声音输出方法
WO2022135303A1 (zh) 一种tws耳机连接方法及设备
WO2022213689A1 (zh) 一种音频设备间语音互通的方法及设备
CN113727231B (zh) 一种耳机音量调节方法及其设备
CN115167802A (zh) 一种音频切换播放方法及电子设备
CN109618062B (zh) 语音交互方法、装置、设备以及计算机可读存储介质
CN114125352A (zh) 屏幕共享方法、电子设备及系统
WO2023160214A1 (zh) 蓝牙耳机、音频输出方法及音频输出系统
CN114980238B (zh) Wi-Fi接入的方法及相关设备
CN115733921B (zh) Tws耳机解耦分享方法、装置、设备、存储介质及程序产品
CN117917899A (zh) 一种音频业务处理方法、电子设备及计算机存储介质
CN117956332A (zh) 耳机模式的切换方法、耳机及计算机可读存储介质
CN114885440A (zh) 多个音频设备间语音通话的方法、电子设备及存储介质

Legal Events

Date Code Title Description
ENP Entry into the national phase

Ref document number: 2022737696

Country of ref document: EP

Effective date: 20220720

NENP Non-entry into the national phase

Ref country code: DE