Nothing Special   »   [go: up one dir, main page]

CN103414982B - A kind of method and apparatus that sound is provided - Google Patents

A kind of method and apparatus that sound is provided Download PDF

Info

Publication number
CN103414982B
CN103414982B CN201310329755.1A CN201310329755A CN103414982B CN 103414982 B CN103414982 B CN 103414982B CN 201310329755 A CN201310329755 A CN 201310329755A CN 103414982 B CN103414982 B CN 103414982B
Authority
CN
China
Prior art keywords
sound
external sound
earphone
playing
acquired
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
CN201310329755.1A
Other languages
Chinese (zh)
Other versions
CN103414982A (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.)
Xiaomi Inc
Original Assignee
Xiaomi Inc
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 Xiaomi Inc filed Critical Xiaomi Inc
Priority to CN201310329755.1A priority Critical patent/CN103414982B/en
Publication of CN103414982A publication Critical patent/CN103414982A/en
Application granted granted Critical
Publication of CN103414982B publication Critical patent/CN103414982B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Telephone Function (AREA)

Abstract

The invention discloses a kind of method and apparatus for providing sound, wherein, it the described method comprises the following steps:When detecting connection earphone and playing sound by the earphone, external sound is obtained by microphone;Whether the external sound for judging to obtain exceedes predetermined threshold value;When the external sound of acquisition exceedes predetermined threshold value, the external sound of acquisition is played by the earphone.The embodiment of the present invention is realized when terminal plays sound by earphone, and qualified external sound is played out by earphone, user is clearly got external sound when using earphone, is easy to user to grasp extraneous circumstance.

Description

Method and device for providing sound
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a method and an apparatus for providing sound.
Background
With the continuous development of terminal technologies, for example, terminals such as smart phones and tablet computers have increasingly greater processing capabilities, and users can implement various functions by installing various application programs on the terminals. The user uses the terminal to play audio and video, uses the terminal to make a call, send or listen to voice information, or uses the terminal to play games, and uses the earphone to listen to sound signals, thus improving the listening quality and avoiding disturbing others.
When a user listens to a sound signal through the headphones, if the volume is too large, the user is basically unable to hear external sounds, and there is a high possibility that an accident may occur because surrounding sounds are not heard or dangerous sounds around are not heard. If the user uses a large volume indoors to listen to music, at the moment, the family calls him or other sounds are sounded, the user cannot hear the sounds in time, and even if the user hears the sounds, the user can communicate with the family by picking off the earphone, and the user is very inconvenient.
In order to enable a user to hear external sound when using the headset, some terminals provide a mute function, and when using the mute function, the sound of the headset can be temporarily muted, so that the user can hear the external sound without taking off the headset. However, if an in-ear sealed earphone or a large headphone is used, even if the earphone itself does not emit sound, the user is prevented from clearly hearing external sound because of the good sealing property of such an earphone.
Therefore, a method for providing external sound is needed, which enables a user to conveniently hear the external sound when using the headset.
Disclosure of Invention
In view of the above, an object of the embodiments of the present invention is to provide a method and an apparatus for providing sound, which can provide external sound for a user using a headset.
In order to achieve the above object, an embodiment of the present invention provides a method for providing sound, which is characterized by comprising the following steps: when detecting that an earphone is connected and sound is played through the earphone, acquiring external sound through a microphone; judging whether the acquired external sound exceeds a preset threshold value or not; and when the acquired external sound exceeds a preset threshold value, the acquired external sound is played through the earphone.
According to the embodiment of the invention, when the terminal plays the sound through the earphone, the external sound meeting the conditions is played through the earphone, so that the user can clearly obtain the external sound when using the earphone, and the user can conveniently master the external condition.
Preferably, the threshold is a decibel value. According to the scheme, when the external sound exceeds the preset decibel, the external sound is played through the earphone, so that noise or irrelevant sound can be avoided from being heard, and the interference to a user is reduced.
As a preferable aspect of the above technique, before the external sound is captured by the microphone, the method further includes: judging whether an instruction for providing external sound is received; the acquiring of the external sound through the microphone includes: when receiving an instruction for requesting the provision of the external sound, the external sound is acquired through the microphone. According to the scheme, the external sound is obtained only when the user requires to provide the external sound, so that the electric power is saved.
As a preferable aspect of the foregoing technology, before the external sound is played through the earphone, the method further includes: filtering the acquired external sound; the playing the acquired external sound through the earphone comprises: and playing the filtered external sound through the earphone. In the scheme, the external sound can be further filtered, so that the external sound which is clearer or meets the requirement better can be provided.
As a preferable aspect of the foregoing technology, before the external sound is played through the earphone, the method further includes: judging whether the acquired external sound has sound within a preset frequency range; the playing the acquired external sound through the earphone comprises: and when the acquired external sound has sound within a preset frequency range, the acquired external sound is played through the earphone. In the scheme, when the sound which accords with the frequency exists in the external sound, the external sound is played, so that resources can be saved, and the external sound which does not accord with the requirement is prevented from being provided for a user.
Preferably, the playing the acquired external sound through the earphone includes: the original sound is paused to be played, and only the acquired external sound is played through the earphone; or mixing the acquired external sound with the original sound and then playing the mixed sound through the earphone. The scheme provides two alternative playing schemes.
As a preferable aspect of the foregoing technology, before the external sound is played through the earphone, the method further includes: judging whether the acquired external sound is a preset voice instruction or not; when the acquired external sound is a preset voice instruction, forwarding the voice instruction; the playing the acquired external sound through the earphone comprises: and when the acquired external sound is not a preset voice instruction, the acquired external sound is played through the earphone. The scheme further judges whether the external sound is a voice instruction, and provides application of the voice instruction for a user using the earphone.
The invention also proposes a device for providing sound, said device comprising:
the acquisition module is used for acquiring external sound through a microphone when detecting that the earphone is connected and sound is played through the earphone;
the first judgment module is used for judging whether the acquired external sound exceeds a preset threshold value or not;
and the playing module is used for playing the acquired external sound through the earphone when the acquired external sound exceeds a preset threshold value.
As a preferable aspect of the above technique, the apparatus further includes:
the second judgment module is used for judging whether an instruction for requesting to provide external sound is received or not;
the playing module is used for acquiring the external sound through the microphone when receiving an instruction of requiring to provide the external sound.
Preferably, the threshold is a decibel value.
As a preferable aspect of the above technique, the apparatus further includes:
the filtering module is used for filtering the acquired external sound;
the playing module is used for playing the filtered external sound through the earphone.
As a preferable aspect of the above technique, the apparatus further includes:
the third judgment module is used for judging whether the acquired external sound has sound within a preset frequency range;
the playing module is used for playing the acquired external sound through the earphone when the acquired external sound has sound within a preset frequency range.
As a preferable aspect of the foregoing technology, the playing module is configured to:
the original sound is paused to be played, and only the acquired external sound is played through the earphone; or,
and mixing the acquired external sound with the original sound and then playing the mixed sound through the earphone.
As a preferable aspect of the above technique, the apparatus further includes:
the fourth judgment module is used for judging whether the acquired external sound is a preset voice instruction or not;
the forwarding module is used for forwarding the voice instruction when the acquired external sound is a preset voice instruction;
the playing module is used for playing the acquired external sound through the earphone when the acquired external sound is not a preset voice instruction.
Additional features and advantages of embodiments of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. The objectives and other advantages of the invention will be realized and attained by the structure particularly pointed out in the written description and claims hereof as well as the appended drawings.
The technical solutions of the embodiments of the present invention are further described in detail with reference to the accompanying drawings and embodiments.
Drawings
The accompanying drawings are included to provide a further understanding of the embodiments of the invention, and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the principles of the invention. In the drawings:
FIG. 1 is a flow chart of the primary method of providing sound in an embodiment of the present invention;
FIG. 2 is a flow chart of a method of another embodiment of providing sound in an embodiment of the present invention;
FIG. 3 is a flow chart of a method of another embodiment of providing sound in an embodiment of the present invention;
FIG. 4 is a flow chart of a method of another embodiment of providing sound in an embodiment of the present invention;
FIG. 5 is a flow chart of a method of another embodiment of providing sound in an embodiment of the present invention;
FIG. 6 is a schematic diagram of the main structure of an apparatus for providing sound according to an embodiment of the present invention;
FIG. 7 is a schematic diagram of a specific structure of an apparatus for providing sound according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present invention.
Detailed Description
The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, and it should be understood that the preferred embodiments described herein are merely illustrative and explanatory of the embodiments of the present invention, and are not restrictive of the embodiments of the invention.
The method for providing the sound provided by the embodiment of the invention can be executed in any terminal capable of providing the sound, wherein the terminal comprises a mobile phone, a tablet computer, a desktop computer, a multimedia player and the like. Fig. 1 shows a main flow of a method for providing sound according to an embodiment of the present invention, which includes the following steps:
step S101: when detecting that the earphone is connected and the sound is played through the earphone, acquiring the external sound through the microphone.
The microphone may be carried by the terminal itself or connected with the terminal.
Step S102: and judging whether the acquired external sound exceeds a preset threshold value.
Preferably, the threshold is a decibel value indicating the magnitude of the sound. Only when the external sound exceeds the preset decibel, the external sound is played through the earphone, so that irrelevant sound or noise can be prevented from being reacted, and the interference to a user is reduced.
Step S103: and when the acquired external sound exceeds a preset threshold value, the acquired external sound is played through the earphone.
Preferably, when the acquired external sound is played through the earphone, playing of the original sound can be suspended, and only the acquired external sound is played through the earphone; or mixing the acquired external sound with the original sound and then playing the mixed sound through the earphone.
According to the embodiment of the invention, when the terminal plays the sound through the earphone, the external sound meeting the conditions is played through the earphone. Therefore, the external sound is provided for the user using the earphone, so that the user can clearly acquire the external sound when using the earphone, and the user can conveniently master the external condition. And the terminal can open the microphone to sense the external sound only when playing the sound through the earphone, and the microphone does not need to be opened for sensing in other times, so that the electric power can be saved.
In the embodiment shown in fig. 2, before the external sound is acquired through the microphone, a determination may be made to determine whether the user allows acquiring and playing the external sound, specifically, the method includes the following steps:
step S201: the terminal detects whether an earphone is connected or not and plays sound through the earphone; if yes, go to step S202; if not, the process is ended.
Step S202: the terminal judges whether an instruction for requesting to provide external sound is received, if so, step S203 is executed; if not, the process is ended.
When the user selects the function of providing the external sound, the instruction of requesting to provide the external sound is issued, or the user or the terminal sets the function of requesting to provide the external sound in advance and the instruction of requesting to provide the external sound is issued.
Step S203: the terminal acquires external sound through the microphone.
Step S204: the terminal judges whether the acquired external sound exceeds a preset decibel value, if so, step S205 is executed; if not, the step is repeated.
Step S205: the terminal pauses playing original sound and only plays the acquired external sound through the connected earphone.
In the embodiment, the external sound is acquired only when the user requires to provide the external sound, so that resources are saved.
In the embodiment shown in fig. 3, before the acquired external sound is played through the earphone, the external sound may be filtered, specifically, the method includes the following steps:
step S301: the terminal detects whether an earphone is connected or not and plays sound through the earphone; if yes, go to step S302; if not, the process is ended.
Step S302: the terminal acquires external sound through the microphone.
Step S303: the terminal judges whether the acquired external sound exceeds a preset decibel value, if so, the step S304 is executed; if not, the step is repeated.
Step S304: and the terminal filters the acquired external sound.
In this step, noise, background sound, etc. in the external sound may be filtered, or the external sound may be filtered according to a preset frequency or frequency range. For example, high frequency parts (10000 Hz-20000 Hz) and low frequency parts (20 Hz-100 Hz) in the external sound are filtered, and only the middle frequency part, namely, only the human sound is retained. The mid-frequency section can be customized, such as 100Hz (male bass) to 10000Hz (female treble). For the reserved frequencies, the size, bandwidth and center frequency can be adjusted. The self-defining of the frequency for filtering can adapt to different use environments and different use habits.
Step S305: the terminal pauses playing original sound, and only plays the filtered external sound through the connected earphone.
In this embodiment, the filtered sound and the original sound volume average value may be further dynamically compared, and the volume of the filtered sound and the original sound volume average value may be adjusted to achieve balance, so as to provide a clearer or more satisfactory external sound.
As shown in fig. 4, before playing the acquired external sound through the earphone, it may be further determined whether the external sound conforms to a sound set by a user, specifically, the method includes the following steps:
step S401: the terminal detects whether an earphone is connected or not and plays sound through the earphone; if yes, go to step S402; if not, the process is ended.
Step S402: the terminal acquires external sound through the microphone.
Step S403: the terminal judges whether the acquired external sound exceeds a preset decibel value, if so, the step S404 is executed; if not, the step is repeated.
Step S404: the terminal judges whether the acquired external sound has sound within a preset frequency range; if yes, go to step S405; if not, the process is ended.
For example, the user needs to play the external sound through the earphone only when the external sound includes a voice, and then, it should be determined whether the acquired external sound includes a sound within a preset frequency range of 100Hz (male bass) to 10000Hz (female treble). For example, the preset frequency range can be customized, and can adapt to different use environments and different use habits.
Step S405: and the terminal processes the external sound and amplifies the sound in a preset frequency range in the external sound.
This step is a preferable step, and it is possible to further make the sound within the preset frequency range out of the external sound prominent.
Step S406: and the terminal mixes the processed external sound with the original sound.
Wherein, the mixing proportion can be adjusted manually or dynamically and automatically, for example, the original sound accounts for 60 percent, and the external sound accounts for 40 percent.
Step S407: and the terminal plays the mixed sound through the connected earphone.
In this embodiment, when there is a sound with a frequency in the external sound, the external sound is played, so that resources can be saved and the external sound which does not meet the requirement is prevented from being provided for the user.
As shown in fig. 5, before the acquired external sound is played through the earphone, it may be further determined whether the external sound is a preset voice instruction, specifically, the method includes the following steps:
step S501: detecting whether an earphone is connected and playing sound through the earphone; if yes, go to step S502; if not, the process is ended.
Step S502: the external sound is acquired through the microphone.
Step S503: judging whether the acquired external sound exceeds a preset decibel value, if so, executing a step 5404; if not, the step is repeated.
Step S504: judging whether the acquired external sound is a preset voice command, if so, executing step S505; if not, go to step S506.
Step S505: and forwarding the voice instruction to a module for executing the voice instruction to execute corresponding operation.
Step S506: and playing the acquired external sound through the connected earphone.
In the embodiment of the invention, whether the external sound is the voice instruction can be further judged, and the application of the voice instruction is provided for a user using the earphone. The preset voice command is a plurality of recognizable languages.
Preferably, it can be further determined whether the external sound is a special sound or a group of special tones or intervals, as the application of the voice command.
As shown in fig. 6, an embodiment of the present invention further provides an apparatus for providing sound, including:
an obtaining module 601, configured to obtain external sound through a microphone when detecting that an earphone is connected and sound is played through the earphone;
a first determining module 602, configured to determine whether the acquired external sound exceeds a preset threshold;
the playing module 603 is configured to play the acquired external sound through the earphone when the acquired external sound exceeds a preset threshold.
Preferably, as shown in fig. 7, the apparatus further includes:
a second judging module 604, configured to judge whether an instruction for providing an external sound is received;
the playing module 603 is configured to obtain the external sound through the microphone when receiving an instruction that the external sound is required to be provided.
Preferably, as shown in fig. 7, the apparatus further includes:
a filtering module 605, configured to filter the acquired external sound;
the playing module 603 is configured to play the filtered external sound through the earphone.
Preferably, as shown in fig. 7, the apparatus further includes:
a third determining module 606, configured to determine whether there is a sound within a preset frequency range in the acquired external sound;
the playing module 603 is configured to play the acquired external sound through the earphone when the acquired external sound has a sound within a preset frequency range.
Preferably, the playing module 603 is configured to:
the original sound is paused to be played, and only the acquired external sound is played through the earphone; or,
and mixing the acquired external sound with the original sound and then playing the mixed sound through the earphone.
Preferably, as shown in fig. 7, the apparatus further includes:
a fourth determining module 607, configured to determine whether the obtained external sound is a preset voice instruction;
a forwarding module 608, configured to forward the voice instruction when the obtained external sound is a preset voice instruction;
the playing module 603 is configured to play the acquired external sound through the earphone when the acquired external sound is not a preset voice instruction.
An embodiment of the present invention further provides a terminal, and fig. 8 is a schematic structural diagram of a terminal device according to an embodiment of the present invention. Referring to fig. 8, the terminal device may be used to implement the method for recommending an application program provided in the above embodiment.
Terminal device 1100 may include components such as a communication unit 110, memory 120 including one or more computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, audio circuitry 160, a WiFi (wireless fidelity) module 170, a processor 180 including one or more processing cores, and a power supply 190. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 8 does not constitute a limitation of the terminal device and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components. Wherein:
the communication unit 110 may be used for receiving and transmitting information or signals during a call, and the communication unit 110 may be an RF (Radio Frequency) circuit, a router, a modem, or other network communication devices. In particular, when the communication unit 110 is an RF circuit, downlink information of the base station is received and then processed by the one or more processors 180; in addition, data relating to uplink is transmitted to the base station. Generally, the RF circuit as a communication unit includes, but is not limited to, an antenna, at least one Amplifier, a tuner, one or more oscillators, a Subscriber Identity Module (SIM) card, a transceiver, a coupler, an LNA (Low Noise Amplifier), a duplexer, and the like. In addition, the communication unit 110 may also communicate with a network and other devices through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to GSM (Global System for Mobile communications), GPRS (general packet Radio Service), CDMA (Code Division Multiple Access), WCDMA (Wideband Code Division Multiple Access), LTE (long term Evolution), email, SMS (Short Messaging Service), and the like. The memory 120 may be used to store software programs and modules, and the processor 180 executes various functional applications and data processing by operating the software programs and modules stored in the memory 120. The memory 120 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 terminal device 1100, and the like. Further, the memory 120 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. Accordingly, the memory 120 may further include a memory controller to provide the processor 180 and the input unit 130 with access to the memory 120.
The input unit 130 may be used to receive input numeric or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Input unit 130 may include a touch-sensitive surface 131 as well as other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, can capture touch operations of a user on or near the touch-sensitive surface 131 (e.g., operations of a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means 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 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include other input devices 132. Other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to a user and various graphic user interfaces of the terminal device 1100, which may be configured by graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141, and optionally, the display panel 141 may be configured in the form of an LCD (Liquid crystal display), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 8, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement input and output functions.
Terminal device 1100 can also include at least one sensor 150, such as a light sensor, motion sensor, and other sensors. The light sensor may include an ambient light sensor that adjusts the brightness of the display panel 141 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 141 and/or a backlight when the terminal device 1100 is moved to the ear. As one of the motion sensors, the gravity acceleration sensor may detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when the mobile phone is stationary, and may be used for applications of recognizing gestures of a mobile phone (for example, horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (for example, pedometer, tapping), and the like, and as for the terminal device 1100, other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, and the like may be further configured, which are not described herein again.
Audio circuitry 160, speaker 161, microphone 162 may provide an audio interface between a user and terminal device 1100. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the acquired sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and outputs the audio data to the processor 180 for processing, and then transmits the audio data to, for example, another terminal device via the RF circuit 110, or outputs the audio data to the memory 120 for further processing. The audio circuit 160 also includes an earpiece jack to provide communication of a peripheral headset with the terminal device 1100.
To implement wireless communication, a wireless communication unit 170 may be configured on the terminal device, and the wireless communication unit 170 may be a WiFi module. WiFi belongs to a short-range wireless transmission technology, and the terminal device 700 can help a user to send and receive e-mail, browse a web page, access streaming media, and the like through the wireless communication unit 170, which provides the user with wireless broadband internet access. Although fig. 8 shows the wireless communication unit 170, it is understood that it does not belong to the essential constitution of the terminal device 1100 and may be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 180 is a control center of the terminal device 1100, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the terminal device 1100 and processes data by operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby performing overall monitoring of the mobile phone. Optionally, processor 180 may include one or more processing cores; preferably, the processor 180 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 the processor 180.
Terminal device 1100 also includes a power supply 190 (e.g., a battery) for powering the various components, which may preferably be logically coupled to processor 180 via a power management system to manage charging, discharging, and power consumption management functions via the power management system. The power supply 190 may also include any component including one or more of a dc or ac power source, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the terminal device 1100 may further include a camera, a bluetooth module, and the like, which will not be described herein. In this embodiment, the display unit of the terminal device is a touch screen display, the terminal device further includes a memory, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the one or more processors include instructions for:
when detecting that an earphone is connected and sound is played through the earphone, acquiring external sound through a microphone;
judging whether the acquired external sound exceeds a preset threshold value or not;
and when the acquired external sound exceeds a preset threshold value, the acquired external sound is played through the earphone.
Preferably, before the external sound is captured by the microphone, the method further includes:
judging whether an instruction for providing external sound is received;
the acquiring of the external sound through the microphone includes: when receiving an instruction for requesting the provision of the external sound, the external sound is acquired through the microphone.
Preferably, the threshold is a decibel value.
Preferably, before the external sound to be acquired is played through the earphone, the method further includes:
filtering the acquired external sound;
the playing the acquired external sound through the earphone comprises: and playing the filtered external sound through the earphone.
Preferably, before the external sound to be acquired is played through the earphone, the method further includes:
judging whether the acquired external sound has sound within a preset frequency range;
the playing the acquired external sound through the earphone comprises: and when the acquired external sound has sound within a preset frequency range, the acquired external sound is played through the earphone.
Preferably, the playing the acquired external sound through the earphone includes:
the original sound is paused to be played, and only the acquired external sound is played through the earphone; or,
and mixing the acquired external sound with the original sound and then playing the mixed sound through the earphone.
Preferably, before the external sound is captured by the microphone, the method further includes:
judging whether the acquired external sound is a preset voice instruction or not;
when the acquired external sound is a preset voice instruction, forwarding the voice instruction;
the playing the acquired external sound through the earphone comprises: and when the acquired external sound is not a preset voice instruction, the acquired external sound is played through the earphone.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (15)

1. A method of providing sound, the method comprising the steps of:
when detecting that an earphone is connected and sound is played through the earphone, acquiring external sound through a microphone;
judging whether the acquired external sound exceeds a preset threshold value or not;
when the acquired external sound exceeds a preset threshold value, the acquired external sound is played through the earphone;
before the external sound is played through the earphone, the method further includes:
judging whether the acquired external sound is a preset voice instruction or not;
when the acquired external sound is a preset voice instruction, forwarding the voice instruction to a module for executing the voice instruction to execute corresponding operation;
the playing the acquired external sound through the earphone comprises: and when the acquired external sound is not a preset voice instruction, the acquired external sound is played through the earphone.
2. The method of claim 1, wherein the threshold is a decibel value.
3. The method of claim 1, wherein prior to the capturing of the ambient sound by the microphone, the method further comprises:
judging whether an instruction for providing external sound is received;
the acquiring of the external sound through the microphone includes: when receiving an instruction for requesting the provision of the external sound, the external sound is acquired through the microphone.
4. The method of claim 1, wherein before the ambient sound is played through the headphones, the method further comprises:
filtering the acquired external sound;
the playing the acquired external sound through the earphone comprises: and playing the filtered external sound through the earphone.
5. The method of claim 1, wherein before the ambient sound is played through the headphones, the method further comprises:
judging whether the acquired external sound has sound within a preset frequency range;
the playing the acquired external sound through the earphone comprises: and when the acquired external sound has sound within a preset frequency range, the acquired external sound is played through the earphone.
6. The method of claim 1, wherein the playing the captured ambient sound through the headset comprises:
the original sound is paused to be played, and only the acquired external sound is played through the earphone; or,
and mixing the acquired external sound with the original sound and then playing the mixed sound through the earphone.
7. The method of claim 6, wherein mixing the captured ambient sound with the original sound and playing the mixed sound through the headset comprises mixing the captured ambient sound with the original sound and playing the mixed sound through the headset according to a ratio set by a user.
8. The apparatus of claim 1, wherein the preset voice command is a recognizable multi-language.
9. The device of claim 1, wherein the predetermined voice command is a sound of a particular tone or interval or a group of tones.
10. An apparatus for providing sound, the apparatus comprising:
the acquisition module is used for acquiring external sound through a microphone when detecting that the earphone is connected and sound is played through the earphone;
the first judgment module is used for judging whether the acquired external sound exceeds a preset threshold value or not;
the playing module is used for playing the acquired external sound through the earphone when the acquired external sound exceeds a preset threshold;
the device further comprises:
the fourth judgment module is used for judging whether the acquired external sound is a preset voice instruction or not;
the forwarding module is used for forwarding the voice instruction to a module for executing the voice instruction to execute corresponding operation when the acquired external sound is a preset voice instruction;
the playing module is used for playing the acquired external sound through the earphone when the acquired external sound is not a preset voice instruction.
11. The apparatus of claim 10, further comprising:
the second judgment module is used for judging whether an instruction for requesting to provide external sound is received or not;
the playing module is used for acquiring the external sound through the microphone when receiving an instruction of requiring to provide the external sound.
12. The apparatus of claim 11, wherein the threshold is a decibel value.
13. The apparatus of claim 11, further comprising:
the filtering module is used for filtering the acquired external sound;
the playing module is used for playing the filtered external sound through the earphone.
14. The apparatus of claim 11, further comprising:
the third judgment module is used for judging whether the acquired external sound has sound within a preset frequency range;
the playing module is used for playing the acquired external sound through the earphone when the acquired external sound has sound within a preset frequency range.
15. The apparatus of claim 11, wherein the playback module is configured to:
the original sound is paused to be played, and only the acquired external sound is played through the earphone; or,
and mixing the acquired external sound with the original sound and then playing the mixed sound through the earphone.
CN201310329755.1A 2013-07-31 2013-07-31 A kind of method and apparatus that sound is provided Active CN103414982B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310329755.1A CN103414982B (en) 2013-07-31 2013-07-31 A kind of method and apparatus that sound is provided

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310329755.1A CN103414982B (en) 2013-07-31 2013-07-31 A kind of method and apparatus that sound is provided

Publications (2)

Publication Number Publication Date
CN103414982A CN103414982A (en) 2013-11-27
CN103414982B true CN103414982B (en) 2018-02-13

Family

ID=49607959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310329755.1A Active CN103414982B (en) 2013-07-31 2013-07-31 A kind of method and apparatus that sound is provided

Country Status (1)

Country Link
CN (1) CN103414982B (en)

Families Citing this family (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104734740B (en) * 2013-12-20 2018-08-14 国民技术股份有限公司 A kind of wireless audio data communications method and device
CN104950440A (en) * 2014-03-28 2015-09-30 美商晶典有限公司 Head-mounted reality augmentation display system
CN104133652B (en) 2014-06-10 2016-02-17 腾讯科技(深圳)有限公司 A kind of audio play control method, and terminal
CN104038860A (en) * 2014-07-01 2014-09-10 深圳智我科技有限公司 Non-removable close-distance voice listening method and headset
CA2971147C (en) 2014-12-23 2022-07-26 Timothy DEGRAYE Method and system for audio sharing
US9529500B1 (en) * 2015-06-05 2016-12-27 Apple Inc. Application recommendation based on detected triggering events
CN105100356B (en) * 2015-07-07 2018-04-06 上海斐讯数据通信技术有限公司 The method and system that a kind of volume automatically adjusts
CN106550294A (en) * 2015-09-18 2017-03-29 丰唐物联技术(深圳)有限公司 Monitor method and device based on earphone
CN105554664A (en) * 2015-12-22 2016-05-04 王晓晖 Headset based sound processing method and apparatus, and headset
CN106373325A (en) * 2016-08-03 2017-02-01 厦门傅里叶电子有限公司 Safety prompting method for virtual reality equipment
CN106325518A (en) * 2016-08-31 2017-01-11 青岛歌尔声学科技有限公司 Voice monitoring method and device for virtual reality equipment and virtual reality equipment
CN106791109A (en) * 2016-12-23 2017-05-31 维沃移动通信有限公司 A kind of sound prompting method and mobile terminal
CN107992258A (en) * 2017-11-28 2018-05-04 广东小天才科技有限公司 Microphone-based control method and device, microphone and storage medium
CN108022601A (en) * 2017-11-29 2018-05-11 歌尔股份有限公司 The real-time based reminding method of virtual reality and virtual reality device
US11074906B2 (en) 2017-12-07 2021-07-27 Hed Technologies Sarl Voice aware audio system and method
CN108540661A (en) * 2018-03-30 2018-09-14 广东欧珀移动通信有限公司 Signal processing method, device, terminal, earphone and readable storage medium storing program for executing
CN112235683B (en) * 2020-11-20 2023-05-05 北京旋极信息技术股份有限公司 Microphone and ambient sound noise reduction method
CN115037398A (en) * 2021-03-03 2022-09-09 Oppo广东移动通信有限公司 Audio transmission method and system, chip and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6782106B1 (en) * 1999-11-12 2004-08-24 Samsung Electronics Co., Ltd. Apparatus and method for transmitting sound
JP2009300915A (en) * 2008-06-17 2009-12-24 Fujitsu Ltd Mobile terminal with music playback function
CN101790000A (en) * 2010-02-20 2010-07-28 华为终端有限公司 Environmental sound reminding method and mobile terminal
CN101840700A (en) * 2010-04-28 2010-09-22 宇龙计算机通信科技(深圳)有限公司 Voice recognition method based on mobile terminal and mobile terminal
CN102624980A (en) * 2012-03-06 2012-08-01 惠州Tcl移动通信有限公司 Method for detecting abrupt environment and prompting based on earphone of mobile phone and mobile phone

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6782106B1 (en) * 1999-11-12 2004-08-24 Samsung Electronics Co., Ltd. Apparatus and method for transmitting sound
JP2009300915A (en) * 2008-06-17 2009-12-24 Fujitsu Ltd Mobile terminal with music playback function
CN101790000A (en) * 2010-02-20 2010-07-28 华为终端有限公司 Environmental sound reminding method and mobile terminal
CN101840700A (en) * 2010-04-28 2010-09-22 宇龙计算机通信科技(深圳)有限公司 Voice recognition method based on mobile terminal and mobile terminal
CN102624980A (en) * 2012-03-06 2012-08-01 惠州Tcl移动通信有限公司 Method for detecting abrupt environment and prompting based on earphone of mobile phone and mobile phone

Also Published As

Publication number Publication date
CN103414982A (en) 2013-11-27

Similar Documents

Publication Publication Date Title
CN103414982B (en) A kind of method and apparatus that sound is provided
CN108684029B (en) Bluetooth pairing connection method and system, Bluetooth device and terminal
CN103488939B (en) Method, device and terminal for prompting user
CN103634717B (en) A kind of method, device and the terminal device of the control of utilization earphone
CN106068020A (en) Hinting abnormal states method and device
CN103618514A (en) Volume adjustment method, device and electronic equipment
WO2022033176A1 (en) Audio play control method and apparatus, and electronic device and storage medium
CN106940997B (en) Method and device for sending voice signal to voice recognition system
CN107846516B (en) Call scene prompting method and mobile terminal
CN109243488B (en) Audio detection method, device and storage medium
CN103312597B (en) A kind of speech message generation method and device
WO2020118495A1 (en) Audio resource allocation method, device, and electronic apparatus
CN108683980B (en) Audio signal transmission method and mobile terminal
CN106445457A (en) Headphone sound channel switching method and device
CN108681413B (en) Control method of display module and mobile terminal
CN111078186A (en) Playing method and electronic equipment
CN107786751A (en) A kind of method for broadcasting multimedia file and mobile terminal
CN111093137B (en) Volume control method, volume control equipment and computer readable storage medium
CN103647868A (en) Method and device for reducing ringtone interferences
CN111614329A (en) Power amplifier, electronic equipment, voltage control method and device
CN111081283A (en) Music playing method and device, storage medium and terminal equipment
CN108319440B (en) Audio output method and mobile terminal
CN106228994B (en) A kind of method and apparatus detecting sound quality
CN108600906B (en) Playing control method and device for multiple sound boxes
CN105159655B (en) Behavior event playing method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: 100085 Beijing city Haidian District Qinghe Street No. 68 Huarun colorful city shopping center two floor 13

Applicant after: Xiaomi Technology Co., Ltd.

Address before: 100102 Beijing Wangjing West Road, a volume of stone world building, A, block, floor 12

Applicant before: Beijing Xiaomi Technology Co., Ltd.

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant