Voice signal output method and electronic equipment

CN119698657APending Publication Date: 2025-03-25HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202380055073.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2022-08-11
Filing Date
2023-04-27
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

In a handheld call scenario, increasing the volume will cause the user's call content to be leaked, causing user privacy leakage and poor user experience.

Method used

By arranging the first and second sound-emitting components in the electronic device, respectively close to the user's ear and far away from the ear, an interference signal is generated and the downlink voice signal is delayed so that it has the same delay as the first voice signal, and The second voice signal is output through the first sound-emitting component and the first voice signal is output through the second sound-emitting component at the same output time to mask the downlink voice signal and ensure that the user can clearly hear the call content without leaking it to the surrounding environment.

Benefits of technology

It effectively protects the user's call privacy, enhances the user experience, and ensures that the user can still clearly hear the call content when turning up the volume, while others around him cannot hear clearly, avoiding the leakage of the call content.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119698657A_ABST
    Figure CN119698657A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a voice signal output method and electronic equipment. According to the method, a first voice signal can be generated, wherein the first voice signal refers to an interference signal generated according to a downlink voice signal; a second voice signal is generated, and the second voice signal is a voice signal which is obtained after the downlink voice signal is subjected to time delay processing and has the same time delay as the first voice signal; then, at the same output time, the second voice signal can be output through the first sound production assembly which can be close to the human ear, and the first voice signal can be output through the second sound production assembly which is far away from the human ear. Therefore, the downlink voice signal can be masked through the interference signal generated according to the downlink voice signal, so that other people except the user cannot clearly hear the call content of the user, and the privacy of the user is well protected.
Need to check novelty before this filing date? Find Prior Art

Description

Voice signal output method and electronic device

[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office on August 11, 2022, with application number 202210960657.7 and invention name “A method for outputting a voice signal and an electronic device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of terminal technology, and in particular to a method for outputting a voice signal and an electronic device. Background Art

[0003] Currently, to reduce sound leakage during handheld calls, electronic devices can generate sound through the sound-generating components of the ceramic-driven screen. This allows the screen's sound-generating area to face the user's ear during a handheld call, allowing the majority of the sound from the electronic device to reach the user's ear, with only a minimal amount leaking into the surrounding environment. This effectively protects the user's privacy by preventing others from clearly hearing the conversation.

[0004] However, if the user increases the call volume, further increasing the loudness of the sound in the human ear, the drive of the ceramic devices in the sound-emitting component of the ceramic-driven screen will increase. In this way, the intensity of the sound leaked to the user's surroundings will also increase, and other people will be able to hear the user's call content clearly, thereby causing the leakage of user privacy and a poor user experience.

[0005] Summary of the Invention

[0006] The embodiments of the present application provide a method for outputting a voice signal and an electronic device to solve the problem that, in current electronic devices, increasing the volume in a handheld call scenario may cause the user's call content to be leaked, resulting in a poor user experience.

[0007] In a first aspect, an embodiment of the present application provides a method for outputting a voice signal, which is used for an electronic device, wherein the electronic device includes a first sound-emitting component and a second sound-emitting component, the first sound-emitting component being arranged at a first position of the electronic device, and when a user holds the electronic device to talk, the first position is close to the user's ear, and the second sound-emitting component is arranged at a second position different from the first position. The method includes: generating a first voice signal, wherein the first voice signal refers to an interference signal generated based on a downlink voice signal; generating a second voice signal, wherein the second voice signal refers to a voice signal having the same time delay as the first voice signal obtained after delay processing of the downlink voice signal; and outputting the second voice signal through the first sound-emitting component and the first voice signal through the second sound-emitting component at the same output time.

[0008] In this way, the interference signal generated based on the downlink voice signal can mask the downlink voice signal. When a user is making a call with their electronic device, the sound intensity reaching their ears is high enough to ensure they can clearly hear the conversation. However, for other people in the surrounding environment, the interference signal masks the downlink voice signal, so the sound intensity reaching their ears is low and incomplete, making it difficult for them to hear the conversation clearly. This effectively protects user privacy and provides a better user experience.

[0009] In one implementation, generating the first voice signal includes: generating a first power spectral density, where the first power spectral density refers to a power spectral density calculated according to the downlink voice signal; and generating the first voice signal according to the first power spectral density.

[0010] In one implementation, generating the first speech signal based on the first power spectral density includes: generating a masking signal and a pink noise signal based on the first power spectral density; adjusting the masking signal and the pink noise signal to have the same time delay; and generating the first speech signal based on the masking signal and the pink noise signal adjusted to have the same time delay.

[0011] In this way, the generated first voice signal can mask the signal of the frequency point with a larger power spectral density value in the downlink voice signal. After the first voice signal and the second voice signal are output simultaneously, the intensity of the sound entering the ears of other people in the user's surrounding environment is weakened, so that they cannot hear the user's call content clearly, which can well protect the user's privacy and provide a better user experience.

[0012] In one implementation, generating a masking signal based on the first power spectral density includes: determining a first average power based on the first power spectral density, where the first average power refers to the average value of power spectral density values ​​of all frequency points corresponding to the first power spectral density; determining a first frequency point, where the first frequency point refers to a frequency point among all frequency points corresponding to the first power spectral density, whose corresponding power spectral density value is greater than the first average power; and generating the masking signal based on the first frequency point.

[0013] In this way, a masking sound can be generated that can mask out signals with larger power spectral density values ​​in the downlink voice signal. Subsequently, the signal with larger power spectral density values ​​in the downlink voice signal can be masked out, so that the intensity of the sound entering the ears of other people in the user's surrounding environment is weakened, making it impossible for them to hear the user's conversation content clearly, thereby effectively protecting the user's privacy.

[0014] In one implementation, generating the masking signal based on the first frequency point includes: if there are multiple first frequency points, and the frequency value difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is less than a first preset frequency threshold, then selecting a first preset number of first frequency points from all the first frequency points in descending order of corresponding power spectrum density values, and determining them as second frequency points; determining a third frequency point, where the third frequency point is located between two adjacent second frequency points; determining the amplitude corresponding to the third frequency point according to a preset human ear masking effect curve, where the amplitude is used to characterize the strength of the signal; and generating the masking signal according to the frequency value of the third frequency point and the amplitude corresponding to the third frequency point.

[0015] In this way, when the frequency points where the power spectrum density value is greater than the first average power are relatively concentrated, a relatively accurate masking signal can be determined, and the subsequent masking effect is better.

[0016] In one implementation, generating the masking signal based on the first frequency point includes: if there are multiple first frequency points, and the frequency value difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is greater than or equal to a first preset frequency threshold, then selecting the first frequency point with the largest corresponding power spectrum density value, the first frequency point with the largest frequency value, and the first frequency point with the smallest frequency value from all the first frequency points, and determining them as the fourth frequency point; near each of the fourth frequency points, and between each of the fourth frequency points, where the frequency value difference is less than or equal to the second preset frequency threshold, selecting a frequency point respectively, and determining it as the fifth frequency point; determining the amplitude corresponding to the fifth frequency point according to a preset human ear masking effect curve, the amplitude being used to characterize the strength of the signal; generating the masking signal according to the frequency value of the fifth frequency point and the amplitude corresponding to the fifth frequency point.

[0017] In this way, when the frequency points with power spectrum density values ​​greater than the first average power are relatively discrete and the frequency value difference between the maximum frequency point and the minimum frequency point is relatively large, a relatively accurate masking signal can be determined and the subsequent masking effect is better.

[0018] In one implementation, generating the masking signal based on the first frequency point includes: if there are multiple first frequency points, and the frequency value difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is greater than or equal to a first preset frequency threshold, then in each frequency point interval, in descending order of the corresponding power spectrum density values, selecting a second preset number of first frequency points and determining them as the sixth frequency point, wherein the frequency value difference between the end frequency point and the starting frequency point of each frequency point interval is less than or equal to a third preset frequency threshold, and the number of first frequency points included in each frequency point interval is greater than or equal to a third preset number; determining a seventh frequency point corresponding to each frequency point interval, wherein the seventh frequency point is located between two adjacent sixth frequency points in the corresponding frequency point interval; determining the amplitude corresponding to the seventh frequency point according to a preset human ear masking effect curve, wherein the amplitude is used to characterize the strength of the signal; generating the masking signal according to the frequency value of the seventh frequency point and the amplitude corresponding to the seventh frequency point.

[0019] In this way, when there are two or more dense intervals of frequency points with power spectrum density values ​​greater than the first average power, and the frequency value difference between the frequency point with the largest frequency value and the frequency point with the smallest frequency value is large, a more accurate masking signal can be determined, and the subsequent masking effect is better.

[0020] In one implementation, generating the masking signal based on the first frequency point includes: if the number of the first frequency points is one, selecting a frequency point on both sides of the first frequency point and determining it as the eighth frequency point; determining the amplitude corresponding to the eighth frequency point according to a preset human ear masking effect curve, the amplitude being used to characterize the strength of the signal; and generating the masking signal according to the frequency value of the eighth frequency point and the amplitude corresponding to the eighth frequency point.

[0021] In this way, when there is only one frequency point with a power spectrum density value greater than the first average power, a relatively accurate masking signal can be determined, and a subsequent masking effect is better.

[0022] In one implementation, generating the masking signal based on the first frequency point includes: if the number of the first frequency points is one, selecting a frequency point on both sides of the first frequency point and determining it as the ninth frequency point; selecting a frequency point between each of the ninth frequency points and the first frequency point and determining it as the tenth frequency point; determining the amplitude corresponding to the tenth frequency point according to a preset human ear masking effect curve, the amplitude being used to characterize the strength of the signal; and generating the masking signal according to the frequency value of the tenth frequency point and the amplitude corresponding to the tenth frequency point.

[0023] In this way, when there is only one frequency point with a power spectrum density value greater than the first average power, a relatively accurate masking signal can be determined, and a subsequent masking effect is better.

[0024] In one implementation, generating a pink noise signal based on the first power spectral density includes: determining a second average power, where the second average power refers to an average of power spectral density values ​​of all eleventh frequency points, where the eleventh frequency point refers to a frequency point whose power spectral density value is less than or equal to the first average power among all frequency points corresponding to the first power spectral density, and the first average power refers to an average of power spectral density values ​​of all frequency points corresponding to the first power spectral density; obtaining a preset pink noise bandpass filter gain corresponding to the second average power; adjusting the gain of the first bandpass filter to the preset pink noise bandpass filter gain; and performing bandpass filtering on a signal output by a pink noise signal source using the first bandpass filter after gain adjustment to generate the pink noise signal.

[0025] In this way, a pink noise signal that can cooperate with the masking signal can be determined, so that the subsequently generated interference signal can better mask the downlink voice signal, thereby better protecting the user's call privacy.

[0026] In one implementation, generating the first speech signal based on the first power spectrum density includes: determining a first average power based on the first power spectrum density, where the first average power refers to the average value of the power spectrum density values ​​of all frequency points corresponding to the first power spectrum density; determining a twelfth frequency point, where the twelfth frequency point refers to a frequency point whose corresponding power spectrum density value is greater than the first average power among all frequency points corresponding to the first power spectrum density; selecting a fourth preset number of twelfth frequencies from all the twelfth frequencies in descending order of corresponding power spectrum density values, and determining them as the thirteenth frequency point; generating a notch filter based on the thirteenth frequency point, where the notch frequency of the notch filter includes the frequency value of the thirteenth frequency point; and performing notch filtering on the signal output by the pink noise signal source through the notch filter to generate the first speech signal.

[0027] In this way, the generated first voice signal can mask most of the remaining signals in the downlink voice signal except for the signals of the frequency points with larger power spectral density values. After the first voice signal and the second voice signal are output simultaneously, the sound entering the ears of other people in the user's surrounding environment lacks the information of the signals of most frequency points, making it impossible to hear the user's call content clearly. It can also protect the user's privacy well and provide a better user experience.

[0028] In one implementation, generating the first power spectral density includes: bandpass filtering the downlink voice signal through a second bandpass filter to obtain a first signal within a first bandwidth range; the first bandwidth is the bandwidth of the second bandpass filter; calculating the power spectral density of the first signal; and determining that the power spectral density of the first signal is the first power spectral density.

[0029] In this way, the signals in the downlink voice signal that are inaudible to the human ear can be filtered out by the second bandpass filter, thereby improving the output efficiency of the downlink voice signal, making the call process smoother and the user experience better.

[0030] In one implementation, the electronic device also includes a third sound-emitting component, which is arranged at a third position close to the first position. The method also includes: generating a third voice signal, wherein the third voice signal refers to a voice signal having the same delay as the first voice signal obtained after delay processing of the downlink voice signal; and outputting the third voice signal through the third sound-emitting component at the same output time.

[0031] In this way, the sound emitted by the third sound-emitting component can supplement the sound emitted by the first sound-emitting component, making the sound heard by the user clearer and improving the user experience.

[0032] In a second aspect, an embodiment of the present application provides an electronic device, comprising a first sound-emitting component and a second sound-emitting component, wherein the first sound-emitting component is arranged at a first position of the electronic device, and when a user holds the electronic device to talk, the first position is close to the user's ear, and the second sound-emitting component is arranged at a second position different from the first position. The electronic device also includes a memory and a processor, and the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes any one of the methods described in the first aspect.

[0033] In this way, electronic devices can mask downlink voice signals by generating interference signals based on the downlink voice signals. When a user is holding an electronic device and making a call, the sound intensity reaching the user's ears is sufficiently high to ensure that the user can clearly hear the conversation. However, for other people in the surrounding environment, the sound intensity reaching their ears is low and incomplete due to the interference signal masking the downlink voice signal, making it difficult for them to clearly hear the user's conversation. This effectively protects the user's privacy and provides a better user experience.

[0034] In a third aspect, the present application provides a computer storage medium, wherein a computer program or instruction is stored in the computer storage medium. When the computer program or instruction is executed, the method as described in any one of the first aspects is executed.

[0035] In summary, the voice signal output method and electronic device provided by the embodiments of the present application can mask the downlink voice signal by generating an interference signal based on the downlink voice signal. When a user holds an electronic device to make a call, the sound intensity entering the user's ears is large enough to ensure that the user can clearly hear the content of the call. As for other people in the surrounding environment, due to the masking effect of the interference signal on the downlink voice signal, the intensity of the sound transmitted to these people's ears is relatively small, and the information is incomplete, making it impossible for these people to hear the content of the user's call clearly, thereby well protecting the user's privacy and providing a better user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] FIG1 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0037] FIG2 is a block diagram of the software structure of the electronic device provided in an embodiment of the present application;

[0038] FIG3 is a flow chart of a method for outputting a voice signal according to an embodiment of the present application;

[0039] FIG4 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0040] FIG5 is a flow chart of a method for generating a first speech signal according to an embodiment of the present application;

[0041] FIG6 is a flow chart of a method for generating a first speech signal according to a first power spectrum density according to an embodiment of the present application;

[0042] 7 is a flow chart of a method for generating a masking signal according to a first power spectrum density according to an embodiment of the present application;

[0043] FIG8 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0044] FIG9 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0045] FIG10 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0046] FIG11 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0047] FIG12 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0048] FIG13 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0049] FIG14 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0050] FIG15 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0051] FIG16 is a schematic diagram of another application scenario provided by an embodiment of the present application;

[0052] FIG17 is a flow chart of a method for generating a pink noise signal according to a first power spectrum density according to an embodiment of the present application;

[0053] FIG18 is a flow chart of another method for generating a first speech signal according to a first power spectrum density according to an embodiment of the present application;

[0054] FIG19 is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0055] The technical solution of this application is described below in conjunction with the accompanying drawings.

[0056] In the description of this application, unless otherwise specified, "and / or" is merely a description of the association relationship between related objects, indicating that three relationships can exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, and B exists alone. In addition, "at least one" means one or more, "at least two" means two or more, and "plurality" also means two or more. Words such as "first" and "second" do not limit the quantity or execution order, and words such as "first" and "second" do not necessarily mean different.

[0057] It should be noted that, in this application, words such as "exemplarily" or "for example" are used to indicate examples, illustrations, or explanations. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplarily" or "for example" is intended to present the relevant concepts in a concrete manner.

[0058] In order to facilitate understanding of the technical solution of the present application, the application scenarios of the technical solution provided by the present application are first exemplified below.

[0059] At present, multiple sound-emitting components can be set in electronic devices, for example, through the sound-emitting components of the ceramic-driven screen, the speakers set on the top and the speakers set on the bottom. In the scenario of handheld calls, electronic devices usually make sounds through the sound-emitting components of the ceramic-driven screen and / or the speakers set on the top. In this way, when the user is making a handheld call, the screen sound-emitting area of ​​the sound-emitting component of the ceramic-driven screen can be directly facing the user's ear, and the top speaker can also be close to the user's ear. Most of the sound emitted by the electronic device can enter the user's ear, and only a very small part of the sound will leak into the surrounding environment. Even if there are other people in the surrounding environment, they cannot hear the content of the user's call clearly, which can well protect the user's privacy.

[0060] However, when the user turns up the volume of the call to further increase the loudness of the sound in the ear, the ceramic drive will increase further, and the sound emitted by the sound-emitting components of the ceramic drive screen and the sound emitted by the speakers installed on the top will also increase in intensity, causing the intensity of the sound leaked into the surrounding environment to increase synchronously. In this way, other people in the surrounding environment can clearly hear the content of the user's call, thereby leading to the leakage of the user's call content, causing the user's privacy to be leaked, and a poor user experience.

[0061] In order to solve the above technical problems, the embodiments of the present application provide a method, device and electronic device for outputting a voice signal. This method can be applied to electronic devices. Through this method, the electronic device can generate an interference signal based on the downlink voice signal during the user's call, and then adjust the downlink voice signal and the interference signal to the same time delay. At the same output time, the downlink voice signal is output through the first sound component of the electronic device close to the human ear, and the interference signal is output through the second sound component far away from the human ear, thereby masking the downlink voice signal through the interference signal, making it impossible for other people in the surrounding environment to hear the user's call content clearly, thereby achieving the purpose of protecting the user's call privacy and providing a better user experience.

[0062] It should be noted that the electronic device of the present application can be stationary or mobile. The electronic device may include a communication terminal, a vehicle-mounted device, a mobile device, a user terminal, a mobile terminal, a wireless communication device, a portable terminal, a user agent, a user device, a service device or a user equipment (UE) in a computer network at the outermost edge of the network, mainly used for inputting data and outputting or displaying processing results. For example, the terminal device can be a mobile phone, a cordless phone, a smart watch, a wearable device, a tablet device, a handheld device with wireless communication function, a computing device, a vehicle-mounted communication module or other processing equipment connected to a wireless modem.

[0063] For example, please refer to FIG1 , which shows a schematic structural diagram of an electronic device 100 .

[0064] The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, 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 button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, etc. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, etc.

[0065] It should be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0066] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors.

[0067] The controller can generate operation control signals according to the instruction operation code and timing signal to complete the control of instruction fetching and execution.

[0068] Processor 110 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 110 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 110. If processor 110 needs to use the same instruction or data again, it can directly access the memory. This avoids duplicate accesses, reduces processor 110 latency, and thus improves system efficiency.

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

[0070] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple I2C bus lines. The processor 110 may be coupled to the touch sensor 180K, the charger, the flash, the camera 193, and the like via different I2C bus interfaces. For example, the processor 110 may be coupled to the touch sensor 180K via the I2C interface, enabling communication between the processor 110 and the touch sensor 180K via the I2C bus interface, thereby implementing the touch function of the electronic device 100.

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

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

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

[0074] The MIPI interface can be used to connect the processor 110 to peripheral devices such as the display 194 and the camera 193. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor 110 and the camera 193 communicate via the CSI interface to implement the camera function of the electronic device 100. The processor 110 and the display 194 communicate via the DSI interface to implement the display function of the electronic device 100.

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

[0076] The USB interface 130 is an interface that complies with USB standards and may be a Mini USB interface, a Micro USB interface, a USB Type-C interface, or the like. The USB interface 130 can be used to connect a charger to charge the electronic device 100, or to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as augmented reality devices.

[0077] It is understood that the interface connection relationship between the modules illustrated in the embodiment of the present invention is merely an illustrative illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0078] The charging management module 140 is configured to receive charging input from a charger. The charger can be either a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 can receive charging input from the wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 can receive wireless charging input via the wireless charging coil of the electronic device 100. While charging the battery 142, the charging management module 140 can also provide power to the electronic device via the power management module 141.

[0079] The power management module 141 is used to connect the battery 142, the charging management module 140, and the processor 110. The power management module 141 receives input from the battery 142 and / or the charging management module 140, and provides power to the processor 110, the internal memory 121, the display 194, the camera 193, and the wireless communication module 160. The power management module 141 can also be used to monitor parameters such as battery capacity, battery cycle count, and battery health status (leakage, impedance). In some other embodiments, the power management module 141 can also be set in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 can also be set in the same device.

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

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

[0082] The mobile communication module 150 can provide solutions for wireless communications including 2G / 3G / 4G / 5G applied to the electronic device 100. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module 150 can receive electromagnetic waves from the antenna 1, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module 150 can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the antenna 1. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 can be set in the same device as at least some of the modules of the processor 110.

[0083] The modem processor may include a modulator and a demodulator. The modulator is used to modulate the low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After being processed by the baseband processor, the low-frequency baseband signal is passed to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be an independent device. In other embodiments, the modem processor may be independent of the processor 110 and be set in the same device as the mobile communication module 150 or other functional modules.

[0084] The wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc., which are applied to the electronic device 100. The wireless communication module 160 can 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, frequency modulates and filters the electromagnetic wave signals, and sends the processed signals to the processor 110. The wireless communication module 160 can also receive the signal to be sent from the processor 110, frequency modulate it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 2.

[0085] In some embodiments, the antenna 1 of the electronic device 100 is coupled to the mobile communication module 150, and the antenna 2 is coupled to the wireless communication module 160, so that the electronic device 100 can communicate with a network and other devices through wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include a global positioning system (GPS), a global navigation satellite system (GLONASS), a Beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS) and / or a satellite based augmentation system (SBAS).

[0086] Electronic device 100 implements display functionality through a GPU, display screen 194, and an application processor. A GPU is a microprocessor for image processing that connects display screen 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 modify display information.

[0087] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 can include one or N display screens 194, where N is a positive integer greater than 1. In other embodiments, the display screen 194 of the electronic device 100 can also be referred to as a screen 194. A sound-emitting area can also be provided on the screen 194 of the electronic device 100. The electronic device 100 can drive the screen in the sound-emitting area through ceramic or other driving devices to produce sound. In the scenario of a handheld call, the sound-emitting area on the screen 194 can be directly facing the human ear.

[0088] The electronic device 100 can implement a shooting function through an ISP, a camera 193, a video codec, a GPU, a display screen 194, and an application processor.

[0089] The ISP processes data fed back by camera 193. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then passed to the ISP for processing and converted into a visible image. The ISP can also perform algorithmic optimization on image noise, brightness, and skin tone. It can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be located within camera 193.

[0090] The camera 193 is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion 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 other format. In some embodiments, the electronic device 100 may include 1 or N cameras 193, where N is a positive integer greater than 1.

[0091] The digital signal processor is used to process digital signals. In addition to processing digital image signals, it can also process other digital signals. For example, when the electronic device 100 selects a frequency point, the digital signal processor is used to perform Fourier transform on the frequency point energy.

[0092] Video codecs are used to compress or decompress digital video. Electronic device 100 may support one or more video codecs. This allows electronic device 100 to play or record videos in various encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.

[0093] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU can enable intelligent cognitive applications in electronic device 100, such as image recognition, face recognition, speech recognition, and text comprehension.

[0094] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 via the external memory interface 120 to implement data storage functions. For example, files such as music and videos can be stored on the external memory card.

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

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

[0097] The audio module 170 is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module 170 can also be used to encode and decode audio signals. In some embodiments, the audio module 170 can be provided in the processor 110, or some functional modules of the audio module 170 can be provided in the processor 110.

[0098] Speaker 170A, also known as a "horn," is used to convert audio electrical signals into sound signals. Electronic device 100 can use speaker 170A to listen to music or make hands-free calls. Multiple speakers 170A can be provided in electronic device 100. For example, one speaker 170A can be provided on the top of electronic device 100, another speaker 170A can be provided on the bottom, and so on.

[0099] Receiver 170B, also known as an "earpiece," is used to convert audio signals into sound signals. When electronic device 100 receives a call or voice message, the user can hold receiver 170B close to their ear to listen to the voice. In some embodiments, speaker 170A and receiver 170B may be integrated into one component, although this is not a limitation of the present invention.

[0100] Microphone 170C, also known as "microphone" or "microphone", is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by putting their mouth close to the microphone 170C to input the sound signal into the microphone 170C. The electronic device 100 can be provided with at least one microphone 170C. In other embodiments, the electronic device 100 can be provided with two microphones 170C, which can not only collect sound signals but also realize noise reduction function. In other embodiments, the electronic device 100 can also be provided with three, four or more microphones 170C to collect sound signals, reduce noise, identify the source of sound, realize directional recording function, etc.

[0101] The headphone jack 170D is used to connect a wired headphone and can be the USB interface 130 or a 3.5mm open mobile terminal platform (OMTP) standard interface or a cellular telecommunications industry association of the USA (CTIA) standard interface.

[0102] Pressure sensor 180A is used to sense pressure signals and convert them into electrical signals. In some embodiments, pressure sensor 180A can be located on display screen 194. There are many types of pressure sensors 180A, such as resistive, inductive, and capacitive. A capacitive pressure sensor can include at least two parallel plates made of conductive material. When force acts on pressure sensor 180A, the capacitance between the electrodes changes. Electronic device 100 determines the intensity of the pressure based on this change in capacitance. When a touch operation is applied to display screen 194, electronic device 100 detects the touch intensity based on pressure sensor 180A. Electronic device 100 can also calculate the touch location based on the detection signal from pressure sensor 180A. In some embodiments, touch operations applied to the same touch location but with different touch intensities can correspond to different operation instructions. For example, when a touch operation with an intensity less than a first pressure threshold is applied to a short message application icon, a command to view short messages is executed. When a touch operation with an intensity greater than or equal to the first pressure threshold is applied to a short message application icon, a command to create a new short message is executed.

[0103] The gyroscope sensor 180B can be used to determine the motion posture of the electronic device 100. In some embodiments, the angular velocity of the electronic device 100 around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor 180B. The gyroscope sensor 180B can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor 180B detects the angle of the electronic device 100 shaking, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shaking of the electronic device 100 through reverse movement to achieve anti-shake. The gyroscope sensor 180B can also be used for navigation and somatosensory game scenes.

[0104] The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 100 calculates the altitude using the air pressure value measured by the air pressure sensor 180C to assist in positioning and navigation.

[0105] The magnetic sensor 180D includes a Hall sensor. The electronic device 100 can use the magnetic sensor 180D to detect the opening and closing of the flip case. In some embodiments, when the electronic device 100 is a flip phone, the electronic device 100 can detect the opening and closing of the flip cover based on the magnetic sensor 180D. Based on the detected opening and closing status of the case or flip cover, features such as automatic unlocking of the flip cover can be configured.

[0106] Accelerometer 180E can detect the magnitude of acceleration of electronic device 100 in all directions (generally three axes). It can also detect the magnitude and direction of gravity when electronic device 100 is stationary. It can also be used to identify the electronic device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.

[0107] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance using infrared or laser. In some embodiments, when shooting a scene, the electronic device 100 can use the distance sensor 180F to measure distance to achieve fast focusing.

[0108] 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 electronic device 100 emits infrared light outward through the light emitting diode. The electronic device 100 uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 100. When insufficient reflected light is detected, the electronic device 100 can determine that there is no object near the electronic device 100. The electronic device 100 can use the proximity light sensor 180G to detect that the user is holding the electronic device 100 close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor 180G can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.

[0109] Ambient light sensor 180L is used to sense ambient light brightness. Electronic device 100 can adaptively adjust the brightness of display screen 194 based on the perceived ambient light. Ambient light sensor 180L can also be used to automatically adjust white balance when taking photos. Ambient light sensor 180L can also work with proximity light sensor 180G to detect whether electronic device 100 is in a pocket to prevent accidental touches.

[0110] The fingerprint sensor 180H is used to collect fingerprints. The electronic device 100 can use the collected fingerprint characteristics to implement fingerprint unlocking, access application locks, fingerprint photography, fingerprint call answering, etc.

[0111] The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 100 uses the temperature detected by the temperature sensor 180J to execute a temperature processing strategy. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 100 reduces the performance of the processor located near the temperature sensor 180J to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 heats the battery 142 to prevent the electronic device 100 from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than another threshold, the electronic device 100 boosts the output voltage of the battery 142 to prevent abnormal shutdown due to low temperature.

[0112] The touch sensor 180K is also called a "touch-sensitive device." The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also called a "touch screen." The touch sensor 180K is used to detect touch operations applied thereto or in the vicinity thereof. The touch sensor can transmit the detected touch operations to the application processor to determine the type of touch event. Visual output related to the touch operations can be provided via the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a location different from that of the display screen 194.

[0113] The bone conduction sensor 180M can obtain vibration signals. In some embodiments, the bone conduction sensor 180M can obtain vibration signals from the vibrating bones of the human body. The bone conduction sensor 180M can also contact the human pulse to receive blood pressure pulse signals. In some embodiments, the bone conduction sensor 180M can also be set in headphones to form bone conduction headphones. The audio module 170 can parse out voice signals based on the vibration signals of the vibrating bones of the human body obtained by the bone conduction sensor 180M to implement voice functions. The application processor can parse heart rate information based on the blood pressure pulse signals obtained by the bone conduction sensor 180M to implement heart rate detection functions.

[0114] The buttons 190 include a power button, a volume button, and the like. The buttons 190 may be mechanical buttons or touch buttons. The electronic device 100 may receive key inputs and generate key signal inputs related to user settings and function control of the electronic device 100.

[0115] Motor 191 can generate vibration prompts. Motor 191 can be used for incoming call vibration prompts, and can also be used for touch vibration feedback. For example, touch operations acting on different applications (such as taking pictures, audio playback, etc.) can correspond to different vibration feedback effects. For touch operations acting on different areas of the display screen 194, motor 191 can also correspond to different vibration feedback effects. Different application scenarios (for example: time reminders, receiving messages, alarm clocks, games, etc.) can also correspond to different vibration feedback effects. The touch vibration feedback effect can also support customization.

[0116] The indicator 192 may be an indicator light, which may be used to indicate the charging status, power level changes, messages, missed calls, notifications, etc.

[0117] The SIM card interface 195 is used to connect a SIM card. The SIM card can be connected to or disconnected from the electronic device 100 by inserting it into or removing it from the SIM card interface 195. The electronic device 100 can support 1 or N SIM card interfaces, where N is a positive integer greater than 1. The SIM card interface 195 can support Nano SIM cards, Micro SIM cards, SIM cards, and the like. Multiple cards can be inserted into the same SIM card interface 195 at the same time. The types of the multiple cards can be the same or different. The SIM card interface 195 can also be compatible with different types of SIM cards. The SIM card interface 195 can also be compatible with external memory cards. The electronic device 100 interacts with the network through the SIM card to implement functions such as calls and data communications. In some embodiments, the electronic device 100 uses an eSIM, i.e., an embedded SIM card. The eSIM card can be embedded in the electronic device 100 and cannot be separated from the electronic device 100.

[0118] The software system of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a micro-service architecture, or a cloud architecture. In the embodiment of the present invention, the Android system with a layered architecture is used as an example to illustrate the software structure of the electronic device 100.

[0119] FIG2 is a block diagram of the software structure of the electronic device 100 according to an embodiment of the present application.

[0120] A layered architecture divides software into several layers, each with distinct roles and responsibilities. Layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into four layers: the application layer, the application framework layer, the Android runtime and system libraries, and the kernel layer.

[0121] The application layer can include a series of application packages.

[0122] As shown in FIG2 , the application package may include applications such as camera, gallery, calendar, call, map, navigation, WLAN, Bluetooth, music, video, and short message.

[0123] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions.

[0124] As shown in FIG2 , 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.

[0125] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0126] Content providers are used to store and retrieve data and make it accessible to applications. The data may include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0127] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0128] The phone manager is used to provide communication functions of the electronic device 100, such as management of call status (including answering, hanging up, etc.).

[0129] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0130] The Notification Manager allows applications to display notifications in the status bar. These messages can be displayed briefly and then disappear automatically without user interaction. For example, the Notification Manager is used to notify users of completed downloads and message reminders. The Notification Manager can also display notifications in the top status bar of the system as icons or scrolling text, such as notifications from background applications, or as dialog windows on the screen. Examples include displaying text messages in the status bar, emitting alert sounds, vibrating electronic devices, or flashing indicator lights.

[0131] Android Runtime includes core libraries and a virtual machine. Android runtime is responsible for scheduling and management of the Android system.

[0132] The core library consists of two parts: one is the function that needs to be called by the Java language, and the other is the Android core library.

[0133] The application layer and application framework layer run in a virtual machine. The virtual machine executes Java files in the application layer and application framework layer as binary files. The virtual machine manages object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0134] The system library can include multiple functional modules, such as surface manager, media library, 3D graphics processing library (such as OpenGL ES), 2D graphics engine (such as SGL), etc.

[0135] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0136] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0137] The 3D graphics processing library is used to implement 3D graphics drawing, image rendering, compositing, and layer processing.

[0138] A 2D graphics engine is a drawing engine for 2D drawings.

[0139] The kernel layer is the layer between hardware and software. The kernel layer includes at least display driver, camera driver, audio driver, and sensor driver.

[0140] The following describes the workflow of the software and hardware of the electronic device 100 in conjunction with capturing a photo scene.

[0141] When the touch sensor 180K receives a touch operation, the corresponding hardware interrupt is sent to the kernel layer. The kernel layer processes the touch operation into a raw input event (including touch coordinates, touch operation timestamp, and other information). The raw input event is stored in the kernel layer. The application framework layer obtains the raw input event from the kernel layer and identifies the control corresponding to the input event. For example, if the touch operation is a touch single-click operation and the control corresponding to the single-click operation is the control of the camera application icon, the camera application calls the interface of the application framework layer to start the camera application, and then starts the camera driver by calling the kernel layer to capture a still image or video through the camera 193.

[0142] The following describes an embodiment of the method for outputting a speech signal provided by the present application.

[0143] Referring to Figure 3, Figure 3 is a flow chart of a method for outputting a voice signal provided in an embodiment of the present application. The method can be applied to an electronic device, in which a first sound-emitting component and a second sound-emitting component are provided. The first sound-emitting component can be set at a first position of the electronic device, and when the user holds the electronic device for a call, that is, when the electronic device is in a handheld call application scenario, the first position is close to the user's ear. The second sound-emitting component can be set at a second position in the electronic device that is different from the first position.

[0144] For example, see Figure 4, which is a schematic diagram of an application scenario provided by an embodiment of the present application. As shown in Figure 4, the first location can be on the screen 194 of the electronic device 100, and the first sound-emitting component 401 can be a sound-emitting component of a ceramic-driven screen. The second location can be at the bottom of the electronic device 100, and the second sound-emitting component 402 can be a speaker disposed at the bottom of the electronic device 100.

[0145] It should be noted that the first position and the second position can also be located elsewhere on the electronic device. For example, the first position can be located at the top of the electronic device, above the screen. The second position can also be located on the side of the electronic device, etc. This application does not limit this. Similarly, the first sound component and the second sound component can also be configured as other sound components. For example, the first sound component can be a speaker located at the top of the electronic device, and the second sound component can be a speaker located on the side of the electronic device, etc. This application does not limit this.

[0146] As shown in FIG3 , the method may include the following steps:

[0147] Step S101: Generate a first speech signal.

[0148] The first voice signal refers to an interference signal generated according to a downlink voice signal. The downlink voice signal may be a downlink voice signal in a user call.

[0149] It should be noted that in the application scenario of handheld calls, the electronic device held by the user (hereinafter referred to as the electronic device) can receive in real time and continuously downlink voice signals transmitted to the electronic device by other terminal devices (hereinafter referred to as the terminal device). After each downlink voice signal is received, the electronic device can process the received downlink voice signal according to the voice signal output method provided in the embodiment of the present application and then output it.

[0150] As shown in FIG5 , generating the first speech signal can be achieved by following the steps below:

[0151] Step S201: Generate a first power spectrum density.

[0152] The first power spectrum density refers to the power spectrum density calculated according to the downlink voice signal.

[0153] In one possible implementation, the first power spectral density may be the power spectral density of the downlink voice signal. In a specific implementation, the power spectral density of the downlink voice signal may be calculated using an autocorrelation function method, and then the calculated power spectral density of the downlink voice signal is determined as the first power spectral density.

[0154] In another possible implementation, the downlink voice signal can be first bandpass filtered using a pre-set second bandpass filter to obtain a first signal within a first bandwidth range, where the first bandwidth is the bandwidth of the second bandpass filter. The power spectral density of the first signal is then calculated using an autocorrelation function method, and the calculated power spectral density of the first signal is then determined as the first power spectral density. In this way, signals in the downlink voice signal that are inaudible to the human ear can be filtered out using the second bandpass filter, thereby improving the output efficiency of the downlink voice signal, making the call process smoother and providing a better user experience.

[0155] Step S202: Generate a first speech signal according to the first power spectrum density.

[0156] In a specific implementation, generating the first speech signal according to the first power spectrum density may include multiple implementation methods. For example, as shown in FIG6 , generating the first speech signal according to the first power spectrum density may be implemented by following the steps below:

[0157] Step S301: Generate a masking signal and a pink noise signal according to a first power spectrum density.

[0158] Among them, the masking signal can be used to mask the downlink voice signal. After the two are output at the same time, the intensity of the sound signal corresponding to the downlink voice signal entering the ears of other people in the surrounding environment is weakened, and the information is incomplete. Even if the user increases the volume, other people in the surrounding environment will not be able to hear the user's conversation content clearly, which can well protect the user's privacy.

[0159] As shown in FIG7 , generating a masking signal according to the first power spectrum density can be achieved by following the steps below:

[0160] Step S401: Determine a first average power according to a first power spectrum density.

[0161] The first average power refers to the average value of the power spectrum density values ​​of all frequency points corresponding to the first power spectrum density.

[0162] Step S402: Determine a first frequency point.

[0163] The first frequency point refers to a frequency point whose corresponding power spectrum density value is greater than the first average power among all frequency points corresponding to the first power spectrum density.

[0164] For example, as shown in FIG8 , among all frequency points corresponding to the first power spectrum density, the power spectrum density values ​​corresponding to frequency points f1 , f2 , and f3 are greater than the first average power, and frequency points f1 , f2 , and f3 can all be determined as first frequency points.

[0165] Step S403: Generate a masking signal according to the first frequency point.

[0166] In a specific implementation, the number of the first frequency points may be multiple or one. Based on this, there may also be multiple implementations of generating the masking signal according to the first frequency point.

[0167] For example, if there are multiple first frequency points, and the frequency difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is less than a first preset frequency threshold, then a first preset number of first frequency points are selected from all the first frequency points in descending order of the corresponding power spectrum density values ​​and determined as the second frequency points. The first preset frequency threshold can be set according to the requirements of the actual application scenario, for example, it can be set to 1000 Hz. The first preset number can also be set according to the requirements of the actual application scenario, for example, it can be set to 3 or 5.

[0168] Then, a third frequency point is determined. The third frequency point is located between two adjacent second frequency points. That is, a third frequency point can be selected between every two adjacent second frequency points. The determined third frequency point can be used as the frequency point of the single masking sound. Optionally, a frequency point can be arbitrarily selected between two adjacent second frequency points and determined as the third frequency point. Optionally, a frequency point located between two adjacent second frequency points can also be selected as the third frequency point, and this application does not limit this.

[0169] Next, the amplitude corresponding to the third frequency point can be determined based on a preset human ear masking effect curve. This amplitude can be used to characterize the strength of the signal. Finally, a masking signal can be generated based on the frequency value of the third frequency point and the amplitude corresponding to the third frequency point. The masking signal includes a signal with a frequency corresponding to the third frequency point and an amplitude corresponding to the corresponding third frequency point.

[0170] In a specific implementation, the frequency values ​​(hereinafter referred to as preset frequency values, in units of Hertz Hz) and amplitudes (hereinafter referred to as preset amplitudes) corresponding to the points included in the human ear masking effect curve can be stored in an electronic device. When determining the amplitude corresponding to the third frequency point according to the preset human ear masking effect curve, the preset frequency value that is the same as the frequency value of the third frequency point can be screened out from the stored preset frequency values, and then the preset amplitude stored corresponding to the screened preset frequency value is determined as the amplitude corresponding to the third frequency point. The amplitude can be sound intensity in decibels (dB), or the amplitude can also be a power spectrum density value in units of decibels / Hz, or the amplitude can also be power, etc. This application is not limited to this. Alternatively, if the preset frequency value that is the same as the frequency value of the third frequency point is not found from the stored preset frequency values, the amplitude corresponding to the third frequency point can be determined by interpolation based on the corresponding stored preset frequency value and preset amplitude.

[0171] For example, still as shown in Figure 8, the number of first frequency points is three, namely f1, f2 and f3, among which the frequency value of the first frequency point f3 with the largest frequency value is 400HZ, and the frequency value of the first frequency point f1 with the smallest frequency value is 100HZ. The frequency difference between the two is 300HZ, which is less than 1000HZ. Then the first frequency points f1, f2 and f3 can all be determined as second frequency points.

[0172] Then, as shown in FIG9 , a frequency point fa1 may be selected between the second frequency point f1 and the second frequency point f2, and a frequency point fa2 may be selected between the second frequency point f2 and the second frequency point f3. Then, the frequency points fa1 and fa2 are determined as the third frequency point.

[0173] Afterwards, the preset frequency values ​​that are the same as the frequency values ​​of the third frequency point fa1 and the frequency values ​​of the third frequency point fa2 can be found from the pre-stored preset frequency values, and then the corresponding preset amplitudes can be found, thereby determining the amplitudes corresponding to the third frequency point fa1 and the amplitudes corresponding to the third frequency point fa2, and thus determining the masking signal.

[0174] Exemplarily, if there are multiple first frequency points, and the frequency value difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is greater than or equal to the first preset frequency threshold, then the first frequency point with the largest corresponding power spectrum density value, the first frequency point with the largest frequency value, and the first frequency point with the smallest frequency value are selected from all the first frequency points and determined as the fourth frequency point.

[0175] Then, between each fourth frequency point and its adjacent first frequency point, a frequency point is selected and determined as the fifth frequency point. Alternatively, a frequency point can be selected and determined as the fifth frequency point near each fourth frequency point, where the frequency value difference between each fourth frequency point and the fourth frequency point is less than or equal to the second preset frequency threshold, that is, the frequency value difference between each fifth frequency point and its adjacent fourth frequency point is less than or equal to the second preset frequency threshold. The second preset frequency threshold can be set according to the requirements of the actual application scenario. For example, the second preset frequency threshold can be set to 5Hz, 20Hz, or 50Hz, etc.

[0176] Next, the amplitude corresponding to the fifth frequency is determined based on a preset human ear masking effect curve. The specific details of the amplitude can be found in the previous embodiment and will not be repeated here. Finally, a masking signal is generated based on the frequency value of the fifth frequency and the amplitude corresponding to the fifth frequency. The masking signal includes a signal having a frequency corresponding to the fifth frequency and an amplitude corresponding to the corresponding fifth frequency.

[0177] For example, as shown in Figure 10, there are three first frequency points, namely frequency points f4, f5 and f6, among which the power spectrum density value corresponding to the first frequency point f5 is the largest, the frequency value of the first frequency point f6 with the largest frequency value is 1500HZ, and the frequency value of the first frequency point f4 with the smallest frequency value is 100HZ. The frequency difference between the two is 1400HZ, which is greater than 1000HZ. Therefore, the first frequency points f4, f5 and f6 can all be determined as the fourth frequency points.

[0178] Then, as shown in FIG11 , a frequency point fa3, fa4, and fa5 may be selected near the fourth frequency points f4, f5, and f6, respectively, and then the frequency points fa3, fa4, and fa5 may be determined as the fifth frequency point.

[0179] Afterwards, the preset frequency values ​​that are the same as the frequency values ​​of the fifth frequency point fa3, the frequency value of the fifth frequency point fa4, and the frequency value of the fifth frequency point fa5 can be found from the pre-stored preset frequency values, and then the corresponding preset amplitudes can be found respectively, thereby determining the amplitudes corresponding to the fifth frequency point fa3, the amplitudes corresponding to the fifth frequency point fa4, and the amplitudes corresponding to the fifth frequency point fa5, thereby determining the masking signal.

[0180] For the specific implementation process, please refer to the contents of the aforementioned embodiments and will not be repeated here.

[0181] For example, if there are multiple first frequency points, and the frequency difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is greater than or equal to the first preset frequency threshold, then in each frequency point interval, a second preset number of first frequency points are selected in descending order of the corresponding power spectrum density values ​​and determined as the sixth frequency point, wherein the frequency difference between the ending frequency point and the starting frequency point of each frequency point interval is less than or equal to the third preset frequency threshold, and the number of first frequency points included in each frequency point interval is greater than or equal to the third preset number. The second preset number can be set according to the requirements of the actual application scenario, for example, the second preset number can be set to 3 or 5. The third preset frequency threshold can also be set according to the requirements of the actual application scenario, for example, the third preset frequency threshold can be set to 50 Hz or 100 Hz. The third preset number can also be set according to the requirements of the actual application scenario, for example, the third preset number can be set to 8 or 10. This application is not limited to this.

[0182] Then, the seventh frequency point corresponding to each frequency point interval is determined, and the seventh frequency point is located between two adjacent sixth frequency points in the corresponding frequency point interval. That is, in each frequency point interval, a frequency point is selected between every two adjacent sixth frequency points and determined as the seventh frequency point corresponding to the frequency point interval. Optionally, any frequency point can be selected between two adjacent sixth frequency points as the seventh frequency point. Optionally, the frequency point between two adjacent sixth frequency points can also be used as the seventh frequency point. This application does not impose any restrictions on this.

[0183] Afterwards, the amplitude corresponding to each seventh frequency point can be determined based on a preset human ear masking effect curve. The specific details of the amplitude can be found in the previous embodiment and will not be repeated here. Finally, a masking signal can be generated based on the frequency values ​​of each seventh frequency point and the amplitude corresponding to each seventh frequency point. The masking signal includes a signal having a frequency value corresponding to the seventh frequency point and an amplitude corresponding to the seventh frequency point.

[0184] For example, as shown in FIG12 , the number of first frequency points is 10, among which the first frequency points f7, f8, f9, f10, and f11 are concentrated in one frequency interval (e.g., frequency interval 1), and the first frequency points f12, f13, f14, f15, and f16 are concentrated in one frequency interval (e.g., frequency interval 2). Then, in frequency interval 1, according to the power spectrum density values ​​corresponding to the first frequency points, from large to small, f8, f9, and f10 can be selected and determined as the sixth frequency point. Furthermore, in frequency interval 2, according to the power spectrum density values ​​corresponding to the first frequency points, from large to small, f13, f15, and f16 can be selected and determined as the sixth frequency point.

[0185] Then, as shown in Figure 13, in frequency interval 1, between the sixth frequency points f8 and f9, a frequency point fa6 is selected and determined as the seventh frequency point, and between the sixth frequency points f9 and f10, a frequency point fa7 is selected and determined as the seventh frequency point. In frequency interval 2, between the sixth frequency points f13 and f15, a frequency point fa8 is selected and determined as the seventh frequency point, and between the sixth frequency points f15 and f16, a frequency point fa9 is selected and determined as the seventh frequency point.

[0186] Afterwards, the preset frequency values ​​that are the same as the frequency values ​​of the seventh frequency point fa6, the frequency value of the seventh frequency point fa7, the frequency value of the seventh frequency point fa8, and the frequency value of the seventh frequency point fa9 can be found from the pre-stored preset frequency values, and then the corresponding preset amplitudes can be found respectively, thereby determining the amplitudes corresponding to the seventh frequency point fa6, the amplitudes corresponding to the seventh frequency point fa7, the amplitudes corresponding to the seventh frequency point fa8, and the amplitudes corresponding to the seventh frequency point fa9, thereby determining the masking signal.

[0187] For the specific implementation process, please refer to the contents of the aforementioned embodiments and will not be repeated here.

[0188] For example, if there is only one first frequency point, one frequency point can be selected on either side of the first frequency point to determine as the eighth frequency point. In a specific implementation, the frequency value between the eighth frequency point and the first frequency point can differ by a fourth preset frequency threshold. The fourth preset frequency threshold can be set based on the requirements of the actual application scenario. For example, the fourth preset frequency threshold can be set to 5 Hz, 10 Hz, or 20 Hz.

[0189] Then, the amplitude corresponding to the eighth frequency point can be determined according to a preset human ear masking effect curve. The content of the amplitude can refer to the content of the aforementioned embodiment and will not be repeated here.

[0190] Then, a masking signal may be generated according to the frequency value of the eighth frequency point and the amplitude corresponding to the eighth frequency point. The masking signal includes a signal having a frequency value of the eighth frequency point and an amplitude corresponding to the eighth frequency point.

[0191] For example, as shown in FIG14 , there is only one first frequency point, which is frequency point f17 , and then frequency points f18 and f19 can be selected on both sides of the first frequency point f17 to be determined as the eighth frequency point.

[0192] Then, the preset frequency value that is the same as the frequency value of the eighth frequency point f18 and the preset frequency value that is the same as the frequency value of the eighth frequency point f19 can be found from the pre-stored preset frequency values, and then the corresponding preset amplitudes can be found to determine the amplitude corresponding to the eighth frequency point f18 and the amplitude corresponding to the eighth frequency point f19. In this way, the masking signal can be determined.

[0193] For the specific implementation process, please refer to the contents of the aforementioned embodiments and will not be repeated here.

[0194] For example, if there is only one first frequency point, a frequency point can be selected on either side of the first frequency point to determine as the ninth frequency point. In a specific implementation, the frequency value between the ninth frequency point and the first frequency point can differ by a fifth preset frequency threshold. The fifth preset frequency threshold can be set based on the requirements of the actual application scenario. For example, the fifth preset frequency threshold can be set to 5 Hz, 10 Hz, or 20 Hz.

[0195] Then, a frequency point is selected between each ninth frequency point and the first frequency point and determined as the tenth frequency point. That is, a frequency point is selected between each ninth frequency point and the first frequency point and determined as the tenth frequency point.

[0196] Next, the amplitude corresponding to the tenth frequency can be determined based on a preset human ear masking effect curve. The amplitude can be found in the previous embodiment and will not be further described here. Finally, a masking signal can be generated based on the frequency value of the tenth frequency and the amplitude corresponding to the tenth frequency. The masking signal includes a signal having a frequency corresponding to the tenth frequency and an amplitude corresponding to the corresponding tenth frequency.

[0197] For example, as shown in FIG15 , there is only one first frequency point, which is frequency point f20 , and then frequency points f21 and f22 can be selected on both sides of the first frequency point f20 to be determined as the ninth frequency point.

[0198] Then, as shown in FIG16 , a frequency point fa10 and fa11 may be selected between the ninth frequency point f21 and the first frequency point f20 and between the ninth frequency point f22 and the first frequency point f20 respectively, and determined as the tenth frequency point.

[0199] Afterwards, the preset frequency values ​​that are the same as the frequency values ​​of the tenth frequency point fa10 and the tenth frequency point fa11 can be found from the pre-saved preset frequency values, and then the corresponding preset amplitudes can be found to determine the amplitudes corresponding to the tenth frequency point fa10 and the amplitudes corresponding to the tenth frequency point fa11. In this way, the masking signal can be determined.

[0200] For the specific implementation process, please refer to the contents of the aforementioned embodiments and will not be repeated here.

[0201] As shown in FIG17 , generating a pink noise signal according to the first power spectrum density can be achieved by following the steps below:

[0202] Step S501: Determine a second average power.

[0203] The second average power refers to the average of the power spectral density values ​​of all eleventh frequency points. The eleventh frequency point refers to the frequency point whose power spectral density value is less than or equal to the first average power among all the frequency points corresponding to the first power spectral density. The first average power refers to the average of the power spectral density values ​​of all the frequency points corresponding to the first power spectral density.

[0204] Step S502: Obtain a preset pink noise bandpass filter gain corresponding to the second average power.

[0205] In specific implementation, a gain rule table can be pre-set in the electronic device based on multiple call tests, and the gain rule table stores power (hereinafter referred to as preset power) and pink noise bandpass filter gain (hereinafter referred to as preset pink noise bandpass filter gain) accordingly.

[0206] When executing step S502, the electronic device may find a preset power that is the same as the second average power from a preset gain rule table, then find a preset pink noise bandpass filter gain stored corresponding to the preset power from the gain rule table, and determine the preset pink noise bandpass filter gain as the preset pink noise bandpass filter gain corresponding to the second average power.

[0207] Step S503: Adjust the gain of the first bandpass filter to the preset pink noise bandpass filter gain.

[0208] The first band-pass filter is pre-set in the electronic device and is used to perform band-pass filtering on the signal output by the pink noise signal source.

[0209] Step S504 : performing band-pass filtering on the signal output by the pink noise signal source through the first band-pass filter after gain adjustment to generate a pink noise signal.

[0210] It should be noted that if the first power spectral density generated in step S201 is the power spectral density of the first signal, then when executing step S504, the bandwidth of the first band-pass filter needs to be set to the first bandwidth, and then the signal output by the pink noise signal source is band-pass filtered by the first band-pass filter having a bandwidth of the first bandwidth and a gain of a preset pink noise band-pass filter gain corresponding to the second average power to generate a pink noise signal.

[0211] Step S302: Adjust the masking signal and the pink noise signal to have the same delay.

[0212] After the masking signal and the pink noise signal are generated, the masking signal and the pink noise signal need to be delayed respectively to adjust the masking signal and the pink noise signal to the same delay.

[0213] Step S303: Generate a first speech signal according to the masking signal and the pink noise signal adjusted to the same time delay.

[0214] In one possible implementation, after adjusting the masking signal and the pink noise signal to have the same time delay, the masking signal and the pink noise signal adjusted to have the same time delay may be summed, and the summed signal is then determined as the first speech signal.

[0215] In one possible implementation, after adjusting the masking signal and the pink noise signal to the same delay, a weighted sum of the masking signal and the pink noise signal adjusted to the same delay is performed, and the resulting weighted sum is then determined as the first speech signal. The weights corresponding to the masking signal and the pink noise signal can be pre-determined through call testing.

[0216] In one possible implementation, after adjusting the masking signal and the pink noise signal to the same time delay, the gains of the delay-adjusted masking signal and the pink noise signal can be adjusted separately. The gain corresponding to the masking signal and the gain corresponding to the pink noise signal can be the same or different, and both can be determined based on call tests and then pre-set in the electronic device. When adjusting the gains of the masking signal and the pink noise signal, they can be retrieved from the electronic device.

[0217] The gain-adjusted masking signal and pink noise signal are then summed or weighted, and the resulting signal is determined as the first voice signal. This allows for better determination of appropriate masking signals and pink noise signals based on call testing. This allows the generated first voice signal to better mask the downlink voice signal, ensuring the user can clearly hear the call while preventing others in the surrounding environment from overhearing the call, resulting in a better user experience.

[0218] According to any one of the implementations shown in Figures 6 to 17, the generated first voice signal can mask the signal of the frequency point with a larger power spectral density value in the downlink voice signal. After the first voice signal and the second voice signal are output simultaneously, the intensity of the sound entering the ears of other people in the user's surrounding environment is weakened, so that they cannot hear the user's call content clearly, which can well protect the user's privacy and provide a better user experience.

[0219] Exemplarily, as shown in FIG18 , generating the first speech signal according to the first power spectrum density can also be implemented by following the steps below:

[0220] Step S601: Determine a first average power according to a first power spectrum density.

[0221] The first average power refers to the average value of the power spectrum density values ​​of all frequency points corresponding to the first power spectrum density.

[0222] Step S602: Determine the twelfth frequency point.

[0223] The twelfth frequency point refers to a frequency point whose corresponding power spectrum density value is greater than the first average power among all frequency points corresponding to the first power spectrum density.

[0224] Step S603 : selecting a fourth preset number of twelfth frequency points from all the twelfth frequency points in descending order of corresponding power spectrum density values, and determining them as the thirteenth frequency points.

[0225] The fourth preset number can be set according to the requirements of the actual application scenario. For example, the fourth preset number can be set to 3 or 5.

[0226] Step S604: Generate a notch filter according to the thirteenth frequency point.

[0227] The notch frequency of the notch filter includes the frequency value of the thirteenth frequency point. That is, after filtering by the notch filter, the signal with the frequency value of the thirteenth frequency point can be filtered out.

[0228] Step S605 : Perform notch filtering on the signal output by the pink noise signal source through the notch filter to generate a first speech signal.

[0229] It should be noted that if the first power spectral density generated in step S201 is the power spectral density of the downlink voice signal, then when executing step S605, the signal output by the pink noise signal source is notched filtered by a notch filter whose notch frequency includes the frequency value of the thirteenth frequency point, and the signal obtained after notch filtering is determined as the first voice signal.

[0230] If the first power spectral density generated in step S201 is the power spectral density of the first signal, then when executing step S605, it is also necessary to set the bandwidth of the notch filter to the first bandwidth, and then use a notch filter with a bandwidth of the first bandwidth and a notch frequency including the frequency value of the thirteenth frequency point to perform notch filtering on the signal output by the pink noise signal source, and determine the signal obtained after notch filtering as the first speech signal.

[0231] According to the implementation shown in Figure 18, the generated first voice signal can mask most of the remaining signals in the downlink voice signal except for the signals of the frequency points with larger power spectrum density values. After the first voice signal and the second voice signal are output simultaneously, the sound entering the ears of other people in the user's surrounding environment lacks information on the signals of most frequency points, making it impossible to hear the user's call content clearly. It can also well protect the user's privacy and provide a better user experience.

[0232] In some other optional embodiments, after calculating the first power spectrum density, the electronic device may further determine whether the difference between the maximum power spectrum density value and the first average power among all power spectrum density values ​​included in the first power spectrum density is greater than or equal to a preset power spectrum density threshold. If the difference between the maximum power spectrum density value and the first average power is greater than or equal to the preset power spectrum density threshold, the first speech signal is generated through the implementation shown in Figure 18. Alternatively, if the difference between the maximum power spectrum density value and the first average power is less than the preset power spectrum density threshold, the first speech signal is generated through any one of the implementations shown in Figures 6 to 17. The preset power spectrum density threshold can be set according to the requirements of the actual scenario.

[0233] In this way, after the electronic device obtains the downlink voice signal in real time and continuously, it can adjust the implementation method of generating the first voice signal in real time according to the properties of the downlink voice signal, so that it can adopt a more appropriate method to generate a more suitable interference signal according to the properties of the downlink voice signal. While ensuring that the user can hear the content of the call clearly, it can prevent other people around the user from hearing the content of the user's call clearly, and the user experience is better.

[0234] In some other optional embodiments, generating the first speech signal according to the first power spectral density can also be implemented as follows: the electronic device can also generate a first speech signal (in this embodiment, the first speech signal can be subsequently recorded as the fourth speech signal) through the implementation shown in Figure 18, and generate a first speech signal (in this embodiment, the first speech signal can be subsequently recorded as the fifth speech signal) through any one of the implementations shown in Figures 6 to 17. Then, the fourth speech signal and the fifth speech signal are summed or weighted, and the signal obtained after the summation or weighted summation is determined as the interference signal. Afterwards, the interference signal can be determined as the first speech signal in step S202.

[0235] It should be noted that in some other optional embodiments, based on any of the above embodiments, before generating the first voice signal based on the downlink voice signal, the attribute information of the downlink voice signal can be adjusted first, for example, the attribute information such as the signal-to-noise ratio and / or gain of the downlink voice signal can be adjusted, and then, the first voice signal is generated based on the downlink voice signal after the attribute information is adjusted. This application does not impose any restrictions on this.

[0236] Step S102: Generate a second voice signal.

[0237] The second voice signal refers to a voice signal obtained after delay processing is performed on the downlink voice signal and has the same delay as the first voice signal.

[0238] It should be noted that in some optional embodiments, before delay processing is performed on the downlink voice signal, other attribute information of the downlink voice signal may be adjusted, for example, by adjusting attribute information such as the signal-to-noise ratio and / or gain of the downlink voice signal. Delay processing is then performed on the downlink voice signal after the attribute information adjustment to obtain a voice signal having the same delay as the first voice signal. Finally, the obtained voice signal is determined as the second voice signal.

[0239] It should also be noted that when generating the first voice signal, the method of adjusting the attribute information of the downlink voice signal can be the same as or different from the method of adjusting the attribute information of the downlink voice signal when generating the second voice signal. This application does not impose any restrictions on this.

[0240] Step S103: at the same output time, output the second voice signal through the first sound emitting component and output the first voice signal through the second sound emitting component.

[0241] At the same output time, after the first sound emitting component outputs the second voice signal and the second sound emitting component outputs the first voice signal, both the first and second voice signals are converted into sound signals and then emitted. In this way, the first voice signal can mask the second voice signal, meaning that the interference signal of the downlink voice signal can mask the downlink voice signal.

[0242] Because the first sound-emitting component is located at a first position in the electronic device, when the user is holding the device for a call, the first position is close to the user's ear, or even directly facing the user's ear, and the second sound-emitting component is located at a second position farther from the user's ear. Therefore, when the user turns up the volume, even if the first voice signal masks the second voice signal, the intensity of the sound entering the user's ear is still high enough for the user to clearly hear the conversation. However, for other people around the user, since the sounds emitted by the first and second sound-emitting components are both farther from their ears, the intensity of the sound entering their ears is lower when the first voice signal masks the second voice signal, and they are unable to clearly hear the user's conversation. This protects the user's conversation privacy and provides a better user experience.

[0243] In some optional embodiments, a third sound-emitting component may be further provided in the electronic device, and the third sound-emitting component may be provided at a third position close to the first position. For example, the first sound-emitting component may be a sound-emitting component of a ceramic-driven screen, the second sound-emitting component may be a speaker provided at the bottom of the electronic device, and the third sound-emitting component may be a speaker provided at the top of the electronic device. In this application scenario, the method for outputting a voice signal provided in the present application may further include: generating a third voice signal, the third voice signal being a voice signal having the same time delay as the first voice signal obtained after delay processing of the downlink voice signal; and outputting the third voice signal through the third sound-emitting component at the same output time as the first voice signal and the second voice signal. In this way, the sound emitted by the first sound-emitting component can be supplemented by the sound emitted by the third sound-emitting component, so that the sound heard by the user is clearer, thereby improving the user experience.

[0244] It can be seen that in the voice signal output method provided in the embodiment of the present application, the downlink voice signal can be masked by an interference signal generated based on the downlink voice signal. When a user holds an electronic device to make a call, the sound intensity entering the user's ears is large enough to ensure that the user can clearly hear the content of the call. As for other people in the surrounding environment, due to the masking effect of the interference signal on the downlink voice signal, the intensity of the sound transmitted to these people's ears is relatively low, and the information is incomplete, making it impossible for these people to hear the content of the user's call clearly, thereby well protecting the user's privacy and providing a better user experience.

[0245] The various method embodiments described herein may be independent solutions or may be combined according to internal logic, and all of these solutions fall within the scope of protection of this application.

[0246] The above embodiments have introduced the method for outputting the voice signal provided by the present application. Below, an embodiment of the electronic device provided by the present application is introduced. It can be understood that, in order to realize the above functions, the electronic device includes a hardware structure and / or software module corresponding to each function. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiments disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0247] The embodiment of the present application can divide the functional modules of the electronic device according to the above method example. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. It should be noted that the division of modules in the embodiment of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0248] The method provided in the embodiment of the present application is described in detail above with reference to Figures 3 to 18. Below, the electronic device provided in the embodiment of the present application is described in detail with reference to Figure 19. It should be understood that the description of the electronic device embodiment corresponds to the description of the method embodiment. Therefore, for matters not described in detail, please refer to the method embodiment above. For the sake of brevity, it will not be repeated here.

[0249] Referring to FIG. 19 , FIG. 19 is a block diagram of a structure of an electronic device provided in an embodiment of the present application. As shown in FIG. 19 , the electronic device 1900 includes a first sound-emitting component 1901 and a second sound-emitting component 1902. The first sound-emitting component 1901 is disposed at a first position of the electronic device 1900. When a user holds the electronic device to make a call, the first position is close to the user's ear. The second sound-emitting component 1902 is disposed at a second position different from the first position. The electronic device 1900 also includes a memory 1903 and a processor 1904, the memory 1903 and the processor 1904 being coupled. The memory 1903 is configured to store computer program code, the computer program code including computer instructions. When the processor 1904 executes the computer instructions, the electronic device 1900 executes the method for outputting a voice signal described in any one of the embodiments of FIG. 3 to FIG. 18 . The electronic device 1900 can perform the operations of the above-described method embodiments.

[0250] For example, in an optional embodiment of the present application, the processor 1904 can be used to: generate a first voice signal, where the first voice signal refers to an interference signal generated based on a downlink voice signal; generate a second voice signal, where the second voice signal refers to a voice signal having the same delay as the first voice signal obtained after delay processing of the downlink voice signal; and output the second voice signal through the first sound emitting component and output the first voice signal through the second sound emitting component at the same output time.

[0251] In one possible implementation, the processor 1904 is used to generate a first voice signal, specifically: the processor 1904 is used to generate a first power spectral density, where the first power spectral density refers to a power spectral density calculated based on the downlink voice signal; and the first voice signal is generated based on the first power spectral density.

[0252] In one possible implementation, the processor 1904 is configured to generate the first speech signal based on the first power spectral density. Specifically, the processor 1904 is configured to generate a masking signal and a pink noise signal based on the first power spectral density; adjust the masking signal and the pink noise signal to the same time delay; and generate the first speech signal based on the masking signal and the pink noise signal adjusted to the same time delay.

[0253] In one possible implementation, the processor 1904 is used to generate a masking signal based on the first power spectrum density, specifically: the processor 1904 is used to determine a first average power based on the first power spectrum density, where the first average power refers to the average value of the power spectrum density values ​​of all frequency points corresponding to the first power spectrum density; determine a first frequency point, where the first frequency point refers to a frequency point among all frequency points corresponding to the first power spectrum density, whose corresponding power spectrum density value is greater than the first average power; and generate the masking signal based on the first frequency point.

[0254] In one possible implementation, the processor 1904 is used to generate the masking signal based on the first frequency point, specifically: the processor 1904 is used to, if there are multiple first frequency points, and the frequency value difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is less than a first preset frequency threshold, then select a first preset number of first frequency points from all the first frequency points in order of corresponding power spectrum density values ​​from large to small, and determine them as the second frequency points; determine a third frequency point, and the third frequency point is located between two adjacent second frequency points; determine the amplitude corresponding to the third frequency point according to a preset human ear masking effect curve, and the amplitude is used to characterize the strength of the signal; generate the masking signal according to the frequency value of the third frequency point and the amplitude corresponding to the third frequency point.

[0255] In one possible implementation, the processor 1904 is used to generate the masking signal based on the first frequency point, specifically: the processor 1904 is used to, if there are multiple first frequency points, and the frequency value difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is greater than or equal to a first preset frequency threshold, then select the first frequency point with the largest corresponding power spectrum density value, the first frequency point with the largest frequency value, and the first frequency point with the smallest frequency value from all the first frequency points, and determine them as the fourth frequency point; near each of the fourth frequency points, and between each of the fourth frequency points, where the frequency value difference is less than or equal to the second preset frequency threshold, select a frequency point respectively, and determine it as the fifth frequency point; according to a preset human ear masking effect curve, determine the amplitude corresponding to the fifth frequency point, and the amplitude is used to characterize the strength of the signal; generate the masking signal according to the frequency value of the fifth frequency point and the amplitude corresponding to the fifth frequency point.

[0256] In one possible implementation, the processor 1904 is used to generate the masking signal based on the first frequency point, specifically: the processor 1904 is used to, if there are multiple first frequency points, and the frequency value difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is greater than or equal to a first preset frequency threshold, then in each frequency point interval, in descending order of the corresponding power spectrum density values, select a second preset number of first frequency points and determine them as the sixth frequency point, wherein the frequency value difference between the end frequency point and the starting frequency point of each frequency point interval is less than or equal to a third preset frequency threshold, and the number of first frequency points included in each frequency point interval is greater than or equal to a third preset number; determine the seventh frequency point corresponding to each frequency point interval, and the seventh frequency point is located between two adjacent sixth frequency points in the corresponding frequency point interval; determine the amplitude corresponding to the seventh frequency point according to a preset human ear masking effect curve, and the amplitude is used to characterize the strength of the signal; generate the masking signal according to the frequency value of the seventh frequency point and the amplitude corresponding to the seventh frequency point.

[0257] In one possible implementation, the processor 1904 is used to generate the masking signal based on the first frequency point. Specifically, the processor 1904 is used to, if the number of the first frequency points is one, select a frequency point on both sides of the first frequency point and determine it as the eighth frequency point; determine the amplitude corresponding to the eighth frequency point according to a preset human ear masking effect curve, and the amplitude is used to characterize the strength of the signal; generate the masking signal according to the frequency value of the eighth frequency point and the amplitude corresponding to the eighth frequency point.

[0258] In one possible implementation, the processor 1904 is used to generate the masking signal based on the first frequency point, specifically: the processor 1904 is used to, if the number of the first frequency points is one, select a frequency point on both sides of the first frequency point respectively, and determine it as the ninth frequency point; select a frequency point between each of the ninth frequency points and the first frequency point respectively, and determine it as the tenth frequency point; determine the amplitude corresponding to the tenth frequency point according to a preset human ear masking effect curve, and the amplitude is used to characterize the strength of the signal; generate the masking signal according to the frequency value of the tenth frequency point and the amplitude corresponding to the tenth frequency point.

[0259] In one possible implementation, the processor 1904 is used to generate a pink noise signal based on the first power spectral density, specifically: the processor 1904 is used to determine a second average power, where the second average power refers to the average value of the power spectral density values ​​of all eleventh frequency points, the eleventh frequency point refers to the frequency point whose power spectral density value is less than or equal to the first average power among all frequency points corresponding to the first power spectral density, and the first average power refers to the average value of the power spectral density values ​​of all frequency points corresponding to the first power spectral density; obtain a preset pink noise bandpass filter gain corresponding to the second average power; adjust the gain of the first bandpass filter to the preset pink noise bandpass filter gain; and perform bandpass filtering on the signal output by the pink noise signal source through the first bandpass filter after gain adjustment to generate the pink noise signal.

[0260] In one possible implementation, the processor 1904 is used to generate the first voice signal based on the first power spectrum density, specifically: the processor 1904 is used to determine the first average power based on the first power spectrum density, where the first average power refers to the average value of the power spectrum density values ​​of all frequency points corresponding to the first power spectrum density; determine the twelfth frequency point, where the twelfth frequency point refers to the frequency point whose corresponding power spectrum density value is greater than the first average power among all the frequency points corresponding to the first power spectrum density; select the fourth preset number of twelfth frequencies from all the twelfth frequencies in descending order of the corresponding power spectrum density values, and determine them as the thirteenth frequency point; generate a notch filter based on the thirteenth frequency point, the notch frequency of the notch filter including the frequency value of the thirteenth frequency point; and perform notch filtering on the signal output by the pink noise signal source through the notch filter to generate the first voice signal.

[0261] In one possible implementation, the processor 1904 is used to generate a first power spectral density, specifically: the processor 1904 is used to bandpass filter the downlink voice signal through a second bandpass filter to obtain a first signal within a first bandwidth range; the first bandwidth is the bandwidth of the second bandpass filter; the power spectral density of the first signal is calculated; and the power spectral density of the first signal is determined to be the first power spectral density.

[0262] In one possible implementation, the electronic device 1900 also includes a third sound-emitting component, which is arranged at a third position close to the first position. The processor 1904 is also used to: generate a third voice signal, wherein the third voice signal refers to a voice signal having the same delay as the first voice signal obtained after delay processing of the downlink voice signal; and output the third voice signal through the third sound-emitting component at the same output time.

[0263] During implementation, each step of the above method can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The steps of the method disclosed in conjunction with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The software module can be located in a storage medium mature in the art such as a random access memory, a flash memory, a read-only memory, a programmable read-only memory or an electrically erasable programmable memory, a register, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in conjunction with its hardware. To avoid repetition, it will not be described in detail here.

[0264] It should be noted that the processor in the embodiments of the present application can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method embodiment can be completed by an integrated logic circuit of the hardware in the processor or by instructions in the form of software. The above processor can be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. The various methods, steps, and logic block diagrams disclosed in the embodiments of the present application can be implemented or executed. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor. The steps of the method disclosed in the embodiments of the present application can be directly embodied as being executed by a hardware decoding processor, or can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium mature in the art, such as random access memory, flash memory, read-only memory, programmable read-only memory, or electrically erasable programmable memory, registers, etc. The storage medium is located in the memory, and the processor reads the information in the memory and completes the steps of the above method in combination with its hardware.

[0265] It is understood that the memory in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct RAM bus RAM (DR RAM). It should be noted that the memory of the systems and methods described herein is intended to include, but is not limited to, these and any other suitable types of memory.

[0266] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a computer program product, which includes: a computer program or instructions, which, when the computer program or instructions are run on a computer, enables the computer to execute the method of any one of the method embodiments.

[0267] According to the method provided in the embodiment of the present application, the embodiment of the present application also provides a computer storage medium, which stores a computer program or instruction. When the computer program or instruction is run on a computer, the computer executes the method of any one of the embodiments of the method.

[0268] Those skilled in the art will appreciate that the various illustrative logical blocks and steps described in conjunction with the embodiments disclosed herein can be implemented using electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0269] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the electronic devices and modules described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0270] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the electronic device embodiments described above are merely illustrative. For example, the division of the modules is merely a logical function division. In actual implementation, there may be other division methods, such as multiple modules or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0271] The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed across multiple network elements. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.

[0272] In addition, the functional modules in the various embodiments of the present application may be integrated into one processing unit, or each module may exist physically separately, or two or more modules may be integrated into one unit.

[0273] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0274] The electronic device, computer storage medium, and computer program product provided in the above-mentioned embodiments of the present application are all used to execute the methods provided above. Therefore, the beneficial effects that can be achieved can refer to the corresponding beneficial effects of the methods provided above, and will not be repeated here.

[0275] It should be understood that in each embodiment of the present application, the execution order of each step should be determined by its function and internal logic. The size of the sequence number of each step does not mean the order of execution and does not limit the implementation process of the embodiment.

[0276] The various sections of this specification are described in a progressive manner. Similar portions between embodiments can be referenced to each other, and each embodiment focuses on the differences between the other embodiments. In particular, the embodiments of the electronic device, computer storage medium, and computer program product are generally similar to the method embodiments, so their descriptions are relatively simplified. For relevant details, refer to the descriptions of the method embodiments.

[0277] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present application.

[0278] The above-described embodiments of the present application do not constitute a limitation on the scope of protection of the present application.

Claims

1. A method for outputting a speech signal, characterized in that: The method is used for an electronic device, which includes a first sound-emitting component and a second sound-emitting component. The first sound-emitting component is arranged at a first position of the electronic device. When a user holds the electronic device for a call, the first position is close to the user's ear, and the second sound-emitting component is arranged at a second position different from the first position. The method includes: generating a first voice signal, where the first voice signal is an interference signal generated according to the downlink voice signal; generating a second voice signal, where the second voice signal is a voice signal obtained by delaying the downlink voice signal and having the same delay as the first voice signal; At the same output time, the second voice signal is output through the first sound emitting component, and the first voice signal is output through the second sound emitting component.

2. The method according to claim 1, characterized in that The generating of the first voice signal comprises: generating a first power spectral density, where the first power spectral density refers to a power spectral density calculated according to the downlink voice signal; The first speech signal is generated according to the first power spectral density.

3. The method according to claim 2, characterized in that Generating the first speech signal according to the first power spectrum density includes: generating a masking signal and a pink noise signal according to the first power spectral density; Adjusting the masking signal and the pink noise signal to have the same delay; The first speech signal is generated according to the masking signal and the pink noise signal adjusted to the same time delay.

4. The method according to claim 3, characterized in that Generating a masking signal according to the first power spectrum density includes: Determine a first average power according to the first power spectral density, where the first average power refers to an average value of power spectral density values ​​of all frequency points corresponding to the first power spectral density; Determining a first frequency point, where the first frequency point refers to a frequency point, among all frequency points corresponding to the first power spectrum density, whose corresponding power spectrum density value is greater than the first average power; The masking signal is generated according to the first frequency point.

5. The method according to claim 4, characterized in that Generating the masking signal according to the first frequency point includes: If there are multiple first frequency points, and the frequency difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is less than a first preset frequency threshold, a first preset number of first frequency points are selected from all the first frequency points in descending order of corresponding power spectral density values, and determined as the second frequency points; Determine a third frequency point, where the third frequency point is located between two adjacent second frequency points; Determining the amplitude corresponding to the third frequency point according to a preset human ear masking effect curve, where the amplitude is used to represent the strength of the signal; The masking signal is generated according to the frequency value of the third frequency point and the amplitude corresponding to the third frequency point.

6. The method according to claim 4, characterized in that Generating the masking signal according to the first frequency point includes: If there are multiple first frequency points, and the first frequency point with the largest frequency value among all the first frequency points If the frequency value difference between the first frequency point and the first frequency point with the smallest frequency value is greater than or equal to a first preset frequency threshold, the first frequency point with the largest corresponding power spectrum density value, the first frequency point with the largest frequency value, and the first frequency point with the smallest frequency value are selected from all the first frequency points and determined as the fourth frequency point; A frequency point is selected near each of the fourth frequency points and at a position where the frequency difference between the fourth frequency point and the fourth frequency point is less than or equal to the second preset frequency threshold, and is determined as the fifth frequency point; Determining the amplitude corresponding to the fifth frequency point according to a preset human ear masking effect curve, where the amplitude is used to represent the strength of the signal; The masking signal is generated according to the frequency value of the fifth frequency point and the amplitude corresponding to the fifth frequency point.

7. The method according to claim 4, characterized in that Generating the masking signal according to the first frequency point includes: If there are multiple first frequency points, and the frequency value difference between the first frequency point with the largest frequency value and the first frequency point with the smallest frequency value among all the first frequency points is greater than or equal to the first preset frequency threshold, then in each frequency point interval, a second preset number of first frequency points are selected in descending order of corresponding power spectrum density values ​​and determined as the sixth frequency point, wherein the frequency value difference between the end frequency point and the starting frequency point of each of the frequency point intervals is less than or equal to the third preset frequency threshold, and the number of first frequency points included in each of the frequency point intervals is greater than or equal to the third preset number; Determine a seventh frequency point corresponding to each of the frequency point intervals, where the seventh frequency point is located between two adjacent sixth frequency points in the corresponding frequency point interval; Determining the amplitude corresponding to the seventh frequency point according to a preset human ear masking effect curve, where the amplitude is used to represent the strength of the signal; The masking signal is generated according to the frequency value of the seventh frequency point and the amplitude corresponding to the seventh frequency point.

8. The method according to claim 4, characterized in that Generating the masking signal according to the first frequency point includes: If the number of the first frequency point is one, selecting a frequency point on both sides of the first frequency point and determining them as the eighth frequency point; Determining the amplitude corresponding to the eighth frequency point according to a preset human ear masking effect curve, where the amplitude is used to represent the strength of the signal; The masking signal is generated according to the frequency value of the eighth frequency point and the amplitude corresponding to the eighth frequency point.

9. The method according to claim 4, characterized in that Generating the masking signal according to the first frequency point includes: If the number of the first frequency point is one, selecting a frequency point on both sides of the first frequency point to determine as the ninth frequency point; Selecting a frequency point between each of the ninth frequency points and the first frequency point as the tenth frequency point; Determining the amplitude corresponding to the tenth frequency point according to a preset human ear masking effect curve, wherein the amplitude is used to represent the strength of the signal; The masking signal is generated according to the frequency value of the tenth frequency point and the amplitude corresponding to the tenth frequency point.

10. The method according to claim 3, characterized in that Generating a pink noise signal according to the first power spectrum density includes: Determine the second average power, wherein the second average power refers to the average power spectrum density value of all eleventh frequency points. The eleventh frequency point refers to a frequency point whose power spectrum density value is less than or equal to the first average power among all frequency points corresponding to the first power spectrum density, and the first average power refers to the average value of the power spectrum density values ​​of all frequency points corresponding to the first power spectrum density; Obtaining a preset pink noise bandpass filter gain corresponding to the second average power; Adjusting the gain of the first bandpass filter to the preset pink noise bandpass filter gain; The signal output by the pink noise signal source is band-pass filtered by the first band-pass filter after gain adjustment to generate the pink noise signal.

11. The method according to claim 2, characterized in that Generating the first speech signal according to the first power spectrum density includes: Determine a first average power according to the first power spectral density, where the first average power refers to an average value of power spectral density values ​​of all frequency points corresponding to the first power spectral density; Determine a twelfth frequency point, where the twelfth frequency point refers to a frequency point whose corresponding power spectrum density value is greater than the first average power among all frequency points corresponding to the first power spectrum density; selecting a fourth preset number of twelfth frequency points from all the twelfth frequency points in descending order of corresponding power spectrum density values, and determining them as the thirteenth frequency point; generating a notch filter according to the thirteenth frequency point, wherein the notch frequency of the notch filter includes the frequency value of the thirteenth frequency point; The signal output by the pink noise signal source is notched filtered by the notch filter to generate the first speech signal.

12. The method according to claim 2, characterized in that Generating a first power spectrum density includes: Band-pass filtering the downlink voice signal through a second band-pass filter to obtain a first signal within a first bandwidth range; the first bandwidth is the bandwidth of the second band-pass filter; calculating a power spectral density of the first signal; The power spectral density of the first signal is determined to be the first power spectral density.

13. The method according to any one of claims 1 to 12, characterized in that The electronic device further includes a third sound emitting component, the third sound emitting component being disposed at a third position close to the first position, and the method further includes: generating a third voice signal, wherein the third voice signal is a voice signal having the same delay as the first voice signal obtained after delay processing the downlink voice signal; At the same output time, the third voice signal is output through the third sound emitting component.

14. An electronic device, characterized in that: The electronic device includes a first sound-emitting component and a second sound-emitting component. The first sound-emitting component is set at a first position of the electronic device. When a user holds the electronic device to talk, the first position is close to the user's ear, and the second sound-emitting component is set at a second position different from the first position. The electronic device also includes a memory and a processor, and the memory and the processor are coupled; the memory is used to store computer program code, and the computer program code includes computer instructions. When the processor executes the computer instructions, the electronic device executes the method as described in any one of claims 1 to 13.

15. A computer storage medium, characterized in that The computer storage medium stores a computer program or instructions. When the computer program or instructions are executed, the method according to any one of claims 1 to 13 is performed.