CN116320880B - Audio processing method and device - Google Patents
Audio processing method and device Download PDFInfo
- Publication number
- CN116320880B CN116320880B CN202310593705.8A CN202310593705A CN116320880B CN 116320880 B CN116320880 B CN 116320880B CN 202310593705 A CN202310593705 A CN 202310593705A CN 116320880 B CN116320880 B CN 116320880B
- Authority
- CN
- China
- Prior art keywords
- earphone
- terminal device
- user
- head
- amplitude
- Prior art date
- Legal status (The legal status 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 status listed.)
- Active
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2201/00—Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
- H04R2201/10—Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups
Landscapes
- Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Acoustics & Sound (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
Abstract
The application provides an audio processing method and device, which can reduce the hardware requirement on headphones. The method is applied to a system comprising a terminal device, a first earphone and a second earphone, wherein the terminal device is in a connection state with the first earphone and the second earphone, and the terminal device plays audio for a user through the first earphone and the second earphone, and the method comprises the following steps: transmitting an ultrasonic signal through a speaker or microphone; determining a distance parameter and a deflection angle parameter of the head of the user relative to the terminal device based on at least one of a first time, a first phase or a first amplitude of the ultrasonic signal received by the first earphone and at least one of a second time, a second phase or a second amplitude of the ultrasonic signal received by the second earphone; determining a target position of a sound field of the audio based on the distance parameter and the deflection angle parameter; and adjusting the position of the sound field of the audio to the target position.
Description
Technical Field
The present application relates to the field of terminal technologies, and in particular, to an audio processing method and apparatus.
Background
In the case where the user plays audio by connecting the terminal device through the headphones, the terminal device may cause the sound field of the audio played through the headphones to accompany the movement of the user's head according to the relative distance of the user's head with respect to the terminal device and the deflection angle of the user's head.
Specifically, a gyroscope and an inertial measurement unit (inertial measurement unit, IMU) are arranged in the earphone, and a head tracking algorithm and a sound effect algorithm are arranged in the terminal equipment. When a user plays audio through the earphone connection terminal equipment, the terminal equipment can determine the relative distance parameter and deflection angle parameter of the head of the user relative to the terminal equipment by inputting detection data of a gyroscope and an IMU in the earphone to a head tracking algorithm; then, the terminal equipment can adjust the sound field of the audio through inputting the relative distance parameter and the deflection angle parameter of the head of the user relative to the terminal equipment into the sound effect algorithm, so that the sound field of the audio can move along with the movement of the head of the user, and the user has good sound effect experience.
However, such audio processing methods have high sensitivity requirements for hardware in the headphones.
Disclosure of Invention
The application provides an audio processing method and device, which can reduce the requirement on earphone hardware.
In a first aspect, an audio processing method is provided, which is applied to a system including a terminal device, a first earphone and a second earphone, where the terminal device is in a connection state with the first earphone and the second earphone, and the terminal device plays audio for a user through the first earphone and the second earphone, and the method includes: the terminal equipment sends ultrasonic signals through a loudspeaker or a microphone; the terminal equipment determines a distance parameter and a deflection angle parameter of the head of the user relative to the terminal equipment based on at least one of a first moment, a first phase or a first amplitude of the ultrasonic signal received by the first earphone and at least one of a second moment, a second phase or a second amplitude of the ultrasonic signal received by the second earphone; the terminal equipment determines the target position of the sound field of the audio based on the distance parameter and the deflection angle parameter; the terminal device adjusts the position of the sound field of the audio to the target position.
According to the audio processing method, the terminal equipment continuously transmits the ultrasonic signals, the first earphone and the second earphone receive the ultrasonic signals from the terminal equipment, the terminal equipment determines the distance parameter and the deflection angle parameter of the head of the user relative to the terminal equipment according to at least one of the moment, the phase or the amplitude of the ultrasonic signals received by the first earphone and at least one of the moment, the phase or the amplitude of the ultrasonic signals received by the second earphone, so that the terminal equipment determines the target position of the sound field of the audio according to the distance parameter and the deflection angle parameter, adjusts the position of the sound field of the audio to the target position, enables the sound field of the audio to move along with the movement of the head of the user, provides good sound effect experience for the user all the time through the first earphone and the second earphone, and does not need to determine the distance parameter and the deflection angle parameter of the head of the user relative to the terminal equipment through a gyroscope and an IMU in the earphone, and the hardware requirements of the audio processing method for the earphone are reduced.
It is understood that an ultrasonic signal, alternatively referred to as ultrasound, is an acoustic wave having a frequency above 20000 hertz (Hz). The terminal device may emit ultrasonic signals through a speaker or microphone. Correspondingly, when the terminal equipment sends out an ultrasonic signal, the first earphone can receive the ultrasonic signal through a microphone of the first earphone; the second earpiece may receive the ultrasonic signal via a microphone of the second earpiece. The amplitude may also be an amplitude. The first earphone and the second earphone are located at different positions, the time, the phase and the amplitude of the ultrasonic signal received by the first earphone from the terminal device and the ultrasonic signal received by the second earphone from the terminal device may be different, and the difference between the first time, the first phase or the first amplitude of the ultrasonic signal received by the first earphone and the second time, the second phase or the second amplitude of the ultrasonic signal received by the second earphone may be different according to the difference of the distance and the angle of the head of the user relative to the terminal device. Thus, the terminal device may determine the distance parameter and the deflection angle parameter of the head of the user with respect to the terminal device based on the difference between the first moment, the first phase or the first amplitude of the ultrasonic signal received by the first earpiece and the second moment, the second phase or the second amplitude of the ultrasonic signal received by the second earpiece. In order to make the sound field of the audio move along with the movement of the head of the user, under the condition that the head of the user moves, the sound field of the audio also needs to move along with the head of the user, so that the position of the sound field of the audio is more matched with the position of the head of the user, and the user experience is improved.
In certain implementations of the first aspect, the determining a distance parameter and a deflection angle parameter of the user's head with respect to the terminal device includes: the terminal equipment obtains at least one of a time difference, a phase difference or an amplitude difference between an ultrasonic signal received by the first earphone and an ultrasonic signal received by the second earphone based on at least one of the first time, the first phase or the first amplitude and at least one of the second time, the second phase or the second amplitude; the terminal device obtains the distance parameter and the deflection angle parameter based on at least one of the time difference, the phase difference or the amplitude difference.
It should be understood that in the case that the distance between the first earphone and the terminal device is different from the distance between the second earphone and the terminal device, the time and the phase of receiving the ultrasonic signals by the first earphone and the second earphone are different; meanwhile, the first earphone and the second earphone receive ultrasonic signals with different amplitudes because the attenuation of the ultrasonic signals received by the first earphone and the attenuation of the ultrasonic signals received by the second earphone are different. According to the time difference, the phase difference or the amplitude difference between the ultrasonic signals received by the first earphone and the ultrasonic signals received by the second earphone, the terminal device can determine the distance parameter and the deflection angle parameter of the head of the user relative to the terminal device.
In certain implementations of the first aspect, the distance parameter includes a distance parameter of the user's head in a left-right direction relative to the terminal device, a distance parameter of the user's head in an up-down direction relative to the terminal device, and a distance parameter of the user's head in a front-back direction relative to the terminal device.
It should be understood that the left-right direction, the up-down direction, and the front-back direction are all directions based on the head of the user. Based on the distances in the three directions, the terminal device can determine the position of the user's head.
In certain implementations of the first aspect, the yaw angle parameter includes a yaw angle parameter of the user's head with respect to the terminal device in a left-right direction of the user's head, a yaw angle parameter of the user's head with respect to the terminal device in an up-down direction of the user's head, and a yaw angle parameter of the user's head with respect to the terminal device in a front-back direction of the user's head.
It should be understood that the yaw angle parameter of the user's head with respect to the terminal device in the left-right direction of the user's head may refer to the angle of rotation of the user's head with respect to the terminal device about the front-rear direction; the deflection angle parameter of the user's head with respect to the terminal device in the up-down direction of the user's head may refer to an angle of rotation of the user's head with respect to the terminal device about the left-right direction; the yaw angle parameter of the user's head with respect to the terminal device in the front-rear direction of the user's head may refer to an angle of rotation of the user's head with respect to the terminal device about an up-down direction.
In certain implementations of the first aspect, the ultrasound signal includes identification information of the terminal device.
It should be understood that the identification information of the terminal device may be at least one of a preset time, phase or amplitude. In this way, in the case where the first earphone or the second earphone receives the ultrasonic signal including at least one of the preset time, phase or amplitude, it is possible to determine that the ultrasonic signal is transmitted for the terminal device according to the preset frequency or amplitude, so that the first earphone and the second earphone can determine the ultrasonic signal transmitted by the terminal device in a connected state with the first earphone and the second earphone even if the plurality of devices simultaneously transmit the ultrasonic signal. In another possible implementation manner, the ultrasonic signal sent by the terminal device carries the identification information of the terminal device. For example, the identification information of the terminal device may be information of a device model number, an ID, and the like of the terminal device. Thus, after the first earphone and the second earphone receive the ultrasonic signals, the first earphone and the second earphone can determine the source of the received ultrasonic signals according to the information carried by the ultrasonic signals, namely, whether the ultrasonic signals are the ultrasonic signals sent by the terminal equipment in a connection state with the first earphone and the second earphone or not is determined.
In certain implementations of the first aspect, the terminal device sends the ultrasonic signal through a speaker or a microphone, including: and under the condition that the head tracking switch is in an on state, the terminal equipment sends an ultrasonic signal through the loudspeaker or the microphone.
It will be appreciated that the head tracking switch may be used to control whether the terminal device transmits an ultrasound signal. For example, if the head tracking switch is in an on state, the terminal device transmits an ultrasonic signal through a speaker or a microphone; if the head tracking switch is in a closed state, the terminal equipment does not send ultrasonic signals. In this way, it is convenient for the user to select whether the terminal device transmits an ultrasonic signal.
In certain implementations of the first aspect, the method further comprises: the terminal equipment displays a first interface, wherein the first interface comprises a selection button of the head tracking switch; the state of the head tracking switch is set to an on state or an off state based on a selection operation by a user.
It should be understood that the first interface may set an interface for a system of the terminal device; the interface can also be set for the sound effect in the setting interface in the application program; the interface of the terminal equipment can also be a downslide notification bar interface, an interface of a pull-up control center and the like.
In certain implementations of the first aspect, the first earpiece and the second earpiece are real wireless stereo TWS earpieces or wired earpieces.
It should be understood that, in the case where the first earphone and the second earphone are wired earphones, the first earphone transmits at least one of a first time, a first phase or a first amplitude of the ultrasonic signal received by the first earphone to the terminal device through a connection line connected to the first earphone; the second earphone transmits at least one of a second time, a second phase or a second amplitude of the ultrasonic signal received by the second earphone to the terminal device through a connection line connected with the second earphone. In the case that the first earphone and the second earphone are TWS earphones, assuming that the first earphone is a main earphone and the second earphone is an auxiliary earphone, the second earphone transmits at least one of a second time, a second phase or a second amplitude of an ultrasonic signal received by the second earphone from the terminal device to the first earphone; the first earpiece transmits at least one of a first time, a first phase, or a first amplitude of the ultrasonic signal received by the first earpiece, and at least one of a second time, a second phase, or a second amplitude of the ultrasonic signal received by the second earpiece to the terminal device.
In a second aspect, another audio processing method is provided and applied to a system including a terminal device, a first earphone and a second earphone, where the terminal device is in a connection state with the first earphone and the second earphone, and the terminal device plays audio for a user through the first earphone and the second earphone, and the method includes: the first earphone receives ultrasonic signals from the terminal equipment through a microphone; the first earphone receives at least one of a second moment, a second phase or a second amplitude of an ultrasonic signal from the second earphone, wherein the ultrasonic signal from the second earphone is an ultrasonic signal from the terminal device received by the second earphone through a microphone; the first earphone determines a distance parameter and a deflection angle parameter of the head of the user relative to the terminal device based on at least one of a first time, a first phase or a first amplitude of the ultrasonic signal received by the first earphone and at least one of the second time, the second phase or the second amplitude of the ultrasonic signal received by the second earphone; the first earphone sends the distance parameter and the deflection angle parameter to the terminal equipment; the first earphone receives the adjusted audio data from the terminal device.
In certain implementations of the second aspect, the determining a distance parameter and a deflection angle parameter of the user's head with respect to the terminal device includes: the first earphone obtains at least one of a time difference, a phase difference or an amplitude difference between an ultrasonic signal received by the first earphone and an ultrasonic signal received by the second earphone based on at least one of the first time, the first phase or the first amplitude and at least one of the second time, the second phase or the second amplitude; the first earphone obtains the distance parameter and the deflection angle parameter based on at least one of the time difference, the phase difference, or the amplitude difference.
In certain implementations of the second aspect, the distance parameter includes a distance parameter of the user's head in a left-right direction relative to the terminal device, a distance parameter of the user's head in an up-down direction relative to the terminal device, and a distance parameter of the user's head in a front-back direction relative to the terminal device.
In certain implementations of the second aspect, the yaw angle parameter includes a yaw angle parameter of the user's head with respect to the terminal device in a left-right direction of the user's head, a yaw angle parameter of the user's head with respect to the terminal device in an up-down direction of the user's head, and a yaw angle parameter of the user's head with respect to the terminal device in a front-back direction of the user's head.
In certain implementations of the second aspect, the ultrasound signal includes identification information of the terminal device.
In certain implementations of the second aspect, the first earpiece and the second earpiece are real wireless stereo TWS earpieces, the first earpiece being a primary earpiece and the second earpiece being a secondary earpiece; the method further comprises the steps of: the main earphone sends the adjusted audio data to the auxiliary earphone.
In a third aspect, an audio processing apparatus is provided for performing the method in any one of the possible implementations of the above aspects. In particular, the apparatus comprises means for performing the method in any one of the possible implementations of the aspects described above.
In a fourth aspect, the application provides a further audio processing apparatus comprising a processor coupled to a memory, operable to execute instructions in the memory to implement a method in any of the possible implementations of the aspects described above. Optionally, the apparatus further comprises a memory. Optionally, the apparatus further comprises a communication interface, the processor being coupled to the communication interface.
In one implementation, the apparatus is a terminal device. When the apparatus is a terminal device, the communication interface may be a transceiver, or an input/output interface.
In another implementation, the apparatus is a chip configured in a terminal device. When the apparatus is a chip configured in a terminal device, the communication interface may be an input/output interface.
In one implementation, the device is a first earpiece. When the device is a first earphone, the communication interface may be a transceiver, or an input/output interface.
In another implementation, the apparatus is a chip configured in the first earpiece. When the device is a chip configured in the first earphone, the communication interface may be an input/output interface.
In a fifth aspect, there is provided a processor comprising: input circuit, output circuit and processing circuit. The processing circuitry is configured to receive signals via the input circuitry and to transmit signals via the output circuitry such that the processor performs the method of any one of the possible implementations of the aspects described above.
In a specific implementation flow, the processor may be a chip, the input circuit may be an input pin, the output circuit may be an output pin, and the processing circuit may be a transistor, a gate circuit, a trigger, various logic circuits, and the like. The input signal received by the input circuit may be received and input by, for example and without limitation, a receiver, the output signal may be output by, for example and without limitation, a transmitter and transmitted by a transmitter, and the input circuit and the output circuit may be the same circuit, which functions as the input circuit and the output circuit, respectively, at different times. The embodiment of the application does not limit the specific implementation modes of the processor and various circuits.
In a sixth aspect, a processing device is provided that includes a processor and a memory. The processor is configured to read instructions stored in the memory and to receive signals via the receiver and to transmit signals via the transmitter to perform the method of any one of the possible implementations of the aspects described above.
Optionally, the processor is one or more, and the memory is one or more.
Alternatively, the memory may be integrated with the processor or the memory may be separate from the processor.
In a specific implementation process, the memory may be a non-transient (non-transitory) memory, for example, a Read Only Memory (ROM), which may be integrated on the same chip as the processor, or may be separately disposed on different chips.
It should be appreciated that the related data interaction flow may be, for example, a flow of sending indication information from a processor, and the receiving capability information may be a flow of receiving input capability information by the processor. Specifically, the data output by the processing may be output to the transmitter, and the input data received by the processor may be from the receiver. Wherein the transmitter and receiver may be collectively referred to as a transceiver.
The processing means in the sixth aspect may be a chip, and the processor may be implemented by hardware or software, and when implemented by hardware, the processor may be a logic circuit, an integrated circuit, or the like; when implemented in software, the processor may be a general-purpose processor, implemented by reading software code stored in a memory, which may be integrated in the processor, or may reside outside the processor, and exist separately.
In a seventh aspect, there is provided a computer program product comprising: a computer program (which may also be referred to as code, or instructions) which, when executed, causes a computer to perform the method in any one of the possible implementations of the aspects described above.
In an eighth aspect, a computer-readable storage medium is provided, which stores a computer program (which may also be referred to as code, or instructions) that, when run on a computer, causes the computer to perform the method in any one of the possible implementations of the aspects.
Drawings
Fig. 1 is a schematic structural diagram of a terminal device according to an embodiment of the present application;
Fig. 2 is a software architecture block diagram of a terminal device according to an embodiment of the present application;
fig. 3 is a schematic diagram of an application scenario provided in an embodiment of the present application;
FIG. 4 is a schematic block diagram of an audio processing system according to an embodiment of the present application;
fig. 5 is a schematic flow chart of an audio processing method according to an embodiment of the present application;
fig. 6 is a schematic diagram illustrating a process for adjusting a sound field of audio according to an embodiment of the present application;
FIG. 7 is a schematic diagram of distance parameters and deflection angle parameters according to an embodiment of the present application;
FIG. 8 is a schematic view of a user's head deflected in a left-right direction according to an embodiment of the present application;
fig. 9 is an interface schematic diagram of displaying a first interface by a terminal device according to an embodiment of the present application;
fig. 10 is a schematic process diagram of an audio processing method according to an embodiment of the present application;
FIG. 11 is a flowchart illustrating another audio processing method according to an embodiment of the present application;
FIG. 12 is a schematic diagram illustrating another audio processing method according to an embodiment of the present application;
fig. 13 is a schematic block diagram of an audio processing apparatus according to an embodiment of the present application;
fig. 14 is a schematic block diagram of another audio processing apparatus according to an embodiment of the present application.
Detailed Description
The technical scheme of the application will be described below with reference to the accompanying drawings.
In embodiments of the present application, the words "first," "second," and the like are used to distinguish between identical or similar items that have substantially the same function and effect. For example, the first value and the second value are merely for distinguishing between different values, and are not limited in order. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
It should be noted that, in the embodiments of the present application, words such as "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
In the embodiments of the present application, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, or c may represent: a, b, c, a-b, a-c, b-c, or a-b-c, wherein a, b, c may be single or plural.
The terminal device provided by the embodiment of the application is a terminal device with a touch display screen, and can be a mobile phone, a tablet personal computer (pad), a desktop computer, a notebook computer and the like. The embodiment of the application does not limit the specific technology and the specific equipment form adopted by the terminal equipment.
In order to better understand the terminal device in the embodiment of the present application, the hardware structure of the terminal device in the embodiment of the present application is described in detail below with reference to fig. 1.
Fig. 1 is a schematic structural diagram of a terminal device 100 according to an embodiment of the present application. As shown in fig. 1, the terminal device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (universal serial bus, USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display 194, a user identification module (subscriber identification module, SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyro sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the terminal device 100. In other embodiments of the application, terminal device 100 may include more or less components than illustrated, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The processor 110 may include one or more processing units, such as: the processor 110 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video codec, a digital signal processor (digital signal processor, DSP), a baseband processor, and/or a neural network processor (neural-network processing unit, NPU), etc. Wherein the different processing units may be separate devices or may be integrated in one or more processors.
The controller can generate operation control signals according to the instruction operation codes and the time sequence signals to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an integrated circuit (inter-integrated circuit, I2C) interface, an integrated circuit built-in audio (inter-integrated circuit sound, I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver transmitter (universal asynchronous receiver/transmitter, UART) interface, a mobile industry processor interface (mobile industry processor interface, MIPI), a general-purpose input/output (GPIO) interface, a subscriber identity module (subscriber identity module, SIM) interface, and/or a universal serial bus (universal serial bus, USB) interface, among others.
The I2C interface is a bi-directional synchronous serial bus comprising a serial data line (SDA) and a serial clock line (derail clock line, SCL). In some embodiments, the processor 110 may contain multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, charger, flash, camera 193, etc., respectively, through different I2C bus interfaces. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the terminal device 100.
The I2S interface may be used for audio communication. In some embodiments, the processor 110 may contain multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 via an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through the I2S interface, to implement a function of answering a call through the bluetooth headset.
PCM interfaces may also be used for audio communication to sample, quantize and encode analog signals. In some embodiments, the audio module 170 and the wireless communication module 160 may be coupled through a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface to implement a function of answering a call through the bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus for asynchronous communications. The bus may be a bi-directional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is typically used to connect the processor 110 with the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit an audio signal to the wireless communication module 160 through a UART interface, to implement a function of playing music through a bluetooth headset.
The MIPI interface may be used to connect the processor 110 to peripheral devices such as a display 194, a camera 193, and the like. The MIPI interfaces include camera serial interfaces (camera serial interface, CSI), display serial interfaces (display serial interface, DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the photographing function of terminal device 100. The processor 110 and the display 194 communicate via a DSI interface to implement the display function of the terminal device 100.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal or as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, an I2S interface, a UART interface, an MIPI interface, etc.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the terminal device 100, or may be used to transfer data between the terminal device 100 and a peripheral device. And can also be used for connecting with a headset, and playing audio through the headset. The interface may also be used to connect other terminal devices, such as AR devices, etc.
It should be understood that the interfacing relationship between the modules illustrated in the embodiment of the present application is only illustrative, and does not constitute a structural limitation of the terminal device 100. In other embodiments of the present application, the terminal device 100 may also use different interfacing manners, or a combination of multiple interfacing manners in the foregoing embodiments.
The charge management module 140 is configured to receive a charge input from a charger. The charger can be a wireless charger or a wired charger. In some wired charging embodiments, the charge management module 140 may receive a charging input of a wired charger through the USB interface 130. In some wireless charging embodiments, the charge management module 140 may receive wireless charging input through a wireless charging coil of the terminal device 100. The charging management module 140 may also supply power to the terminal device through the power management module 141 while charging the battery 142.
The power management module 141 is used for connecting the battery 142, and the charge management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 to power the processor 110, the internal memory 121, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be configured to monitor battery capacity, battery cycle number, battery health (leakage, impedance) and other parameters. In other embodiments, the power management module 141 may also be provided in the processor 110. In other embodiments, the power management module 141 and the charge management module 140 may be disposed in the same device.
The wireless communication function of the terminal device 100 can be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the terminal device 100 may be used to cover a single or multiple communication bands. Different antennas may also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed into a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including 2G/3G/4G/5G wireless communication applied to the terminal device 100. The mobile communication module 150 may include at least one filter, switch, power amplifier, low noise amplifier (low noise amplifier, LNA), etc. The mobile communication module 150 may receive electromagnetic waves from the antenna 1, perform processes such as filtering, amplifying, and the like on the received electromagnetic waves, and transmit the processed electromagnetic waves to the modem processor for demodulation. The mobile communication module 150 can amplify the signal modulated by the modem processor, and convert the signal into electromagnetic waves through the antenna 1 to radiate. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be provided in the same device as at least some of the modules of the processor 110.
The 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 for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low frequency baseband signal to the baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs sound signals through an audio device (not limited to the speaker 170A, the receiver 170B, etc.), or displays images or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional module, independent of the processor 110.
The wireless communication module 160 may provide solutions for wireless communication including wireless local area network (wireless local area networks, WLAN) (e.g., wireless fidelity (wireless fidelity, wi-Fi) network), bluetooth (BT), global navigation satellite system (global navigation satellite system, GNSS), frequency modulation (frequency modulation, FM), near field wireless communication technology (near field communication, NFC), infrared technology (IR), etc., applied to the terminal device 100. The wireless communication module 160 may be one or more devices that integrate at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, modulates the electromagnetic wave signals, filters the electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, frequency modulate it, amplify it, and convert it to electromagnetic waves for radiation via the antenna 2.
In some embodiments, antenna 1 and mobile communication module 150 of terminal device 100 are coupled, and antenna 2 and wireless communication module 160 are coupled, such that terminal device 100 may communicate with a network and other devices via wireless communication techniques. The wireless communication techniques may include the Global System for Mobile communications (global system for mobile communications, GSM), general packet radio service (general packet radio service, GPRS), code division multiple access (code division multiple access, CDMA), wideband code division multiple access (wideband code division multiple access, WCDMA), time division code division multiple access (time-division code division multiple access, TD-SCDMA), long term evolution (long term evolution, LTE), BT, GNSS, WLAN, NFC, FM, and/or IR techniques, among others. The GNSS may include a global satellite positioning system (global positioning system, GPS), a global navigation satellite system (global navigation satellite system, GLONASS), a beidou satellite navigation system (beidou navigation satellite system, BDS), a quasi zenith satellite system (quasi-zenith satellite system, QZSS) and/or a satellite based augmentation system (satellite based augmentation systems, SBAS).
The terminal device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (flex), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the terminal device 100 may include 1 or N display screens 194, N being a positive integer greater than 1.
The terminal device 100 may implement a photographing function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, an application processor, and the like.
The ISP is used to process data fed back by the camera 193. For example, when photographing, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, the optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and is converted into an image visible to naked eyes. ISP can also optimize the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in the camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image onto the photosensitive element. The photosensitive element may be a charge coupled device (charge coupled device, CCD) or a Complementary Metal Oxide Semiconductor (CMOS) phototransistor. The photosensitive element converts the optical signal into an electrical signal, which is then transferred to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV, or the like format. In some embodiments, the terminal device 100 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process other digital signals besides digital image signals. For example, when the terminal device 100 selects a frequency bin, the digital signal processor is used to fourier transform the frequency bin energy, or the like.
Video codecs are used to compress or decompress digital video. The terminal device 100 may support one or more video codecs. In this way, the terminal device 100 can play or record video in various encoding formats, for example: dynamic picture experts group (moving picture experts group, MPEG) 1, MPEG2, MPEG3, MPEG4, etc.
The NPU is a neural-network (NN) computing processor, and can rapidly process input information by referencing a biological neural network structure, for example, referencing a transmission mode between human brain neurons, and can also continuously perform self-learning. Applications such as intelligent awareness of the terminal device 100 may be implemented by the NPU, for example: image recognition, face recognition, speech recognition, text understanding, etc.
The external memory interface 120 may be used to connect an external memory card, such as a Micro SD card, to realize expansion of the memory capability of the terminal device 100. The external memory card communicates with the processor 110 through an external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are stored in an external memory card.
The internal memory 121 may be used to store computer executable program code including instructions. The internal memory 121 may include a storage program area and a storage data area. The storage program area may store an application program (such as a sound playing function, an image playing function, etc.) required for at least one function of the operating system, etc. The storage data area may store data (such as audio data, phonebook, etc.) created during use of the terminal device 100, and the like. In addition, the internal memory 121 may include a high-speed random access memory, and may further include a nonvolatile memory such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like. The processor 110 performs various functional applications of the terminal device 100 and data processing by executing instructions stored in the internal memory 121 and/or instructions stored in a memory provided in the processor.
The terminal device 100 may implement audio functions through an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, an application processor, and the like. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into an analog audio signal output and also to convert an analog audio input into a digital audio signal. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or a portion of the functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also referred to as a "horn," is used to convert audio electrical signals into sound signals. The terminal device 100 can listen to music or to handsfree talk through the speaker 170A.
A receiver 170B, also referred to as a "earpiece", is used to convert the audio electrical signal into a sound signal. When the terminal device 100 receives a call or voice message, it is possible to receive voice by approaching the receiver 170B to the human ear.
Microphone 170C, also referred to as a "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can sound near the microphone 170C through the mouth, inputting a sound signal to the microphone 170C. The terminal device 100 may be provided with at least one microphone 170C. In other embodiments, the terminal device 100 may be provided with two microphones 170C, and may implement a noise reduction function in addition to collecting sound signals. In other embodiments, the terminal device 100 may be further provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, implement directional recording functions, etc.
The earphone interface 170D is used to connect a wired earphone. The earphone interface 170D may be a USB interface 130 or a 3.5mm open mobile terminal platform (open mobile terminal platform, OMTP) standard interface, a american cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used to sense a pressure signal, and may convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A is of various types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a capacitive pressure sensor comprising at least two parallel plates with conductive material. The capacitance between the electrodes changes when a force is applied to the pressure sensor 180A. The terminal device 100 determines the intensity of the pressure according to the change of the capacitance. When a touch operation is applied to the display 194, the terminal device 100 detects the intensity of the touch operation according to the pressure sensor 180A. The terminal device 100 may also calculate the position of the touch from the detection signal of the pressure sensor 180A. In some embodiments, touch operations that act on the same touch location, but at different touch operation strengths, may correspond to different operation instructions. For example: and executing an instruction for checking the short message when the touch operation with the touch operation intensity smaller than the first pressure threshold acts on the short message application icon. And executing an instruction for newly creating the short message when the touch operation with the touch operation intensity being greater than or equal to the first pressure threshold acts on the short message application icon.
The gyro sensor 180B may be used to determine a motion gesture of the terminal device 100. In some embodiments, the angular velocity of the terminal device 100 about three axes (i.e., x, y, and z axes) may be determined by the gyro sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects the angle of shake of the terminal apparatus 100, calculates the distance to be compensated for by the lens module according to the angle, and allows the lens to counteract the shake of the terminal apparatus 100 by the reverse movement, thereby realizing anti-shake. The gyro sensor 180B may also be used for navigating, somatosensory game scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the terminal device 100 calculates altitude from barometric pressure values measured by the barometric pressure sensor 180C, aiding in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The terminal device 100 can detect the opening and closing of the flip cover using the magnetic sensor 180D. In some embodiments, when the terminal device 100 is a folder, the terminal device 100 may detect opening and closing of the folder according to the magnetic sensor 180D. And then according to the detected opening and closing state of the leather sheath or the opening and closing state of the flip, the characteristics of automatic unlocking of the flip and the like are set.
The acceleration sensor 180E can detect the magnitude of acceleration of the terminal device 100 in various directions (typically three axes). The magnitude and direction of gravity may be detected when the terminal device 100 is stationary. The method can also be used for identifying the gesture of the terminal equipment, and is applied to the applications such as horizontal and vertical screen switching, pedometers and the like.
A distance sensor 180F for measuring a distance. The terminal device 100 may measure the distance by infrared or laser. In some embodiments, the terminal device 100 may range using the distance sensor 180F to achieve fast focusing.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The terminal device 100 emits infrared light outward through the light emitting diode. The terminal device 100 detects infrared reflected light from a nearby object using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object in the vicinity of the terminal device 100. When insufficient reflected light is detected, the terminal device 100 may determine that there is no object in the vicinity of the terminal device 100. The terminal device 100 can detect that the user holds the terminal device 100 close to the ear to talk by using the proximity light sensor 180G, so as to automatically extinguish the screen for the purpose of saving power. The proximity light sensor 180G may also be used in holster mode, pocket mode to automatically unlock and lock the screen.
The ambient light sensor 180L is used to sense ambient light level. The terminal device 100 may adaptively adjust the brightness of the display 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust white balance when taking a photograph. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the terminal device 100 is in a pocket to prevent false touches.
The fingerprint sensor 180H is used to collect a fingerprint. The terminal device 100 can utilize the collected fingerprint characteristics to realize fingerprint unlocking, access an application lock, fingerprint photographing, fingerprint incoming call answering and the like.
The temperature sensor 180J is for detecting temperature. In some embodiments, the terminal device 100 performs a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the terminal device 100 performs a reduction in the performance of a processor located near the temperature sensor 180J in order to reduce power consumption to implement thermal protection. In other embodiments, when the temperature is below another threshold, the terminal device 100 heats the battery 142 to avoid the low temperature causing the terminal device 100 to shut down abnormally. In other embodiments, when the temperature is below a further threshold, the terminal device 100 performs boosting of the output voltage of the battery 142 to avoid abnormal shutdown caused by low temperatures.
The touch sensor 180K, also referred to as a "touch device". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is for detecting a touch operation acting thereon or thereabout. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output related to touch operations may be provided through the display 194. In other embodiments, the touch sensor 180K may also be disposed on the surface of the terminal device 100 at a different location than the display 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, bone conduction sensor 180M may acquire a vibration signal of a human vocal tract vibrating bone pieces. The bone conduction sensor 180M may also contact the pulse of the human body to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, in combination with an osteoinductive headset. The audio module 170 may analyze the voice signal based on the vibration signal of the sound portion vibration bone block obtained by the bone conduction sensor 180M, so as to implement a voice function. The application processor may analyze the heart rate information based on the blood pressure beat signal acquired by the bone conduction sensor 180M, so as to implement a heart rate detection function.
The keys 190 include a power-on key, a volume key, etc. The keys 190 may be mechanical keys. Or may be a touch key. The terminal device 100 may receive key inputs, generating key signal inputs related to user settings and function controls of the terminal device 100.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration alerting as well as for touch vibration feedback. For example, touch operations acting on different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also correspond to different vibration feedback effects by touching different areas of the display screen 194. Different application scenarios (such as time reminding, receiving information, alarm clock, game, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
The indicator 192 may be an indicator light, may be used to indicate a state of charge, a change in charge, a message indicating a missed call, a notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card may be contacted and separated from the terminal apparatus 100 by being inserted into the SIM card interface 195 or by being withdrawn from the SIM card interface 195. The terminal device 100 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support Nano SIM cards, micro SIM cards, and the like. The same SIM card interface 195 may be used to insert multiple cards simultaneously. The types of the plurality of cards may be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The terminal device 100 interacts with the network through the SIM card to realize functions such as call and data communication. In some embodiments, the terminal device 100 employs esims, namely: an embedded SIM card. The eSIM card can be embedded in the terminal device 100 and cannot be separated from the terminal device 100. The software system of the terminal device 100 may employ a layered architecture, an event driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the application, taking an Android system with a layered architecture as an example, a software structure of the terminal device 100 is illustrated.
Fig. 2 is a software configuration block diagram of the terminal device 100 according to the embodiment of the present application.
The layered architecture divides the software into several layers, each with distinct roles and branches. The layers communicate with each other through a software interface. In some embodiments, the Android system is divided into four layers, from top to bottom, an application layer, an application framework layer, an Zhuoyun row (Android run) and system libraries, and a kernel layer, respectively.
The application layer may include a series of application packages. As shown in fig. 2, the application package may include applications for cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, etc.
The application framework layer provides an application programming interface (application programming interface, API) and programming framework for application programs of the application layer. The application framework layer includes a number of predefined functions. As shown in FIG. 2, the application framework layer may include a window manager, a content provider, a view system, a telephony manager, a resource manager, a notification manager, and the like.
The window manager is used for managing window programs. The window manager can acquire the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make such data accessible to applications. The data may include video, images, audio, calls made and received, browsing history and bookmarks, phonebooks, etc.
The view system includes visual controls, such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, a display interface including a text message notification icon may include a view displaying text and a view displaying a picture.
The telephony manager is used to provide the communication functions of the terminal device 100. Such as the management of call status (including on, hung-up, etc.).
The resource manager provides various resources for the application program, such as localization strings, icons, pictures, layout files, video files, and the like.
The notification manager allows the application to display notification information in a status bar, can be used to communicate notification type messages, can automatically disappear after a short dwell, and does not require user interaction. Such as notification manager is used to inform that the download is complete, message alerts, etc. The notification manager may also be a notification in the form of a chart or scroll bar text that appears on the system top status bar, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, a text message is prompted in a status bar, a prompt tone is emitted, the terminal equipment vibrates, and an indicator light blinks.
Android run time includes a core library and virtual machines. Android run time is responsible for scheduling and management of the Android system.
The core library consists of two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application program layer and the application program framework layer as binary files. The virtual machine is used for executing the functions of object life cycle management, stack management, thread management, security and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface manager (surface manager), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), etc.
The surface manager is used to manage the display subsystem and provides a fusion of 2D and 3D layers for multiple applications.
Media libraries support a variety of commonly used audio, video format playback and recording, still image files, and the like. The media library may support a variety of audio and video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, etc.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The kernel layer is used for driving the hardware so that the hardware works. The kernel layer at least includes display driver, screen driver, image processor (graphics processing unit, GPU) driver, camera, sensor driver, etc., which is not limited in this embodiment of the application. For example, the screen driver may drive a screen bright or off screen.
In case that the earphone is connected to the terminal device, the terminal device may play audio for the user through the earphone. The terminal equipment can be mobile phones, tablet computers, notebook computers, desktop computers, intelligent watches, televisions and other equipment; the earphone may be a real wireless stereo (true wireless stereo, TWS) earphone, a wired earphone, a headphone, or other various types of earphones, and the specific forms of the terminal device and the earphone are not limited in the embodiments of the present application.
The following describes an application scenario of the embodiment of the present application in detail with reference to fig. 3, which uses a terminal device as a mobile phone and a headset as a TWS headset.
Fig. 3 is a schematic diagram of an application scenario 300 according to an embodiment of the present application. As shown in fig. 3, the TWS headset 301 is connected to the handset 302 via bluetooth. The user can hear the audio of the cellular phone 302 through the TWS earphone 301 while wearing the TWS earphone 301.
At present, in order to provide better sound effect experience for users, along with the movement of the users, the terminal equipment can determine the distance parameters and the angle parameters between the heads of the users and the terminal equipment, so that sound field positioning is performed in real time according to the distance parameters and the angle parameters, audio data are adjusted, and therefore whether the users move or not is ensured, the positions of sound sources perceived by the users are consistent, and good sound effect experience is provided for the users.
The current audio processing method will be described in detail with reference to fig. 4.
Fig. 4 is a schematic block diagram of an audio processing system 400 according to an embodiment of the present application. As shown in fig. 4, the audio processing system includes a terminal device 401 and a headphone 402. The headset 402 includes a gyroscope and an inertial measurement unit (inertial measurement unit, IMU). When the terminal device 401 plays audio for a user through the earphone 402, the gyroscope and the IMU in the earphone send detected gyroscope data and IMU data to the receiving module of the terminal device 401 through the data sending module of the earphone 402. In the case that the headset 402 is a bluetooth headset, the data transmitting module of the headset 402 may transmit the gyroscope data and the IMU data to the head tracking algorithm module of the terminal device 401 through bluetooth; in the case where the headset 402 is a wired headset, the headset 402 may transmit the gyroscope data and IMU data to the head tracking algorithm module of the terminal device 401 through a connection line. The connection line may be used to connect the earphone 402 and the terminal device 401, such as an audio line or the like. The head tracking algorithm module comprises a head tracking algorithm, and the head tracking algorithm is used for calculating distance parameters and angle parameters of the head of the user relative to the terminal equipment according to the gyroscope data and the IMU data. Thus, the head tracking algorithm module may output distance parameters and angle parameters of the user's head with respect to the terminal device. Then, the terminal device inputs the distance parameter and the angle parameter to the sound effect algorithm module. The sound effect algorithm module comprises a sound effect algorithm, and is used for determining a target position of the sound field of the audio according to the distance parameter and the angle parameter, adjusting the audio data according to the target position, and adjusting the position of the sound field of the audio to the target position, so that the position of the adjusted sound field of the audio is more matched with the position of the head of the user, for example, the terminal equipment moves the position of the sound field of the audio along with the movement of the head of the user, so that the sound field of the audio always surrounds the head of the user by taking the head of the user as the center, and the user obtains better experience. Thus, the sound effect algorithm module may output the adjusted audio data and transmit the adjusted audio data to the data receiving module of the earphone 402. The headphones 402 may then play the adjusted audio to the user through the speakers. In the process that the terminal device 401 plays the audio to the user through the earphone 402, the head tracking algorithm module continuously determines the real-time distance parameter and the real-time angle parameter of the head of the user relative to the terminal device, and the sound effect algorithm module continuously adjusts the audio data according to the real-time distance parameter and the real-time angle parameter, so that the terminal device 401 can adjust the position of the sound field of the audio according to the distance and the angle of the head of the user relative to the terminal device 401 in real time along with the movement of the head of the user, the sound field of the audio moves along with the movement of the head of the user, and the user experience is improved.
It will be appreciated that the hardware of the terminal device 401 in the audio processing system 400 may be as shown in fig. 1 and the software may be as shown in fig. 2.
However, the above-mentioned audio processing method requires a headset to deploy a gyroscope and an IMU, and has high sensitivity requirements for the gyroscope and the IMU, so that the above-mentioned audio processing method has high hardware requirements for the headset.
In order to solve the above problems, the present application provides an audio processing method, in which, in a process that a terminal device plays audio to a user through an earphone, the terminal device continuously transmits an ultrasonic signal, the earphone includes a first earphone and a second earphone which respectively receive the ultrasonic signal, the terminal device or the earphone can determine a real-time distance and a real-time deflection angle of a head of the user relative to the terminal device according to at least one of a time, a phase or an amplitude of the ultrasonic signal received by the first earphone and at least one of a time, a phase or an amplitude of the ultrasonic signal received by the second earphone, the terminal device can determine a target position of a sound field of the audio according to the real-time distance and the real-time deflection angle of the head of the user relative to the terminal device, and then the terminal device can adjust audio data, adjust the sound field of the audio to the target position, and transmit the adjusted audio data to the earphone, so that the earphone plays the adjusted audio for the user. Therefore, under the condition that the earphone does not comprise a gyroscope and an IMU, the terminal equipment can also adjust the position of the sound field of the audio in real time according to the real-time distance and the real-time deflection angle of the head of the user relative to the terminal equipment, and the hardware requirement of the audio processing method on the earphone is reduced.
The audio processing method of the present application will be described in detail with reference to fig. 5 to 12. The embodiment of the application shows the audio processing method provided by the application from the perspective of equipment interaction. The specific form and number of the devices shown therein are only examples and should not be construed as limiting the practice of the method provided by the present application in any way. The audio processing method according to the embodiment of the present application will be described in detail below by taking a terminal device and an earphone as an execution body.
It should be understood that the terminal device may be the terminal device itself, or a chip, a chip system or a processor supporting the terminal device to implement an audio processing method, or may be a logic module or software capable of implementing all or part of functions of the terminal device, where a hardware structure of the terminal device may be as shown in fig. 1, and a software structure may be as shown in fig. 2; the earphone may be the earphone itself, a chip system or a processor for supporting the earphone to implement the audio processing method, or a logic module or software for implementing all or part of the earphone functions, which is not particularly limited in the present application.
Fig. 5 is a flowchart of an audio processing method 500 according to an embodiment of the present application. The method 500 is applied to a system including a terminal device, a first earphone and a second earphone, where the terminal device is in a connection state with the first earphone and the second earphone, and the terminal device plays audio for a user through the first earphone and the second earphone. The method 500 includes the steps of:
S501, the terminal device sends an ultrasonic signal through a speaker or a microphone. Correspondingly, the first earphone and the second earphone respectively receive ultrasonic signals from the terminal equipment through the microphone.
It is understood that an ultrasonic signal, alternatively referred to as ultrasound, is an acoustic wave having a frequency above 20000 hertz (Hz). The terminal device may emit ultrasonic signals through a speaker or microphone. Correspondingly, when the terminal equipment sends out an ultrasonic signal, the first earphone can receive the ultrasonic signal through a microphone of the first earphone; the second earpiece may receive the ultrasonic signal via a microphone of the second earpiece. The first earphone and the second earphone may be two earphones in a pair of earphones, and the pair of earphones may be a wired earphone or a bluetooth earphone. Under the condition that the first earphone and the second earphone are Bluetooth earphones, the first earphone and the second earphone are connected to the terminal equipment through Bluetooth; in the case where the first earphone and the second earphone are wired earphones, the first earphone and the second earphone may be connected to the earphone interface 170D of the terminal device through a connection line. The audio of the terminal device playing audio for the user through the first earphone and the second earphone may be any audio, such as audio of music, video, and the like.
After the first earphone and the second earphone respectively transmit the ultrasonic signals, the first earphone and the second earphone need to transmit at least one of the time, the phase and the amplitude of the received ultrasonic signals to the terminal device, and the transmission modes can be divided into the following two cases.
In the first case, the first earphone transmits at least one of a first time, a first phase or a first amplitude of the ultrasonic signal received by the first earphone from the terminal device to the terminal device. Correspondingly, the terminal device receives at least one of a first time, a first phase or a first amplitude of the ultrasonic signal from the terminal device received by the first earpiece from the first earpiece. The second earpiece transmits at least one of a second time, a second phase or a second amplitude of the ultrasonic signal from the terminal device received by the second earpiece to the terminal device. Correspondingly, the terminal device receives at least one of a second time, a second phase or a second amplitude of the ultrasonic signal from the terminal device received by the second earpiece from the second earpiece.
For example, when the first earphone and the second earphone are wired earphones, the first earphone and the second earphone may transmit at least one of a time, a phase or an amplitude of the received ultrasonic signal to the terminal device through the connection lines, respectively.
In the second case, the second earphone transmits at least one of a second time, a second phase or a second amplitude of the ultrasonic signal received by the second earphone from the terminal device to the first earphone. Correspondingly, the first earpiece receives at least one of a second moment, a second phase or a second amplitude of the ultrasonic signal from the terminal device received by the second earpiece from the second earpiece. Then, the first earphone transmits at least one of a first time, a first phase or a first amplitude at which the first earphone receives the ultrasonic signal from the terminal device, and at least one of a second time, a second phase or a second amplitude at which the second earphone receives the ultrasonic signal from the terminal device to the terminal device. Correspondingly, the terminal device receives at least one of the first moment, the first phase or the first amplitude and at least one of the second moment, the second phase or the second amplitude.
It should be understood that the second earphone may send at least one of the second time, the second phase or the second amplitude of the ultrasonic signal received by the second earphone to the first earphone by means of bluetooth or the like, and the data transmission manner between the second earphone and the first earphone is not specifically limited in the present application.
In an exemplary embodiment, in a case where the first earphone and the second earphone are TWS earphones, and the first earphone is a main earphone of the TWS earphones, and the second earphone is a sub-earphone of the TWS earphones, the sub-earphone transmits at least one of a second time, a second phase, or a second amplitude of the received ultrasonic signal from the terminal device to the main earphone, and then the main earphone transmits at least one of a first time, a first phase, or a first amplitude of the ultrasonic signal received by the main earphone, and at least one of a second time, a second phase, or a second amplitude of the ultrasonic signal received by the sub-earphone to the terminal device through bluetooth.
In a possible embodiment, the terminal device periodically transmits an ultrasound signal.
In another possible embodiment, the terminal device continuously transmits the ultrasound signal.
S502, the terminal device receives at least one of a first time, a first phase or a first amplitude and at least one of a second time, a second phase or a second amplitude.
In a possible implementation manner, the first earphone sends at least one of a first time, a first phase or a first amplitude of the ultrasonic signal received by the first earphone to the terminal device; the second earphone transmits the second moment, the second phase or the second amplitude of the ultrasonic signal received by the second earphone to the terminal device. Correspondingly, the terminal device receives at least one of the first moment, the first phase or the first amplitude and at least one of the second moment, the second phase or the second amplitude.
In a possible embodiment, the second earpiece transmits at least one of a second time, a second phase or a second amplitude of the ultrasonic signal received by the second earpiece to the first earpiece. Correspondingly, the first earpiece receives at least one of a second time, a second phase, or a second amplitude. The first earpiece transmits at least one of a first time, a first phase, or a first amplitude, and at least one of a second time, a second phase, or a second amplitude to the terminal device. Correspondingly, the terminal device receives at least one of a first time instant, a first phase or a first amplitude from the first earpiece and at least one of a second time instant, a second phase or a second amplitude.
S503, the terminal equipment determines a distance parameter and a deflection angle parameter of the head of the user relative to the terminal equipment based on at least one of a first moment, a first phase or a first amplitude of the ultrasonic signal received by the first earphone and at least one of a second moment, a second phase or a second amplitude.
It should be understood that the amplitude may also be an amplitude. The first earphone and the second earphone are located at different positions, the time, the phase and the amplitude of the ultrasonic signal received by the first earphone from the terminal device and the ultrasonic signal received by the second earphone from the terminal device may be different, and the difference between the first time, the first phase or the first amplitude of the ultrasonic signal received by the first earphone and the second time, the second phase or the second amplitude of the ultrasonic signal received by the second earphone may be different according to the difference of the distance and the angle of the head of the user relative to the terminal device. Thus, the terminal device may determine the distance parameter and the deflection angle parameter of the head of the user with respect to the terminal device based on the difference between the first moment, the first phase or the first amplitude of the ultrasonic signal received by the first earpiece and the second moment, the second phase or the second amplitude of the ultrasonic signal received by the second earpiece.
S504, the terminal equipment determines the target position of the sound field of the audio based on the distance parameter and the deflection angle parameter.
It should be understood that, in order to make the sound field of the audio move along with the movement of the head of the user, in the case that the head of the user moves, the sound field of the audio also needs to move along with the head of the user, so that the position of the sound field of the audio is more matched with the position of the head of the user, and the user experience is improved. The audio field of the audio is set to be a stereo surround, when the terminal device plays the audio for the user through the earphone, the sound field of the audio surrounds the head of the user with the head of the user as a center, after the head of the user moves, the terminal device determines a target position where the sound field of the audio needs to move according to the position of the head of the user after the head of the user moves, so that after the sound field of the audio moves to the target position, the user can still surround the head of the user with the head of the user as a center, and the user can continue to experience the audio effect of the stereo surround.
S505, the terminal device adjusts the position of the sound field of the audio to the target position.
It should be understood that the process in which the terminal device determines the target position of the sound field of the audio and adjusts the position of the sound field of the audio to the target position may also be referred to as sound field localization.
In a specific example, as shown in fig. 6, the terminal device 601 plays audio to the user through the first earphone 602 and the second earphone 603 worn by the user, and the terminal device 601 continuously emits an ultrasonic signal, and the first earphone 602 and the second earphone 603 receive the ultrasonic signal. It is assumed that the sound field of the audio corresponding to the sound effect when the audio is played is set by the user through the terminal device to be located right above the head of the user. In the process 1, the position of the terminal device 601 is unchanged, the head of the user moves from the initial position to the left side of the head of the user, at this time, the sound field of the audio is still at the initial position, and the sound effect of the audio heard by the user is changed. Then, the terminal device 601 determines a distance parameter and a deflection angle parameter of the head of the user after the movement with respect to the terminal device 601 from a first time, a first phase and a first amplitude at which the first earpiece 602 worn by the user receives the ultrasonic signal from the terminal device 601, and a second time, a second phase and a second amplitude at which the second earpiece 603 receives the ultrasonic signal from the terminal device 601. The terminal device 601 can determine the target position of the sound field of the audio based on the distance parameter and the deflection angle parameter. In process 2, the terminal apparatus 601 adjusts the sound field of the audio to the target position so that the sound field of the audio is still directly above the head of the user.
In one possible implementation, the terminal device includes an audio algorithm module, where the audio algorithm module deploys an audio algorithm for adjusting the audio data based on the distance parameter and the yaw angle parameter, thereby adjusting the sound field of the audio to the target position. And inputting the distance parameter and the deflection angle parameter into an audio effect algorithm module at the terminal equipment, and outputting the adjusted audio data by the audio effect algorithm module.
In one possible implementation, the sound effect algorithm module may be deployed at an application framework layer or a kernel layer in the software structure of the terminal device shown in fig. 2.
S506, the terminal equipment sends the adjusted audio data to the first earphone (and the second earphone).
In a possible implementation, the terminal device sends the adjusted audio data to the first earpiece. Correspondingly, the first earphone receives the adjusted audio data. The first earphone sends the adjusted audio data to the second earphone. Correspondingly, the second earphone receives the adjusted audio data from the first earphone.
In another possible implementation manner, the terminal device sends the adjusted audio data to the first earphone and the second earphone respectively. Correspondingly, the first earphone receives the adjusted audio data from the terminal equipment; the second earphone receives the adjusted audio data from the terminal device.
According to the audio processing method, the terminal equipment continuously transmits the ultrasonic signals, the first earphone and the second earphone receive the ultrasonic signals from the terminal equipment, the terminal equipment determines the distance parameter and the deflection angle parameter of the head of the user relative to the terminal equipment according to at least one of the moment, the phase or the amplitude of the ultrasonic signals received by the first earphone and at least one of the moment, the phase or the amplitude of the ultrasonic signals received by the second earphone, so that the terminal equipment determines the target position of the sound field of the audio according to the distance parameter and the deflection angle parameter, adjusts the position of the sound field of the audio to the target position, enables the sound field of the audio to move along with the movement of the head of the user, provides good sound effect experience for the user all the time through the first earphone and the second earphone, and does not need to determine the distance parameter and the deflection angle parameter of the head of the user relative to the terminal equipment through a gyroscope and an IMU in the earphone, and the hardware requirements of the audio processing method for the earphone are reduced.
As an alternative embodiment, S502 is specifically implemented by: the terminal equipment obtains at least one of time difference, phase difference or amplitude difference between the ultrasonic signals received by the first earphone and the ultrasonic signals received by the second earphone based on at least one of the first time, the first phase or the first amplitude and at least one of the second time, the second phase or the second amplitude; the terminal device obtains a distance parameter and a deflection angle parameter based on at least one of the time difference, the phase difference or the amplitude difference.
It should be understood that in the case that the distance between the first earphone and the terminal device is different from the distance between the second earphone and the terminal device, the time and the phase of receiving the ultrasonic signals by the first earphone and the second earphone are different; meanwhile, the first earphone and the second earphone receive ultrasonic signals with different amplitudes because the attenuation of the ultrasonic signals received by the first earphone and the attenuation of the ultrasonic signals received by the second earphone are different. According to the time difference, the phase difference or the amplitude difference between the ultrasonic signals received by the first earphone and the ultrasonic signals received by the second earphone, the terminal device can determine the distance parameter and the deflection angle parameter of the head of the user relative to the terminal device.
In one case, under the condition that the first earphone sends the first moment to the terminal equipment, the second earphone can correspondingly send the second moment to the terminal equipment, so that the terminal equipment can determine the moment difference according to the first moment and the second moment; in another case, in the case that the first earphone sends the first phase to the terminal device, the second earphone may correspondingly send the second phase to the terminal device, so that the terminal device can determine the phase difference according to the first phase and the second phase; in yet another case, in the case that the first earphone transmits the first amplitude to the terminal device, the second earphone may correspondingly transmit the second amplitude to the terminal device, so that the terminal device can determine the amplitude difference according to the first amplitude and the second amplitude. The three cases may also be combined, for example, in the case that the first earphone sends the first time and the first phase to the terminal device, the second earphone may correspondingly send the second time and the second phase to the terminal device, so that the terminal device can determine the time difference according to the first time and the second time, and determine the phase difference according to the first phase and the second phase; under the condition that the first earphone sends the first moment and the first amplitude to the terminal equipment, the second earphone can correspondingly send the second moment and the second amplitude to the terminal equipment, so that the terminal equipment can determine moment difference according to the first moment and the second moment and determine amplitude difference according to the first amplitude and the second amplitude; in the case that the first earphone transmits the first phase and the first amplitude to the terminal device, the second earphone may correspondingly transmit the second phase and the second amplitude to the terminal device, so that the terminal device may determine the phase difference according to the first phase and the second phase, and determine the amplitude difference according to the first amplitude and the second amplitude. In the case that the first earphone transmits the first time, the first phase and the first amplitude to the terminal device, the second earphone may correspondingly transmit the second time, the second phase and the second amplitude to the terminal device, so that the terminal device can determine a time difference according to the first time and the second time, determine a phase difference according to the first phase and the second phase, and determine an amplitude difference according to the first amplitude and the second amplitude.
Under the condition that the terminal equipment receives the first moment and the second moment, the terminal equipment determines the moment difference between the ultrasonic signals received by the first earphone and the ultrasonic signals received by the second earphone based on the first moment and the second moment; under the condition that the terminal equipment receives the first phase and the second phase, the terminal equipment determines the phase difference between the ultrasonic signals received by the first earphone and the ultrasonic signals received by the second earphone based on the first phase and the second phase; in the case that the terminal device receives the first amplitude and the second amplitude, the terminal device determines an amplitude difference between the ultrasonic signal received by the first earphone and the ultrasonic signal received by the second earphone based on the first amplitude and the second amplitude. Likewise, in the case that the terminal device receives the first time, the second time, the first phase and the second phase, the terminal device determines a time difference and a phase difference between the ultrasonic signal received by the first earphone and the ultrasonic signal received by the second earphone based on the first time and the second time, and the first phase and the second phase; under the condition that the terminal equipment receives the first moment, the second moment, the first amplitude and the second amplitude, the terminal equipment determines a moment difference and an amplitude difference between an ultrasonic signal received by the first earphone and an ultrasonic signal received by the second earphone based on the first moment and the second moment and the first amplitude and the second amplitude; in the case that the terminal device receives the first amplitude, the second amplitude, the first phase and the second phase, the terminal device determines an amplitude difference and a phase difference between the ultrasonic signal received by the first earphone and the ultrasonic signal received by the second earphone based on the first amplitude and the second amplitude, and the first phase and the second phase. Likewise, in the case where the terminal device receives the first time, the second time, the first phase, the second phase, the first amplitude, and the second amplitude, the terminal device determines a time difference, a phase difference, and an amplitude difference between the ultrasonic signal received by the first earpiece and the ultrasonic signal received by the second earpiece based on the first time and the second time, the first phase and the second phase, and the first amplitude and the second amplitude.
In one possible embodiment, the terminal device comprises an ultrasonic processing algorithm module, and the ultrasonic processing algorithm module is configured with an ultrasonic processing algorithm, and is used for obtaining a distance parameter and a deflection angle parameter of the head of the user relative to the terminal device according to at least one of a first moment, a first phase or a first amplitude and at least one of a second moment, a second phase or a second amplitude. Specifically, the terminal device inputs at least one of a first time, a first phase or a first amplitude and at least one of a second time, a second phase or a second amplitude to the ultrasonic processing algorithm module; the ultrasonic processing algorithm module outputs distance parameters and deflection angle parameters of the head of the user relative to the terminal equipment.
In one possible implementation, the ultrasonic processing algorithm module may be deployed at an application framework layer or a kernel layer in a software structure of the terminal device as shown in fig. 2.
As an alternative embodiment, the distance parameters include a distance parameter of the head of the user in the left-right direction with respect to the terminal device, a distance parameter of the head of the user in the up-down direction with respect to the terminal device, and a distance parameter of the head of the user in the front-back direction with respect to the terminal device.
It should be understood that the left-right direction, the up-down direction, and the front-back direction are all directions based on the head of the user. Fig. 7 is a schematic diagram of distance parameters and deflection angle parameters of a user's head relative to a terminal device according to an embodiment of the present application. As shown in fig. 7, the distance parameters of the terminal device with respect to the user's head may include a relative distance of the user's head with respect to the terminal device in the up-down direction, a relative distance of the user's head with respect to the terminal device in the left-right direction, and a relative distance of the user's head with respect to the terminal device in the front-rear direction, from which the terminal device may determine the position of the user's head.
As an alternative embodiment, the yaw angle parameter includes a yaw angle parameter of the user's head with respect to the terminal device in a left-right direction of the user's head, a yaw angle parameter of the user's head with respect to the terminal device in an up-down direction of the user's head, and a yaw angle parameter of the user's head with respect to the terminal device in a front-back direction of the user's head.
It should be understood that, as shown in fig. 7, the yaw angle parameter of the user's head with respect to the terminal device in the left-right direction of the user's head may refer to the angle of rotation of the user's head with respect to the terminal device about the front-rear direction; the deflection angle parameter of the user's head with respect to the terminal device in the up-down direction of the user's head may refer to an angle of rotation of the user's head with respect to the terminal device about the left-right direction; the yaw angle parameter of the user's head with respect to the terminal device in the front-rear direction of the user's head may refer to an angle of rotation of the user's head with respect to the terminal device about an up-down direction.
In one possible embodiment, the axes in the left-right direction, the axes in the up-down direction, and the axes in the front-rear direction intersect, and the axes in the left-right direction, the axes in the up-down direction, and the axes in the front-rear direction may be perpendicular to each other, and the three-dimensional coordinate system corresponding to the axes in the left-right direction, the axes in the up-down direction, and the axes in the front-rear direction may be a preset coordinate system. Alternatively, the left-right direction axis, the up-down direction axis, and the front-back direction axis are unchanged when the user's head is rotated. Alternatively, an intersection point at which the left-right axis, the up-down axis, and the front-rear axis intersect may be a center of the head of the user, and when the head of the user moves, the three-dimensional coordinate system corresponding to the left-right axis, the up-down axis, and the front-rear axis moves, and the left-right axis, the up-down axis, or the front-rear axis may move in parallel.
Illustratively, as shown in fig. 8, the terminal device plays audio to the user through the first earphone and the second earphone, and the initial state of the user's head is the upright state. The user's head is then deflected to the left in a left-right direction relative to the terminal device, i.e. the user's head is rotated in a counter-clockwise direction relative to the terminal device about an axis in the front-rear direction.
It will be appreciated that as the user's head deflects left and right, the up and down, left and right, and front and back axes remain unchanged, as shown in fig. 8. If the user's head does not deflect relative to the terminal device and the position of the user's head relative to the terminal device changes, the axis in the up-down direction, the axis in the left-right direction, and the axis in the front-back direction can be translated.
In one possible embodiment, the distance parameter and the deflection angle parameter of the user's head with respect to the terminal device are represented in the form of coordinates.
In an example, the distance parameter of the user's head with respect to the terminal device may be denoted (a, b, c). Wherein a, b and c are real numbers. a is used for indicating the distance of the head of the user relative to the terminal equipment in the left-right direction, b is used for indicating the distance of the head of the user relative to the terminal equipment in the up-down direction, and c is used for indicating the distance of the head of the user relative to the terminal equipment in the front-back direction. In one possible embodiment, the sign of a may indicate that the terminal device is on the left or right side of the user's head, respectively. For example, when a is a positive number, it means that the terminal device is on the right side of the user's head, and the distance of the user's head in the left-right direction with respect to the terminal device is |a|, and when a is a negative number, it means that the terminal device is on the right-left side of the user's head, and the distance of the user's head in the left-right direction with respect to the terminal device is |a|; alternatively, when a is positive, the terminal device is on the left side of the user's head, and when a is negative, the terminal device is on the right side of the user's head. Similarly, the symbol of b may indicate that the terminal device is on the upper side or the lower side of the user's head, respectively. The symbol of c may indicate that the terminal device is on the front or rear side of the user's head, respectively. Illustratively, the distance parameter is (9, 6, -7), then the terminal device determines that the terminal device is on the right side of the user's head according to (9, 6, -7), and the distance of the user's head relative to the terminal device in the left-right direction is 9; the terminal equipment is arranged on the upper side of the head of the user, and the distance between the head of the user and the terminal equipment in the up-down direction is 6; the terminal device is on the rear side of the user's head, and the distance of the user's head with respect to the terminal device in the front-rear direction is 7.
In another example, the deflection angle parameter of the user's head with respect to the terminal device may be denoted by (P, Y, R). P, Y, R are each values between-360 DEG and 360 deg. Wherein P (pitch) is used for indicating the deflection angle of the head of the user relative to the terminal device in the up-down direction, namely the rotation angle of the head of the user relative to the terminal device in the left-right direction; y (yaw) is used for indicating a deflection angle of the head of the user with respect to the terminal device in the front-rear direction, that is, a rotation angle of the head of the user with respect to the terminal device about an axis in the up-down direction; r (roll) is used to indicate the angle of deflection of the user's head with respect to the terminal device in the left-right direction, i.e., the angle of rotation of the user's head with respect to the terminal device about an axis in the front-rear direction. In one possible embodiment, the symbols P, Y, R may indicate that the user's head is turned in a clockwise direction or clockwise direction relative to the terminal device. For example, when P is greater than 0, it may indicate that the user's head is rotated clockwise about the left-right direction with respect to the terminal device |p|, and when P is less than 0, it may indicate that the user's head is rotated counterclockwise about the left-right direction with respect to the terminal device |p|; alternatively, when P is greater than 0, it may indicate that the user's head is rotated counterclockwise about the left-right direction with respect to the terminal device |p|, and when P is less than 0, it may indicate that the user's head is rotated clockwise about the left-right direction with respect to the terminal device |p|. Similarly, the symbol of Y may indicate that the user's head rotates clockwise or counterclockwise with respect to the terminal device about an axis in the up-down direction; the symbol of R may indicate that the user's head rotates clockwise or counterclockwise with respect to the terminal device about the front-rear direction. For example, the deflection angle parameter is (30, 40, -30 °), then the terminal device determines that the deflection angle of the user's head with respect to the terminal device in the up-down direction is 30 ° based on (30 °,40 °, -30 °), i.e., the user's head rotates clockwise by 30 ° with respect to the terminal device about the left-right direction; the deflection angle of the head of the user relative to the terminal device in the front-rear direction is 40 degrees, namely the head of the user rotates clockwise by 40 degrees relative to the terminal device by taking the up-down direction as an axis; the deflection angle of the user's head with respect to the terminal device in the left-right direction is-30 deg., i.e., the user's head is rotated counterclockwise by 30 deg. about the front-rear direction with respect to the terminal device.
As an alternative embodiment, the ultrasound signal comprises identification information of the terminal device.
In one possible embodiment, the identification information of the terminal device may be at least one of a preset time, phase or amplitude. In this way, in the case where the first earphone or the second earphone receives the ultrasonic signal including at least one of the preset time, phase or amplitude, it is possible to determine that the ultrasonic signal is transmitted for the terminal device according to the preset frequency or amplitude, so that the first earphone and the second earphone can determine the ultrasonic signal transmitted by the terminal device in a connected state with the first earphone and the second earphone even if the plurality of devices simultaneously transmit the ultrasonic signal.
In another possible implementation manner, the ultrasonic signal sent by the terminal device carries the identification information of the terminal device. For example, the identification information of the terminal device may be information of a device model number, an ID, and the like of the terminal device. Thus, after the first earphone and the second earphone receive the ultrasonic signals, the first earphone and the second earphone can determine the source of the received ultrasonic signals according to the information carried by the ultrasonic signals, namely, whether the ultrasonic signals are the ultrasonic signals sent by the terminal equipment in a connection state with the first earphone and the second earphone or not is determined.
As an alternative embodiment, S501 is implemented specifically by: in the case that the head tracking switch is in an on state, the terminal device transmits an ultrasonic signal through a speaker or a microphone.
It will be appreciated that the head tracking switch may be used to control whether the terminal device transmits an ultrasound signal. For example, if the head tracking switch is in an on state, the terminal device transmits an ultrasonic signal through a speaker or a microphone; if the head tracking switch is in a closed state, the terminal equipment does not send ultrasonic signals.
In one possible embodiment, the terminal device comprises an ultrasonic signal transmission module for controlling a speaker or a microphone of the terminal device to transmit ultrasonic signals. And under the condition that the head tracking switch is in an on state, the ultrasonic signal transmitting module controls a loudspeaker or a microphone of the terminal equipment to transmit ultrasonic signals. It can be understood that the ultrasonic signal transmitting module may be disposed in an application framework layer or a kernel layer in the software structure of the terminal device shown in fig. 2, and in the case that the head tracking switch is in an on state, the ultrasonic signal transmitting module transmits an indication message to an audio driver of the kernel layer, for indicating the audio driver to control a speaker or a microphone of the terminal device to transmit an ultrasonic signal.
In one possible implementation, the first earpiece receives an ultrasonic signal from the terminal device through a microphone of the first earpiece; the second earphone receives the ultrasonic signal from the terminal device through a microphone of the second earphone. The first earphone can be provided with a first ultrasonic signal receiving module, and the first ultrasonic signal receiving module is used for controlling a microphone of the first earphone to receive ultrasonic signals and storing at least one of first time, first phase or first amplitude of the ultrasonic signals received by the first earphone; the second earphone may be disposed with a second ultrasonic signal receiving module, and the microphone is configured to control the second earphone to receive the ultrasonic signal, and store at least one of a second time, a second phase or a second amplitude of the ultrasonic signal received by the second earphone in the second ultrasonic signal receiving module.
As an alternative embodiment, the method 500 further comprises: the terminal equipment displays a first interface, wherein the first interface comprises a selection button of a head tracking switch; the state of the head movement tracking switch is set to an on state or an off state based on a selection operation by the user.
It should be understood that the first interface may be an interface for a system of terminal devices. For example, in the interface (a) shown in fig. 9, in the case where the user's selection operation may be to click the selection button 901, the state of the head tracking switch will be set to the on state or the off state. The first interface may also set an interface for sound effects in a setting interface in the application. For example, in the interface (b) shown in fig. 9, in the music application, a setting interface in the music application is opened, the sound effect setting is selected, the terminal device displays the first interface, and in the case where the selection operation by the user may be clicking the selection button 902, the state of the head tracking switch will be set to the on state or the off state. If the state of the head tracking switch is set to be in an on state under the condition that the first interface is an audio setting interface in a setting interface in the application program, when the terminal equipment plays the audio of the application program to a user through the first earphone and the second earphone, the terminal equipment sends an ultrasonic signal through a loudspeaker or a microphone. It is understood that the first interface may also be a sliding notification bar interface of the terminal device, an interface of a pull-up control center, and the like, which is not particularly limited in the present application.
As an alternative embodiment, the first earphone and the second earphone are TWS earphones or wired earphones.
It should be understood that, in the case where the first earphone and the second earphone are wired earphones, the first earphone transmits at least one of a first time, a first phase or a first amplitude of the ultrasonic signal received by the first earphone to the terminal device through a connection line connected to the first earphone; the second earphone transmits at least one of a second time, a second phase or a second amplitude of the ultrasonic signal received by the second earphone to the terminal device through a connection line connected with the second earphone.
In the case that the first earphone and the second earphone are TWS earphones, assuming that the first earphone is a main earphone and the second earphone is an auxiliary earphone, the second earphone transmits at least one of a second time, a second phase or a second amplitude of an ultrasonic signal received by the second earphone from the terminal device to the first earphone; the first earpiece transmits at least one of a first time, a first phase, or a first amplitude of the ultrasonic signal received by the first earpiece, and at least one of a second time, a second phase, or a second amplitude of the ultrasonic signal received by the second earpiece to the terminal device. The following describes in detail the audio processing method according to the embodiment of the present application with reference to fig. 9, taking the first earphone and the second earphone as TWS earphones, and the first earphone as the main earphone and the second earphone as the auxiliary earphone.
Fig. 10 is a schematic process diagram of an audio processing method 1000 according to an embodiment of the present application. As shown in fig. 10, in the case where the head tracking switch of the terminal device is in an on state, the ultrasonic signal transmission module of the terminal device controls the speaker to transmit an ultrasonic signal including identification information of the terminal device. The first ultrasonic signal receiving module of the first earphone controls a microphone of the first earphone to receive ultrasonic signals from the terminal equipment, and sends the received ultrasonic signals at a first moment, a first phase and a first amplitude to the data sending module through the first ultrasonic signal receiving module; the second ultrasonic signal receiving module of the second earphone controls a microphone of the second earphone to receive ultrasonic signals from the terminal equipment, and sends second time, second phase and second amplitude of the ultrasonic signals received by the second earphone to the second sending module in the second double-ear transmission module through the second ultrasonic signal receiving module. The second transmitting module transmits the second time, the second phase and the second amplitude to a first receiving module of the first binaural transmission module of the first headphones. The first receiving module transmits the second moment, the second phase and the second amplitude to the data transmitting module. The data transmission module in the first earphone transmits the first moment, the first phase, the first amplitude, the second moment, the second phase and the second amplitude to the ultrasonic processing algorithm module of the terminal equipment through Bluetooth, and the ultrasonic processing algorithm module outputs the distance parameter and the deflection angle parameter of the head of the user relative to the terminal equipment. The terminal equipment inputs the distance parameter and the deflection angle parameter into an audio algorithm module, the audio algorithm module outputs the adjusted audio data, and the adjusted audio data is transmitted to a data receiving module of the first earphone through Bluetooth. The data receiving module of the first earphone sends the adjusted audio data to the second receiving module of the second double-ear transmission module of the second earphone through the first sending module of the first double-ear transmission module. The first earphone and the second earphone play the adjusted audio through the loudspeaker respectively.
Fig. 11 is a flowchart of an audio processing method 1100 according to an embodiment of the present application. The method 1100 is applied to a system including a terminal device, a first earphone and a second earphone, where the terminal device is in a connection state with the first earphone and the second earphone, and the terminal device plays audio for a user through the first earphone and the second earphone, and the method 1100 includes:
s1101, the terminal equipment transmits an ultrasonic signal. Correspondingly, the first earphone receives ultrasonic signals from the terminal device through the microphone.
S1102, the second earphone transmits at least one of a second time, a second phase or a second amplitude of the ultrasonic signal received by the second earphone to the first earphone. Correspondingly, the first earphone receives at least one of a second moment, a second phase or a second amplitude of the ultrasonic signal from the second earphone, wherein the ultrasonic signal from the second earphone is an ultrasonic signal from the terminal device received by the second earphone through the microphone.
S1103, the first earphone determines a distance parameter and a deflection angle parameter of a head of the user with respect to the terminal device based on at least one of a first time, a first phase or a first amplitude of the ultrasonic signal received by the first earphone and at least one of a second time, a second phase or a second amplitude of the ultrasonic signal received by the second earphone.
S1104, the first earphone sends the distance parameter and the deflection angle parameter to the terminal device. Correspondingly, the terminal device receives the distance parameter and the deflection angle parameter from the first earpiece.
S1105, the terminal equipment sends the adjusted audio data to the first earphone. Correspondingly, the first earphone receives the adjusted audio data from the terminal device.
It should be appreciated that in the case where the first and second headphones are TWS headphones, the first headphone may be the master headphone. In the case where the first earphone and the second earphone are wired earphones, the first earphone may be any one earphone of a pair of earphones. After the first earphone sends the distance parameter and the deflection angle parameter to the terminal equipment, the terminal equipment determines a target position of the sound field of the audio based on the distance parameter and the deflection angle parameter, and adjusts the audio data based on the target position, so that the adjusted sound field of the audio is located at the target position. And the terminal equipment sends the adjusted audio data to the first earphone.
In one possible implementation, the terminal device sends the adjusted audio data to the first earpiece and the second earpiece. Correspondingly, the first earphone and the second earphone respectively receive the adjusted audio data from the terminal device.
In another possible embodiment, the terminal device sends the adjusted audio data to the first earpiece. Correspondingly, the first earphone receives the adjusted audio data from the terminal device. The first earphone sends the adjusted audio data to the second earphone. Correspondingly, the second earphone receives the adjusted audio data from the first earphone.
According to the audio processing method, the terminal equipment continuously transmits the ultrasonic signals, the first earphone and the second earphone receive the ultrasonic signals from the terminal equipment, and the second earphone transmits at least one of second time, second phase or second amplitude of the received ultrasonic signals from the terminal equipment to the first earphone. The first earphone determines a distance parameter and a deflection angle parameter of the head of the user relative to the terminal equipment according to at least one of a first moment, a first phase or a first amplitude of an ultrasonic signal received by the first earphone and at least one of a second moment, a second phase or a second amplitude of the ultrasonic signal received by the second earphone, and sends the distance parameter and the deflection angle parameter to the terminal equipment, so that the terminal equipment determines a target position of a sound field of audio according to the distance parameter and the deflection angle parameter, adjusts audio data, enables the sound field of the adjusted audio to be located at the target position, enables the sound field of the audio to move along with the movement of the head of the user, always provides good sound effect experience for the user through the first earphone and the second earphone, does not need to determine the distance parameter and the deflection angle parameter of the head of the user relative to the terminal equipment through a gyroscope and an IMU in the earphone, and reduces hardware requirements of an audio processing method on the earphone.
As an alternative embodiment, S1103 is specifically implemented by: the first earphone obtains at least one of a time difference, a phase difference or an amplitude difference between an ultrasonic signal received by the first earphone and an ultrasonic signal received by the second earphone based on at least one of a first time, a first phase or a first amplitude and at least one of a second time, a second phase or a second amplitude; the first earphone obtains a distance parameter and a deflection angle parameter based on at least one of a time difference, a phase difference or an amplitude difference.
As an alternative embodiment, the distance parameters include a distance parameter of the head of the user in the left-right direction with respect to the terminal device, a distance parameter of the head of the user in the up-down direction with respect to the terminal device, and a distance parameter of the head of the user in the front-back direction with respect to the terminal device.
As an alternative embodiment, the yaw angle parameter includes a yaw angle parameter of the user's head with respect to the terminal device in a left-right direction of the user's head, a yaw angle parameter of the user's head with respect to the terminal device in an up-down direction of the user's head, and a yaw angle parameter of the user's head with respect to the terminal device in a front-back direction of the user's head.
As an alternative embodiment, the ultrasound signal comprises identification information of the terminal device.
It should be appreciated that the detailed implementation of the embodiment of the method 1100 is similar to the method 500, and reference may be made to the above, and will not be repeated here.
As an alternative embodiment, the first earphone and the second earphone are TWS earphones, the first earphone is a main earphone, and the second earphone is a pair of earphones; the method 1100 further comprises: the main earphone transmits the adjusted audio data to the auxiliary earphone.
It should be understood that in the case where the first earphone and the second earphone are TWS earphones, the terminal device transmits the adjusted audio data to the main earphone, and the main earphone transmits the adjusted audio data to the sub-earphone.
The following describes in detail the audio processing method according to the embodiment of the present application, taking the first earphone and the second earphone as TWS earphone, the first earphone as the main earphone, and the second earphone as the auxiliary earphone.
Fig. 12 is a schematic process diagram of an audio processing method 1200 according to an embodiment of the present application. As shown in fig. 12, in the case where the head tracking switch of the terminal device is in an on state, the ultrasonic signal transmission module of the terminal device controls the speaker to transmit an ultrasonic signal including identification information of the terminal device. The first ultrasonic signal receiving module of the first earphone controls a microphone of the first earphone to receive ultrasonic signals from the terminal equipment, and sends first time, first phase and first amplitude of the ultrasonic signals received by the first earphone to the data sending module through the first ultrasonic signal receiving module; the second ultrasonic signal receiving module of the second earphone controls a microphone of the second earphone to receive ultrasonic signals from the terminal equipment, and sends second time, second phase and second amplitude of the ultrasonic signals received by the second earphone to the second sending module in the second double-ear transmission module through the second ultrasonic signal receiving module. The second transmitting module transmits the second time, the second phase and the second amplitude to the first receiving module of the first earphone. The first earpiece inputs the first time, the first phase, the first amplitude, the second time, the second phase, and the second amplitude into the ultrasonic processing algorithm module. The ultrasonic processing algorithm module outputs distance parameters and deflection angle parameters of the head of the user relative to the terminal equipment. The data transmitting module of the first earphone transmits the distance parameter and the deflection angle parameter to the sound effect algorithm module of the terminal equipment through Bluetooth, the sound effect algorithm module outputs the adjusted audio data, and the adjusted audio data is transmitted to the data receiving module of the first earphone through Bluetooth. The data receiving module of the first earphone sends the adjusted audio data to the second receiving module of the second double-ear transmission module of the second earphone through the first sending module of the first double-ear transmission module. The first earphone and the second earphone play the adjusted audio through the loudspeaker respectively.
It should be understood that the sequence numbers of the above processes do not mean the order of execution, and the execution order of the processes should be determined by the functions and internal logic of the processes, and should not be construed as limiting the implementation process of the embodiments of the present application.
The audio processing method according to the embodiment of the present application is described in detail above with reference to fig. 3 to 12, and the audio processing apparatus according to the embodiment of the present application is described in detail below with reference to fig. 13 and 14. The audio processing device comprises corresponding modules or units for performing each of the parts of the above embodiments. The modules or units may be software, hardware, or a combination of software and hardware. The random access device is only briefly illustrated below, and for implementation details of the scheme, reference may be made to the description of the foregoing method embodiments, which are not described in detail below.
Fig. 13 is a schematic block diagram of an audio processing apparatus 1300 according to an embodiment of the present application. As shown in fig. 13, the apparatus 1300 includes: a transceiver module 1301 and a processing module 1302.
In a possible implementation manner, the apparatus 1300 is configured to implement steps corresponding to the terminal device in the method 500.
The apparatus 1300 is in a connected state with the first earphone and the second earphone, and the apparatus 1300 plays audio for the user through the first earphone and the second earphone.
A transceiver module 1301 for transmitting an ultrasonic signal through a speaker or a microphone;
a processing module 1302, configured to determine a distance parameter and a deflection angle parameter of a head of a user with respect to the terminal device based on at least one of a first time, a first phase, or a first amplitude of an ultrasonic signal received by the first earpiece, and at least one of a second time, a second phase, or a second amplitude of an ultrasonic signal received by the second earpiece; determining a target position of a sound field of the audio based on the distance parameter and the deflection angle parameter; the position of the sound field of the audio is adjusted to the target position.
Optionally, the processing module 1302 is specifically configured to: obtaining at least one of a time difference, a phase difference or an amplitude difference between the ultrasonic signal received by the first earphone and the ultrasonic signal received by the second earphone based on at least one of the first time, the first phase or the first amplitude and at least one of the second time, the second phase or the second amplitude; the distance parameter and the deflection angle parameter are obtained based on at least one of the time difference, the phase difference or the amplitude difference.
Optionally, the distance parameter includes a distance parameter of the head of the user in a left-right direction relative to the terminal device, a distance parameter of the head of the user in an up-down direction relative to the terminal device, and a distance parameter of the head of the user in a front-back direction relative to the terminal device.
Optionally, the yaw angle parameter includes a yaw angle parameter of the user's head with respect to a lateral direction of the user's head with respect to the terminal device, a yaw angle parameter of the user's head with respect to an up-down direction of the user's head with respect to the terminal device, and a yaw angle parameter of the user's head with respect to a front-back direction of the user's head with respect to the terminal device.
Optionally, the ultrasound signal comprises identification information of the terminal device.
Optionally, the transceiver module 1301 is specifically configured to: in the case where the head tracking switch is in an on state, an ultrasonic signal is transmitted through a speaker or a microphone.
Optionally, the apparatus 1300 further includes a display module 1303 for displaying a first interface including a selection button of the head tracking switch; the processing module 1302 is further configured to: the state of the head movement tracking switch is set to an on state or an off state based on a selection operation by the user.
Optionally, the first earphone and the second earphone are real wireless stereo TWS earphones or wired earphones.
In one possible implementation manner, the apparatus 1300 is configured to implement the steps corresponding to the first earphone in the method 1100.
The terminal device is in a connection state with the apparatus 1300 and the second earphone, and the terminal device plays audio for the user through the apparatus 1300 and the second earphone.
A transceiver module 1301 for receiving an ultrasonic signal from a terminal device through a microphone; receiving at least one of a second moment, a second phase or a second amplitude of an ultrasonic signal from a second earphone, wherein the ultrasonic signal from the second earphone is an ultrasonic signal from a terminal device received by the second earphone through a microphone;
a processing module 1302 configured to determine a distance parameter and a deflection angle parameter of a head of a user with respect to a terminal device based on at least one of a first time, a first phase, or a first amplitude of an ultrasonic signal received by the apparatus 1300, and at least one of a second time, a second phase, or a second amplitude of an ultrasonic signal received by a second earpiece;
the transceiver module 1301 is further configured to: transmitting the distance parameter and the deflection angle parameter to a terminal device; and receiving the adjusted audio data from the terminal device.
Optionally, the processing module 1302 is specifically configured to: obtaining at least one of a time difference, a phase difference or an amplitude difference between the ultrasonic signal received by the first earphone and the ultrasonic signal received by the second earphone based on at least one of the first time, the first phase or the first amplitude and at least one of the second time, the second phase or the second amplitude; the distance parameter and the deflection angle parameter are obtained based on at least one of the time difference, the phase difference or the amplitude difference.
Optionally, the distance parameter includes a distance parameter of the head of the user in a left-right direction relative to the terminal device, a distance parameter of the head of the user in an up-down direction relative to the terminal device, and a distance parameter of the head of the user in a front-back direction relative to the terminal device.
Optionally, the yaw angle parameter includes a yaw angle parameter of the user's head with respect to a lateral direction of the user's head with respect to the terminal device, a yaw angle parameter of the user's head with respect to an up-down direction of the user's head with respect to the terminal device, and a yaw angle parameter of the user's head with respect to a front-back direction of the user's head with respect to the terminal device.
Optionally, the ultrasound signal comprises identification information of the terminal device.
Optionally, the device 1300 and the second earpiece are real wireless stereo TWS earpieces, the device 1300 is a main earpiece, and the second earpiece is a secondary earpiece; the transceiver module 1301 is further configured to: and sending the adjusted audio data to the auxiliary earphone.
It should be appreciated that the apparatus 1300 herein is embodied in the form of functional modules. The term module herein may refer to an application specific integrated circuit (application specific integrated circuit, ASIC), an electronic circuit, a processor (e.g., a shared, dedicated, or group processor, etc.) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality. In an alternative example, it will be understood by those skilled in the art that the apparatus 1300 may be specifically a terminal device or a first earphone in the foregoing embodiment, and the apparatus 1300 may be used to execute each flow and/or step corresponding to the terminal device or the first earphone in the foregoing method embodiment, which is not described herein.
The apparatus 1300 has functions of implementing corresponding steps executed by the terminal device or the first earphone in the method; the above functions may be implemented by hardware; the corresponding software implementation may also be executed by hardware. The hardware or software includes one or more modules corresponding to the functions described above.
In an embodiment of the present application, the apparatus 1300 in fig. 13 may also be a chip, for example: SOC. Correspondingly, the transceiver module 1301 may be a transceiver circuit of the chip, which is not limited herein.
Fig. 14 is a schematic block diagram of another audio processing apparatus 1400 provided in an embodiment of the present application. The apparatus 1400 includes a processor 1401, a transceiver 1402, and a memory 1403. Wherein the processor 1401, the transceiver 1402 and the memory 1403 communicate with each other through an internal connection path, the memory 1403 is used for storing instructions, and the processor 1401 is used for executing the instructions stored in the memory 1403 to control the transceiver 1402 to transmit signals and/or receive signals.
It should be understood that the apparatus 1400 may be embodied as a terminal device or a first earpiece in the above-described embodiments, and may be used to perform the steps and/or flows corresponding to the terminal device or the first earpiece in the above-described method embodiments. Alternatively, the memory 1403 may include read only memory and random access memory, and provide instructions and data to the processor. A portion of the memory may also include non-volatile random access memory. For example, the memory may also store information of the device type. The processor 1401 may be configured to execute instructions stored in a memory, and when the processor 1401 executes instructions stored in a memory, the processor 1401 is configured to perform the steps and/or processes of the method embodiments described above. The transceiver 1402 may include a transmitter that may be used to implement various steps and/or processes for performing transmit actions corresponding to the transceiver and a receiver that may be used to implement various steps and/or processes for performing receive actions corresponding to the transceiver.
It should be appreciated that in embodiments of the present application, the processor may be a central processing unit (central processing unit, CPU), the processor may also be other general purpose processors, digital Signal Processors (DSPs), application Specific Integrated Circuits (ASICs), field Programmable Gate Arrays (FPGAs) 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.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware in a processor or by instructions in the form of software. The steps of a method disclosed in connection with the embodiments of the present application may be embodied directly in a hardware processor for execution, or in a combination of hardware and software modules in the processor for execution. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in a memory, and the processor executes instructions in the memory to perform the steps of the method described above in conjunction with its hardware. To avoid repetition, a detailed description is not provided herein.
The present application also provides a computer readable storage medium for storing a computer program for implementing the method shown in the above-described method embodiments.
The present application also provides a computer program product comprising a computer program (which may also be referred to as code, or instructions) which, when run on a computer, performs the method as shown in the method embodiments described above.
Those of ordinary skill in the art will appreciate that the various illustrative modules and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system, apparatus and module may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, and for example, the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or modules, which may be in electrical, mechanical, or other forms.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical modules, i.e., may be located in one place, or may be distributed over a plurality of network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional module in each embodiment of the present application may be integrated into one processing module, or each module may exist alone physically, or two or more modules may be integrated into one module.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely a specific implementation of the present application, but the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art may easily think about changes or substitutions within the technical scope of the embodiments of the present application, and all changes and substitutions are included in the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.
Claims (12)
1. An audio processing method, which is applied to a system including a terminal device, a first earphone and a second earphone, wherein the terminal device is in a connection state with the first earphone and the second earphone, and the terminal device plays audio for a user through the first earphone and the second earphone, the method comprises:
the terminal equipment sends ultrasonic signals through a loudspeaker or a microphone;
the terminal equipment receives the first moment, the first phase and the first amplitude of the ultrasonic signal received by the first earphone, and the second moment, the second phase and the second amplitude of the ultrasonic signal received by the second earphone;
the terminal equipment determines a distance parameter and a deflection angle parameter of the head of the user relative to the terminal equipment based on a first moment, a first phase and a first amplitude of an ultrasonic signal received by the first earphone and a second moment, a second phase and a second amplitude of the ultrasonic signal received by the second earphone;
the terminal equipment determines the target position of the sound field of the audio based on the distance parameter and the deflection angle parameter;
the terminal equipment adjusts the position of the sound field of the audio to the target position;
The determining a distance parameter and a deflection angle parameter of the head of the user relative to the terminal device comprises:
the terminal equipment obtains a time difference, a phase difference and an amplitude difference between an ultrasonic signal received by the first earphone and an ultrasonic signal received by the second earphone based on the first time, the first phase and the first amplitude, and the second time, the second phase and the second amplitude;
and the terminal equipment obtains the distance parameter and the deflection angle parameter based on the moment difference, the phase difference and the amplitude difference.
2. The method of claim 1, wherein the distance parameters include a distance parameter of the user's head in a left-right direction relative to the terminal device, a distance parameter of the user's head in an up-down direction relative to the terminal device, and a distance parameter of the user's head in a front-back direction relative to the terminal device.
3. The method of claim 1, wherein the yaw angle parameters include a yaw angle parameter of the user's head with respect to the terminal device in a side-to-side direction of the user's head, a yaw angle parameter of the user's head with respect to the terminal device in an up-down direction of the user's head, and a yaw angle parameter of the user's head with respect to the terminal device in a front-to-back direction of the user's head.
4. A method according to any one of claims 1 to 3, characterized in that the ultrasound signal comprises identification information of the terminal device.
5. A method according to any of claims 1 to 3, wherein the terminal device sends the ultrasonic signal through a speaker or microphone, comprising:
and under the condition that the head tracking switch is in an on state, the terminal equipment sends an ultrasonic signal through the loudspeaker or the microphone.
6. The method of claim 5, wherein the method further comprises:
the terminal equipment displays a first interface, wherein the first interface comprises a selection button of the head tracking switch;
the state of the head tracking switch is set to an on state or an off state based on a selection operation by a user.
7. A method according to any one of claims 1 to 3, characterized in that the first and second headphones are real wireless stereo TWS headphones or wired headphones.
8. An audio processing method, which is applied to a system including a terminal device, a first earphone and a second earphone, wherein the terminal device is in a connection state with the first earphone and the second earphone, and the terminal device plays audio for a user through the first earphone and the second earphone, the method comprises:
The first earphone receives ultrasonic signals from the terminal equipment through a microphone;
the first earphone receives a second moment, a second phase and a second amplitude of an ultrasonic signal from the second earphone, wherein the ultrasonic signal from the second earphone is an ultrasonic signal from the terminal equipment, which is received by the second earphone through a microphone;
the first earphone determines a distance parameter and a deflection angle parameter of the head of the user relative to the terminal equipment based on a first moment, a first phase and a first amplitude of an ultrasonic signal received by the first earphone and the second moment, the second phase and the second amplitude of the ultrasonic signal received by the second earphone;
the first earphone sends the distance parameter and the deflection angle parameter to the terminal equipment;
the first earphone receives the adjusted audio from the terminal equipment;
the determining a distance parameter and a deflection angle parameter of the head of the user relative to the terminal device comprises:
the first earphone obtains a time difference, a phase difference and an amplitude difference between an ultrasonic signal received by the first earphone and an ultrasonic signal received by the second earphone based on the first time, the first phase and the first amplitude, and the second time, the second phase and the second amplitude;
The first earphone obtains the distance parameter and the deflection angle parameter based on the time difference, the phase difference and the amplitude difference.
9. The method of claim 8, wherein the distance parameters include a distance parameter of the user's head in a left-right direction relative to the terminal device, a distance parameter of the user's head in an up-down direction relative to the terminal device, and a distance parameter of the user's head in a front-back direction relative to the terminal device.
10. The method of claim 8, wherein the yaw angle parameters include a yaw angle parameter of the user's head with respect to the terminal device in a side-to-side direction of the user's head, a yaw angle parameter of the user's head with respect to the terminal device in an up-down direction of the user's head, and a yaw angle parameter of the user's head with respect to the terminal device in a front-to-back direction of the user's head.
11. A method according to any of claims 8 to 10, characterized in that the ultrasound signal comprises identification information of the terminal device.
12. The method according to any one of claims 8 to 10, wherein the first earphone and the second earphone are real wireless stereo TWS earphones, the first earphone being a main earphone and the second earphone being a pair of earphones;
The method further comprises the steps of:
the main earphone sends the adjusted audio to the auxiliary earphone.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310593705.8A CN116320880B (en) | 2023-05-25 | 2023-05-25 | Audio processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310593705.8A CN116320880B (en) | 2023-05-25 | 2023-05-25 | Audio processing method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116320880A CN116320880A (en) | 2023-06-23 |
CN116320880B true CN116320880B (en) | 2023-10-20 |
Family
ID=86834536
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310593705.8A Active CN116320880B (en) | 2023-05-25 | 2023-05-25 | Audio processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116320880B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5452359A (en) * | 1990-01-19 | 1995-09-19 | Sony Corporation | Acoustic signal reproducing apparatus |
EP2874412A1 (en) * | 2013-11-18 | 2015-05-20 | Nxp B.V. | A signal processing circuit |
CN105101016A (en) * | 2015-08-07 | 2015-11-25 | 深圳市金立通信设备有限公司 | Earphone sound channel switching method and terminal |
CN115474238A (en) * | 2021-06-10 | 2022-12-13 | 华为技术有限公司 | Data stream transmission method, device, communication device and storage medium |
Family Cites Families (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2007312367A (en) * | 2006-04-18 | 2007-11-29 | Seiko Epson Corp | Output control method of ultrasonic speaker and ultrasonic speaker system |
KR102669181B1 (en) * | 2016-11-30 | 2024-05-27 | 삼성전자주식회사 | Method for Producing Haptic Signal and the Electronic Device supporting the same |
-
2023
- 2023-05-25 CN CN202310593705.8A patent/CN116320880B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5452359A (en) * | 1990-01-19 | 1995-09-19 | Sony Corporation | Acoustic signal reproducing apparatus |
EP2874412A1 (en) * | 2013-11-18 | 2015-05-20 | Nxp B.V. | A signal processing circuit |
CN105101016A (en) * | 2015-08-07 | 2015-11-25 | 深圳市金立通信设备有限公司 | Earphone sound channel switching method and terminal |
CN115474238A (en) * | 2021-06-10 | 2022-12-13 | 华为技术有限公司 | Data stream transmission method, device, communication device and storage medium |
WO2022258016A1 (en) * | 2021-06-10 | 2022-12-15 | 华为技术有限公司 | Data stream transmission method and device, communication apparatus, and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN116320880A (en) | 2023-06-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2020000448A1 (en) | Flexible screen display method and terminal | |
CN111543042B (en) | Notification message processing method and electronic equipment | |
CN111602108B (en) | Application icon display method and terminal | |
CN112882823B (en) | Screen display method and electronic equipment | |
CN114089932B (en) | Multi-screen display method, device, terminal equipment and storage medium | |
CN115798390B (en) | Screen display method and terminal equipment | |
CN113573390A (en) | Antenna power adjusting method, terminal device and storage medium | |
CN116048358B (en) | Method and related device for controlling suspension ball | |
CN114827098B (en) | Method, device, electronic equipment and readable storage medium for taking photo | |
CN114201738B (en) | Unlocking method and electronic equipment | |
CN115914461B (en) | Position relation identification method and electronic equipment | |
CN116095224B (en) | Notification display method and terminal device | |
CN114740986B (en) | Handwriting input display method and related equipment | |
CN114691248B (en) | Method, device, equipment and readable storage medium for displaying virtual reality interface | |
CN113645595B (en) | Equipment interaction method and device | |
CN116320880B (en) | Audio processing method and device | |
CN114637392A (en) | Display method and electronic equipment | |
CN116346982B (en) | Method for processing audio, electronic device and readable storage medium | |
CN116382728B (en) | Propagation name display method and terminal equipment | |
CN116232959B (en) | Network quality detection method and device | |
CN116204059B (en) | Frame rate adjustment method and device for eye movement tracking | |
CN114205318B (en) | Head portrait display method and electronic equipment | |
CN116095223B (en) | Notification display method and terminal device | |
CN115619628B (en) | Image processing method and terminal equipment | |
WO2023197999A1 (en) | Display method and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |