CN107728990A - A kind of audio frequency playing method, mobile terminal and computer-readable recording medium - Google Patents

A kind of audio frequency playing method, mobile terminal and computer-readable recording medium Download PDF

Info

Publication number
CN107728990A
CN107728990A CN201710924291.7A CN201710924291A CN107728990A CN 107728990 A CN107728990 A CN 107728990A CN 201710924291 A CN201710924291 A CN 201710924291A CN 107728990 A CN107728990 A CN 107728990A
Authority
CN
China
Prior art keywords
mobile terminal
noise
target audio
level
fragment
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
CN201710924291.7A
Other languages
Chinese (zh)
Other versions
CN107728990B (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.)
Suzhou Hongsen Software Co., Ltd
Original Assignee
Nubia Technology 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 Nubia Technology Co Ltd filed Critical Nubia Technology Co Ltd
Priority to CN201710924291.7A priority Critical patent/CN107728990B/en
Publication of CN107728990A publication Critical patent/CN107728990A/en
Application granted granted Critical
Publication of CN107728990B publication Critical patent/CN107728990B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/60Information retrieval; Database structures therefor; File system structures therefor of audio data
    • G06F16/61Indexing; Data structures therefor; Storage structures
    • 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)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Environmental & Geological Engineering (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Telephone Function (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

The invention discloses a kind of audio frequency playing method, mobile terminal and computer-readable recording medium, the audio frequency playing method detects the level of noise of the mobile terminal local environment;Judge whether include playing the target audio fragment that decibel value is less than the level of noise in the target audio file of the mobile terminal;If the audio file of the mobile terminal includes playing the audio fragment that decibel value is less than the level of noise, the target audio fragment is skipped.So, audio frequency playing method provided by the invention can skip the audio fragment for the noise that the mobile terminal local environment can not be covered in audio file automatically, so that the audio file of the mobile terminal playing can cover the noise of the mobile terminal local environment, effectively filtering ambient noise is realized, prevents Environmental Noise Influence user.

Description

A kind of audio frequency playing method, mobile terminal and computer-readable recording medium
Technical field
The present invention relates to audio play-back technology field, more particularly to a kind of audio frequency playing method, mobile terminal and computer Readable storage medium storing program for executing.
Background technology
With the continuous development of electronic technology, the function of mobile terminal (such as smart mobile phone, tablet personal computer etc.) is increasingly It is powerful, play indispensable role in the life or work of people.The audio playing function of mobile terminal supports user Audio can be listened to whenever and wherever possible, and in some noisy occasions, user can also select to listen to around audio isolation using earphone Noise.Such as user, when taking transit bus, if side is very noisy, user can put on earphone, the noise around song filtering is heard. However, because the frequency spectrum of the audio of broadcasting is all fluctuation, the fluctuation of some moment frequency spectrums is smaller, and sound is weaker, can not be effective Noise around ground filtering.
The content of the invention
In view of this, the present invention proposes a kind of audio frequency playing method, mobile terminal and computer-readable recording medium, with solution Certainly above-mentioned technical problem.
First, to achieve the above object, the present invention proposes a kind of audio frequency playing method, applied to mobile terminal, the side Method includes:
Detect the level of noise of the mobile terminal local environment;
Judge whether include playing the mesh that decibel value is less than the level of noise in the target audio file of the mobile terminal Mark audio fragment;
If the target audio file of the mobile terminal includes playing the audio fragment that decibel value is less than the level of noise, Skip the target audio fragment.
Alternatively, the level of noise of the detection mobile terminal local environment, including:
If the mobile terminal accesses earphone and is in audio broadcast state, making an uproar for the mobile terminal local environment is detected Value.
Alternatively, after the step of level of noise of the detection mobile terminal local environment, methods described also includes:
Judge whether the level of noise is more than default level of noise;
If the level of noise is more than the default level of noise, judge whether wrapped in the target audio file of the mobile terminal Include and play the target audio fragment that decibel value is less than the level of noise.
Alternatively, it is described to skip the target audio fragment not play the target during the broadcasting target audio file Audio fragment.
Alternatively, it is described to skip the target audio fragment, including:
Judge whether the target audio clip durations are more than preset duration;
If the target audio clip durations are less than or equal to the preset duration, the target audio fragment is skipped;
If the target audio clip durations are more than the preset duration, skip preceding default in the target audio fragment The audio fragment of duration.
Alternatively, the audio fragment for skipping preset duration in the target audio fragment, including:
Skip and start in the target audio fragment to the audio fragment of preset duration.
Alternatively, broadcasting decibel whether is included in the target audio file for judging the mobile terminal and is less than described make an uproar The target audio fragment of value, including:
Judge whether the target audio file of the mobile terminal includes broadcasting when playing with the mobile terminal current volume Put the target audio fragment that decibel value is less than the level of noise.
Alternatively, the target audio file is that the currently playing audio file of the mobile terminal or the movement are whole Hold next audio file of currently playing audio file.
In addition, to achieve the above object, the present invention also provides a kind of mobile terminal, the mobile terminal include memory, At least one processor and be stored on the memory and can at least one program of at least one computing device, The step in the method described in any of the above-described is realized when at least one program is by least one computing device.
Further, to achieve the above object, the present invention also provides a kind of computer-readable recording medium, the computer Readable storage medium storing program for executing is stored with the executable at least one program of computer, and at least one program is performed by the computer When the computer is performed the step in the method described in any of the above-described.
Compared to prior art, audio frequency playing method proposed by the invention detects making an uproar for the mobile terminal local environment Value;Judge whether include playing the target sound that decibel value is less than the level of noise in the target audio file of the mobile terminal Frequency fragment;If the target audio file of the mobile terminal includes playing the audio fragment that decibel value is less than the level of noise, Skip the target audio fragment.So, can skip automatically can not in audio file for audio frequency playing method provided by the invention Covered the audio fragment of the noise of the mobile terminal local environment so that the audio file of the mobile terminal playing can cover The noise of the mobile terminal local environment is crossed, effectively filtering ambient noise is realized, prevents Environmental Noise Influence user.
Brief description of the drawings
Fig. 1 is a kind of hardware architecture diagram for the mobile terminal for realizing each embodiment of the present invention;
Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention;
Fig. 3 is a kind of schematic flow sheet of audio frequency playing method provided in an embodiment of the present invention;
Fig. 4 is the schematic flow sheet of another audio frequency playing method provided in an embodiment of the present invention;
Fig. 5 is the schematic flow sheet of another audio frequency playing method provided in an embodiment of the present invention;
The realization, functional characteristics and advantage of the object of the invention will be described further referring to the drawings in conjunction with the embodiments.
Embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In follow-up description, the suffix using such as " module ", " part " or " unit " for representing element is only Be advantageous to the explanation of the present invention, itself there is no a specific meaning.Therefore, " module ", " part " or " unit " can mix Ground uses.
Terminal can be implemented in a variety of manners.For example, the terminal described in the present invention can include such as mobile phone, flat board Computer, notebook computer, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable Media player (Portable Media Player, PMP), guider, wearable device, Intelligent bracelet, pedometer etc. move Dynamic terminal, and the fixed terminal such as digital TV, desktop computer.
It will be illustrated in subsequent descriptions by taking mobile terminal as an example, it will be appreciated by those skilled in the art that except special Outside element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, its hardware architecture diagram for a kind of mobile terminal of each embodiment of the realization present invention, the shifting Dynamic terminal 100 can include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit 103rd, A/V (audio/video) input block 104, sensor 105, display unit 106, user input unit 107, interface unit 108th, the part such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1 Mobile terminal structure does not form the restriction to mobile terminal, and mobile terminal can be included than illustrating more or less parts, Either combine some parts or different parts arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, the reception and transmission of signal, specifically, by base station Downlink information receive after, handled to processor 110;In addition, up data are sent to base station.Generally, radio frequency unit 101 Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrate Frequency unit 101 can also be communicated by radio communication with network and other equipment.Above-mentioned radio communication can use any communication Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division Multiple Access, WCDMA), TD-SCDMA (Time Division-Synchronous Code Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division Duplexing-Long Term Evolution, FDD Long Term Evolution) and TDD-LTE (Time Division Duplexing-Long Term Evolution, time division duplex Long Term Evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102 Sub- mail, browse webpage and access streaming video etc., it has provided the user wireless broadband internet and accessed.Although Fig. 1 shows Go out WiFi module 102, but it is understood that, it is simultaneously not belonging to must be configured into for mobile terminal, completely can be according to need To be omitted in the essential scope for do not change invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100 When under the isotypes such as formula, speech recognition mode, broadcast reception mode, by radio frequency unit 101 or WiFi module 102 it is receiving or It is sound that the voice data stored in memory 109, which is converted into audio signal and exported,.Moreover, audio output unit 103 The audio output related to the specific function that mobile terminal 100 performs can also be provided (for example, call signal receives sound, disappeared Breath receives sound etc.).Audio output unit 103 can include loudspeaker, buzzer etc..
A/V input blocks 104 are used to receive audio or video signal.A/V input blocks 104 can include graphics processor (Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode Or the static images or the view data of video obtained in image capture mode by image capture apparatus (such as camera) are carried out Reason.Picture frame after processing may be displayed on display unit 106.Picture frame after the processing of graphics processor 1041 can be deposited Storage is transmitted in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042 Quiet down sound (voice data), and can be voice data by such acoustic processing.Audio (voice) data after processing can To be converted to the form output that mobile communication base station can be sent to via radio frequency unit 101 in the case of telephone calling model. Microphone 1042 can implement various types of noises and eliminate (or suppression) algorithm to eliminate (or suppression) in reception and send sound Caused noise or interference during frequency signal.
Mobile terminal 100 also includes at least one sensor 105, such as optical sensor, motion sensor and other biographies Sensor.Specifically, optical sensor includes ambient light sensor and proximity transducer, wherein, ambient light sensor can be according to environment The light and shade of light adjusts the brightness of display panel 1061, and proximity transducer can close when mobile terminal 100 is moved in one's ear Display panel 1061 and/or backlight.As one kind of motion sensor, accelerometer sensor can detect in all directions (general For three axles) size of acceleration, size and the direction of gravity are can detect that when static, the application available for identification mobile phone posture (such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.; The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer, The other sensors such as hygrometer, thermometer, infrared ray sensor, will not be repeated here.
Display unit 106 is used for the information for showing the information inputted by user or being supplied to user.Display unit 106 can wrap Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, CD), Organic Light Emitting Diode can be used Forms such as (Organic Light-Emitting Diode, OLED) configures display panel 1061.
User input unit 107 can be used for the numeral or character information for receiving input, and produce the use with mobile terminal The key signals input that family is set and function control is relevant.Specifically, user input unit 107 may include contact panel 1071 with And other input equipments 1072.Contact panel 1071, also referred to as touch-screen, collect touch operation of the user on or near it (for example user uses any suitable objects or annex such as finger, stylus on contact panel 1071 or in contact panel 1071 Neighbouring operation), and corresponding attachment means are driven according to formula set in advance.Contact panel 1071 may include touch detection Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it Contact coordinate is converted into, then gives processor 110, and the order sent of reception processing device 110 and can be performed.In addition, can To realize contact panel 1071 using polytypes such as resistance-type, condenser type, infrared ray and surface acoustic waves.Except contact panel 1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap Include but be not limited to physical keyboard, in function key (such as volume control button, switch key etc.), trace ball, mouse, action bars etc. One or more, do not limit herein specifically.
Further, contact panel 1071 can cover display panel 1061, detect thereon when contact panel 1071 or After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, contact panel 1071 and display panel 1061 be the part independent as two to realize the input of mobile terminal and output function, but in certain embodiments, can Input and the output function of mobile terminal are realized so that contact panel 1071 and display panel 1061 is integrated, is not done herein specifically Limit.
Interface unit 108 is connected the interface that can pass through as at least one external device (ED) with mobile terminal 100.For example, External device (ED) can include wired or wireless head-band earphone port, external power source (or battery charger) port, wired or nothing Line FPDP, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number It is believed that breath, electric power etc.) and at least one element that the input received is transferred in mobile terminal 100 or can use In transmitting data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storage software program and various data.Memory 109 can mainly include storing program area And storage data field, wherein, storing program area can storage program area, application program (such as the sound needed at least one function Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as Voice data, phone directory etc.) etc..In addition, memory 109 can include high-speed random access memory, can also include non-easy The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the whole mobile terminal of connection Individual part, by running or performing the software program and/or module that are stored in memory 109, and call and be stored in storage Data in device 109, the various functions and processing data of mobile terminal are performed, so as to carry out integral monitoring to mobile terminal.Place Reason device 110 may include at least one processing unit;Preferably, processor 110 can integrate application processor and modulation /demodulation processing Device, wherein, application processor mainly handles operating system, user interface and application program etc., and modem processor is mainly located Manage radio communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) to all parts power supply, it is preferred that power supply 111 Can be logically contiguous by power-supply management system and processor 110, so as to realize management charging by power-supply management system, put The function such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also will not be repeated here including bluetooth module etc..
For the ease of understanding the embodiment of the present invention, the communications network system being based on below to the mobile terminal of the present invention enters Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system Unite as the LTE system of universal mobile communications technology, the UE that the LTE system includes communicating connection successively (User Equipment, is used Family equipment) 201, E-UTRAN (Evolved UMTS Terrestrial Radio Access Network, evolved UMTS lands Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation 204。
Specifically, UE201 can be above-mentioned terminal 100, and here is omitted.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning Journey (backhaul) (such as X2 interface) is connected with other eNodeB2022, and eNodeB2021 is connected to EPC203, ENodeB2021 can provide UE201 to EPC203 access.
EPC203 can include MME (Mobility Management Entity, mobility management entity) 2031, HSS (Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way, Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and The control node of signaling between EPC203, there is provided carrying and connection management.HSS2032 is all to manage for providing some registers Such as the function of attaching position register (not shown) etc, and preserve some and used about service features, data rate etc. The special information in family.All customer data can be transmitted by SGW2034, and PGW2035 can provide UE 201 IP Address is distributed and other functions, and PCRF2036 is strategy and the charging control strategic decision-making of business data flow and IP bearing resources Point, it selects and provided available strategy and charging control decision-making with charge execution function unit (not shown) for strategy.
IP operation 204 can include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with And following new network system etc., do not limit herein.
Based on the above-mentioned hardware configuration of mobile terminal 100 and communications network system, each embodiment of the inventive method is proposed.
Refering to Fig. 3, Fig. 3 is a kind of step flow chart of audio frequency playing method provided in an embodiment of the present invention, method application In a mobile terminal, as shown in figure 3, method includes:
Step 301, the level of noise for detecting mobile terminal local environment.
In the step, method detects the level of noise of mobile terminal local environment, and method can be by being arranged on mobile terminal On detection means detection mobile terminal local environment level of noise, can also by access mobile terminal headset detection move The level of noise of terminal local environment.Method can detect the level of noise of mobile terminal local environment every preset time, can also The level of noise of mobile terminal local environment is detected when mobile terminal meets preset trigger condition, can also detect movement eventually End meets after preset trigger condition every the level of noise of preset time detection mobile terminal local environment.Preset trigger condition can be with It is that mobile terminal is in audio broadcast state or mobile terminal access earphone, can also be that mobile terminal accesses earphone And it is in audio broadcast state.Level of noise can be the decibel value of noise.
Method can detect the level of noise of mobile terminal local environment by noise meter, and noise meter can be arranged on mobile whole On end, it can also be arranged on the earphone of access mobile terminal.Spectrum overlapping network in noise meter has tri- kinds of standard meters of A, B, C Network is weighed, A networks are the responses for simulating human ear to 40 side's pure tones in equal loudness contour, and its psophometric curves shape is with 340 sides' Equal loudness contour on the contrary, so that in electric signal, low-frequency range have larger decay.B networks are simulation human ears to 70 side's pure tones Response, it makes the low-frequency range of electric signal have certain decay.C networks are the responses for simulating human ear to 100 side's pure tones, in whole sound There is almost straight response in the range of frequency.The sound pressure level that noise meter is measured by spectrum overlapping network is referred to as sound level, according to being made Weighting network is different, is referred to as A sound levels, B sound levels and C sound levels, unit is denoted as dB (A), dB (B) and dB (C).Noise meter is pressed Precision can be divided into precision sound level meter and normal noise meter.The measurement error of precision sound level meter is about ± 1dB, and common sound level meter is about ±3dB.In the embodiment of the present invention, precision sound level meter can be used, normal noise meter can also be used, the present invention does not make to have to this Body limits.
Step 302, judge whether include playing the mesh that decibel value is less than level of noise in the target audio file of mobile terminal Mark audio fragment.
In the step, method judges whether the audio file of mobile terminal includes playing the target that decibel value is less than level of noise Audio fragment, if the audio file of mobile terminal includes playing the target audio fragment that decibel value is less than level of noise, perform step Rapid 303;If on the contrary, do not include playing the target audio piece that decibel value is less than level of noise in the audio file of mobile terminal Section, flow terminate.
The target audio file of mobile terminal can be that the currently playing audio file of mobile terminal or movement are whole Hold next audio file of currently playing audio file.That is, mobile terminal may determine that mobile terminal is currently broadcast Whether include playing the target audio fragment that decibel value is less than level of noise in the audio file put, can also judge that mobile terminal is worked as Whether include playing the target audio fragment that decibel value is less than level of noise in next audio file of the audio file of preceding broadcasting.Side Method judges whether the target audio file of mobile terminal includes the mode for playing the target audio fragment that decibel value is less than level of noise Can be specifically to judge whether to have when audio file is played with mobile terminal current volume to play the mesh that decibel value is less than level of noise Mark audio fragment.
Method judges whether the audio file of mobile terminal includes playing the target audio fragment that decibel value is less than level of noise Mode specifically can also by parsing the frequency spectrum of audio file, then judged according to the frequency spectrum of audio file be in audio file The no fragment weakened including sound straight line.The concrete mode that spectrum analysis is carried out to audio file can be that audio file is carried out Eight frequency dividing samplings, pass through FFT (Fast Fourier Transformation, fast Fourier by the voice data that sampling obtains Conversion) algorithm process.
Principle is specific as follows:If audio file is adopted with 44.1K (44.1K point of sampling per second) sample rate Sample, the output sampling of some mobile terminals acquiescence and 44.1K are (even if the high quality audio that i.e. mobile terminal is downloaded, actual play Out, resampling is had been carried out in mobile terminal bottom, and audio file is compressed, and is not real high quality audio). Obtained voice data will be sampled by FFT (Fast Fourier Transformation, Fast Fourier Transform (FFT)) algorithm Reason, the new data drawn can linearly substep, what the interval each put was just as, even if the sound by minimum standard 44.1K Frequency does frequency spectrum drafting, and the point that can all have many low-frequency ranges is taken less than so we need to reduce sample rate, 8 frequency dividings are appreciated that For sample rate is reduced into 8 times, so same 1024 data, the frequency density after FFT computings will increase, it may also be said to be spaced It will reduce, thus can smoothly get the low-frequency range for needing to show., can be in units of 1K data in the embodiment of the present invention Drawn, section is 20HZ -20KHZ (standard).
Audio file can be music or video, and when audio file is music, target audio fragment can be White spaces in the beginning or ending of music.
Step 303, skip target audio fragment.
In the step, when the audio file of mobile terminal includes covering the target audio fragment of level of noise, side Method skips target audio fragment.Skip when target audio fragment is specially and plays target audio file and do not play target audio piece Section, so, method can skip the target audio fragment that current environment level of noise can not be covered in audio file, effective mistake automatically Environmental noise is filtered, avoids environmental noise from being interfered to user.
In the embodiment, audio frequency playing method detects the level of noise of mobile terminal local environment;Judge the sound of mobile terminal Whether have in frequency file can not cover the target audio fragment of level of noise;If the target audio file of mobile terminal includes playing Decibel value is less than the audio fragment of level of noise, skips target audio fragment.So, audio frequency playing method provided by the invention can The automatic audio fragment for skipping the noise that mobile terminal local environment can not be covered in audio file so that mobile terminal playing Audio file can cover the noise of mobile terminal local environment, realize effectively filtering ambient noise, prevent Environmental Noise Influence User.
Alternatively, the level of noise of mobile terminal local environment is detected, including:
If mobile terminal accesses earphone and is in audio broadcast state, the level of noise of mobile terminal local environment is detected.
In the embodiment, method detects mobile terminal institute when mobile terminal accesses earphone and is in audio broadcast state Locate the level of noise of environment.
Alternatively, skip target audio fragment and do not play target audio fragment during target audio file to play.
Alternatively, judge whether include playing the target sound that decibel is less than level of noise in the target audio file of mobile terminal Frequency fragment, including:
Judge whether the target audio file of mobile terminal includes playing decibel value when playing with mobile terminal current volume Less than the target audio fragment of level of noise.
Alternatively, target audio file is that the currently playing audio file of mobile terminal or mobile terminal are currently playing Next audio file of audio file.
Referring to Fig. 4, Fig. 4 is the schematic flow sheet of another audio frequency playing method provided in an embodiment of the present invention, such as Fig. 4 institutes Show, method includes:
The level of noise of step 401, detection terminal local environment.
The step 401 is identical with the step 301 in the embodiment shown in Fig. 3, and here is omitted.
Step 402, judge whether level of noise is more than default level of noise.
In the step, method judges whether level of noise is more than default level of noise, if level of noise is more than default level of noise, performs Step 403;On the contrary, if level of noise is not more than default level of noise, flow terminates or flow return to step 401, and method continues The level of noise of the mobile local environment of detection.Embodiment shown in Fig. 4 is not limited thereto so that flow terminates as an example.
Default level of noise can be that user sets according to own actual situation (such as the acceptable maximum noise value of user) Put, can also method integrate the acquiescence level of noise that the situation of most of user is set.
Step 403, judge whether include playing the mesh that decibel value is less than level of noise in the target audio file of mobile terminal Mark audio fragment.
In the step, if the level of noise detected is more than default level of noise, method judges the target audio text of mobile terminal Whether include playing the target audio fragment that decibel value is less than level of noise in part, if the audio file of mobile terminal includes playing Decibel value is less than the target audio fragment of level of noise, performs step 404;If on the contrary, do not wrapped in the audio file of mobile terminal Include and play the target audio fragment that decibel value is less than level of noise, flow terminates.
Judge whether include playing the target audio piece that decibel value is less than level of noise in the target audio file of mobile terminal Step 302 of the mode of section in the embodiment shown in Fig. 3 of the present invention has been carried out being described in detail, and here is omitted.
Step 404, skip target audio fragment.
The step 404 is identical with the step 303 in the embodiment shown in Fig. 3 of the present invention, and here is omitted.
Referring to Fig. 5, Fig. 5 is the schematic flow sheet of another audio frequency playing method provided in an embodiment of the present invention, such as Fig. 5 institutes Show, method includes:
Step 501, the level of noise for detecting mobile terminal local environment.
Step 502, judge whether the level of noise of mobile terminal local environment is more than default level of noise.
In the step, method judges whether the level of noise of mobile terminal local environment is more than default level of noise, if mobile whole Hold the level of noise of local environment to be more than default level of noise, perform step 503;If the on the contrary, noise of mobile terminal local environment Value is less than or equal to default level of noise, and flow terminates.
Step 503, judge whether include playing the mesh that decibel value is less than level of noise in the target audio file of mobile terminal Mark audio fragment.
In the step, method judges whether the target audio file of mobile terminal includes playing decibel value less than level of noise Target audio fragment, if the target audio file of mobile terminal includes playing the target audio fragment that decibel value is less than level of noise, Perform step 504;On the contrary, if the target audio file of mobile terminal does not include playing the target sound that decibel value is less than level of noise Frequency fragment, flow terminate.
Step 501 is identical to step 403 with the step 401 in the embodiment shown in Fig. 4 to step 503, no longer superfluous herein State.
Step 504, judge whether target audio clip durations are more than preset duration.
In the step, when the target audio file of mobile terminal includes the target audio fragment that can not cover level of noise When, method judges whether target audio clip durations are more than preset duration.If target audio clip durations are less than or equal to pre- If duration, step 505 is performed;On the contrary, if target audio clip durations are more than preset duration, step 506 is performed.Preset duration Can be the duration of acquiescence or the duration of user's setting.
Step 505, skip target audio fragment.
In the step, if target audio clip durations are less than or equal to preset duration, method directly skips target audio Fragment.
Step 506, the audio fragment for skipping preset duration in target audio fragment.
In the step, if target audio clip durations are more than preset duration, method is skipped default in target audio fragment The fragment of duration.In such manner, it is possible to avoid skipping the longer fragment in an audio file, so as to avoid influenceing Consumer's Experience. The audio fragment of preset duration in target audio fragment can be any fragment of preset duration in target audio fragment, such as Can start in target audio fragment into the audio fragment of preset duration or target audio fragment before end The audio fragment of preset duration, it can also be the audio fragment of arbitrary preset duration among target audio fragment.For example, Assuming that target audio fragment when a length of 10 seconds, preset duration be 5 seconds, method can be skipped in target audio fragment the 1st to 5 second Audio fragment, the audio fragment of the 6th to 10 second in target audio fragment can also be skipped, target audio fragment can also be skipped In the audio fragment or the audio fragment of the 3rd to the 7th second of the 4th to 8 second.
The target audio piece that multiple broadcasting decibel values are less than level of noise can be included in the embodiment, in target audio file Section, method judge whether each target audio fragment is more than preset duration, and based on sentencing to each target audio file Disconnected result is handled each target audio fragment.For example, it is assumed that preset duration is 30 seconds, the 1st in a song The fragment of second to the 10th second plays decibel value and is less than level of noise, and the fragment broadcasting decibel value of the 50th second to the 100th second is less than Level of noise, method can skip the fragment of the 1st second to the 10th second in the song, and skip in the song the 50th second to the 80th The fragment of second.
Alternatively, the audio fragment of preset duration in target audio fragment is skipped, including:
Skip and start in target audio fragment to the audio fragment of preset duration.
In the embodiment, audio frequency playing method detects the level of noise of mobile terminal local environment;Judge whether level of noise is big In default level of noise;If level of noise is more than default level of noise, judge whether include playing in the target audio file of mobile terminal Decibel value is less than the target audio fragment of level of noise;If the audio file of mobile terminal includes broadcasting, decibel value is less than level of noise Audio fragment, judge whether target audio clip durations are more than preset duration;If target audio clip durations are less than or waited In preset duration, target audio fragment is skipped;It is pre- in target audio fragment if target audio clip durations are more than preset duration If the audio fragment of duration.So, audio frequency playing method provided by the invention can automatically be skipped in audio file and can not covered The audio fragment of the noise of mobile terminal local environment so that the audio file of mobile terminal playing can cover mobile terminal institute Locate the noise of environment, realize effectively filtering ambient noise, prevent Environmental Noise Influence user.
One of ordinary skill in the art will appreciate that all or part of step for realizing above-described embodiment method is can be with Completed by the related hardware of at least one programmed instruction, at least one program can be stored in mobile end as shown in Figure 1 End 100 memory 109 in, and can processor 110 perform, when at least one program is performed by processor 110, realize it is as follows Step:
Detect the level of noise of mobile terminal local environment;
Judge whether include playing the target audio piece that decibel value is less than level of noise in the target audio file of mobile terminal Section;
If the target audio file of mobile terminal includes playing the audio fragment that decibel value is less than level of noise, target is skipped Audio fragment.
Alternatively, the level of noise of mobile terminal local environment is detected, including:
If mobile terminal accesses earphone and is in audio broadcast state, the level of noise of mobile terminal local environment is detected.
Alternatively, after the step of detecting the level of noise of mobile terminal local environment, processor 110 can also realize following step Suddenly:
Judge whether level of noise is more than default level of noise;
If level of noise is more than default level of noise, judge whether include playing decibel value in the target audio file of mobile terminal Less than the target audio fragment of level of noise.
Alternatively, skip target audio fragment and do not play target audio fragment during target audio file to play.
Alternatively, target audio fragment is skipped, including:
Judge whether target audio clip durations are more than preset duration;
If target audio clip durations are less than or equal to preset duration, target audio fragment is skipped;
If target audio clip durations are more than preset duration, the audio piece of the preceding preset duration in target audio fragment is skipped Section.
Alternatively, the audio fragment of preset duration in target audio fragment is skipped, including:
Skip and start in target audio fragment to the audio fragment of preset duration.
Alternatively, judge whether include playing the target sound that decibel is less than level of noise in the target audio file of mobile terminal Frequency fragment, including:
Judge whether the target audio file of mobile terminal includes playing decibel value when playing with mobile terminal current volume Less than the target audio fragment of level of noise.
Alternatively, target audio file is that the currently playing audio file of mobile terminal or mobile terminal are currently playing Next audio file of audio file.
One of ordinary skill in the art will appreciate that all or part of step for realizing above-described embodiment method is can be with Completed by the related hardware of at least one programmed instruction, at least one program can be stored in a computer-readable storage medium In matter, when at least one program is performed, following steps are realized:
Detect the level of noise of mobile terminal local environment;
Judge whether include playing the target audio piece that decibel value is less than level of noise in the target audio file of mobile terminal Section;
If the target audio file of mobile terminal includes playing the audio fragment that decibel value is less than level of noise, target is skipped Audio fragment.
Alternatively, the level of noise of mobile terminal local environment is detected, including:
If mobile terminal accesses earphone and is in audio broadcast state, the level of noise of mobile terminal local environment is detected.
Alternatively, after the step of detecting the level of noise of mobile terminal local environment, when at least one program is performed, also Following steps can be achieved:
Judge whether level of noise is more than default level of noise;
If level of noise is more than default level of noise, judge whether include playing decibel value in the target audio file of mobile terminal Less than the target audio fragment of level of noise.
Alternatively, skip target audio fragment and do not play target audio fragment during target audio file to play.
Alternatively, target audio fragment is skipped, including:
Judge whether target audio clip durations are more than preset duration;
If target audio clip durations are less than or equal to preset duration, target audio fragment is skipped;
If target audio clip durations are more than preset duration, the audio piece of the preceding preset duration in target audio fragment is skipped Section.
Alternatively, the audio fragment of preset duration in target audio fragment is skipped, including:
Skip and start in target audio fragment to the audio fragment of preset duration.
Alternatively, judge whether include playing the target sound that decibel is less than level of noise in the target audio file of mobile terminal Frequency fragment, including:
Judge whether the target audio file of mobile terminal includes playing decibel value when playing with mobile terminal current volume Less than the target audio fragment of level of noise.
Alternatively, target audio file is that the currently playing audio file of mobile terminal or mobile terminal are currently playing Next audio file of audio file.
It should be noted that herein, term " comprising ", "comprising" or its any other variant are intended to non-row His property includes, so that process, method, article or device including a series of elements not only include those key elements, and And also include the other element being not expressly set out, or also include for this process, method, article or device institute inherently Key element.In the absence of more restrictions, the key element limited by sentence "including a ...", it is not excluded that including this Other identical element also be present in the process of key element, method, article or device.
The embodiments of the present invention are for illustration only, do not represent the quality of embodiment.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side Method can add the mode of required general hardware platform to realize by software, naturally it is also possible to by hardware, but in many cases The former is more preferably embodiment.Based on such understanding, technical scheme is substantially done to prior art in other words Going out the part of contribution can be embodied in the form of software product, and the computer software product is stored in a storage medium In (such as ROM/RAM, magnetic disc, CD), including some instructions to cause a station terminal equipment (can be mobile phone, computer, clothes Be engaged in device, air conditioner, or network equipment etc.) method that performs each embodiment of the present invention.
The preferred embodiments of the present invention are these are only, are not intended to limit the scope of the invention, it is every to utilize this hair The equivalent structure or equivalent flow conversion that bright specification and accompanying drawing content are made, or directly or indirectly it is used in other related skills Art field, is included within the scope of the present invention.

Claims (10)

1. a kind of audio frequency playing method, applied to mobile terminal, it is characterised in that methods described includes:
Detect the level of noise of the mobile terminal local environment;
Judge whether include playing the target sound that decibel value is less than the level of noise in the target audio file of the mobile terminal Frequency fragment;
If the target audio file of the mobile terminal includes playing the audio fragment that decibel value is less than the level of noise, skip The target audio fragment.
2. the method as described in claim 1, it is characterised in that the level of noise of the detection mobile terminal local environment, Including:
If the mobile terminal accesses earphone and is in audio broadcast state, the noise of the mobile terminal local environment is detected Value.
3. the method as described in claim 1, it is characterised in that the level of noise of the detection mobile terminal local environment After step, methods described also includes:
Judge whether the level of noise is more than default level of noise;
If the level of noise is more than the default level of noise, judge whether include broadcasting in the target audio file of the mobile terminal Put the target audio fragment that decibel value is less than the level of noise.
4. the method as described in claim 1, it is characterised in that described to skip the target audio fragment to play the target The target audio fragment is not played during audio file.
5. the method as described in any one of Claims 1-4, it is characterised in that described to skip the target audio fragment, bag Include:
Judge whether the target audio clip durations are more than preset duration;
If the target audio clip durations are less than or equal to the preset duration, the target audio fragment is skipped;
If the target audio clip durations are more than the preset duration, the sound of preset duration in the target audio fragment is skipped Frequency fragment.
6. method as claimed in claim 5, it is characterised in that the sound for skipping preset duration in the target audio fragment Frequency fragment, including:
Skip and start in the target audio fragment to the audio fragment of preset duration.
7. the method as described in claim 1, it is characterised in that be in the target audio file for judging the mobile terminal The no target audio fragment for being less than the level of noise including playing decibel, including:
Judge whether the target audio file of the mobile terminal divides including being played when being played with the mobile terminal current volume Shellfish value is less than the target audio fragment of the level of noise.
8. the method as described in claim 1, it is characterised in that the target audio file is that the mobile terminal is currently playing Audio file or the currently playing audio file of the mobile terminal next audio file.
9. a kind of mobile terminal, it is characterised in that the mobile terminal includes memory, at least one processor and is stored in institute State on memory and can at least one program of at least one computing device, at least one program by it is described extremely The step in the method described in any one of the claims 1~8 is realized during a few computing device.
10. a kind of computer-readable recording medium, the computer-readable recording medium storage has computer executable at least One program, it is characterised in that at least one program makes the computer perform above-mentioned power when being performed by the computer Profit requires the step in the method described in 1~8 any one.
CN201710924291.7A 2017-09-30 2017-09-30 Audio playing method, mobile terminal and computer readable storage medium Active CN107728990B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710924291.7A CN107728990B (en) 2017-09-30 2017-09-30 Audio playing method, mobile terminal and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710924291.7A CN107728990B (en) 2017-09-30 2017-09-30 Audio playing method, mobile terminal and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN107728990A true CN107728990A (en) 2018-02-23
CN107728990B CN107728990B (en) 2020-09-01

Family

ID=61209722

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710924291.7A Active CN107728990B (en) 2017-09-30 2017-09-30 Audio playing method, mobile terminal and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN107728990B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883222A (en) * 2021-01-21 2021-06-01 咪咕音乐有限公司 Song recommendation playing method, electronic equipment and computer readable storage medium
CN114121050A (en) * 2021-11-30 2022-03-01 云知声智能科技股份有限公司 Audio playing method and device, electronic equipment and storage medium
CN114268893A (en) * 2021-12-20 2022-04-01 歌尔科技有限公司 Method and device for detecting abnormal playing of Bluetooth audio device and readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1353223A (en) * 2000-11-15 2002-06-12 Bsh博施及西门子家用器具有限公司 Domestic electric appliance possessing improved noise effect
CN103354445A (en) * 2013-06-20 2013-10-16 广东欧珀移动通信有限公司 Adaptive environment music playing apparatus and method thereof
CN103686524A (en) * 2012-09-19 2014-03-26 深圳市得辉达科技有限公司 Environmental noise induction type intelligent sound box
CN203964362U (en) * 2014-06-05 2014-11-26 广东纽恩泰新能源科技发展有限公司 A kind of Teat pump boiler with music playback function
CN106470374A (en) * 2015-08-20 2017-03-01 中兴通讯股份有限公司 Volume adjusting method, wearable device, terminal unit and sound volume regulating system
CN106936991A (en) * 2017-03-03 2017-07-07 深圳市金立通信设备有限公司 The method and terminal of a kind of automatic regulating volume
CN107147794A (en) * 2017-05-24 2017-09-08 上海与德科技有限公司 The switching method and device of audio pattern

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1353223A (en) * 2000-11-15 2002-06-12 Bsh博施及西门子家用器具有限公司 Domestic electric appliance possessing improved noise effect
CN103686524A (en) * 2012-09-19 2014-03-26 深圳市得辉达科技有限公司 Environmental noise induction type intelligent sound box
CN103354445A (en) * 2013-06-20 2013-10-16 广东欧珀移动通信有限公司 Adaptive environment music playing apparatus and method thereof
CN203964362U (en) * 2014-06-05 2014-11-26 广东纽恩泰新能源科技发展有限公司 A kind of Teat pump boiler with music playback function
CN106470374A (en) * 2015-08-20 2017-03-01 中兴通讯股份有限公司 Volume adjusting method, wearable device, terminal unit and sound volume regulating system
CN106936991A (en) * 2017-03-03 2017-07-07 深圳市金立通信设备有限公司 The method and terminal of a kind of automatic regulating volume
CN107147794A (en) * 2017-05-24 2017-09-08 上海与德科技有限公司 The switching method and device of audio pattern

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112883222A (en) * 2021-01-21 2021-06-01 咪咕音乐有限公司 Song recommendation playing method, electronic equipment and computer readable storage medium
CN112883222B (en) * 2021-01-21 2022-12-16 咪咕音乐有限公司 Song recommendation playing method, electronic equipment and computer readable storage medium
CN114121050A (en) * 2021-11-30 2022-03-01 云知声智能科技股份有限公司 Audio playing method and device, electronic equipment and storage medium
CN114268893A (en) * 2021-12-20 2022-04-01 歌尔科技有限公司 Method and device for detecting abnormal playing of Bluetooth audio device and readable storage medium
CN114268893B (en) * 2021-12-20 2024-05-31 歌尔科技有限公司 Bluetooth audio equipment play abnormity detection method, equipment and readable storage medium

Also Published As

Publication number Publication date
CN107728990B (en) 2020-09-01

Similar Documents

Publication Publication Date Title
CN107027114A (en) A kind of SIM card switching method, equipment and computer-readable recording medium
CN107463481A (en) Data interactive method, mobile terminal and storage medium
CN106951302A (en) Using the method for testing and terminal and computer-readable recording medium of the time of startup
CN107517494A (en) A kind of display methods of terminal battery electricity quantity, terminal and computer-readable recording medium
CN107566635A (en) Screen intensity method to set up, mobile terminal and computer-readable recording medium
CN107343083A (en) One kind lifting game experiencing method, apparatus and computer-readable recording medium
CN107885665A (en) With case script method of testing, mobile terminal and computer-readable recording medium
CN108391190B (en) A kind of noise-reduction method, earphone and computer readable storage medium
CN107181700A (en) Control method, mobile terminal and the storage medium of application program for mobile terminal
CN107678634A (en) The method to set up and terminal of game mode, computer-readable recording medium
CN107729115A (en) A kind of display methods, equipment and computer-readable storage medium
CN107844230A (en) A kind of advertisement page method of adjustment, mobile terminal and computer-readable recording medium
CN107562705A (en) A kind of data export method, service end and computer-readable recording medium
CN108172161A (en) Display methods, mobile terminal and computer readable storage medium based on flexible screen
CN108111986A (en) A kind of conversion method of notification message, terminal and computer readable storage medium
CN107341067A (en) A kind of keys deactivation processing method, equipment and computer-readable recording medium
CN108762631A (en) A kind of method for controlling mobile terminal, mobile terminal and computer readable storage medium
CN107580350A (en) A kind of signal intensity switching method, equipment and computer-readable recording medium
CN107172605A (en) A kind of Emmergency call method, mobile terminal and computer-readable recording medium
CN109379735A (en) ESIM card operating method, mobile terminal and eSIM card apparatus
CN107390856A (en) A kind of method, mobile terminal and storage medium for reducing mobile terminal power consumption
CN108600489A (en) Receiver, the calibration method of loud speaker, mobile terminal and readable storage medium storing program for executing
CN107728990A (en) A kind of audio frequency playing method, mobile terminal and computer-readable recording medium
CN107706981A (en) A kind of wireless charging method and wireless charging device
CN107682541A (en) Audio control method, mobile terminal and the storage medium of screen prjection

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
TA01 Transfer of patent application right

Effective date of registration: 20200810

Address after: 215500, 1, 68 southeast Avenue, Changshu hi tech Industrial Development Zone, Jiangsu, Suzhou

Applicant after: Suzhou Hongsen Software Co., Ltd

Address before: 518057 Guangdong Province, Shenzhen high tech Zone of Nanshan District City, No. 9018 North Central Avenue's innovation building A, 6-8 layer, 10-11 layer, B layer, C District 6-10 District 6 floor

Applicant before: NUBIA TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant