CN111182118B - Volume adjusting method and electronic equipment - Google Patents

Volume adjusting method and electronic equipment Download PDF

Info

Publication number
CN111182118B
CN111182118B CN202010005932.0A CN202010005932A CN111182118B CN 111182118 B CN111182118 B CN 111182118B CN 202010005932 A CN202010005932 A CN 202010005932A CN 111182118 B CN111182118 B CN 111182118B
Authority
CN
China
Prior art keywords
sound signal
signal
value
noise
volume
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010005932.0A
Other languages
Chinese (zh)
Other versions
CN111182118A (en
Inventor
倪忠
申厚拯
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN202010005932.0A priority Critical patent/CN111182118B/en
Publication of CN111182118A publication Critical patent/CN111182118A/en
Application granted granted Critical
Publication of CN111182118B publication Critical patent/CN111182118B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/60Substation equipment, e.g. for use by subscribers including speech amplifiers
    • H04M1/6033Substation equipment, e.g. for use by subscribers including speech amplifiers for providing handsfree use or a loudspeaker mode in telephone sets
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/08Mouthpieces; Microphones; Attachments therefor

Abstract

The embodiment of the invention provides a volume adjusting method and electronic equipment, wherein the method is applied to the electronic equipment, and the volume adjusting method comprises the following steps: acquiring a first sound signal collected by a microphone; determining an echo signal value and a noise signal value in the first sound signal, respectively; and adjusting the volume of the receiver according to the echo signal value and the noise signal value. The volume adjusting method provided by the embodiment of the invention can adjust the volume of the receiver in real time and accurately.

Description

Volume adjusting method and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of electronic equipment, in particular to a volume adjusting method and electronic equipment.
Background
With the progress and development of society, electronic devices have become an indispensable communication tool in people's lives, and the electronic devices can provide services such as conversation, video browsing, image shooting and positioning for users. In the process of using the electronic equipment for conversation, the problem of leakage of conversation content can be solved by adjusting the volume of an earphone of the electronic equipment.
At present, when the volume of an earphone is adjusted in the process of a call, the volume of the earphone is manually adjusted by a user, but in the actual operation process, the user cannot determine the degree to which the volume of the earphone is adjusted, and then people around the user can be prevented from hearing the call content. Furthermore, the user does not perceive that people around the user can hear the conversation content, and the sound of the receiver cannot be adjusted in real time, so that the conversation content is leaked. Therefore, the existing earphone volume adjusting method cannot adjust the earphone volume in real time and accurately, and finally the communication content is leaked.
Disclosure of Invention
The embodiment of the invention provides an adjusting method and electronic equipment, and aims to solve the problem that the volume of a receiver cannot be adjusted timely and accurately in the prior art.
In order to solve the above technical problem, the embodiment of the present invention is implemented as follows:
in a first aspect, an embodiment of the present invention provides a volume adjustment method, which is applied to an electronic device, where the method includes: acquiring a first sound signal collected by a microphone; determining an echo signal value and a noise signal value in the first sound signal, respectively; and adjusting the volume of the receiver according to the echo signal value and the noise signal value.
In a second aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes: the acquisition module is used for acquiring a first sound signal acquired by a microphone; a determining module, configured to determine an echo signal value and a noise signal value in the first sound signal, respectively; and the adjusting module is used for adjusting the volume of the receiver according to the echo signal value and the noise signal value.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, and when executed by the processor, the computer program implements the steps of any one of the volume adjustment methods described in the embodiments of the present invention.
In a fourth aspect, the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores thereon a computer program, and the computer program, when executed by a processor, implements the steps of any one of the volume adjustment methods described in the embodiments of the present invention.
In the embodiment of the invention, a first sound signal collected by a microphone is acquired; respectively determining an echo signal value and a noise signal value in the first sound signal; the volume of the receiver is adjusted according to the echo signal value and the noise signal value, the volume of the receiver can be flexibly adjusted by the electronic equipment, the volume of the receiver does not need to be manually adjusted by a user, the adjustment of the volume of the receiver is instant and accurate, and the use experience of the user can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flow chart illustrating steps of a volume adjustment method according to a first embodiment of the present invention;
fig. 2 is a flow chart illustrating the steps of a volume adjustment method according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating the echo cancellation principle in the second embodiment of the present invention;
fig. 4 is a block diagram showing a configuration of an electronic apparatus according to a third embodiment of the present invention;
fig. 5 is a schematic diagram showing a hardware configuration of an electronic device according to a fourth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Example one
Referring to fig. 1, a flowchart illustrating steps of a volume adjusting method according to a first embodiment of the present invention is shown.
The volume adjusting method provided by the embodiment of the invention is applied to electronic equipment and comprises the following steps:
step 101: and acquiring a first sound signal collected by a microphone.
The first sound signal collected by the microphone is composed of near-end voice, ambient noise and echo, wherein the near-end voice is a second sound signal played by the receiver. In the conversation process, a processor of the electronic equipment analyzes the first sound signal collected by the microphone in real time, and adjusts the volume of the receiver in real time according to the analysis result.
Step 102: an echo signal value and a noise signal value in the first sound signal are determined separately.
The echo signal is a sound signal returned by a second sound signal sent by an earphone of the electronic equipment after passing through the obstacle. The noise signal is noise generated in the environment surrounding the electronic device.
Step 103: and adjusting the volume of the receiver according to the echo signal value and the noise signal value.
The echo signal value can reflect the strength of a second sound signal played by the receiver, and the higher the echo signal value is, the higher the strength of the second sound signal is; the noise signal value can reflect the magnitude of the external noise, the larger the noise signal value is, the larger the external noise is, otherwise, the smaller the noise signal value is, the smaller the external noise is. The user clearly hears the second sound signal played by the receiver, and needs to overcome the external noise and the echo of the second sound signal output by the receiver at the previous moment, so the volume of the receiver needs to be adjusted by combining the echo signal value and the noise signal value, thereby ensuring that the user can clearly hear the second sound signal output by the receiver, namely the call content sent by the opposite terminal device, and preventing surrounding people from hearing the call content.
According to the volume adjusting method provided by the embodiment of the invention, a first sound signal collected by a microphone is acquired; respectively determining an echo signal value and a noise signal value in the first sound signal; according to the volume of the earphone adjusted by the echo signal value and the noise signal value, on one hand, the volume of the earphone can be flexibly adjusted by the electronic equipment, the volume of the earphone does not need to be manually adjusted by a user, the adjustment of the volume of the earphone is instant and accurate, and the use experience of the user can be improved.
Example two
Referring to fig. 2, a flowchart illustrating steps of a volume adjusting method according to a second embodiment of the present invention is shown.
The volume adjusting method provided by the embodiment of the invention is applied to electronic equipment and comprises the following steps:
step 201: and acquiring a first sound signal collected by a microphone.
Step 202: and acquiring a second sound signal to be played by the receiver.
In the process of the communication between the electronic equipment and the opposite terminal equipment, the user of the electronic equipment sends voice information to the opposite terminal equipment and inputs the voice information through the microphone, and the user of the opposite terminal equipment sends the voice information to the electronic equipment and inputs the voice information through the receiver of the electronic equipment. The second sound signal is a sound signal converted from the sound information sent to the electronic equipment by the opposite terminal equipment user.
Step 203: and performing echo signal cancellation processing on the first sound signal according to the second sound signal to obtain a third sound signal and determine an echo signal value in the first sound signal.
And performing echo cancellation on the first sound signal collected by the microphone and the second sound signal to be played by the receiver to obtain the energy of the echo signal collected by the microphone, wherein the energy of the echo signal can be represented by an echo signal value.
And carrying out echo signal elimination processing on the first sound signal according to the second sound signal to obtain a third sound signal. Specifically, an echo signal value in the first sound signal may be determined in dependence on the second sound signal; and subtracting the echo signal value from the first sound signal to obtain a third sound signal.
An adaptive filtering echo cancellation method may be used for performing echo cancellation on the first sound signal, and the schematic diagram of the echo cancellation is shown in fig. 3. As shown in fig. 3, the first sound signal collected by the microphone mainly originates from two paths, where the first path is a sound source including near-end speech and ambient noise, and the second path is an echo of the sound signal emitted by the receiver after encountering an obstacle. Estimating the size of an echo signal in a first sound signal collected by a microphone by using a reference signal, namely a second sound signal to be played by a receiver, and then subtracting the estimated echo signal from the first sound signal collected by the microphone to obtain a third sound signal with echo removed.
Step 204: and carrying out noise estimation on the third sound signal, and determining a noise signal value in the third sound signal.
Any suitable method may be adopted for performing noise estimation on the third sound signal, and this is not particularly limited by the embodiment of the present invention.
Step 205: and adjusting the volume of the receiver according to the echo signal value and the noise signal value.
A manner of adjusting the volume of the handset, optionally in dependence on the echo signal value and the noise signal value, is: calculating the ratio of the echo signal value to the noise signal value; comparing the ratio with a preset value; reducing the volume of the receiver under the condition that the ratio is greater than a preset value; and under the condition that the ratio is smaller than the preset value, increasing the volume of the receiver.
The method for adjusting the volume of the receiver according to the ratio of the echo signal value to the noise signal value can improve the accuracy of volume adjustment.
In a specific implementation process, the preset value can be determined as follows: determining a safe distance; the volume of the receiver is increased while preset noise is played through the receiver, and the increase of the volume of the receiver is stopped when the signal intensity reaches the preset intensity after the preset noise is transmitted for a safe distance; collecting noise played by a receiver through a microphone to obtain a fourth sound signal; and determining the ratio of the first signal value of the fourth sound signal to the second signal value of the preset noise as a preset value.
According to the volume adjusting method provided by the embodiment of the invention, a first sound signal collected by a microphone is acquired; respectively determining an echo signal value and a noise signal value in the first sound signal; according to the volume of the earphone adjusted by the echo signal value and the noise signal value, on one hand, the volume of the earphone can be flexibly adjusted by the electronic equipment, the volume of the earphone does not need to be manually adjusted by a user, the adjustment of the volume of the earphone is instant and accurate, and the use experience of the user can be improved. In addition, the volume adjustment method provided by the embodiment of the invention is introduced above, and the accuracy of adjusting the volume of the receiver can be further improved by adjusting the volume of the receiver according to the ratio of the echo signal value to the noise signal value.
An electronic device provided by an embodiment of the present invention will be described below with reference to the drawings.
EXAMPLE III
Referring to fig. 4, a block diagram of an electronic device according to a fourth embodiment of the present invention is shown.
The electronic device of the embodiment of the invention comprises: an obtaining module 401, configured to obtain a first sound signal collected by a microphone; a determining module 402, configured to determine an echo signal value and a noise signal value in the first sound signal, respectively; and an adjusting module 403, configured to adjust a volume of the receiver according to the echo signal value and the noise signal value.
Optionally, the determining module includes: the signal acquisition submodule is used for acquiring a second sound signal to be played by the receiver; the echo cancellation submodule is used for carrying out echo signal cancellation processing on the first sound signal according to the second sound signal to obtain a third sound signal and determining an echo signal value in the first sound signal; and the noise estimation submodule is used for carrying out noise estimation on the third sound signal and determining a noise signal value in the third sound signal.
Optionally, the echo cancellation sub-module includes: a first unit, configured to determine an echo signal value in the first sound signal according to the second sound signal; a second unit, configured to subtract the echo signal value from the first sound signal to obtain the third sound signal.
Optionally, the adjusting module comprises: a calculation submodule for calculating a ratio of the echo signal value to the noise signal value; the comparison submodule is used for comparing the ratio with a preset value; the first adjusting submodule is used for reducing the volume of the receiver under the condition that the ratio is larger than the preset value; and the second adjusting submodule is used for increasing the volume of the receiver under the condition that the ratio is smaller than the preset value.
Optionally, the electronic device further comprises: the preset value determining module is used for determining a safety distance; increasing the volume of the receiver while playing preset noise through the receiver, and stopping increasing the volume of the receiver when the signal intensity reaches the preset intensity after the preset noise is transmitted by the safety distance; collecting the noise played by the receiver through a microphone to obtain a fourth sound signal; and determining the ratio of the first signal value of the fourth sound signal to the second signal value of the preset noise as the preset value.
The electronic device provided in the embodiment of the present invention can implement each process implemented by the electronic device in the method embodiments of fig. 1 to fig. 3, and is not described herein again to avoid repetition.
According to the electronic equipment provided by the embodiment of the invention, the first sound signal collected by the microphone is acquired; respectively determining an echo signal value and a noise signal value in the first sound signal; according to the volume of the earphone adjusted by the echo signal value and the noise signal value, on one hand, the volume of the earphone can be flexibly adjusted by the electronic equipment, the volume of the earphone does not need to be manually adjusted by a user, the adjustment of the volume of the earphone is instant and accurate, and the use experience of the user can be improved.
Example four
Referring to fig. 5, a block diagram of an electronic device according to a fourth embodiment of the present invention is shown.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device 500 for implementing various embodiments of the present invention, where the electronic device 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 506, a user input unit 507, an interface unit 508, a memory 509, a processor 510, and a power supply 511. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The microphone 5042 is used for collecting a first sound signal.
A processor 510, configured to obtain a first sound signal collected by a microphone 5042; determining an echo signal value and a noise signal value in the first sound signal, respectively; and adjusting the volume of the receiver according to the echo signal value and the noise signal value.
Optionally, the microphone 5042 is further configured to obtain a second sound signal to be played by the earphone.
The processor 510 is further configured to perform echo signal cancellation processing on the first sound signal according to the second sound signal to obtain a third sound signal and determine an echo signal value in the first sound signal; and carrying out noise estimation on the third sound signal, and determining a noise signal value in the third sound signal.
Optionally, the processor 510 is further configured to determine an echo signal value in the first sound signal according to the second sound signal; subtracting the echo signal value from the first sound signal to obtain the third sound signal.
Optionally, the processor 510 is further configured to calculate a ratio of the echo signal value and the noise signal value; comparing the ratio with a preset value; reducing the volume of the earphone under the condition that the ratio is greater than the preset value; and increasing the volume of the receiver under the condition that the ratio is smaller than the preset value.
Optionally, the processor 510 is further configured to determine a safe distance; increasing the volume of the receiver while playing preset noise through the receiver, and stopping increasing the volume of the receiver when the signal intensity reaches the preset intensity after the preset noise is transmitted by the safety distance;
the microphone 5042 is further used for collecting noise played by the earphone through the microphone to obtain a fourth sound signal;
and a processor 510, determining a ratio of the first signal value of the fourth sound signal to the second signal value of the preset noise as the preset value.
According to the electronic equipment provided by the embodiment of the invention, the first sound signal collected by the microphone is acquired; respectively determining an echo signal value and a noise signal value in the first sound signal; according to the volume of the earphone adjusted by the echo signal value and the noise signal value, on one hand, the volume of the earphone can be flexibly adjusted by the electronic equipment, the volume of the earphone does not need to be manually adjusted by a user, the adjustment of the volume of the earphone is instant and accurate, and the use experience of the user can be improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 510; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 501 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 501 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 502, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the electronic apparatus 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used to receive an audio or video signal. The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphic processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 may receive sounds and may be capable of processing such sounds into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 501 in case of the phone call mode.
The electronic device 500 also includes at least one sensor 505, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 5061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 5061 and/or a backlight when the electronic device 500 is moved to the ear. Display panel 501 is a flexible display screen, and the flexible display screen includes a screen base, a liftable module array and a flexible screen that are stacked in sequence. As one type of motion sensor, an accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 505 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 506 is used to display information input by the user or information provided to the user. The Display unit 506 may include a Display panel 5061, and the Display panel 5061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 507 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 5071 using a finger, stylus, or any suitable object or attachment). The touch panel 5071 may include two parts of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 5, the touch panel 5071 and the display panel 5061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 5071 and the display panel 5061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
The interface unit 508 is an interface for connecting an external device to the electronic apparatus 500. For example, the external device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 508 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic apparatus 500 or may be used to transmit data between the electronic apparatus 500 and external devices.
The memory 509 may be used to store software programs as well as various data. The memory 509 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 509 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The processor 510 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 509 and calling data stored in the memory 509, thereby performing overall monitoring of the electronic device. Processor 510 may include one or more processing units; preferably, the processor 510 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into processor 510.
The electronic device 500 may further include a power supply 511 (e.g., a battery) for supplying power to various components, and preferably, the power supply 511 may be logically connected to the processor 510 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system.
In addition, the electronic device 500 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 510, a memory 509, and a computer program that is stored in the memory 509 and can be run on the processor 510, and when the computer program is executed by the processor 510, the processes of the above-mentioned embodiment of the volume adjustment method are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not described here again.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned embodiment of the volume adjustment method, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
While the present invention has been described with reference to the embodiments shown in the drawings, the present invention is not limited to the embodiments, which are illustrative and not restrictive, and it will be apparent to those skilled in the art that various changes and modifications can be made therein without departing from the spirit and scope of the invention as defined in the appended claims.

Claims (8)

1. A volume adjusting method is applied to an electronic device, and is characterized by comprising the following steps:
acquiring a first sound signal collected by a microphone;
determining an echo signal value and a noise signal value in the first sound signal, respectively;
adjusting the volume of a receiver according to the echo signal value and the noise signal value;
the step of adjusting the volume of the earpiece according to the echo signal value and the noise signal value includes:
calculating a ratio of the echo signal value and the noise signal value;
comparing the ratio with a preset value;
reducing the volume of the earphone under the condition that the ratio is greater than the preset value;
and increasing the volume of the receiver under the condition that the ratio is smaller than the preset value.
2. The method of claim 1, wherein the step of separately determining echo signal values and noise signal values in the first sound signal comprises:
acquiring a second sound signal to be played by a receiver;
carrying out echo signal elimination processing on the first sound signal according to the second sound signal to obtain a third sound signal and determine an echo signal value in the first sound signal;
and carrying out noise estimation on the third sound signal, and determining a noise signal value in the third sound signal.
3. The method of claim 2, wherein the step of performing echo cancellation processing on the first sound signal according to the second sound signal to obtain a third sound signal and determining an echo signal value in the first sound signal comprises:
determining an echo signal value in the first sound signal according to the second sound signal;
subtracting the echo signal value from the first sound signal to obtain the third sound signal.
4. The method of claim 3, wherein the preset value is determined by:
determining a safe distance;
increasing the volume of the receiver while playing preset noise through the receiver, and stopping increasing the volume of the receiver when the signal intensity reaches the preset intensity after the preset noise is transmitted by the safety distance;
collecting the noise played by the receiver through a microphone to obtain a fourth sound signal;
and determining the ratio of the first signal value of the fourth sound signal to the second signal value of the preset noise as the preset value.
5. An electronic device, characterized in that the electronic device comprises:
the acquisition module is used for acquiring a first sound signal acquired by a microphone;
a determining module, configured to determine an echo signal value and a noise signal value in the first sound signal, respectively;
the adjusting module is used for adjusting the volume of a receiver according to the echo signal value and the noise signal value;
the adjustment module includes:
a calculation submodule for calculating a ratio of the echo signal value to the noise signal value;
the comparison submodule is used for comparing the ratio with a preset value;
the first adjusting submodule is used for reducing the volume of the receiver under the condition that the ratio is larger than the preset value;
and the second adjusting submodule is used for increasing the volume of the receiver under the condition that the ratio is smaller than the preset value.
6. The electronic device of claim 5, wherein the determining module comprises:
the signal acquisition submodule is used for acquiring a second sound signal to be played by the receiver;
the echo cancellation submodule is used for carrying out echo signal cancellation processing on the first sound signal according to the second sound signal to obtain a third sound signal and determining an echo signal value in the first sound signal;
and the noise estimation submodule is used for carrying out noise estimation on the third sound signal and determining a noise signal value in the third sound signal.
7. The electronic device of claim 6, wherein the echo cancellation sub-module comprises:
a first unit, configured to determine an echo signal value in the first sound signal according to the second sound signal;
a second unit, configured to subtract the echo signal value from the first sound signal to obtain the third sound signal.
8. An electronic device comprising a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the volume adjustment method according to any one of claims 1 to 4.
CN202010005932.0A 2020-01-03 2020-01-03 Volume adjusting method and electronic equipment Active CN111182118B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010005932.0A CN111182118B (en) 2020-01-03 2020-01-03 Volume adjusting method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010005932.0A CN111182118B (en) 2020-01-03 2020-01-03 Volume adjusting method and electronic equipment

