CN111479005A - A kind of volume adjustment method and electronic device - Google Patents

A kind of volume adjustment method and electronic device Download PDF

Info

Publication number
CN111479005A
CN111479005A CN202010296924.6A CN202010296924A CN111479005A CN 111479005 A CN111479005 A CN 111479005A CN 202010296924 A CN202010296924 A CN 202010296924A CN 111479005 A CN111479005 A CN 111479005A
Authority
CN
China
Prior art keywords
audio
volume
electronic device
condition
preset
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.)
Granted
Application number
CN202010296924.6A
Other languages
Chinese (zh)
Other versions
CN111479005B (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 CN202010296924.6A priority Critical patent/CN111479005B/en
Publication of CN111479005A publication Critical patent/CN111479005A/en
Application granted granted Critical
Publication of CN111479005B publication Critical patent/CN111479005B/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
    • H04MTELEPHONIC COMMUNICATION
    • H04M1/00Substation equipment, e.g. for use by subscribers
    • H04M1/72Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
    • H04M1/724User interfaces specially adapted for cordless or mobile telephones
    • H04M1/72448User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

本发明公开了一种音量调节方法及电子设备,其中,所述方法应用于电子设备,所述方法包括:通过扬声器播放第一音频的过程中,采集第二音频;在第二音频满足预设条件的情况下,调大扬声器的音量。本发明公开的音量调节方法,电子设备可基于第二音频的情况自动调大扬声器的音量,无需用户手动调节,便捷且智能。

Figure 202010296924

The invention discloses a volume adjustment method and electronic device, wherein the method is applied to the electronic device, and the method includes: collecting a second audio during the process of playing a first audio through a speaker; when the second audio satisfies a preset If possible, turn up the speaker volume. With the volume adjustment method disclosed in the present invention, the electronic device can automatically increase the volume of the speaker based on the second audio frequency, without requiring manual adjustment by the user, which is convenient and intelligent.

Figure 202010296924

Description

一种音量调节方法及电子设备A kind of volume adjustment method and electronic device

技术领域technical field

本发明实施例涉及通信技术领域,尤其涉及一种音量调节方法及电子设备。Embodiments of the present invention relate to the field of communication technologies, and in particular, to a volume adjustment method and an electronic device.

背景技术Background technique

随着社会的进步和发展,电子设备已经成为人们生活中不可缺少的工具,电子设备可为用户提供通话、视频浏览、音乐播放、图像拍摄以及定位等服务。在使用电子设备的扬声器播放音乐过程中,若用户不手动对音量进行调节,则电子设备始终按照固定音量外放音乐。在该种情况下,若电子设备处于嘈杂的环境中时,用户可听到的音量因受外界事物的阻挡会变小,此时,需要用户手动将扬声器的音量调大,操作繁琐且不够智能。With the progress and development of society, electronic devices have become indispensable tools in people's lives. Electronic devices can provide users with services such as calls, video browsing, music playback, image capture, and positioning. During the process of using the speaker of the electronic device to play music, if the user does not manually adjust the volume, the electronic device always plays the music at a fixed volume. In this case, if the electronic device is in a noisy environment, the volume that the user can hear will be reduced due to the obstruction of external things. At this time, the user needs to manually increase the volume of the speaker, which is cumbersome and not intelligent enough. .

发明内容SUMMARY OF THE INVENTION

本发明实施例提供一种音量调节方法及电子设备,以解决现有技术中存在的需要用户手动调节扬声器音量,操作繁琐且不够智能的问题。Embodiments of the present invention provide a volume adjustment method and an electronic device, so as to solve the problems in the prior art that the user needs to manually adjust the speaker volume, which is cumbersome to operate and is not intelligent enough.

为了解决上述技术问题,本发明实施例是这样实现的:In order to solve the above technical problems, the embodiments of the present invention are 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, wherein the method includes: collecting a second audio during the process of playing a first audio through a speaker; wherein, the second audio is external audio; when the second audio satisfies a preset condition, turn up the volume of the speaker; wherein the preset condition includes at least one of the following: the second audio and the first audio The matching degree is higher than the preset value; the second audio includes ambient noise.

第二方面,本发明实施例提供了一种电子设备,其中,所述电子设备包括:采集模块,用于通过扬声器播放第一音频的过程中,采集第二音频;其中,所述第二音频为外部音频;调节模块,用于在所述第二音频满足预设条件的情况下,调大所述扬声器的音量;其中,所述预设条件包括以下至少一种:所述第二音频与所述第一音频的匹配度高于预设值;所述第二音频包括环境噪声。In a second aspect, an embodiment of the present invention provides an electronic device, wherein the electronic device includes: a collection module configured to collect a second audio in the process of playing the first audio through a speaker; wherein the second audio is an external audio; an adjustment module is used to increase the volume of the speaker when the second audio meets a preset condition; wherein the preset condition includes at least one of the following: the second audio and the The matching degree of the first audio is higher than a preset value; the second audio includes ambient noise.

第三方面,本发明实施例提供了一种电子设备,其中,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如本发明实施例中所述的任意一种音量调节方法的步骤。In a third aspect, an embodiment of the present invention provides an electronic device, including a processor, a memory, and a computer program stored on the memory and executable on the processor, the computer program being processed by the processor The steps of implementing any one of the volume adjustment methods described in the embodiments of the present invention are implemented when the device is executed.

第四方面,本发明实施例提供了一种计算机可读存储介质,其中,所述计算机可读存储介质上存储计算机程序,所述计算机程序被处理器执行时实现如本发明实施例中所述的任意一种音量调节方法的步骤。In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the implementation is as described in the embodiment of the present invention The steps of any one of the volume adjustment methods.

在本发明实施例中,通过扬声器播放第一音频的过程中,采集第二音频;在所述第二音频满足预设条件的情况下,调大扬声器的音量,电子设备可基于第二音频的情况自动调大扬声器的音量,无需用户手动调节,便捷且智能。In the embodiment of the present invention, during the process of playing the first audio through the speaker, the second audio is collected; when the second audio satisfies the preset condition, the volume of the speaker is turned up, and the electronic device can be based on the second audio. Automatically increase the volume of the speaker without the need for manual adjustment by the user, which is convenient and intelligent.

上述说明仅是本发明技术方案的概述,为了能够更清楚了解本发明的技术手段,而可依照说明书的内容予以实施,并且为了让本发明的上述和其它目的、特征和优点能够更明显易懂,以下特举本发明的具体实施方式。The above description is only an overview of the technical solutions of the present invention, in order to be able to understand the technical means of the present invention more clearly, it can be implemented according to the content of the description, and in order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand , the following specific embodiments of the present invention are given.

附图说明Description of drawings

通过阅读下文优选实施方式的详细描述,各种优点和益处对于本领域普通技术人员将变得清楚明了。附图仅用于示出优选实施方式,而并不认为是对本发明的限制。而且在整个附图中,用相同的参考符号表示相同的部件。在附图中:Various advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only used to illustrate preferred embodiments and are not to be considered limiting of the present invention. Also, the same components are denoted by the same reference numerals throughout the drawings. In the attached image:

图1是根据本发明实施例的一种音量调节方法的步骤流程图;1 is a flow chart of the steps of a method for adjusting a volume according to an embodiment of the present invention;

图2是根据本发明实施例的又一种音量调节方法的步骤流程图;Fig. 2 is a flow chart of steps of yet another volume adjustment method according to an embodiment of the present invention;

图3是根据本发明实施例的一种电子设备的结构框图;3 is a structural block diagram of an electronic device according to an embodiment of the present invention;

图4是根据本发明实施例的一种电子设备的硬件结构示意图。FIG. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

参照图1,示出了本发明实施例的一种音量调节方法的步骤流程图。Referring to FIG. 1 , a flow chart of steps of a volume adjustment method according to an embodiment of the present invention is shown.

本发明实施例的音量调节方法包括以下步骤:The volume adjustment method of the embodiment of the present invention includes the following steps:

步骤101:通过扬声器播放第一音频的过程中,采集第二音频。Step 101: During the process of playing the first audio through the speaker, collect the second audio.

本发明实施例提供的音量调节方法适用于电子设备,电子设备中包含扬声器、处理器以及音频采集装置如:麦克风。音频采集装置采集外部音频即第二音频。The volume adjustment method provided by the embodiment of the present invention is suitable for electronic equipment, and the electronic equipment includes a speaker, a processor, and an audio collection device such as a microphone. The audio collection device collects external audio, that is, the second audio.

步骤102:在第二音频满足预设条件的情况下,调大扬声器的音量。Step 102: Turn up the volume of the speaker when the second audio satisfies the preset condition.

其中,预设条件包括以下至少一种:第二音频与第一音频的匹配度高于预设值;第二音频包括环境噪声。The preset condition includes at least one of the following: a degree of matching between the second audio and the first audio is higher than a preset value; and the second audio includes environmental noise.

第一音频与第二音频的匹配度高于预设值,说明电子设备采集到了大量第一音频的回声,可初步判定电子设备处于封闭或者半封闭的区间内,例如:口袋中、背包中等,为使用户可清楚地听到第一音频,需调大扬声器的音量。The matching degree of the first audio frequency and the second audio frequency is higher than the preset value, indicating that the electronic device has collected a large number of echoes of the first audio frequency. In order for the user to hear the first audio clearly, the volume of the speaker needs to be turned up.

第二音频包括环境噪声的情况下,说明电子设备处于嘈杂的环境中,为为使用户可清楚地听到第一音频,需调大扬声器的音量。In the case where the second audio frequency includes ambient noise, it means that the electronic device is in a noisy environment, and in order for the user to hear the first audio frequency clearly, the volume of the speaker needs to be increased.

在具体实现过程中,一种可选地确定第二音频是否满足预设条件的方式为:In a specific implementation process, a method for optionally determining whether the second audio satisfies the preset condition is:

监测第二音频的声波振幅变化情况,在第二音频的声波振幅大于预设振幅的情况下,处理器对第二音频进行分析,确定声波振幅发生明显增大的原因,导致声波振幅发生明显增大的原因可能是扬声器所播放的第一音频大量反射、电子设备进入嘈杂的环境中等。通过确定第一音频与第二音频的音源是否相同,可分析出第二音频与第一音频的匹配度是否高于预设值,进一步可分析出第二音频的声波振幅增大是否因为第一音频大量反射导致。预设振幅可以由本领域技术人员根据实验值设置,本发明实施例中对预设值的具体数值不做具体限制。当然并不限于此,还可以直接将第一音频、第二音频的进行音频内容比对,从而确定二者的匹配度。Monitor the change of the sound wave amplitude of the second audio frequency, and in the case that the sound wave amplitude of the second audio frequency is greater than the preset amplitude, the processor analyzes the second audio frequency to determine the reason for the obvious increase in the sound wave amplitude, resulting in a significant increase in the sound wave amplitude. Larger reasons may be a lot of reflections of the first audio played by the speakers, electronic equipment entering a noisy environment, etc. By determining whether the sound sources of the first audio and the second audio are the same, it can be analyzed whether the matching degree of the second audio and the first audio is higher than the preset value, and further it can be analyzed whether the increase of the sound wave amplitude of the second audio is caused by the first audio. Caused by a lot of reflections in the audio. The preset amplitude may be set by those skilled in the art according to experimental values, and the specific numerical value of the preset value is not specifically limited in the embodiment of the present invention. Of course, it is not limited to this, and it is also possible to directly compare the audio content of the first audio and the second audio, so as to determine the matching degree of the two.

本发明实施例提供的音量调节方法,通过扬声器播放第一音频的过程中,采集第二音频;在第二音频满足预设条件的情况下,调大扬声器的音量,电子设备可基于第二音频的情况自动调大扬声器的音量,无需用户手动调节,便捷且智能。In the volume adjustment method provided by the embodiment of the present invention, during the process of playing the first audio through the speaker, the second audio is collected; when the second audio satisfies the preset condition, the volume of the speaker is increased, and the electronic device can be based on the second audio. Automatically increase the volume of the speaker, without the user's manual adjustment, convenient and intelligent.

参照图2,示出了本发明实施例的又一种音量调节方法的步骤流程图。Referring to FIG. 2 , a flow chart of steps of still another volume adjustment method according to an embodiment of the present invention is shown.

本发明实施例的音量调节方法应用于电子设备,包括以下步骤:The volume adjustment method of the embodiment of the present invention is applied to an electronic device, and includes the following steps:

步骤201:通过扬声器播放第一音频的过程中,采集第二音频。Step 201: During the process of playing the first audio through the speaker, collect the second audio.

其中,第二音频为外部音频,第二音频通过电子设备中设置的音频采集模块如麦克风采集。The second audio is external audio, and the second audio is collected by an audio collection module such as a microphone set in the electronic device.

步骤202:实时监测第二音频是否满足预设条件。Step 202: Monitor in real time whether the second audio satisfies the preset condition.

其中,预设条件包括以下至少一种:第二音频与第一音频的匹配度高于预设值;第二音频包括环境噪声。The preset condition includes at least one of the following: a degree of matching between the second audio and the first audio is higher than a preset value; and the second audio includes environmental noise.

在第二音频不满足预设条件的情况下,返回执行步骤201继续采集第二音频并监测第二音频是否满足预设条件。In the case that the second audio does not meet the preset condition, return to step 201 to continue collecting the second audio and monitor whether the second audio satisfies the preset condition.

第二音频与第一音频的匹配度高于预设值,说明扬声器所播放的第一音频大量反射,电子设备可能处于封闭或者半封闭空间中,为使电子设备用户清楚地听到第一音频,需调大扬声器的音量。第二音频包含环境噪声,说明电子设备进入嘈杂的环境中,为使电子设备用户清楚地听到第一音频,同样也需调大扬声器的音量。在确定第二音频与第一音频的匹配度是否高于预设值时,可判断第二音频与第一音频的音源是否相同;若相同,确定第二音频与第一音频的匹配度高于预设值。一种可选地判断第二音频与第一音频的音源是否相同的方式为:The matching degree of the second audio frequency with the first audio frequency is higher than the preset value, indicating that the first audio frequency played by the speaker is largely reflected, and the electronic device may be in a closed or semi-closed space. , turn up the speaker volume. The second audio frequency contains ambient noise, which indicates that the electronic device enters a noisy environment. In order for the user of the electronic device to hear the first audio frequency clearly, it is also necessary to increase the volume of the speaker. When determining whether the matching degree of the second audio and the first audio is higher than the preset value, it can be determined whether the sound source of the second audio and the first audio is the same; if they are the same, it is determined that the matching degree of the second audio and the first audio is higher than default value. A way to optionally judge whether the sound source of the second audio and the first audio is the same is:

将第二音频转化成频谱图,每隔预设长度提取一次标志点特征,将所提取的标志点特征作为音频指纹;在音乐片段库中对提取的各音频指纹进行搜索匹配,分别确定片段库中各歌曲与所提取的各音频指纹的匹配数量;确定匹配数量最高的第一歌曲;确定第一歌曲与第一音频是否为同一首歌曲;若是,确定第二音频与第一音频的音源相同;若否,确定第二音频与第一音频的音源不同。音乐片段库中包含多首歌曲的指纹片段,每首歌曲对应多个指纹片段。The second audio frequency is converted into a spectrogram, and the marker point feature is extracted once every preset length, and the extracted marker point feature is used as an audio fingerprint; the extracted audio fingerprints are searched and matched in the music fragment library, and the fragment library is determined respectively. The matching number of each song and the extracted audio fingerprints in the middle; Determine the first song with the highest matching number; Determine whether the first song and the first audio are the same song; If so, determine that the second audio is the same as the source of the first audio ; If not, determine that the source of the second audio is different from that of the first audio. The music segment library contains fingerprint segments of multiple songs, and each song corresponds to multiple fingerprint segments.

在第二音频与第一音频的匹配度高于预设值的情况下,还需确定电子设备用户的状态,依据电子设备用户的状态给出更加符合实际需求的扬声器调整提示。用户的状态可以包括但不限于:驾驶状态、手持电子设备的状态、行走状态或者静止状态等。用户状态不同,扬声器调整提示不同,具体流程如步骤203至步骤206。In the case that the matching degree of the second audio frequency and the first audio frequency is higher than the preset value, the state of the user of the electronic device needs to be determined, and a speaker adjustment prompt more suitable for actual needs is given according to the state of the user of the electronic device. The state of the user may include, but is not limited to, a driving state, a state of a handheld electronic device, a walking state or a stationary state, and the like. Different user states have different speaker adjustment prompts. The specific process is as in step 203 to step 206 .

在第二音频包含环境噪声的情况下,调大扬声器的音量,并输出询问提示信息。When the second audio contains ambient noise, turn up the volume of the speaker, and output an inquiry prompt message.

其中,询问提示信息用于提示电子设备接入耳机。用户可根据实际需求对询问提示信息进行响应。该种在确定电子设备处于嘈杂环境中输出询问提示信息的方式,用户可根据实际需求进行音量调节或者接入耳机,能满足用户的个性化需求。The query prompt information is used to prompt the electronic device to connect to the headset. The user can respond to the query prompt information according to actual needs. In this method of outputting inquiry prompt information when it is determined that the electronic device is in a noisy environment, the user can adjust the volume or connect to the earphone according to actual needs, which can meet the individual needs of the user.

步骤203:在第二音频满足预设条件的情况下,检测电子设备的移动速度是否大于预设速度;若是,执行步骤204;若否,执行步骤206。Step 203 : if the second audio frequency satisfies the preset condition, detect whether the moving speed of the electronic device is greater than the preset speed; if yes, go to step 204 ; if not, go to step 206 .

通过检测电子设备的移动速度是否大于预设速度,可确定电子设备用户当前是否处于驾驶状态。预设速度的具体值可由本领域技术人员根据实验或者经验设置,本发明实施例中对此不做具体限制。例如:预设速度可设置为3米/秒、5米/秒或者6米/秒等。By detecting whether the moving speed of the electronic device is greater than the preset speed, it can be determined whether the user of the electronic device is currently in a driving state. The specific value of the preset speed can be set by those skilled in the art according to experiments or experience, which is not specifically limited in this embodiment of the present invention. For example: the preset speed can be set to 3 m/s, 5 m/s or 6 m/s, etc.

步骤204:在电子设备用户处于驾驶状态的情况下,搜索驾驶车辆上是否包含已开启的车载系统。在电子设备的移动速度小于或等于预设速度的情况下,确定电子设备用户未处于驾驶状态,可能处于静止或者步行状态等。Step 204: When the user of the electronic device is in a driving state, search whether the driving vehicle contains an on-board system that is turned on. When the moving speed of the electronic device is less than or equal to the preset speed, it is determined that the user of the electronic device is not in a driving state, and may be in a stationary or walking state, or the like.

搜索是否包含已开启的车载系统时,可以对可连接设备列表中查找是否包含车载系统标识,若包含确定驾驶车辆上包含已开启的车载系统。When searching whether the on-board system is included, you can check the list of connectable devices to see if the on-board system ID is included.

步骤205:在驾驶车辆的车载系统已开启的情况下,输出提示信息。Step 205 : output a prompt message when the on-board system of the driving vehicle is turned on.

其中,提示信息用于提示电子设备接入车载系统。The prompt information is used to prompt the electronic device to access the vehicle system.

将电子设备接入车载系统,便于用户驾驶的同时对电子设备进行操控,例如:切换播放对象、调节音量等。Connecting the electronic device to the in-vehicle system is convenient for the user to control the electronic device while driving, such as switching the playback object, adjusting the volume, etc.

步骤206:在电子设备的移动速度小于或等于预设速度的情况下,调大扬声器的音量。Step 206: Turn up the volume of the speaker when the moving speed of the electronic device is less than or equal to the preset speed.

该分支即:在第二音频满足预设条件、且电子设备的移动速度小于或等于预设速度的情况下,调大扬声器的音量。This branch is: when the second audio frequency satisfies the preset condition and the moving speed of the electronic device is less than or equal to the preset speed, turn up the volume of the speaker.

调大扬声器的音量时,可以将扬声器的音量调节至预设音量,也可以调节至扬声器的最大音量,本发明实施例中对此不做具体限制。When increasing the volume of the speaker, the volume of the speaker may be adjusted to a preset volume, or may be adjusted to the maximum volume of the speaker, which is not specifically limited in this embodiment of the present invention.

一种可选的方式为,在第二音频满足预设条件、且所述电子设备的移动速度小于或等于预设速度的情况下,检测电子设备是否未被手持;在电子设备未被手持的情况下,再调大扬声器的音量。即在第二音频满足预设条件、电子设备的移动速度小于或等于预设速度、且电子设备未被手持的情况下,调大扬声器的音量。在电子设备被手持的情况下,保持扬声器的音量不变。电子设备未被手持的情况下,可初步判定电子设备可能置于全封闭或者半封闭空间中,才导致第二音频与第一音频的匹配度高于预设值。例如:电子设备置于用户口袋中、电子设备置于用户背包中等这类全封闭或半封闭空间中。该种情况下,为确保电子设备用户可清楚地听到第一音频,需调大扬声器的音量。An optional way is to detect whether the electronic device is not held when the second audio frequency meets the preset condition and the moving speed of the electronic device is less than or equal to the preset speed; If so, turn up the speaker volume again. That is, when the second audio frequency satisfies the preset condition, the moving speed of the electronic device is less than or equal to the preset speed, and the electronic device is not held by hand, the volume of the speaker is turned up. Keep the speaker volume constant while the electronic device is held in hand. When the electronic device is not held by hand, it can be preliminarily determined that the electronic device may be placed in a fully enclosed or semi-enclosed space, so that the matching degree between the second audio frequency and the first audio frequency is higher than the preset value. For example, the electronic device is placed in the user's pocket, the electronic device is placed in the user's backpack, etc. in a fully enclosed or semi-enclosed space. In this case, in order to ensure that the user of the electronic device can clearly hear the first audio frequency, it is necessary to increase the volume of the speaker.

在具体实现过程中,可基于陀螺仪对电子设备的倾斜角度、所处高度等参数进行检测,结合检测到的参数判断电子设备是否被手持。还可以基于感光元件确定电子设备与用户手指的距离,从而确定电子设备是否被用户手持。In the specific implementation process, parameters such as the inclination angle and the height of the electronic device can be detected based on the gyroscope, and whether the electronic device is held by hand can be determined in combination with the detected parameters. The distance between the electronic device and the user's finger may also be determined based on the photosensitive element, so as to determine whether the electronic device is held by the user.

本发明实施例提供的音量调节方法,通过扬声器播放第一音频的过程中,采集第二音频;在第二音频满足预设条件的情况下,调大扬声器的音量,电子设备可基于第二音频的情况自动调大扬声器的音量,无需用户手动调节,便捷且智能。此外,本发明实施例提供的音量调节方法,在确定第二音频与第一音频的匹配度高于预设值的情况下,还进一步分析用户的状态例如:驾驶、行走等,依据分析结果提供更加准确、全面地音量调节相关提示,能够进一步提升用户的使用体验。In the volume adjustment method provided by the embodiment of the present invention, during the process of playing the first audio through the speaker, the second audio is collected; when the second audio satisfies the preset condition, the volume of the speaker is increased, and the electronic device can be based on the second audio. Automatically increase the volume of the speaker, without the user's manual adjustment, convenient and intelligent. In addition, in the volume adjustment method provided by the embodiment of the present invention, when it is determined that the matching degree of the second audio frequency and the first audio frequency is higher than the preset value, the user's state, such as driving, walking, etc., is further analyzed, and the user is provided according to the analysis result. More accurate and comprehensive prompts related to volume adjustment can further improve the user experience.

参照图3,示出了本发明实施例的一种电子设备的结构框图。Referring to FIG. 3 , a structural block diagram of an electronic device according to an embodiment of the present invention is shown.

本发明实施例的电子设备300包括:采集模块301,用于通过扬声器播放第一音频的过程中,采集第二音频;其中,所述第二音频为外部音频;调节模块302,用于在所述第二音频满足预设条件的情况下,调大所述扬声器的音量;其中,所述预设条件包括以下至少一种:所述第二音频与所述第一音频的匹配度高于预设值;所述第二音频包括环境噪声。The electronic device 300 according to the embodiment of the present invention includes: a collection module 301 for collecting a second audio in the process of playing the first audio through a speaker; wherein the second audio is external audio; and an adjustment module 302 for When the second audio satisfies a preset condition, turn up the volume of the speaker; wherein the preset condition includes at least one of the following: the matching degree of the second audio and the first audio is higher than the preset Set value; the second audio includes ambient noise.

可选地,所述电子设备还包括:搜索模块,用于在所述调节模块调大所述扬声器的音量之前,在所述电子设备用户处于驾驶状态的情况下,搜索驾驶车辆的车载系统是否已开启;第一输出模块,用于在所述驾驶车辆的车载系统已开启的情况下,输出提示信息,其中,所述提示信息用于提示将所述电子设备接入所述车载系统。Optionally, the electronic device further includes: a search module, configured to search whether the vehicle-mounted system of the driving vehicle is in a driving state before the adjustment module turns up the volume of the speaker. is turned on; the first output module is configured to output prompt information when the on-board system of the driving vehicle is turned on, wherein the prompt information is used to prompt to connect the electronic device to the on-board system.

可选地,所述调节模块具体用于:在所述第二音频满足预设条件、且所述电子设备的移动速度小于或等于预设速度的情况下,调大所述扬声器的音量。Optionally, the adjusting module is specifically configured to: increase the volume of the speaker when the second audio frequency meets a preset condition and the moving speed of the electronic device is less than or equal to the preset speed.

可选地,所述调节模块具体用于:在所述第二音频满足预设条件、所述电子设备的移动速度小于或等于预设速度、且所述电子设备未被手持的情况下,调大所述扬声器的音量。Optionally, the adjustment module is specifically configured to: adjust the audio when the second audio satisfies a preset condition, the moving speed of the electronic device is less than or equal to the preset speed, and the electronic device is not held by hand. Increase the volume of the speakers.

可选地,所述调节模块具体用于:在所述第二音频包括环境噪声的情况下,调大所述扬声器的音量,并输出询问提示信息,其中,所述询问提示信息用于提示所述电子设备接入耳机。Optionally, the adjustment module is specifically configured to: when the second audio includes environmental noise, increase the volume of the speaker, and output inquiry prompt information, wherein the inquiry prompt information is used to prompt the The electronic device is connected to the headset.

本发明实施例提供的电子设备能够实现图1至图2的方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。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. 2 , and to avoid repetition, details are not described here.

本发明实施例提供的电子设备,通过扬声器播放第一音频的过程中,采集第二音频;在第二音频满足预设条件的情况下,调大扬声器的音量,电子设备可基于第二音频的情况自动调大扬声器的音量,无需用户手动调节,便捷且智能。In the electronic device provided by the embodiment of the present invention, in the process of playing the first audio frequency through the speaker, the second audio frequency is collected; when the second audio frequency meets the preset condition, the volume of the speaker is increased, and the electronic device can be based on the second audio frequency. Automatically increase the volume of the speaker without the need for manual adjustment by the user, which is convenient and intelligent.

参照图4,示出了本发明实施例4的一种电子设备的结构框图。Referring to FIG. 4 , a structural block diagram of an electronic device according to Embodiment 4 of the present invention is shown.

图4为实现本发明各个实施例的一种电子设备的硬件结构示意图,该电子设备400包括但不限于:射频单元401、网络模块402、音频输出单元403、输入单元404、传感器405、显示单元406、用户输入单元407、接口单元408、存储器409、处理器410、以及电源411等部件。本领域技术人员可以理解,图4中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。4 is a schematic diagram of the hardware structure of an electronic device implementing various embodiments of the present invention. The electronic device 400 includes but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, and a display unit 406 , a user input unit 407 , an interface unit 408 , a memory 409 , a processor 410 , and a power supply 411 and other components. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 4 does not constitute a limitation on the electronic device, and the electronic device may include more or less components than the one shown, or combine some components, or different components layout. In this embodiment of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a notebook computer, a palmtop computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.

其中,输入单元404用于在电子设备通过扬声器播放第一音频的过程中,采集第二音频;其中,所述第二音频为外部音频;处理器410,用于在所述第二音频满足预设条件的情况下,调大所述扬声器的音量;其中,所述预设条件包括以下至少一种:所述第二音频与所述第一音频的匹配度高于预设值;所述第二音频包括环境噪声。Wherein, the input unit 404 is used for collecting the second audio when the electronic device plays the first audio through the speaker; wherein, the second audio is external audio; the processor 410 is used for when the second audio satisfies the preset In the case of setting conditions, turn up the volume of the speaker; wherein, the preset conditions include at least one of the following: the matching degree of the second audio and the first audio is higher than a preset value; the first audio Two tones include ambient noise.

本发明实施例提供的电子设备,通过扬声器播放第一音频的过程中,采集第二音频;在第二音频满足预设条件的情况下,调大扬声器的音量,电子设备可基于第二音频的情况自动调大扬声器的音量无需用户手动调节,便捷且智能。In the electronic device provided by the embodiment of the present invention, in the process of playing the first audio frequency through the speaker, the second audio frequency is collected; when the second audio frequency meets the preset condition, the volume of the speaker is increased, and the electronic device can be based on the second audio frequency. Automatically increase the volume of the speaker without manual adjustment by the user, which is convenient and intelligent.

应理解的是,本发明实施例中,射频单元401可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器410处理;另外,将上行的数据发送给基站。通常,射频单元401包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元401还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in this embodiment of the present invention, the radio frequency unit 401 can be used for receiving and sending signals during sending and receiving information or during a call. Specifically, after receiving the downlink data from the base station, it is processed by the processor 410; The uplink data is sent to the base station. Generally, the radio frequency unit 401 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 401 can also communicate with the network and other devices through a wireless communication system.

电子设备通过网络模块402为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The electronic device provides the user with wireless broadband Internet access through the network module 402, such as helping the user to send and receive emails, browse web pages, access streaming media, and the like.

音频输出单元403可以将射频单元401或网络模块402接收的或者在存储器409中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元403还可以提供与电子设备400执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元403包括扬声器、蜂鸣器以及受话器等。The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into audio signals and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the electronic device 400 (eg, call signal reception sound, message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.

输入单元404用于接收音频或视频信号。输入单元404可以包括图形处理器(Graphics Processing Unit,GPU)4041和麦克风4042,图形处理器4041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元406上。经图形处理器4041处理后的图像帧可以存储在存储器409(或其它存储介质)中或者经由射频单元401或网络模块402进行发送。麦克风4042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元401发送到移动通信基站的格式输出。The input unit 404 is used to receive audio or video signals. The input unit 404 may include a graphics processor (Graphics Processing Unit, GPU) 4041 and a microphone 4042. The graphics processor 4041 captures images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode data is processed. The processed image frames may be displayed on the display unit 406 . The image frames processed by the graphics processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402 . The microphone 4042 can receive sound and can process such sound into audio data. The processed audio data can be converted into a format that can be transmitted to a mobile communication base station via the radio frequency unit 401 for output in the case of a telephone call mode.

电子设备400还包括至少一种传感器405,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板4061的亮度,接近传感器可在电子设备400移动到耳边时,关闭显示面板4061和/或背光。显示面板401为柔性显示屏,柔性显示屏包括依次叠加设置的屏幕底座、可升降模块阵列以及柔性屏幕。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器405还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The electronic device 400 also includes at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 4061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 4061 and the display panel 4061 when the electronic device 400 is moved to the ear. / or backlight. The display panel 401 is a flexible display screen, and the flexible display screen includes a screen base, an array of liftable modules, and a flexible screen that are superimposed in sequence. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (usually three axes), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games , magnetometer attitude calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, Infrared sensors, etc., are not repeated here.

显示单元406用于显示由用户输入的信息或提供给用户的信息。显示单元406可包括显示面板4061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板4061。The display unit 406 is used to display information input by the user or information provided to the user. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.

用户输入单元407可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元407包括触控面板4071以及其他输入设备4072。触控面板4071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板4071上或在触控面板4071附近的操作)。触控面板4071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器410,接收处理器410发来的命令并加以执行。此外,可以采用电阻式、电容式、红外线以及表面声波等多种类型实现触控面板4071。除了触控面板4071,用户输入单元407还可以包括其他输入设备4072。具体地,其他输入设备4072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 407 may be used to receive input numerical or character information, and generate key signal input related to user setting and function control of the electronic device. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072 . The touch panel 4071, also referred to as a touch screen, can collect the user's touch operations on or near it (such as the user's finger, stylus, etc., any suitable object or accessory on or near the touch panel 4071). operate). The touch panel 4071 may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it to the touch controller. To the processor 410, the command sent by the processor 410 is received and executed. In addition, the touch panel 4071 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch panel 4071 , the user input unit 407 may also include other input devices 4072 . Specifically, other input devices 4072 may include, but are not limited to, physical keyboards, function keys (such as volume control keys, switch keys, etc.), trackballs, mice, and joysticks, which will not be repeated here.

进一步的,触控面板4071可覆盖在显示面板4061上,当触控面板4071检测到在其上或附近的触摸操作后,传送给处理器410以确定触摸事件的类型,随后处理器410根据触摸事件的类型在显示面板4061上提供相应的视觉输出。虽然在图4中,触控面板4071与显示面板4061是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板4071与显示面板4061集成而实现电子设备的输入和输出功能,具体此处不做限定。Further, the touch panel 4071 can be covered on the display panel 4061. When the touch panel 4071 detects a touch operation on or near it, it transmits it to the processor 410 to determine the type of the touch event, and then the processor 410 determines the type of the touch event according to the touch The type of event provides corresponding visual output on display panel 4061. Although in FIG. 4 , the touch panel 4071 and the display panel 4061 are used as two independent components to realize the input and output functions of the electronic device, but in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated The implementation of the input and output functions of the electronic device is not specifically limited here.

接口单元408为外部装置与电子设备400连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(I/O)端口、视频I/O端口、耳机端口等等。接口单元408可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备400内的一个或多个元件或者可以用于在电子设备400和外部装置之间传输数据。The interface unit 408 is an interface for connecting an external device to the electronic device 400 . For example, external devices may include wired or wireless headset ports, external power (or battery charger) ports, wired or wireless data ports, memory card ports, ports for connecting devices with identification modules, audio input/output (I/O) ports, video I/O ports, headphone ports, and more. The interface unit 408 may be used to receive input (eg, data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic device 400 or may be used between the electronic device 400 and external Transfer data between devices.

存储器409可用于存储软件程序以及各种数据。存储器409可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器409可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a stored program area and a stored data area, wherein the stored program area may store an operating system, an application program (such as a sound playback function, an image playback function, etc.) required for at least one function, and the like; Data created by the use of the mobile phone (such as audio data, phone book, etc.), etc. Additionally, memory 409 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.

处理器410是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器409内的软件程序和/或模块,以及调用存储在存储器409内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器410可包括一个或多个处理单元;优选的,处理器410可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器410中。The processor 410 is the control center of the electronic device, using various interfaces and lines to connect various parts of the entire electronic device, by running or executing the software programs and/or modules stored in the memory 409, and calling the data stored in the memory 409. , perform various functions of electronic equipment and process data, so as to monitor electronic equipment as a whole. The processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem The processor mainly handles wireless communication. It can be understood that, the above-mentioned modulation and demodulation processor may not be integrated into the processor 410.

电子设备400还可以包括给各个部件供电的电源411(比如电池),优选的,电源411可以通过电源管理系统与处理器410逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 400 may also include a power supply 411 (such as a battery) for supplying power to various components. Preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system and other functions.

另外,电子设备400包括一些未示出的功能模块,在此不再赘述。In addition, the electronic device 400 includes some functional modules not shown, which will not be repeated here.

优选的,本发明实施例还提供一种电子设备,包括处理器410,存储器409,存储在存储器409上并可在所述处理器410上运行的计算机程序,该计算机程序被处理器410执行时实现上述音量调节方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, an embodiment of the present invention further provides an electronic device, including a processor 410, a memory 409, and a computer program stored in the memory 409 and running on the processor 410, when the computer program is executed by the processor 410 The various processes of the foregoing volume adjustment method embodiments are implemented, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.

本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述音量调节方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。Embodiments of the present invention further provide a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium. When the computer program is executed by a processor, each process of the foregoing volume adjustment method embodiment can be implemented, and the same technology can be achieved. The effect, in order to avoid repetition, is not repeated here. The computer-readable storage medium is, for example, a read-only memory (Read-Only Memory, ROM for short), a random access memory (Random Access Memory, RAM for short), a magnetic disk, or an optical disk.

需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that, herein, the terms "comprising", "comprising" or any other variation thereof are intended to encompass non-exclusive inclusion, such that a process, method, article or device comprising a series of elements includes not only those elements, It also includes other elements not expressly listed or inherent to such a process, method, article or apparatus. Without further limitation, an element qualified by the phrase "comprising a..." does not preclude the presence of additional identical elements in a process, method, article or apparatus that includes the element.

通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。From the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is better implementation. Based on this understanding, the technical solutions of the present invention can be embodied in the form of software products in essence or the parts that make contributions to the prior art, and the computer software products are stored in a storage medium (such as ROM/RAM, magnetic disk, CD), including several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods described in the various embodiments of the present invention.

上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The embodiments of the present invention have been described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments, which are merely illustrative rather than restrictive. Under the inspiration of the present invention, without departing from the spirit of the present invention and the scope protected by the claims, many forms can be made, which all belong to the protection of the present invention.

Claims (11)

1. A volume adjusting method is applied to an electronic device, and is characterized by comprising the following steps:
collecting a second audio in the process of playing the first audio through a loudspeaker; wherein the second audio is an external audio;
turning up the volume of the loudspeaker under the condition that the second audio meets a preset condition;
wherein the preset condition comprises at least one of the following: the matching degree of the second audio and the first audio is higher than a preset value; the second audio includes ambient noise.
2. The method of claim 1, wherein prior to the turning up the volume of the speaker, the method further comprises:
searching whether a vehicle-mounted system for driving a vehicle is started or not under the condition that the electronic equipment user is in a driving state;
and under the condition that the vehicle-mounted system for driving the vehicle is started, outputting prompt information, wherein the prompt information is used for prompting that the electronic equipment is accessed to the vehicle-mounted system.
3. The method of claim 1, wherein turning up the volume of the speaker if the second audio satisfies a preset condition comprises:
and under the condition that the second audio meets a preset condition and the moving speed of the electronic equipment is less than or equal to a preset speed, turning up the volume of the loudspeaker.
4. The method of claim 3, wherein turning up the volume of the speaker if the second audio satisfies a preset condition and the moving speed of the electronic device is less than or equal to a preset speed comprises:
and under the conditions that the second audio frequency meets a preset condition, the moving speed of the electronic equipment is less than or equal to a preset speed, and the electronic equipment is not held by hands, turning up the volume of the loudspeaker.
5. The method of claim 1, wherein in the event that the second audio comprises ambient noise, the step of turning up the volume of the speaker comprises:
and under the condition that the second audio comprises the environmental noise, turning up the volume of the loudspeaker and outputting inquiry prompting information, wherein the inquiry prompting information is used for prompting the electronic equipment to access an earphone.
6. An electronic device, characterized in that the electronic device comprises:
the acquisition module is used for acquiring a second audio in the process of playing the first audio through the loudspeaker; wherein the second audio is an external audio;
the adjusting module is used for increasing the volume of the loudspeaker under the condition that the second audio meets a preset condition;
wherein the preset condition comprises at least one of the following: the matching degree of the second audio and the first audio is higher than a preset value; the second audio includes ambient noise.
7. The electronic device of claim 6, further comprising:
the searching module is used for searching whether an on-vehicle system of a driving vehicle is started or not under the condition that the electronic equipment user is in a driving state before the adjusting module increases the volume of the loudspeaker;
the first output module is used for outputting prompt information under the condition that a vehicle-mounted system for driving the vehicle is started, wherein the prompt information is used for prompting that the electronic equipment is connected to the vehicle-mounted system.
8. The electronic device of claim 6, wherein the adjustment module is specifically configured to:
and under the condition that the second audio meets a preset condition and the moving speed of the electronic equipment is less than or equal to a preset speed, turning up the volume of the loudspeaker.
9. The electronic device of claim 8, wherein the adjustment module is specifically configured to:
and under the conditions that the second audio frequency meets a preset condition, the moving speed of the electronic equipment is less than or equal to a preset speed, and the electronic equipment is not held by hands, turning up the volume of the loudspeaker.
10. The electronic device of claim 6, wherein the adjustment module is specifically configured to:
and under the condition that the second audio comprises the environmental noise, turning up the volume of the loudspeaker and outputting inquiry prompting information, wherein the inquiry prompting information is used for prompting the electronic equipment to access an earphone.
11. 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 as claimed in any one of claims 1 to 5.
CN202010296924.6A 2020-04-15 2020-04-15 A kind of volume adjustment method and electronic device Active CN111479005B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010296924.6A CN111479005B (en) 2020-04-15 2020-04-15 A kind of volume adjustment method and electronic device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010296924.6A CN111479005B (en) 2020-04-15 2020-04-15 A kind of volume adjustment method and electronic device

Publications (2)

Publication Number Publication Date
CN111479005A true CN111479005A (en) 2020-07-31
CN111479005B CN111479005B (en) 2021-07-16

Family

ID=71754248

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010296924.6A Active CN111479005B (en) 2020-04-15 2020-04-15 A kind of volume adjustment method and electronic device

Country Status (1)

Country Link
CN (1) CN111479005B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600976A (en) * 2020-12-16 2021-04-02 维沃移动通信有限公司 Volume adjusting method and device and electronic equipment

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070255435A1 (en) * 2005-03-28 2007-11-01 Sound Id Personal Sound System Including Multi-Mode Ear Level Module with Priority Logic
CN102904536A (en) * 2011-07-28 2013-01-30 富泰华工业(深圳)有限公司 Volume adjustment device and method
CN107483731A (en) * 2017-08-18 2017-12-15 广东欧珀移动通信有限公司 Audio playback volume control method, device, storage medium and mobile terminal
CN109040449A (en) * 2018-08-06 2018-12-18 维沃移动通信有限公司 A kind of volume adjusting method and terminal device
CN109511037A (en) * 2018-12-19 2019-03-22 努比亚技术有限公司 Earpiece volume adjusting method, device and computer readable storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070255435A1 (en) * 2005-03-28 2007-11-01 Sound Id Personal Sound System Including Multi-Mode Ear Level Module with Priority Logic
CN102904536A (en) * 2011-07-28 2013-01-30 富泰华工业(深圳)有限公司 Volume adjustment device and method
CN107483731A (en) * 2017-08-18 2017-12-15 广东欧珀移动通信有限公司 Audio playback volume control method, device, storage medium and mobile terminal
CN109040449A (en) * 2018-08-06 2018-12-18 维沃移动通信有限公司 A kind of volume adjusting method and terminal device
CN109511037A (en) * 2018-12-19 2019-03-22 努比亚技术有限公司 Earpiece volume adjusting method, device and computer readable storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112600976A (en) * 2020-12-16 2021-04-02 维沃移动通信有限公司 Volume adjusting method and device and electronic equipment
CN112600976B (en) * 2020-12-16 2022-05-31 维沃移动通信有限公司 Volume adjusting method and device and electronic equipment

Also Published As

Publication number Publication date
CN111479005B (en) 2021-07-16

Similar Documents

Publication Publication Date Title
CN111556371A (en) Note-taking method and electronic device
CN108551534B (en) Method and device for multi-terminal voice call
CN110568926A (en) A sound signal processing method and terminal equipment
CN111370018A (en) Audio data processing method, electronic device and medium
CN108022446A (en) A kind of parking spot acquisition methods, mobile terminal
CN108668024A (en) A kind of method of speech processing and terminal
CN110097872A (en) A kind of audio-frequency processing method and electronic equipment
WO2021098676A1 (en) Control method and electronic device
CN107886969A (en) A kind of audio frequency playing method and audio playing apparatus
CN108521501A (en) Voice input method and mobile terminal
CN108924319B (en) Proximity detection method and mobile terminal
CN110516495A (en) A kind of barcode scanning method and mobile terminal
CN109067429B (en) A control method and terminal device
CN108430025B (en) A detection method and mobile terminal
CN109443261B (en) Method for obtaining folding angle of folding screen mobile terminal and mobile terminal
CN110248269A (en) A kind of information identifying method, earphone and terminal device
CN110764650A (en) Button trigger detection method and electronic device
CN109949809A (en) A kind of sound control method and terminal device
CN111479005B (en) A kind of volume adjustment method and electronic device
CN108650392A (en) A kind of call recording method and mobile terminal
CN109963235B (en) Sound signal processing method and mobile terminal
CN109218526B (en) Voice processing method and mobile terminal
CN108897467B (en) Display control method and terminal equipment
CN107835310B (en) Mobile terminal setting method and mobile terminal
CN110717065A (en) Audio recommendation method and device, electronic equipment and storage medium

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