[go: up one dir, main page]

CN108040181A - Audio playing method and device and electronic equipment - Google Patents

Audio playing method and device and electronic equipment Download PDF

Info

Publication number
CN108040181A
CN108040181A CN201810031071.6A CN201810031071A CN108040181A CN 108040181 A CN108040181 A CN 108040181A CN 201810031071 A CN201810031071 A CN 201810031071A CN 108040181 A CN108040181 A CN 108040181A
Authority
CN
China
Prior art keywords
audio
signal
strength
bone conduction
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.)
Pending
Application number
CN201810031071.6A
Other languages
Chinese (zh)
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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201810031071.6A priority Critical patent/CN108040181A/en
Publication of CN108040181A publication Critical patent/CN108040181A/en
Pending legal-status Critical Current

Links

Classifications

    • 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/72403User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
    • H04M1/72442User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality for playing music files
    • 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
    • H04M1/72454User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions according to context-related or environment-related conditions

Landscapes

  • Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Environmental & Geological Engineering (AREA)
  • Telephone Function (AREA)

Abstract

The invention discloses an audio playing method, an audio playing device and electronic equipment, wherein the audio playing method comprises the following steps: when the audio is played, detecting the signal intensity of the audio signal with the frequency lower than the preset frequency in the audio; comparing the signal intensity with a preset intensity; when the signal intensity is higher than the preset intensity, controlling the bone conduction receiver to vibrate; and when the signal intensity is lower than the preset intensity, controlling the bone conduction receiver not to vibrate. According to the audio playing method, the audio playing device and the electronic equipment, when the audio is played, the signal intensity of the audio signal lower than the preset frequency in the audio is detected, the signal intensity is compared with the preset intensity, the bone conduction receiver is controlled to vibrate when the signal intensity is higher than the preset intensity, the bone conduction receiver is controlled not to vibrate when the signal intensity is lower than the preset intensity, the vibration of the bone conduction receiver is integrated into the playing of music or ring, the use experience of a user is enriched, and the higher requirements of the user are met.

Description

音频播放方法、装置及电子设备Audio playing method, device and electronic equipment

技术领域technical field

本发明涉及移动终端技术领域,尤其涉及一种音频播放方法、装置及电子设备。The present invention relates to the technical field of mobile terminals, in particular to an audio playing method, device and electronic equipment.

背景技术Background technique

随着科技的不断进步,手机的功能也越来越强大。手机中设置高清的显示屏幕和音频解码芯片,为用户提供了良好的视觉和听觉体验。目前,用户在使用手机播放音频时,只能通过扬声器或连接耳机将声音传播至用户的耳朵,不能满足用户全方位的需求。With the continuous advancement of technology, the functions of mobile phones are becoming more and more powerful. A high-definition display screen and an audio decoding chip are set in the mobile phone to provide users with a good visual and auditory experience. At present, when a user uses a mobile phone to play audio, the sound can only be transmitted to the user's ear through a speaker or connected to an earphone, which cannot meet the all-round needs of the user.

发明内容Contents of the invention

本发明的目的旨在至少在一定程度上解决上述的技术问题之一。The object of the present invention is to solve one of the above-mentioned technical problems at least to a certain extent.

为此,本发明的第一个目的在于提出一种音频播放方法,通过将骨传导听筒的震动融入至音乐或者铃声的播放中,丰富用户的使用体验,满足用户更高的需求。Therefore, the first purpose of the present invention is to propose an audio playback method, which can enrich the user experience and meet the higher needs of the user by integrating the vibration of the bone conduction earpiece into the playback of music or ringtones.

本发明的第二个目的在于提出一种音频播放装置。The second object of the present invention is to provide an audio playback device.

本发明的第三个目的在于提出一种电子设备。The third object of the present invention is to provide an electronic device.

本发明的第四个目的在于提出一种计算机可读存储介质。A fourth object of the present invention is to provide a computer-readable storage medium.

为达上述目的,本发明第一方面实施例提出了一种音频播放方法,包括:In order to achieve the above purpose, the embodiment of the first aspect of the present invention proposes an audio playback method, including:

播放音频时,检测所述音频中低于预设频率的音频信号的信号强度;When playing the audio, detect the signal strength of the audio signal lower than the preset frequency in the audio;

将所述信号强度与预设强度进行比较;comparing the signal strength with a preset strength;

当所述信号强度高于预设强度时,控制所述骨传导听筒进行震动;When the signal strength is higher than a preset strength, controlling the bone conduction earpiece to vibrate;

当所述信号强度低于所述预设强度时,控制所述骨传导听筒不震动。When the signal strength is lower than the preset strength, the bone conduction earpiece is controlled not to vibrate.

可选的,检测所述音频中低于预设频率的音频信号的信号强度,包括:Optionally, detecting the signal strength of an audio signal lower than a preset frequency in the audio includes:

采集所述音频的音频信号;collecting an audio signal of the audio;

对所述音频信号进行傅里叶变换;performing a Fourier transform on the audio signal;

获取低于预设频率的音频信号;Obtain an audio signal lower than a preset frequency;

计算低于预设频率的音频信号的信号强度的均方根值;calculating the root mean square value of the signal strength of the audio signal below a preset frequency;

将所述均方根值作为低于预设频率的音频信号的信号强度。The root mean square value is used as the signal strength of the audio signal lower than the preset frequency.

可选的,所述音频信号为脉冲编码调制PCM格式信号或wav格式信号。Optionally, the audio signal is a pulse code modulation signal in PCM format or wav format.

可选的,所述方法还包括:Optionally, the method also includes:

根据所述信号强度确定骨传导听筒的震动强度。The vibration intensity of the bone conduction earpiece is determined according to the signal intensity.

可选的,当所述信号强度高于所述预设强度时,所述震动强度与所述信号强度成正比关系。Optionally, when the signal strength is higher than the preset strength, the vibration strength is proportional to the signal strength.

可选的,在播放音频之前,还包括:Optionally, before playing audio, also include:

确定骨传导听筒震动功能开启;和/或Make sure the bone conduction earpiece vibration function is turned on; and/or

确定应用程序APP支持骨传导听筒震动功能。Make sure that the application APP supports the bone conduction earpiece vibration function.

本发明实施例的音频播放方法,播放音频时,检测音频中低于预设频率的音频信号的信号强度,并将信号强度与预设强度进行比较,以及当信号强度高于预设强度时,控制骨传导听筒进行震动,当信号强度低于预设强度时,控制骨传导听筒不震动,通过将骨传导听筒的震动融入至音乐或者铃声的播放中,丰富用户的使用体验,满足用户更高的需求。In the audio playing method of the embodiment of the present invention, when playing audio, the signal strength of the audio signal lower than the preset frequency in the audio is detected, and the signal strength is compared with the preset strength, and when the signal strength is higher than the preset strength, Control the bone conduction earpiece to vibrate. When the signal strength is lower than the preset strength, control the bone conduction earpiece not to vibrate. By integrating the vibration of the bone conduction earpiece into the playback of music or ringtones, it enriches the user experience and satisfies the higher requirements of users. demand.

本发明第二方面实施例提出了一种音频播放装置,包括:The embodiment of the second aspect of the present invention proposes an audio playback device, including:

检测模块,用于播放音频时,检测所述音频中低于预设频率的音频信号的信号强度;A detection module, configured to detect the signal strength of an audio signal lower than a preset frequency in the audio when the audio is played;

比较模块,用于将所述信号强度与预设强度进行比较;a comparison module, configured to compare the signal strength with a preset strength;

第一控制模块,用于当所述信号强度高于预设强度时,控制所述骨传导听筒进行震动;A first control module, configured to control the bone conduction receiver to vibrate when the signal strength is higher than a preset strength;

第二控制模块,用于当所述信号强度低于所述预设强度时,控制所述骨传导听筒不震动。The second control module is used to control the bone conduction earpiece not to vibrate when the signal strength is lower than the preset strength.

可选的,所述检测模块,用于:Optionally, the detection module is used for:

采集所述音频的音频信号;collecting an audio signal of the audio;

对所述音频信号进行傅里叶变换;performing a Fourier transform on the audio signal;

获取低于预设频率的音频信号;Obtain an audio signal lower than a preset frequency;

计算低于预设频率的音频信号的信号强度的均方根值;calculating the root mean square value of the signal strength of the audio signal below a preset frequency;

将所述均方根值作为低于预设频率的音频信号的信号强度。The root mean square value is used as the signal strength of the audio signal lower than the preset frequency.

可选的,所述音频信号为脉冲编码调制PCM格式信号或wav格式信号。Optionally, the audio signal is a pulse code modulation signal in PCM format or wav format.

可选的,所述装置还包括:Optionally, the device also includes:

第一确定模块,用于根据所述信号强度确定骨传导听筒的震动强度。The first determination module is configured to determine the vibration intensity of the bone conduction earpiece according to the signal intensity.

可选的,当所述信号强度高于所述预设强度时,所述震动强度与所述信号强度成正比关系。Optionally, when the signal strength is higher than the preset strength, the vibration strength is proportional to the signal strength.

可选的,装置还包括:Optionally, the device also includes:

第二确定模块,用于在播放音频之前,确定骨传导听筒震动功能开启;和/或The second determination module is used to determine that the vibration function of the bone conduction earpiece is turned on before playing the audio; and/or

确定应用程序APP支持骨传导听筒震动功能。Make sure that the application APP supports the bone conduction earpiece vibration function.

本发明实施例的音频播放装置,播放音频时,检测音频中低于预设频率的音频信号的信号强度,并将信号强度与预设强度进行比较,以及当信号强度高于预设强度时,控制骨传导听筒进行震动,当信号强度低于预设强度时,控制骨传导听筒不震动,通过将骨传导听筒的震动融入至音乐或者铃声的播放中,丰富用户的使用体验,满足用户更高的需求。The audio playback device in the embodiment of the present invention, when playing audio, detects the signal strength of the audio signal in the audio lower than the preset frequency, and compares the signal strength with the preset strength, and when the signal strength is higher than the preset strength, Control the bone conduction earpiece to vibrate. When the signal strength is lower than the preset strength, control the bone conduction earpiece not to vibrate. By integrating the vibration of the bone conduction earpiece into the playback of music or ringtones, it enriches the user experience and satisfies the higher requirements of users. demand.

本发明第三方面实施例提出了一种电子设备,包括:The embodiment of the third aspect of the present invention provides an electronic device, including:

处理器;processor;

骨传导听筒;以及bone conduction earpieces; and

存储器,用于存储所述处理器的可执行指令;a memory for storing executable instructions of the processor;

其中,所述处理器配置为经由执行所述可执行指令来执行第一方面实施例所述的音频播放方法。Wherein, the processor is configured to execute the audio playing method described in the embodiment of the first aspect by executing the executable instruction.

本发明第四方面实施例提出了一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现第一方面实施例所述的音频播放方法。The embodiment of the fourth aspect of the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein, when the program is executed by a processor, the audio playing method described in the embodiment of the first aspect is implemented.

本发明附加的方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本发明的实践了解到。Additional aspects and advantages of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention.

附图说明Description of drawings

本发明上述的和/或附加的方面和优点从下面结合附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present invention will become apparent and easy to understand from the following description of the embodiments in conjunction with the accompanying drawings, wherein:

图1为本发明一实施例提出的音频播放方法的流程图;Fig. 1 is the flow chart of the audio playing method that an embodiment of the present invention proposes;

图2为本发明另一实施例提出的音频播放方法的流程图;Fig. 2 is the flowchart of the audio playing method that another embodiment of the present invention proposes;

图3是根据本发明一个实施例的音频播放装置的结构框图;Fig. 3 is a structural block diagram of an audio playback device according to an embodiment of the present invention;

图4是根据本发明另一个实施例的音频播放装置的结构框图;Fig. 4 is a structural block diagram of an audio playback device according to another embodiment of the present invention;

图5是根据本发明又一个实施例的音频播放装置的结构框图;Fig. 5 is a structural block diagram of an audio playback device according to yet another embodiment of the present invention;

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

具体实施方式Detailed ways

下面详细描述本发明的实施例,所述实施例的示例在附图中示出,其中自始至终相同或类似的标号表示相同或类似的元件或具有相同或类似功能的元件。下面通过参考附图描述的实施例是示例性的,旨在用于解释本发明,而不能理解为对本发明的限制。Embodiments of the present invention are described in detail below, examples of which are shown in the drawings, wherein the same or similar reference numerals designate the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the figures are exemplary and are intended to explain the present invention and should not be construed as limiting the present invention.

下面参考附图描述本发明实施例的音频播放方法、装置及电子设备。The audio playing method, device and electronic equipment according to the embodiments of the present invention are described below with reference to the accompanying drawings.

图1为本发明一实施例提出的音频播放方法的流程图。FIG. 1 is a flowchart of an audio playing method proposed by an embodiment of the present invention.

如图1所示,音频播放方法,包括以下步骤:As shown in Figure 1, the audio playback method includes the following steps:

步骤101,播放音频时,检测音频中低于预设频率的音频信号的信号强度。Step 101, when playing audio, detect the signal strength of audio signals in the audio that are lower than a preset frequency.

目前,用户在使用手机播放音频时,只能通过扬声器或连接耳机将声音传播至用户的耳朵,用户只有听觉上的体验,并不能产生其他感觉上的享受体验。为此,本申请提出一种音频播放方法,利用骨传导听筒产生的震动,配合音频上的听觉体验,使用户产生更佳的使用体验。At present, when a user uses a mobile phone to play audio, the sound can only be transmitted to the user's ear through a speaker or connected to an earphone. The user only has an auditory experience, and cannot produce other sensory enjoyment experiences. To this end, the present application proposes an audio playback method, which utilizes the vibration generated by the bone conduction earpiece and cooperates with the auditory experience on the audio, so that the user can have a better user experience.

在本发明的一个实施例中,在播放音频时,首先可采集音频的音频信号,再对音频信号进行傅里叶变换,然后获取低于预设频率的音频信号。在此之后,可计算低于预设频率的音频信号的信号强度的均方根值,并将均方根值作为低于预设频率的音频信号的信号强度。In an embodiment of the present invention, when playing the audio, the audio signal of the audio can be collected first, and then Fourier transform is performed on the audio signal, and then the audio signal lower than the preset frequency can be obtained. After that, the root mean square value of the signal strength of the audio signal lower than the preset frequency can be calculated, and the root mean square value can be used as the signal strength of the audio signal lower than the preset frequency.

其中,音频信号可为脉冲编码调制PCM格式信号或wav格式信号。Wherein, the audio signal may be a PCM format signal or a wav format signal.

例如:在播放音乐或者电话铃声的时候,可采集PCM格式或者wav格式的音频信号,对其进行傅里叶变换。然后,过滤掉频率为300hz以上的部分,保留低于300hz的部分。再对保留的部分进行计算,得到这部分音频信号的均方根值。计算得到的数值就是频率低于300hz的音频信号的信号强度。For example: when playing music or phone ringtones, audio signals in PCM format or wav format can be collected and Fourier transformed. Then, filter out the part whose frequency is above 300hz, keep the part below 300hz. Then calculate the reserved part to obtain the root mean square value of this part of the audio signal. The calculated value is the signal strength of the audio signal whose frequency is lower than 300 Hz.

步骤102,将信号强度与预设强度进行比较。Step 102, comparing the signal strength with a preset strength.

步骤103,当信号强度高于预设强度时,控制骨传导听筒进行震动。Step 103, when the signal strength is higher than the preset strength, control the bone conduction earpiece to vibrate.

继续上例进行描述,如果信号强度高于预设强度如50的时候,则可控制骨传导听筒进行震动。Continuing the description of the above example, if the signal strength is higher than the preset strength such as 50, the bone conduction earpiece can be controlled to vibrate.

步骤104,当信号强度低于预设强度时,控制骨传导听筒不震动。Step 104, when the signal strength is lower than the preset strength, control the bone conduction earpiece not to vibrate.

继续上例进行描述,如果信号强度低于预设强度如50的时候,说明该音频信号很弱了,无需再控制骨传导听筒进行震动。Continuing the description of the above example, if the signal strength is lower than the preset strength such as 50, it means that the audio signal is very weak, and there is no need to control the bone conduction earpiece to vibrate.

此外,还可根据信号强度确定骨传导听筒的震动强度。In addition, the vibration strength of the bone conduction earpiece can be determined according to the signal strength.

具体地,在当信号强度高于预设强度时,骨传导听筒的震动强度是与信号强度成正比关系的。即信号强度越强,震动强度也随之增强;信号强度越弱,震动强度也随之减弱。Specifically, when the signal strength is higher than the preset strength, the vibration strength of the bone conduction earpiece is proportional to the signal strength. That is, the stronger the signal strength, the stronger the vibration intensity; the weaker the signal strength, the weaker the vibration intensity.

当然,也可直接将低于预设频率如300hz的音频信号通过受话器驱动电路直接驱动骨传导听筒进行震动。Of course, the audio signal lower than the preset frequency such as 300 Hz can also be directly driven through the receiver driving circuit to directly drive the bone conduction earpiece to vibrate.

将骨传导听筒的震动融入至音乐或者铃声的播放中,伴随着播放的过程,低于300hz的音频信号越强,骨传导听筒的震动也随之增强,丰富用户的使用体验,而不仅仅只限于听觉感受,满足用户更高的需求。The vibration of the bone conduction earpiece is integrated into the playback of music or ringtones. During the playback process, the stronger the audio signal below 300hz, the stronger the vibration of the bone conduction earpiece, which enriches the user experience, not just Limited to auditory experience, to meet the higher needs of users.

在本发明的另一个实施例中,如图2所示,音频播放方法还包括:In another embodiment of the present invention, as shown in Figure 2, the audio playback method also includes:

步骤105,在播放音频之前,确定骨传导听筒震动功能开启;和/或确定应用程序APP支持骨传导听筒震动功能。Step 105, before playing the audio, it is determined that the vibration function of the bone conduction earpiece is enabled; and/or it is determined that the application APP supports the vibration function of the bone conduction earpiece.

举例来说,如果某音乐播放APP支持骨传导听筒震动功能,且手机中的骨传导听筒震动功能同时也开启了,那么在播放音乐的时候,就可以利用骨传导听筒进行震动,实现更加动感的播放体验。For example, if a music playback app supports the vibration function of the bone conduction earpiece, and the bone conduction earpiece vibration function in the mobile phone is also turned on at the same time, then when playing music, the bone conduction earpiece can be used to vibrate to achieve a more dynamic experience. Play experience.

本发明实施例的音频播放方法,播放音频时,检测音频中低于预设频率的音频信号的信号强度,并将信号强度与预设强度进行比较,以及当信号强度高于预设强度时,控制骨传导听筒进行震动,当信号强度低于预设强度时,控制骨传导听筒不震动,通过将骨传导听筒的震动融入至音乐或者铃声的播放中,丰富用户的使用体验,满足用户更高的需求。In the audio playing method of the embodiment of the present invention, when playing audio, the signal strength of the audio signal lower than the preset frequency in the audio is detected, and the signal strength is compared with the preset strength, and when the signal strength is higher than the preset strength, Control the bone conduction earpiece to vibrate. When the signal strength is lower than the preset strength, control the bone conduction earpiece not to vibrate. By integrating the vibration of the bone conduction earpiece into the playback of music or ringtones, it enriches the user experience and satisfies the higher requirements of users. demand.

为了实现上述实施例,本发明还提出了一种音频播放装置,图3是根据本发明一个实施例的音频播放装置的结构框图,如图3所示,该装置包括检测模块310、比较模块320、第一控制模块330和第二控制模块340。In order to realize the above-mentioned embodiment, the present invention also proposes an audio playback device. FIG. 3 is a structural block diagram of an audio playback device according to an embodiment of the present invention. As shown in FIG. 3 , the device includes a detection module 310 and a comparison module 320 , a first control module 330 and a second control module 340 .

其中,检测模块310,用于播放音频时,检测音频中低于预设频率的音频信号的信号强度。Wherein, the detection module 310 is configured to detect the signal strength of an audio signal with a frequency lower than a preset frequency in the audio when the audio is played.

比较模块320,用于将信号强度与预设强度进行比较。A comparing module 320, configured to compare the signal strength with a preset strength.

第一控制模块330,用于当信号强度高于预设强度时,控制骨传导听筒进行震动。The first control module 330 is configured to control the bone conduction earpiece to vibrate when the signal strength is higher than a preset strength.

第二控制模块340,用于当信号强度低于预设强度时,控制骨传导听筒不震动。The second control module 340 is configured to control the bone conduction earpiece not to vibrate when the signal strength is lower than a preset strength.

如图4所示,本发明实施例的音频播放装置还可包括第一确定模块350。As shown in FIG. 4 , the audio playback device in this embodiment of the present invention may further include a first determining module 350 .

第一确定模块350,用于根据信号强度确定骨传导听筒的震动强度。The first determination module 350 is configured to determine the vibration intensity of the bone conduction earpiece according to the signal intensity.

在当信号强度高于预设强度时,骨传导听筒的震动强度是与信号强度成正比关系的。即信号强度越强,震动强度也随之增强;信号强度越弱,震动强度也随之减弱。When the signal strength is higher than the preset strength, the vibration strength of the bone conduction earpiece is proportional to the signal strength. That is, the stronger the signal strength, the stronger the vibration intensity; the weaker the signal strength, the weaker the vibration intensity.

如图5所示,本发明实施例的音频播放装置还可包括第二确定模块360。As shown in FIG. 5 , the audio playback device in this embodiment of the present invention may further include a second determining module 360 .

第二确定模块360,用于在播放音频之前,确定骨传导听筒震动功能开启,和/或确定应用程序APP支持骨传导听筒震动功能。The second determination module 360 is configured to determine that the vibration function of the bone conduction earpiece is enabled before playing the audio, and/or determine that the application APP supports the vibration function of the bone conduction earpiece.

需要说明的是,前述对音频播放方法的解释说明,也适用于本发明实施例的音频播放装置,本发明实施例中未公布的细节,在此不再赘述。It should be noted that the foregoing explanations on the audio playback method are also applicable to the audio playback device in the embodiment of the present invention, and details not disclosed in the embodiment of the present invention will not be repeated here.

本发明实施例的音频播放装置,播放音频时,检测音频中低于预设频率的音频信号的信号强度,并将信号强度与预设强度进行比较,以及当信号强度高于预设强度时,控制骨传导听筒进行震动,当信号强度低于预设强度时,控制骨传导听筒不震动,通过将骨传导听筒的震动融入至音乐或者铃声的播放中,丰富用户的使用体验,满足用户更高的需求。The audio playback device in the embodiment of the present invention, when playing audio, detects the signal strength of the audio signal in the audio lower than the preset frequency, and compares the signal strength with the preset strength, and when the signal strength is higher than the preset strength, Control the bone conduction earpiece to vibrate. When the signal strength is lower than the preset strength, control the bone conduction earpiece not to vibrate. By integrating the vibration of the bone conduction earpiece into the playback of music or ringtones, it enriches the user experience and satisfies the higher requirements of users. demand.

为了实现上述实施例,本发明还提出了一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现本发明第一方面实施例的音频播放方法。In order to realize the above-mentioned embodiments, the present invention also proposes a computer-readable storage medium on which a computer program is stored, wherein the program is executed by a processor to implement the audio playing method of the embodiment of the first aspect of the present invention.

为了实现上述实施例,本发明还提出了一种电子设备。In order to realize the above embodiments, the present invention also proposes an electronic device.

如图6所示,电子设备500包括处理器510、存储器520及存储在存储器上并可在处理器上运行的计算机程序501以及骨传导听筒530,处理器510用于执行本发明第一方面实施例的音频播放方法。As shown in FIG. 6, an electronic device 500 includes a processor 510, a memory 520, a computer program 501 stored on the memory and operable on the processor, and a bone conduction earpiece 530. The processor 510 is used to implement the implementation of the first aspect of the present invention. Example audio playback method.

例如,计算机程序可被处理器执行以完成以下步骤的音频播放方法:For example, a computer program can be executed by a processor to complete the audio playback method of the following steps:

101’,播放音频时,检测音频中低于预设频率的音频信号的信号强度。101', when playing the audio, detect the signal strength of the audio signal in the audio lower than the preset frequency.

102’,将信号强度与预设强度进行比较。102', comparing the signal strength with a preset strength.

103’,当信号强度高于预设强度时,控制骨传导听筒进行震动。103', when the signal strength is higher than the preset strength, control the bone conduction earpiece to vibrate.

104’,当信号强度低于预设强度时,控制骨传导听筒不震动。104', when the signal strength is lower than the preset strength, control the bone conduction earpiece not to vibrate.

本发明实施例的电子设备,播放音频时,检测音频中低于预设频率的音频信号的信号强度,并将信号强度与预设强度进行比较,以及当信号强度高于预设强度时,控制骨传导听筒进行震动,当信号强度低于预设强度时,控制骨传导听筒不震动,通过将骨传导听筒的震动融入至音乐或者铃声的播放中,丰富用户的使用体验,满足用户更高的需求。The electronic device in the embodiment of the present invention detects the signal strength of an audio signal with a frequency lower than a preset frequency in the audio when playing audio, and compares the signal strength with the preset strength, and when the signal strength is higher than the preset strength, controls The bone conduction earpiece vibrates. When the signal strength is lower than the preset strength, the bone conduction earpiece is controlled not to vibrate. By integrating the vibration of the bone conduction earpiece into the playback of music or ringtones, it enriches the user experience and satisfies the higher requirements of users. need.

在本说明书的描述中,参考术语“一个实施例”、“一些实施例”、“示例”、“具体示例”、或“一些示例”等的描述意指结合该实施例或示例描述的具体特征、结构、材料或者特点包含于本发明的至少一个实施例或示例中。在本说明书中,对上述术语的示意性表述不必须针对的是相同的实施例或示例。而且,描述的具体特征、结构、材料或者特点可以在任一个或多个实施例或示例中以合适的方式结合。此外,在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。In the description of this specification, descriptions referring to the terms "one embodiment", "some embodiments", "example", "specific examples", or "some examples" mean that specific features described in connection with the embodiment or example , structure, material or characteristic is included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the described specific features, structures, materials or characteristics may be combined in any suitable manner in any one or more embodiments or examples. In addition, those skilled in the art can combine and combine different embodiments or examples and features of different embodiments or examples described in this specification without conflicting with each other.

此外,术语“第一”、“第二”仅用于描述目的,而不能理解为指示或暗示相对重要性或者隐含指明所指示的技术特征的数量。由此,限定有“第一”、“第二”的特征可以明示或者隐含地包括至少一个该特征。在本发明的描述中,“多个”的含义是至少两个,例如两个,三个等,除非另有明确具体的限定。In addition, the terms "first" and "second" are used for descriptive purposes only, and cannot be interpreted as indicating or implying relative importance or implicitly specifying the quantity of indicated technical features. Thus, the features defined as "first" and "second" may explicitly or implicitly include at least one of these features. In the description of the present invention, "plurality" means at least two, such as two, three, etc., unless specifically defined otherwise.

流程图中或在此以其他方式描述的任何过程或方法描述可以被理解为,表示包括一个或更多个用于实现定制逻辑功能或过程的步骤的可执行指令的代码的模块、片段或部分,并且本发明的优选实施方式的范围包括另外的实现,其中可以不按所示出或讨论的顺序,包括根据所涉及的功能按基本同时的方式或按相反的顺序,来执行功能,这应被本发明的实施例所属技术领域的技术人员所理解。Any process or method descriptions in flowcharts or otherwise described herein may be understood to represent a module, segment or portion of code comprising one or more executable instructions for implementing custom logical functions or steps of a process , and the scope of preferred embodiments of the invention includes alternative implementations in which functions may be performed out of the order shown or discussed, including substantially concurrently or in reverse order depending on the functions involved, which shall It is understood by those skilled in the art to which the embodiments of the present invention pertain.

在流程图中表示或在此以其他方式描述的逻辑和/或步骤,例如,可以被认为是用于实现逻辑功能的可执行指令的定序列表,可以具体实现在任何计算机可读介质中,以供指令执行系统、装置或设备(如基于计算机的系统、包括处理器的系统或其他可以从指令执行系统、装置或设备取指令并执行指令的系统)使用,或结合这些指令执行系统、装置或设备而使用。就本说明书而言,"计算机可读介质"可以是任何可以包含、存储、通信、传播或传输程序以供指令执行系统、装置或设备或结合这些指令执行系统、装置或设备而使用的装置。计算机可读介质的更具体的示例(非穷尽性列表)包括以下:具有一个或多个布线的电连接部(电子装置),便携式计算机盘盒(磁装置),随机存取存储器(RAM),只读存储器(ROM),可擦除可编辑只读存储器(EPROM或闪速存储器),光纤装置,以及便携式光盘只读存储器(CDROM)。另外,计算机可读介质甚至可以是可在其上打印程序的纸或其他合适的介质,因为可以例如通过对纸或其他介质进行光学扫描,接着进行编辑、解译或必要时以其他合适方式进行处理来以电子方式获得程序,然后将其存储在计算机存储器中。The logic and/or steps represented in the flowcharts or otherwise described herein, for example, can be considered as a sequenced listing of executable instructions for implementing logical functions, which can be embodied in any computer-readable medium, For use with instruction execution systems, devices, or devices (such as computer-based systems, systems including processors, or other systems that can fetch instructions from instruction execution systems, devices, or devices and execute instructions), or in conjunction with these instruction execution systems, devices or equipment used. For the purposes of this specification, a "computer-readable medium" may be any device that can contain, store, communicate, propagate or transmit a program for use in or in conjunction with an instruction execution system, device, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection with one or more wires (electronic device), portable computer disk case (magnetic device), random access memory (RAM), Read Only Memory (ROM), Erasable and Editable Read Only Memory (EPROM or Flash Memory), Fiber Optic Devices, and Portable Compact Disc Read Only Memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program may be printed, as it may be possible, for example, by optically scanning the paper or other medium, followed by editing, interpretation or other suitable means if necessary. Processing to obtain programs electronically and store them in computer memory.

应当理解,本发明的各部分可以用硬件、软件、固件或它们的组合来实现。在上述实施方式中,多个步骤或方法可以用存储在存储器中且由合适的指令执行系统执行的软件或固件来实现。如,如果用硬件来实现和在另一实施方式中一样,可用本领域公知的下列技术中的任一项或他们的组合来实现:具有用于对数据信号实现逻辑功能的逻辑门电路的离散逻辑电路,具有合适的组合逻辑门电路的专用集成电路,可编程门阵列(PGA),现场可编程门阵列(FPGA)等。It should be understood that various parts of the present invention can be realized by hardware, software, firmware or their combination. In the embodiments described above, various steps or methods may be implemented by software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware as in another embodiment, it can be implemented by any one or a combination of the following techniques known in the art: a discrete Logic circuits, ASICs with suitable combinational logic gates, Programmable Gate Arrays (PGA), Field Programmable Gate Arrays (FPGA), etc.

本技术领域的普通技术人员可以理解实现上述实施例方法携带的全部或部分步骤是可以通过程序来指令相关的硬件完成,的程序可以存储于一种计算机可读存储介质中,该程序在执行时,包括方法实施例的步骤之一或其组合。Those of ordinary skill in the art can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed , including one or a combination of the steps of the method embodiment.

此外,在本发明各个实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。In addition, each functional unit in each embodiment of the present invention may be integrated into one processing module, each unit may exist separately physically, or two or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware or in the form of software function modules. If the integrated modules are realized in the form of software function modules and sold or used as independent products, they can also be stored in a computer-readable storage medium.

上述提到的存储介质可以是只读存储器,磁盘或光盘等。尽管上面已经示出和描述了本发明的实施例,可以理解的是,上述实施例是示例性的,不能理解为对本发明的限制,本领域的普通技术人员在本发明的范围内可以对上述实施例进行变化、修改、替换和变型。The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, and the like. Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention, those skilled in the art can make the above-mentioned The embodiments are subject to changes, modifications, substitutions and variations.

Claims (14)

1.一种音频播放方法,其特征在于,包括:1. An audio playback method, characterized in that, comprising: 播放音频时,检测所述音频中低于预设频率的音频信号的信号强度;When playing the audio, detect the signal strength of the audio signal lower than the preset frequency in the audio; 将所述信号强度与预设强度进行比较;comparing the signal strength with a preset strength; 当所述信号强度高于所述预设强度时,控制所述骨传导听筒进行震动;When the signal strength is higher than the preset strength, controlling the bone conduction earpiece to vibrate; 当所述信号强度低于所述预设强度时,控制所述骨传导听筒不震动。When the signal strength is lower than the preset strength, the bone conduction earpiece is controlled not to vibrate. 2.如权利要求1所述的方法,其特征在于,检测所述音频中低于预设频率的音频信号的信号强度,包括:2. The method according to claim 1, wherein detecting the signal strength of an audio signal lower than a preset frequency in the audio comprises: 采集所述音频的音频信号;collecting an audio signal of the audio; 对所述音频信号进行傅里叶变换;performing a Fourier transform on the audio signal; 获取低于预设频率的音频信号;Obtain an audio signal lower than a preset frequency; 计算低于预设频率的音频信号的信号强度的均方根值;calculating the root mean square value of the signal strength of the audio signal below a preset frequency; 将所述均方根值作为低于预设频率的音频信号的信号强度。The root mean square value is used as the signal strength of the audio signal lower than the preset frequency. 3.如权利要求2所述的方法,其特征在于,所述音频信号为脉冲编码调制PCM格式信号或wav格式信号。3. The method according to claim 2, wherein the audio signal is a pulse code modulation signal in PCM format or a signal in wav format. 4.如权利要求1所述的方法,其特征在于,还包括:4. The method of claim 1, further comprising: 根据所述信号强度确定骨传导听筒的震动强度。The vibration intensity of the bone conduction earpiece is determined according to the signal intensity. 5.如权利要求4所述的方法,其特征在于,当所述信号强度高于所述预设强度时,所述震动强度与所述信号强度成正比关系。5. The method according to claim 4, wherein when the signal strength is higher than the preset strength, the vibration strength is proportional to the signal strength. 6.如权利要求1所述的方法,其特征在于,在播放音频之前,还包括:6. The method according to claim 1, wherein, before playing the audio, further comprising: 确定骨传导听筒震动功能开启;和/或Make sure the bone conduction earpiece vibration function is turned on; and/or 确定应用程序APP支持骨传导听筒震动功能。Make sure that the application APP supports the bone conduction earpiece vibration function. 7.一种音频播放装置,其特征在于,包括:7. An audio playback device, characterized in that, comprising: 检测模块,用于播放音频时,检测所述音频中低于预设频率的音频信号的信号强度;A detection module, configured to detect the signal strength of an audio signal lower than a preset frequency in the audio when the audio is played; 比较模块,用于将所述信号强度与预设强度进行比较;a comparison module, configured to compare the signal strength with a preset strength; 第一控制模块,用于当所述信号强度高于所述预设强度时,控制所述骨传导听筒进行震动;A first control module, configured to control the bone conduction earpiece to vibrate when the signal strength is higher than the preset strength; 第二控制模块,用于当所述信号强度低于所述预设强度时,控制所述骨传导听筒不震动。The second control module is used to control the bone conduction earpiece not to vibrate when the signal strength is lower than the preset strength. 8.如权利要求7所述的装置,其特征在于,所述检测模块,用于:8. The device according to claim 7, wherein the detection module is configured to: 采集所述音频的音频信号;collecting an audio signal of the audio; 对所述音频信号进行傅里叶变换;performing a Fourier transform on the audio signal; 获取低于预设频率的音频信号;Obtain an audio signal lower than a preset frequency; 计算低于预设频率的音频信号的信号强度的均方根值;calculating the root mean square value of the signal strength of the audio signal below a preset frequency; 将所述均方根值作为低于预设频率的音频信号的信号强度。The root mean square value is used as the signal strength of the audio signal lower than the preset frequency. 9.如权利要求8所述的装置,其特征在于,所述音频信号为脉冲编码调制PCM格式信号或wav格式信号。9. The device according to claim 8, wherein the audio signal is a pulse code modulation signal in PCM format or a signal in wav format. 10.如权利要求7所述的装置,其特征在于,所述装置还包括:10. The device of claim 7, further comprising: 第一确定模块,用于根据所述信号强度确定骨传导听筒的震动强度。The first determination module is configured to determine the vibration intensity of the bone conduction earpiece according to the signal intensity. 11.如权利要求10所述的装置,其特征在于,当所述信号强度高于所述预设强度时,所述震动强度与所述信号强度成正比关系。11. The device according to claim 10, wherein when the signal strength is higher than the preset strength, the vibration strength is proportional to the signal strength. 12.如权利要求7所述的方法,其特征在于,还包括:12. The method of claim 7, further comprising: 第二确定模块,用于在播放音频之前,确定骨传导听筒震动功能开启;和/或The second determination module is used to determine that the vibration function of the bone conduction earpiece is turned on before playing the audio; and/or 确定应用程序APP支持骨传导听筒震动功能。Make sure that the application APP supports the bone conduction earpiece vibration function. 13.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,该程序被处理器执行时实现权利要求1~6任一项所述的音频播放方法。13. A computer-readable storage medium, on which a computer program is stored, characterized in that, when the program is executed by a processor, the audio playback method according to any one of claims 1-6 is implemented. 14.一种电子设备,其特征在于,包括:14. An electronic device, characterized in that it comprises: 处理器;processor; 骨传导听筒;以及bone conduction earpieces; and 存储器,用于存储所述处理器的可执行指令;a memory for storing executable instructions of the processor; 其中,所述处理器配置为经由执行所述可执行指令来执行权利要求1~6任一项所述的音频播放方法。Wherein, the processor is configured to execute the audio playing method according to any one of claims 1-6 by executing the executable instructions.
CN201810031071.6A 2018-01-12 2018-01-12 Audio playing method and device and electronic equipment Pending CN108040181A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810031071.6A CN108040181A (en) 2018-01-12 2018-01-12 Audio playing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810031071.6A CN108040181A (en) 2018-01-12 2018-01-12 Audio playing method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN108040181A true CN108040181A (en) 2018-05-15

Family

ID=62099434

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810031071.6A Pending CN108040181A (en) 2018-01-12 2018-01-12 Audio playing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN108040181A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971743A (en) * 2018-09-28 2020-04-07 腾讯科技(深圳)有限公司 Reminding method of terminal equipment and related product
CN112416116A (en) * 2020-06-01 2021-02-26 上海哔哩哔哩科技有限公司 Vibration control method and system for computer equipment
WO2021243560A1 (en) * 2020-06-02 2021-12-09 雷铭科技有限公司 Integrated auditory system and control method

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024481A (en) * 2009-09-14 2011-04-20 展讯通信(上海)有限公司 Method and device for extracting vibration information from audio file and vibrating device
CN104503084A (en) * 2014-12-31 2015-04-08 青岛歌尔声学科技有限公司 Head-mounted display with vibrating function
CN104811838A (en) * 2013-12-30 2015-07-29 骷髅头有限公司 Headphones for stereo tactile vibration, and related systems and methods
CN106231088A (en) * 2016-07-27 2016-12-14 宇龙计算机通信科技(深圳)有限公司 A kind of method of voice call, device and terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102024481A (en) * 2009-09-14 2011-04-20 展讯通信(上海)有限公司 Method and device for extracting vibration information from audio file and vibrating device
CN104811838A (en) * 2013-12-30 2015-07-29 骷髅头有限公司 Headphones for stereo tactile vibration, and related systems and methods
CN104503084A (en) * 2014-12-31 2015-04-08 青岛歌尔声学科技有限公司 Head-mounted display with vibrating function
CN106231088A (en) * 2016-07-27 2016-12-14 宇龙计算机通信科技(深圳)有限公司 A kind of method of voice call, device and terminal

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110971743A (en) * 2018-09-28 2020-04-07 腾讯科技(深圳)有限公司 Reminding method of terminal equipment and related product
CN112416116A (en) * 2020-06-01 2021-02-26 上海哔哩哔哩科技有限公司 Vibration control method and system for computer equipment
CN112416116B (en) * 2020-06-01 2022-11-11 上海哔哩哔哩科技有限公司 Vibration control method and system for computer equipment
US11775070B2 (en) * 2020-06-01 2023-10-03 Shanghai Bilibili Technology Co., Ltd. Vibration control method and system for computer device
WO2021243560A1 (en) * 2020-06-02 2021-12-09 雷铭科技有限公司 Integrated auditory system and control method

Similar Documents

Publication Publication Date Title
US10674294B2 (en) Method for removing dust in sound outlet hole of loudspeaker, and terminal device
US10321222B1 (en) Earphone, earphone control method and device
CN103295610B (en) A kind of method of audio plays and device
WO2018157708A1 (en) Method and apparatus for dealing with blockage of ventilation holes of loudspeaker, and terminal device
WO2018157679A1 (en) Sounding control method and electronic device
WO2018157688A1 (en) Electronic device and loudness-based detection method
CN113613156B (en) Wearing status detection method, device, headset and storage medium
WO2011100890A1 (en) Reminding method of environmental sound and mobile terminal thereof
CN108320751A (en) A kind of voice interactive method, device, equipment and server
JP6717940B2 (en) Audio file rerecording method, device and storage medium
CN108040181A (en) Audio playing method and device and electronic equipment
CN106959838A (en) Audio control method, audio control device and electronic device
WO2023165116A1 (en) Control method, apparatus and system for smart home device, and storage medium
CN108347525A (en) Electronic equipment vibration control method and device and electronic equipment
WO2016098807A1 (en) Portable audio apparatus display device
CN105852810A (en) Sleep control method
WO2016131373A1 (en) Method and terminal for controlling high-fidelity function
TW201409992A (en) Electronic apparatus and method for recognizing applications through vocal element
JP6360195B2 (en) Selective acoustic storage
CN106251826B (en) Control method and control device
TWM528005U (en) Clapping device
HK1236714B (en) Method, device and equipment terminal of dust remove of speaker hole
CN111930337A (en) Method, terminal and storage medium for controlling voice output
KR101060546B1 (en) Device that converts audio playback files to suit your hearing
KR101448247B1 (en) Sound pressure measuring device and its operation method

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20180515

RJ01 Rejection of invention patent application after publication