Publications (2)

Publication Number Publication Date
CN111182118A CN111182118A (en) 2020-05-19
CN111182118B true CN111182118B (en) 2021-05-25

Family

ID=70649162

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010005932.0A Active CN111182118B (en) 2020-01-03 2020-01-03 Volume adjusting method and electronic equipment

Country Status (1)

Country Link
CN (1) CN111182118B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113067944B (en) * 2021-03-24 2023-05-02 深圳市锐尔觅移动通信有限公司 Call volume adjusting method, device, terminal and storage medium
CN114900579A (en) * 2022-03-28 2022-08-12 歌尔股份有限公司 Electronic device and volume control method
CN114650335A (en) * 2022-03-28 2022-06-21 歌尔股份有限公司 Electronic device and volume control method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413384A (en) * 2011-11-16 2012-04-11 杭州艾力特音频技术有限公司 Echo cancellation two-way voice talk back equipment
CN105898078A (en) * 2016-06-23 2016-08-24 乐视控股(北京)有限公司 Ringing volume regulation method and ringing volume regulation device

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100868862B1 (en) * 2007-04-16 2008-11-13 에스케이 텔레콤주식회사 Automatic volume control apparatus
US20130094656A1 (en) * 2011-10-16 2013-04-18 Hei Tao Fung Intelligent Audio Volume Control for Robot
US20130148582A1 (en) * 2011-11-17 2013-06-13 Tip Solutions, Inc. Message injection system and method
CN104980337B (en) * 2015-05-12 2019-11-22 腾讯科技(深圳)有限公司 A kind of performance improvement method and device of audio processing
CN106131282A (en) * 2016-08-30 2016-11-16 韦嘉志 A kind of hands-free speaking system
CN107105366B (en) * 2017-06-15 2022-09-23 歌尔股份有限公司 Multi-channel echo cancellation circuit and method and intelligent device

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102413384A (en) * 2011-11-16 2012-04-11 杭州艾力特音频技术有限公司 Echo cancellation two-way voice talk back equipment
CN105898078A (en) * 2016-06-23 2016-08-24 乐视控股(北京)有限公司 Ringing volume regulation method and ringing volume regulation device

Also Published As

Publication number Publication date
CN111182118A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
CN109078319B (en) Game interface display method and terminal
CN109461117B (en) Image processing method and mobile terminal
CN109215683B (en) Prompting method and terminal
CN111182118B (en) Volume adjusting method and electronic equipment
CN108196815B (en) Method for adjusting call sound and mobile terminal
CN110012143B (en) Telephone receiver control method and terminal
CN110855313B (en) Signal control method and electronic equipment
CN107785027B (en) Audio processing method and electronic equipment
CN110266323B (en) Signal control circuit, terminal equipment and signal control method
CN109739394B (en) SAR value processing method and mobile terminal
CN111083297A (en) Echo cancellation method and electronic equipment
CN110602696A (en) Conversation privacy protection method and electronic equipment
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN109873894B (en) Volume adjusting method and mobile terminal
CN109443261B (en) Method for acquiring folding angle of folding screen mobile terminal and mobile terminal
CN108093119B (en) Strange incoming call number marking method and mobile terminal
CN111459447B (en) Volume adjustment display method and electronic equipment
CN111328132B (en) Method for adjusting transmitting power and electronic equipment
CN110427149B (en) Terminal operation method and terminal
CN110740265B (en) Image processing method and terminal equipment
CN109348366B (en) Method for adjusting volume by using electrical parameters and mobile terminal
CN108600566B (en) Interference processing method and mobile terminal
CN108418961B (en) Audio playing method and mobile terminal
CN108430025B (en) Detection method and mobile terminal
CN107743174B (en) Clipping judgment method of sound signal and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant