Summary of the invention
In order to solve problems in the prior art, the embodiment of the invention provides a kind of method and apparatus for detecting sound quality.InstituteIt is as follows to state technical solution:
In a first aspect, providing a kind of method for detecting sound quality, which comprises
Receive the automatic detection instruction of sound quality of the first audio file of user's input;
Obtain the sonograph of first audio file;
If preset standard audio frequency corresponding color at each audio frame is default in the sonographZero loudness of correspondence color, then show that the sound quality of first audio file is to damage the prompt information of sound quality.
Optionally, the method also includes:
When the manual detection instruction of the sound quality for receiving first audio file that user inputs, first sound is shownThe sonograph of frequency file, and the corresponding frequency line of the standard audio frequency is shown in the sonograph.
In this way, user can by detect manually be understood more intuitively audio file sound quality,
Optionally, the method also includes:
The sound quality of first audio file is labeled as to damage sound quality.
In this way, terminal can mark the sound quality of audio file, user is facilitated to select the audio file of lossless sound quality later.
Optionally, the sonograph for obtaining first audio file, comprising:
According to the corresponding relationship of preset color and loudness, the sonograph of first audio file is generated.
Optionally, the method also includes:
When receiving the setting of color of corresponding zero loudness instruction, the first color of user's input is obtained, by described theOne color is set as the color of corresponding zero loudness.
Second aspect, provides a kind of device for detecting sound quality, and described device includes:
Receiving module, the automatic detection instruction of sound quality of the first audio file for receiving user's input;
Module is obtained, for obtaining the sonograph of first audio file;
Cue module, if preset standard audio frequency is corresponding at each audio frame in the sonographColor be preset zero loudness of correspondence color, then show that the sound quality of first audio file is to damage the prompt of sound qualityInformation.
Optionally, described device further include:
Display module, for when receiving the manual detection instruction of sound quality of first audio file of user's input,It shows the sonograph of first audio file, and shows the corresponding frequency of the standard audio frequency in the sonographLine.
Optionally, described device further include:
Mark module damages sound quality for the sound quality of first audio file to be labeled as.
Optionally, the acquisition module, is used for:
According to the corresponding relationship of preset color and loudness, the sonograph of first audio file is generated.
Optionally, described device further include:
Setup module, for obtaining the first of user's input when the setting instruction for the color for receiving corresponding zero loudnessColor sets first color to the color of corresponding zero loudness.
Technical solution provided in an embodiment of the present invention has the benefit that
In the embodiment of the present invention, the automatic detection instruction of sound quality of the first audio file of user's input is received, obtains firstThe sonograph of audio file, if preset standard audio frequency corresponding color at each audio frame is equal in sonographFor the color of preset zero loudness of correspondence, then show that the sound quality of the first audio file is to damage the prompt information of sound quality.In this way, eventuallyEnd can be according in sonograph, and whether the corresponding color of preset standard audio frequency is lossless come the sound quality for judging audio fileSound quality thereby may be ensured that experience when user listens to music so that user can choose the audio file for playing lossless sound quality.
Specific embodiment
To make the object, technical solutions and advantages of the present invention clearer, below in conjunction with attached drawing to embodiment party of the present inventionFormula is described in further detail.
The embodiment of the invention provides a kind of method for detecting sound quality, the executing subject of this method is terminal.Wherein, terminalIt can be the terminal for detecting sound quality, can be computer, mobile phone etc..Broadcast message class application program can be installed in terminal,The broadcast message class application program can have the function of detection audio file sound quality.Processor, memory can be set in terminal,Processor can be used for detecting the relevant treatment of sound quality, and memory, which can be used for storing, to be needed and generate in following treatment processesData.It is also provided with audio output part and display unit, audio output part can be used for playing audio file, displayComponent can show the related content of audio file.
Below in conjunction with specific embodiment, process flow shown in FIG. 1 is described in detail, content can be asUnder:
Step 101, the automatic detection instruction of sound quality of the first audio file of user's input is received.
In an implementation, the broadcast message class application program for playing audio file can be installed, user can make in terminalThe audio file being locally stored or the audio file downloaded from network are played with the broadcast message class application program.The broadcast message class is answeredSound quality detection function can be set with program, when user need to detect some audio file with the presence or absence of sound quality defect, i.e.,Whether the actual sound quality for detecting the audio file is lossless sound quality, can open the sound quality detection circle of the broadcast message class application programThen face selects some audio file (i.e. the first audio file) at audio file list, click automatic detection key later,Terminal then can receive the automatic detection instruction of sound quality of the first audio file of user's input, and sound quality detects interface can be such as figureShown in 2.
Step 102, the sonograph of the first audio file is obtained.
In an implementation, terminal is after the automatic detection instruction of sound quality for receiving the first audio file, available first soundThe sonograph of frequency file.Herein, it is interim to can be data of the terminal based on the first audio file for the sonograph of the first audio fileGenerate, be also possible to server corresponding from above-mentioned broadcast message class application program from download, can also be and the first soundFrequency file is corresponding, the sonograph being stored in advance in terminal.Pre-stored sonograph terminal can be based on first for before againWhat the data of audio file generated, or can be what terminal was obtained when obtaining the first audio file.
Optionally, the corresponding relationship of different colours and different loudness in sonograph can be set in terminal, correspondingly, step102 processing can be such that the corresponding relationship according to preset color and loudness, generate the sonograph of the first audio file.
In an implementation, it can store the corresponding relationship of preset color and loudness in terminal, terminal is receiving firstIt after the automatic detection instruction of the sound quality of audio file, can first determine at each audio frame, each audio frequency of the first audio file pointThe loudness of amount, and then determine the corresponding color of loudness, so as to generate the sonograph of the first audio file.
Step 103, if in sonograph, preset standard audio frequency corresponding color at each audio frame isThe color of preset zero loudness of correspondence then shows that the sound quality of the first audio file is to damage the prompt information of sound quality.
Wherein, the horizontal axis of sonograph is time (i.e. audio frame) axis, and the longitudinal axis is frequency axis, and is indicated with different colorsAudio loudness size corresponding to different time different frequency.
In an implementation, terminal is after the sonograph for getting the first audio file, it can be determined that each audio frame in sonographCorresponding highest audio frequency component, if the corresponding highest audio frequency component of each audio frame is respectively less than preset standard pronunciationFrequent rate, i.e., preset standard audio frequency corresponding color at each audio frame is preset zero sound of correspondence in sonographThe color of degree, it can think that the corresponding loudness of the first audio file Plays audio frequency is zero.And sound is damaged due to existingPleasure be obtained after cutting off the high frequency section of lossless music, so can with established standards audio frequency for the excision frequency, fromAnd if the loudness that standard audio frequency corresponds to audio component is zero, the first audio file exists at standard audio frequency to be lackedDamage, therefore can consider that the first audio file is to damage music, so that terminal can show that the sound quality of the first audio file is to damageThe prompt information of sound quality.It is noted that considering the definition to lossless music and human ear hearing frequencies in the prior artRange can be 22khz with established standards audio frequency.Further, it is also possible to set time standard audio frequency, secondary standard audio frequencyIt can be 21khz, the available secondary standard audio frequency corresponding face at all audio frames of terminal less than standard audio frequencyColor, if the audio frame proportion of the color of corresponding zero loudness is less than preset threshold, it may be considered that the first audio fileSound quality is lossless sound quality.
Optionally, terminal can also provide user's method for detecting sound quality manually, and corresponding processing can be such that when receptionWhen the manual detection instruction of sound quality of the first audio file inputted to user, the sonograph of the first audio file is shown, and in soundThe corresponding frequency line of standard audio frequency is shown in spectrogram.
In an implementation, when user need to detect some audio file with the presence or absence of sound quality defect, that is, detect audio textWhether the actual sound quality of part is lossless sound quality, can open the sound quality detection of the broadcast message class application program of above-mentioned installation at the terminalThen interface selects some audio file (i.e. the first audio file) at audio file list, click detection manually later and pressKey, terminal then can receive the manual detection instruction of sound quality of the first audio file of user's input, so as to obtain and showShow the sonograph of the first audio file, while showing the corresponding frequency line of standard audio frequency in sonograph, in this way, user is thenMore can intuitively find out whether color corresponding to the corresponding frequency line of standard audio frequency is corresponding zero by sonographThe color of loudness, so as to detect whether the sound quality of the first audio file is to damage sound quality manually, as shown in figure 3, whereinThe lossless line of 22khz is the corresponding frequency line of standard audio frequency.
Optionally, terminal can also mark the sound quality of each audio file, and corresponding processing can be such that the first audioThe sound quality of file is labeled as damaging sound quality.
It in an implementation, can be by the first audio text after terminal detects that the sound quality of the first audio file is to damage sound qualityThe sound quality of part is labeled as sound quality is damaged, specifically, can be the first audio in the audio list of above-mentioned broadcast message class application programFile adds sound quality mark, similarly, can be by the sound of the first audio file if the sound quality of the first audio file is lossless sound qualityMatter is labeled as lossless sound quality, can also mark the audio file not detected, as shown in Figure 4.
Optionally, user can be with the corresponding color of zero loudness of self-setting, and corresponding processing can be such that when receiving pairWhen the setting of the color of zero loudness being answered to instruct, the first color of user's input is obtained, sets corresponding zero loudness for the first colorColor.
In an implementation, user can open the setting page of above-mentioned broadcast message class application program, then click zero loudness colorSetting button, at this moment terminal can click a kind of color in the color selection interface with display color selection interface, user(i.e. the first color), and confirmation key is clicked, in this way, terminal then can receive the setting instruction of the color of corresponding zero loudness,And then the first color of available user's input, then it can set the first color to the color of corresponding zero loudness.Herein,If terminal is the sonograph generated based on the corresponding relationship of preset color and loudness, the first color can be above-mentioned correspondenceThe color being not present in relationship.
In the embodiment of the present invention, the automatic detection instruction of sound quality of the first audio file of user's input is received, obtains firstThe sonograph of audio file, if preset standard audio frequency corresponding color at each audio frame is equal in sonographFor the color of preset zero loudness of correspondence, then show that the sound quality of the first audio file is to damage the prompt information of sound quality.In this way, eventuallyEnd can be according in sonograph, and whether the corresponding color of preset standard audio frequency is lossless come the sound quality for judging audio fileSound quality thereby may be ensured that experience when user listens to music so that user can choose the audio file for playing lossless sound quality.
Based on the same technical idea, the embodiment of the invention also provides a kind of detection sound quality devices, as shown in figure 5, shouldDevice includes:
Receiving module 501, the automatic detection instruction of sound quality of the first audio file for receiving user's input;
Module 502 is obtained, for obtaining the sonograph of first audio file;
Cue module 503, if in the sonograph, preset standard audio frequency is at each audio frame pairThe color answered is the color of preset zero loudness of correspondence, then shows that the sound quality of first audio file is to damage mentioning for sound qualityShow information.
Optionally, as shown in fig. 6, described device further include:
Display module 504, for the manual detection instruction of sound quality when first audio file for receiving user's inputWhen, show the sonograph of first audio file, and the corresponding frequency of the standard audio frequency is shown in the sonographRate line.
Optionally, as shown in fig. 7, described device further include:
Mark module 505 damages sound quality for the sound quality of first audio file to be labeled as.
Optionally, the acquisition module 502, is used for:
According to the corresponding relationship of preset color and loudness, the sonograph of first audio file is generated.
Optionally, as shown in figure 8, described device further include:
Setup module 506, for when receiving the setting of color of corresponding zero loudness instruction, obtaining the of user's inputOne color sets first color to the color of corresponding zero loudness.
In the embodiment of the present invention, the automatic detection instruction of sound quality of the first audio file of user's input is received, obtains firstThe sonograph of audio file, if preset standard audio frequency corresponding color at each audio frame is equal in sonographFor the color of preset zero loudness of correspondence, then show that the sound quality of the first audio file is to damage the prompt information of sound quality.In this way, eventuallyEnd can be according in sonograph, and whether the corresponding color of preset standard audio frequency is lossless come the sound quality for judging audio fileSound quality thereby may be ensured that experience when user listens to music so that user can choose the audio file for playing lossless sound quality.
It should be understood that it is provided by the above embodiment detection sound quality device when detecting sound quality, only with above-mentioned each functionCan module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different functionsModule is completed, i.e., the internal structure of device is divided into different functional modules, described above all or part of to completeFunction.In addition, the device of detection sound quality provided by the above embodiment and the embodiment of the method for detection sound quality belong to same design,Specific implementation process is detailed in embodiment of the method, and which is not described herein again.
Referring to FIG. 9, the terminal can be used for it illustrates the structural schematic diagram of terminal involved in the embodiment of the present inventionThe method of the detection sound quality provided in above-described embodiment is provided.Specifically:
Terminal 900 may include RF (Radio Frequency, radio frequency) circuit 110, include one or more meterThe memory 120 of calculation machine readable storage medium storing program for executing, input unit 130, display unit 140, sensor 150, voicefrequency circuit 160,WiFi (wireless fidelity, Wireless Fidelity) module 170, the processing for including one or more than one processing coreThe components such as device 180 and power supply 190.It will be understood by those skilled in the art that terminal structure shown in Fig. 9 is not constituted pairThe restriction of terminal may include perhaps combining certain components or different component cloth than illustrating more or fewer componentsIt sets.Wherein:
RF circuit 110 can be used for receiving and sending messages or communication process in, signal sends and receivees, particularly, by base stationAfter downlink information receives, one or the processing of more than one processor 180 are transferred to;In addition, the data for being related to uplink are sent toBase station.In general, RF circuit 110 includes but is not limited to antenna, at least one amplifier, tuner, one or more oscillators, usesFamily identity module (SIM) card, transceiver, coupler, LNA (Low Noise Amplifier, low-noise amplifier), duplexDevice etc..In addition, RF circuit 110 can also be communicated with network and other equipment by wireless communication.Wireless communication, which can be used, appoints(Global System of Mobile communication, the whole world are moved for one communication standard or agreement, including but not limited to GSMDynamic communication system), GPRS (General Packet Radio Service, general packet radio service), CDMA (CodeDivision Multiple Access, CDMA), WCDMA (Wideband Code Division MultipleAccess, wideband code division multiple access), LTE (Long Term Evolution, long term evolution), Email, SMS (ShortMessaging Service, short message service) etc..
Memory 120 can be used for storing software program and module, and processor 180 is stored in memory 120 by operationSoftware program and module, thereby executing various function application and data processing.Memory 120 can mainly include storage journeySequence area and storage data area, wherein storing program area can the (ratio of application program needed for storage program area, at least one functionSuch as sound-playing function, image player function) etc.;Storage data area, which can be stored, uses created number according to terminal 900According to (such as audio data, phone directory etc.) etc..In addition, memory 120 may include high-speed random access memory, can also wrapInclude nonvolatile memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.Correspondingly, memory 120 can also include Memory Controller, to provide processor 180 and input unit 130 to memory120 access.
Input unit 130 can be used for receiving the number or character information of input, and generate and user setting and functionControl related keyboard, mouse, operating stick, optics or trackball signal input.Specifically, input unit 130 may include touchingSensitive surfaces 131 and other input equipments 132.Touch sensitive surface 131, also referred to as touch display screen or Trackpad are collected and are usedFamily on it or nearby touch operation (such as user using any suitable object or attachment such as finger, stylus in touch-sensitive tableOperation on face 131 or near touch sensitive surface 131), and corresponding attachment device is driven according to preset formula.It is optional, touch sensitive surface 131 may include both touch detecting apparatus and touch controller.Wherein, touch detecting apparatus detection is usedThe touch orientation at family, and touch operation bring signal is detected, transmit a signal to touch controller;Touch controller is from touchTouch information is received in detection device, and is converted into contact coordinate, then gives processor 180, and can receive processor 180The order sent simultaneously is executed.Furthermore, it is possible to using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic wavesRealize touch sensitive surface 131.In addition to touch sensitive surface 131, input unit 130 can also include other input equipments 132.Specifically,Other input equipments 132 can include but is not limited to physical keyboard, function key (such as volume control button, switch key etc.),One of trace ball, mouse, operating stick etc. are a variety of.
Display unit 140 can be used for showing information input by user or the information and terminal 500 that are supplied to userVarious graphical user interface, these graphical user interface can be made of figure, text, icon, video and any combination thereof.Display unit 140 may include display panel 141, optionally, can use LCD (Liquid Crystal Display, liquid crystalShow device), the forms such as OLED (Organic Light-Emitting Diode, Organic Light Emitting Diode) configure display panel141.Further, touch sensitive surface 131 can cover display panel 141, when touch sensitive surface 131 detects touching on it or nearbyAfter touching operation, processor 180 is sent to determine the type of touch event, is followed by subsequent processing device 180 according to the type of touch eventCorresponding visual output is provided on display panel 141.Although touch sensitive surface 131 and display panel 141 are conducts in Fig. 9Two independent components realize input and input function, but in some embodiments it is possible to by touch sensitive surface 131 and displayPanel 141 is integrated and realizes and outputs and inputs function.
Terminal 900 may also include at least one sensor 150, such as optical sensor, motion sensor and other sensingsDevice.Specifically, optical sensor may include ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environmentThe light and shade of light adjusts the brightness of display panel 141, and proximity sensor can close display when terminal 900 is moved in one's earPanel 141 and/or backlight.As a kind of motion sensor, gravity accelerometer can detect in all directions (generallyThree axis) acceleration size, can detect that size and the direction of gravity when static, can be used to identify mobile phone posture application (ratioSuch as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, tap);ExtremelyIn other sensors such as gyroscope, barometer, hygrometer, thermometer, the infrared sensors that terminal 900 can also configure, hereinIt repeats no more.
Voicefrequency circuit 160, loudspeaker 161, microphone 162 can provide the audio interface between user and terminal 900.AudioElectric signal after the audio data received conversion can be transferred to loudspeaker 161, be converted to sound by loudspeaker 161 by circuit 160Sound signal output;On the other hand, the voice signal of collection is converted to electric signal by microphone 162, after being received by voicefrequency circuit 160Audio data is converted to, then by after the processing of audio data output processor 180, such as another end is sent to through RF circuit 110End, or audio data is exported to memory 120 to be further processed.Voicefrequency circuit 160 is also possible that earphone jack,To provide the communication of peripheral hardware earphone Yu terminal 900.
WiFi belongs to short range wireless transmission technology, and terminal 900 can help user's transceiver electronics by WiFi module 170Mail, browsing webpage and access streaming video etc., it provides wireless broadband internet access for user.Although Fig. 9 is shownWiFi module 170, but it is understood that, and it is not belonging to must be configured into for terminal 900, it can according to need completelyDo not change in the range of the essence of invention and omits.
Processor 180 is the control centre of terminal 900, utilizes each portion of various interfaces and connection whole mobile phonePoint, by running or execute the software program and/or module that are stored in memory 120, and calls and be stored in memory 120Interior data execute the various functions and processing data of terminal 900, to carry out integral monitoring to mobile phone.Optionally, processor180 may include one or more processing cores;Preferably, processor 180 can integrate application processor and modem processor,Wherein, the main processing operation system of application processor, user interface and application program etc., modem processor mainly handles nothingLine communication.It is understood that above-mentioned modem processor can not also be integrated into processor 180.
Terminal 900 further includes the power supply 190 (such as battery) powered to all parts, it is preferred that power supply can pass through electricityManagement system and processor 180 are logically contiguous, to realize management charging, electric discharge and power consumption by power-supply management systemThe functions such as management.Power supply 190 can also include one or more direct current or AC power source, recharging system, power supply eventHinder the random components such as detection circuit, power adapter or inverter, power supply status indicator.
Although being not shown, terminal 900 can also include camera, bluetooth module etc., and details are not described herein.Specifically in this realityIt applies in example, the display unit of terminal 900 is touch-screen display, and terminal 900 further includes having memory and one or oneAbove program, one of them perhaps more than one program be stored in memory and be configured to by one or one withUpper processor execution states one or more than one program includes the instruction for performing the following operation:
Receive the automatic detection instruction of sound quality of the first audio file of user's input;
Obtain the sonograph of first audio file;
If preset standard audio frequency corresponding color at each audio frame is default in the sonographZero loudness of correspondence color, then show that the sound quality of first audio file is to damage the prompt information of sound quality.
Optionally, the method also includes:
When the manual detection instruction of the sound quality for receiving first audio file that user inputs, first sound is shownThe sonograph of frequency file, and the corresponding frequency line of the standard audio frequency is shown in the sonograph.
Optionally, the method also includes:
The sound quality of first audio file is labeled as to damage sound quality.
Optionally, the sonograph for obtaining first audio file, comprising:
According to the corresponding relationship of preset color and loudness, the sonograph of first audio file is generated.
Optionally, the method also includes:
When receiving the setting of color of corresponding zero loudness instruction, the first color of user's input is obtained, by described theOne color is set as the color of corresponding zero loudness.
In the embodiment of the present invention, the automatic detection instruction of sound quality of the first audio file of user's input is received, obtains firstThe sonograph of audio file, if preset standard audio frequency corresponding color at each audio frame is equal in sonographFor the color of preset zero loudness of correspondence, then show that the sound quality of the first audio file is to damage the prompt information of sound quality.In this way, eventuallyEnd can be according in sonograph, and whether the corresponding color of preset standard audio frequency is lossless come the sound quality for judging audio fileSound quality thereby may be ensured that experience when user listens to music so that user can choose the audio file for playing lossless sound quality.
Those of ordinary skill in the art will appreciate that realizing that all or part of the steps of above-described embodiment can pass through hardwareIt completes, relevant hardware can also be instructed to complete by program, the program can store in a kind of computer-readableIn storage medium, storage medium mentioned above can be read-only memory, disk or CD etc..
The foregoing is merely presently preferred embodiments of the present invention, is not intended to limit the invention, it is all in spirit of the invention andWithin principle, any modification, equivalent replacement, improvement and so on be should all be included in the protection scope of the present invention.