[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN106066782B - A kind of data processing method and electronic equipment - Google Patents

A kind of data processing method and electronic equipment Download PDF

Info

Publication number
CN106066782B
CN106066782B CN201610507769.1A CN201610507769A CN106066782B CN 106066782 B CN106066782 B CN 106066782B CN 201610507769 A CN201610507769 A CN 201610507769A CN 106066782 B CN106066782 B CN 106066782B
Authority
CN
China
Prior art keywords
audio
played
type
voice
playing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610507769.1A
Other languages
Chinese (zh)
Other versions
CN106066782A (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201610507769.1A priority Critical patent/CN106066782B/en
Publication of CN106066782A publication Critical patent/CN106066782A/en
Application granted granted Critical
Publication of CN106066782B publication Critical patent/CN106066782B/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The invention discloses a kind of data processing method and electronic equipments, by receiving audio play instruction, audio play instruction includes the audio of pre- broadcasting, when the audio played in advance meets the first preset condition, the audio played in advance is the first audio types, then is played out by voice play mode corresponding with the first audio types in electronic equipment to the audio played in advance.This programme passes through when the audio played in advance is the first audio types, voice play mode is called directly to play out the audio played in advance, it realizes and the audio of the first audio types is played using individual play mode, the problem of avoiding to the audio of the first audio types using the play mode for being not suitable for the type, so that the audio played in advance is played out with the mode for meeting its type, result of broadcast is improved.

Description

Data processing method and electronic equipment
Technical Field
The present invention relates to the field of audio, and in particular, to a data processing method and an electronic device.
Background
More and more users are increasingly demanding on the tone quality of the audio played by the electronic equipment, and at present, on the electronic equipment, before the audio is played, the audio needs to be added with a third-party sound effect to optimize the tone quality, for example: dolby, SRS, waves, etc. The third party sound effect optimizes the sound quality of the audio in the electronic equipment, and generally comprises the following steps: the audio playing method comprises three audio modes of music, movies and games, specifically, in the process of optimizing audio in electronic equipment, a third-party audio usually performs Dynamic Range Control (DRC) on the audio, and integrally raises small and medium signals in the audio by a certain decibel to achieve a better playing effect.
However, when the user uses the electronic device, the user usually uses voice communication, and when the user performs recording communication through the electronic device, the third-party sound effect usually optimizes the recording communication into a music mode for playing.
In the process of acquiring the recording file in the recording communication, due to the limitation of the signal-to-noise ratio of the microphone of the electronic equipment and the noise problem of the surrounding environment, the noise in the recording file is relatively high, so that the maximum value or the minimum value of the dynamic range control DRC cannot be identified easily, the noise in the playing process of the recording file is relatively high, and the playing effect is influenced.
Disclosure of Invention
In view of the above, the present invention provides a data processing method and an electronic device, so as to solve the problem that in the prior art, when performing recording communication through an electronic device, due to processing of a sound effect of a recording file by a third-party sound effect, a bottom noise of the playing of the recording file is large, and a playing effect is affected, and a specific scheme thereof is as follows:
a data processing method is applied to electronic equipment and comprises the following steps:
receiving an audio playing instruction, wherein the audio playing instruction comprises pre-played audio;
judging whether the pre-played audio meets a first preset condition or not;
if so, the pre-played audio is of a first audio type, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the electronic equipment.
Further, the determining whether the pre-played audio meets a first preset condition, if so, the pre-played audio is of a first audio type, including:
judging whether the sampling rate of the pre-played audio is smaller than a first preset threshold value or not;
and if so, the pre-played audio is a chat audio file.
Further, the method also comprises the following steps:
when the pre-played audio does not accord with a first preset condition, detecting whether the pre-played audio has a first preset identifier, wherein the first preset identifier is used for marking a recording audio file when the recording audio file is acquired;
if so, the pre-played audio is a recording audio file, and the pre-played audio is played through a voice playing mode in the electronic equipment.
Further, the playing the pre-played audio through the voice playing mode corresponding to the first audio type in the electronic device includes:
loading a firmware program corresponding to a voice playing mode by calling a local sound effect processing chip so as to play the pre-played audio through the voice playing mode corresponding to the first audio type;
or,
calling a partial program module of a voice output module of a locally installed third-party application program, and outputting the played audio based on the partial program module of the voice output module of the third-party application program so as to play the pre-played audio in a voice playing mode corresponding to the first audio type.
Further, the method also comprises the following steps:
when the pre-played audio does not have a first preset identifier, detecting the type of the pre-played audio;
and playing the pre-played audio through a playing mode corresponding to the type of the pre-played audio in the electronic equipment according to the type of the pre-played audio.
Further, the playing the pre-played audio according to the type of the pre-played audio through a playing mode corresponding to the type of the pre-played audio in the electronic device includes:
adjusting the dynamic range of the relative loudness of the audio according to the type of the pre-played audio to obtain the adjusted pre-played audio;
and playing the adjusted pre-played audio.
Further, whether the pre-played audio meets a first preset condition is judged, if yes, the pre-played audio is of a first audio type, and specifically, the method includes:
judging whether the pre-played audio has a second preset identifier, wherein the second preset identifier is used for marking the voice audio file when the voice audio file is acquired;
if so, the pre-played audio is a voice audio type file, and the voice audio type file comprises: voice chat audio files and recorded audio files.
An electronic device, comprising: audio player and processor, wherein:
the audio player is used for playing audio;
the processor receives an audio playing instruction, the audio playing instruction comprises pre-played audio, whether the pre-played audio meets a first preset condition is judged, if yes, the pre-played audio is of a first audio type, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the audio player.
Further, the processor determines whether the pre-played audio meets a first preset condition, and if so, the pre-played audio is of a first audio type, including:
the processor judges whether the sampling rate of the pre-played audio is smaller than a first preset threshold value, and if so, the pre-played audio is a voice chat audio file.
Further, the processor is further configured to:
when the pre-played audio is judged not to be in accordance with a first preset condition, whether the pre-played audio has a first preset identification or not is detected, the first preset identification is a mark carried out on the recording audio file when the recording audio file is obtained, if yes, the pre-played audio is the recording audio file, and the pre-played audio is played through a voice playing mode in the audio player.
Further, the playing the pre-played audio through a voice playing mode corresponding to the first audio type in the audio player by the processor includes:
the processor loads a firmware program corresponding to a voice playing mode by calling a local sound effect processing chip so as to play the pre-played audio through the voice playing mode corresponding to the first audio type in the audio player;
or,
the processor calls a part of program modules of a voice output module of a locally installed third-party application program, and outputs the played audio based on the part of program modules of the voice output module of the third-party application program, so that the pre-played audio is played through a voice playing mode corresponding to the first audio type in an audio player.
Further, the processor is further configured to:
and when the pre-played audio is judged not to have the first preset identifier, detecting the type of the pre-played audio, and playing the pre-played audio through a playing mode corresponding to the type of the pre-played audio in the audio player according to the type of the pre-played audio.
Further, the playing, by the processor, the pre-played audio according to the type of the pre-played audio through a playing mode corresponding to the type of the pre-played audio in the audio player includes:
and the processor adjusts the dynamic range of the relative loudness of the audio according to the type of the pre-played audio to obtain the adjusted pre-played audio, and the adjusted pre-played audio is played through the audio player.
Further, the processor determines whether the pre-played audio meets a first preset condition, and if so, the pre-played audio is of a first audio type, specifically:
the processor judges whether the pre-played audio has a second preset identifier, the second preset identifier is used for marking the voice audio file when the voice audio file is acquired, if so, the pre-played audio is a voice audio type file, and the voice audio type file comprises: voice chat audio files and recorded audio files.
According to the data processing method and the electronic device, the audio playing instruction is received, the audio playing instruction comprises the pre-played audio, when the pre-played audio meets the first preset condition, the pre-played audio is of the first audio type, and the pre-played audio is played through the voice playing mode corresponding to the first audio type in the electronic device. According to the scheme, when the pre-played audio is of the first audio type, the voice playing mode is directly called to play the pre-played audio, so that the audio of the first audio type is played in an independent playing mode, the problem that the audio of the first audio type is not suitable for the playing mode of the type is solved, the pre-played audio is played in a mode according with the type, and the playing effect is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 3 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 4 is a flow chart of a data processing method according to an embodiment of the present invention;
FIG. 5 is a flow chart of a data processing method according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention discloses a data processing method, which is applied to electronic equipment, and a flow chart of the data processing method is shown in figure 1 and comprises the following steps:
step S11, receiving an audio playing instruction, wherein the audio playing instruction comprises pre-played audio;
when audio needs to be played in the electronic equipment, an audio playing instruction is received, wherein the audio playing instruction at least comprises: the audio to be played may further include: the time or duration of playing, or the volume of audio playing, etc., are not limited in this respect.
Step S12, judging whether the pre-played audio meets a first preset condition;
step S13, if yes, the pre-played audio is of the first audio type, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the electronic device.
Audio can be divided into various types, such as: the electronic device comprises a plurality of playing modes, namely voice audio, movie audio, music audio, game audio and the like, and the electronic device respectively plays the audio of the type corresponding to the electronic device in the plurality of playing modes.
For example: if the audio is a voice audio, namely the first audio type, the voice audio is played through a voice playing mode; if the audio is the movie audio, playing the movie audio through a movie playing mode; if the audio is music audio, playing the music audio through a music playing mode; and if the audio is game audio, playing the game audio through a game playing mode.
Different play modes are different processing of audio, for example: the voice playing mode can be that the voice audio is directly played without any processing, or the voice audio is played after the relative loudness of small amplitude is adjusted; in the corresponding playing modes of the video audio, the music audio or the game audio, a dynamic range adjustment of relative loudness with a larger amplitude is required, and the adjustment amplitude or the adjustment mode of different audio types are different in different playing modes.
The voice audio may specifically be: the electronic device directly acquires data such as: recorded audio or third party applications such as: wechat or QQ chat audio.
In the data processing method disclosed in this embodiment, an audio playing instruction is received, where the audio playing instruction includes a pre-played audio, and when the pre-played audio meets a first preset condition and is of a first audio type, the pre-played audio is played in a voice playing mode corresponding to the first audio type in the electronic device. According to the scheme, when the pre-played audio is of the first audio type, the voice playing mode is directly called to play the pre-played audio, so that the audio of the first audio type is played in an independent playing mode, the problem that the audio of the first audio type is not suitable for the playing mode of the type is solved, the pre-played audio is played in a mode according with the type, and the playing effect is improved.
The embodiment discloses a data processing method applied to an electronic device, and a flowchart of the data processing method is shown in fig. 2, and includes:
step S21, receiving an audio playing instruction, wherein the audio playing instruction comprises pre-played audio;
step S22, judging whether the sampling rate of the pre-played audio is smaller than a first preset threshold value;
different types of audio differ in their sampling rate, such as: the sampling rate of music audio and video audio is usually greater than 44.1KHz, and the sampling rate of voice chat audio is usually less than 16KHz, wherein the voice chat audio is one of voice audio, and the voice audio may further include: and recording the audio.
Therefore, if the first preset threshold is 16KHz, when the sampling rate of the pre-played audio is less than 16KHz, the pre-played audio is a talk audio.
And step S23, if yes, the pre-played audio is a voice chat audio file, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the electronic equipment.
No matter the pre-played audio is chatting audio in voice audio or recorded audio, the pre-played audio needs to be played in a voice playing mode.
When the pre-played audio is the voice chat audio, playing the voice chat audio through a voice playing mode; and when the pre-played audio is the recorded audio, playing the recorded audio through the voice playing mode.
In the data processing method disclosed in this embodiment, an audio playing instruction is received, where the audio playing instruction includes a pre-played audio, and when the pre-played audio meets a first preset condition and is of a first audio type, the pre-played audio is played in a voice playing mode corresponding to the first audio type in the electronic device. According to the scheme, when the pre-played audio is of the first audio type, the voice playing mode is directly called to play the pre-played audio, so that the audio of the first audio type is played in an independent playing mode, the problem that the audio of the first audio type is not suitable for the playing mode of the type is solved, the pre-played audio is played in a mode according with the type, and the playing effect is improved.
The embodiment discloses a data processing method applied to an electronic device, and a flowchart of the data processing method is shown in fig. 3, and includes:
step S31, receiving an audio playing instruction, wherein the audio playing instruction comprises pre-played audio;
step S32, judging whether the sampling rate of the pre-played audio is smaller than a first preset threshold value;
step S33, if yes, the pre-played audio is a voice chat audio file, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the electronic equipment;
step S34, if not, detecting whether the pre-played audio has a first preset identifier, wherein the first preset identifier is a mark for the recording audio file when the recording audio file is obtained;
if the first preset threshold is 16KHz, when the sampling rate of the pre-played audio is not less than the first preset threshold, it indicates that the type of the pre-played audio is non-voice chat audio.
And step S35, if yes, the pre-played audio is a recorded audio file, and the pre-played audio is played through a voice playing mode in the electronic equipment.
Under the condition that the pre-played audio is non-voice chat audio, if the pre-played audio is detected to have a first preset mark, the pre-played audio is indicated to be recording audio.
The recording file is directly acquired through the electronic equipment, and when the recording file is acquired through the electronic equipment, the recording file is marked to indicate that the type of the audio file is the recording file, so that when the audio file is detected to be provided with the first preset identification, the audio file is the recording audio file, and the recording audio file also needs to be played in a voice playing mode.
In the data processing method disclosed in this embodiment, an audio playing instruction is received, where the audio playing instruction includes a pre-played audio, and when the pre-played audio meets a first preset condition and is of a first audio type, the pre-played audio is played in a voice playing mode corresponding to the first audio type in the electronic device. According to the scheme, when the pre-played audio is of the first audio type, the voice playing mode is directly called to play the pre-played audio, so that the audio of the first audio type is played in an independent playing mode, the problem that the audio of the first audio type is not suitable for the playing mode of the type is solved, the pre-played audio is played in a mode according with the type, and the playing effect is improved.
The embodiment discloses a data processing method applied to an electronic device, and a flowchart of the data processing method is shown in fig. 4, and includes:
step S41, receiving an audio playing instruction, wherein the audio playing instruction comprises pre-played audio;
step S42, judging whether the sampling rate of the pre-played audio is smaller than a first preset threshold value;
step S43, if yes, the pre-played audio is a voice chat audio file, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the electronic equipment;
step S44, if not, detecting whether the pre-played audio has a first preset identifier, wherein the first preset identifier is a mark for the recording audio file when the recording audio file is obtained;
step S45, if yes, the pre-played audio is a recorded audio file, and the pre-played audio is played through a voice playing mode in the electronic equipment;
step S46, if the pre-played audio does not have the first preset identification, detecting the type of the pre-played audio;
when the sampling rate of the pre-played audio is smaller than a first preset threshold value, the pre-played audio is a voice chat audio; when the pre-played audio has a first preset identifier, the pre-played audio is a recorded audio; when the sampling rate of the pre-played audio is not less than the first preset threshold and does not have the first preset identifier, the pre-played audio may be music audio, movie audio, or game audio, and at this time, the type of the pre-played audio is detected to detect whether the pre-played audio is music audio, movie audio, or game audio.
And step S47, playing the pre-played audio through the playing mode corresponding to the type of the pre-played audio in the electronic equipment according to the type of the pre-played audio.
When the detection result shows that the pre-played audio is music audio, playing the audio in a music playing mode; when the detection result shows that the pre-played audio is the movie audio, playing the audio in a movie playing mode; and when the detection result shows that the pre-played audio is game audio, playing the audio in a game playing mode.
The playing of the pre-played audio is performed through a playing mode corresponding to the type of the pre-played audio in the electronic device according to the type of the pre-played audio, and may specifically be:
and adjusting the dynamic range of the relative loudness of the audio according to the type of the pre-played audio to obtain the adjusted pre-played audio, and playing the adjusted pre-played audio.
When the dynamic range of the relative loudness of the audio is adjusted for the pre-played audio, the adjustment is performed according to the type of the pre-played audio, for example: for a certain type of audio, the dynamic adjustment amplitude of the relative loudness is large and needs to be larger than a certain preset threshold; or, for another type of audio, the dynamic adjustment amplitude of the relative loudness is small, and needs to be smaller than another preset threshold, which is not specifically limited herein.
In the data processing method disclosed in this embodiment, an audio playing instruction is received, where the audio playing instruction includes a pre-played audio, and when the pre-played audio meets a first preset condition and is of a first audio type, the pre-played audio is played in a voice playing mode corresponding to the first audio type in the electronic device. According to the scheme, when the pre-played audio is of the first audio type, the voice playing mode is directly called to play the pre-played audio, so that the audio of the first audio type is played in an independent playing mode, the problem that the audio of the first audio type is not suitable for the playing mode of the type is solved, the pre-played audio is played in a mode according with the type, and the playing effect is improved.
The embodiment discloses a data processing method applied to an electronic device, and a flowchart of the data processing method is shown in fig. 5, and includes:
step S51, receiving an audio playing instruction, wherein the audio playing instruction comprises pre-played audio;
step S52, judging whether the pre-played audio has a second preset identification, wherein the second preset identification is a mark for the voice audio file when the voice audio file is acquired;
when the electronic equipment collects the voice audio file, the collected voice audio file is marked to indicate that the audio file with the second preset identification is the voice audio file, so that whether the audio file is the voice audio file is judged directly by detecting whether the audio file has the second preset identification.
Wherein the voice audio type file includes: voice chat audio files and recorded audio files.
And step S53, if yes, the pre-played audio is a voice audio type file, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the electronic equipment.
The first audio type played through the voice playing mode is voice audio.
Playing the pre-played audio through a voice playing mode corresponding to the first audio type in the electronic device may specifically be:
loading a firmware program corresponding to a voice playing mode by calling a local sound effect processing chip so as to play the pre-played audio through the voice playing mode corresponding to the first audio type; or calling a part of program modules of the voice output module of the locally installed third-party application program, and outputting the pre-played audio based on the part of program modules of the voice output module of the third-party application program, so that the pre-played audio is played in a voice playing mode corresponding to the first audio type.
The third-party application program may be: WeChat or QQ.
No matter a local sound effect processing chip is adopted, or a part of program modules of a voice output module of a locally installed third-party application program are called, the sound effect of the third party is avoided, such as: dolby, SRS or waves and the like, the process of optimizing the pre-played audio avoids the dynamic range adjustment of the pre-played audio, namely the voice audio, with a larger range amplitude, and ensures the playing effect of the voice audio.
In the data processing method disclosed in this embodiment, an audio playing instruction is received, where the audio playing instruction includes a pre-played audio, and when the pre-played audio meets a first preset condition and is of a first audio type, the pre-played audio is played in a voice playing mode corresponding to the first audio type in the electronic device. According to the scheme, when the pre-played audio is of the first audio type, the voice playing mode is directly called to play the pre-played audio, so that the audio of the first audio type is played in an independent playing mode, the problem that the audio of the first audio type is not suitable for the playing mode of the type is solved, the pre-played audio is played in a mode according with the type, and the playing effect is improved.
The embodiment discloses an electronic device, a schematic structural diagram of which is shown in fig. 6, and the electronic device includes:
an audio player 61 and a processor 62.
The audio player 61 is used for playing audio.
The processor 62 is configured to receive an audio playing instruction, where the audio playing instruction includes a pre-played audio, determine whether the pre-played audio meets a first preset condition, if so, the pre-played audio is of a first audio type, and play the pre-played audio through a voice playing mode corresponding to the first audio type in the audio player.
When audio needs to be played in the electronic equipment, an audio playing instruction is received, wherein the audio playing instruction at least comprises: the audio to be played may further include: the time or duration of playing, or the volume of audio playing, etc., are not limited in this respect.
Audio can be divided into various types, such as: the electronic device comprises a plurality of playing modes, namely voice audio, movie audio, music audio, game audio and the like, and the electronic device respectively plays the audio of the type corresponding to the electronic device in the plurality of playing modes.
For example: if the audio is a voice audio, namely the first audio type, the voice audio is played through a voice playing mode; if the audio is the movie audio, playing the movie audio through a movie playing mode; if the audio is music audio, playing the music audio through a music playing mode; and if the audio is game audio, playing the game audio through a game playing mode.
Different play modes are different processing of audio, for example: the voice playing mode can be that the voice audio is directly played without any processing, or the voice audio is played after the relative loudness of small amplitude is adjusted; in the corresponding playing modes of the video audio, the music audio or the game audio, a dynamic range adjustment of relative loudness with a larger amplitude is required, and the adjustment amplitude or the adjustment mode of different audio types are different in different playing modes.
The voice audio may specifically be: the electronic device directly acquires data such as: recorded audio or third party applications such as: wechat or QQ chat audio.
Processor 62 determines whether the pre-played audio meets a first predetermined condition, and if so, the pre-played audio is of a first audio type, which may specifically be:
the processor 62 determines whether the sampling rate of the pre-played audio is less than a first preset threshold, and if so, the pre-played audio is a chat audio file.
Different types of audio differ in their sampling rate, such as: the sampling rate of music audio and video audio is usually greater than 44.1KHz, and the sampling rate of voice chat audio is usually less than 16KHz, wherein the voice chat audio is one of voice audio, and the voice audio may further include: and recording the audio.
Therefore, if the first preset threshold is 16KHz, when the sampling rate of the pre-played audio is less than 16KHz, the pre-played audio is a talk audio.
No matter the pre-played audio is chatting audio in voice audio or recorded audio, the pre-played audio needs to be played in a voice playing mode.
When the pre-played audio is the voice chat audio, playing the voice chat audio through a voice playing mode; and when the pre-played audio is the recorded audio, playing the recorded audio through the voice playing mode.
Further, when the processor 62 determines that the pre-played audio does not meet the first preset condition, it detects whether the pre-played audio has a first preset identifier, where the first preset identifier is a flag performed on the recording audio file when the recording audio file is acquired, and if so, the pre-played audio is the recording audio file and is played in a voice play mode in the audio player.
If the first preset threshold is 16KHz, when the sampling rate of the pre-played audio is not less than the first preset threshold, it indicates that the type of the pre-played audio is non-voice chat audio.
Under the condition that the pre-played audio is non-voice chat audio, if the pre-played audio is detected to have a first preset mark, the pre-played audio is indicated to be recording audio.
The recording file is directly acquired through the electronic equipment, and when the recording file is acquired through the electronic equipment, the recording file is marked to indicate that the type of the audio file is the recording file, so that when the audio file is detected to be provided with the first preset identification, the audio file is the recording audio file, and the recording audio file also needs to be played in a voice playing mode.
When the processor 62 determines that the pre-played audio does not have the first preset identifier, the type of the pre-played audio is detected, and the pre-played audio is played through a play mode corresponding to the type of the pre-played audio in the audio player according to the type of the pre-played audio.
When the sampling rate of the pre-played audio is smaller than a first preset threshold value, the pre-played audio is a voice chat audio; when the pre-played audio has a first preset identifier, the pre-played audio is a recorded audio; when the sampling rate of the pre-played audio is not less than the first preset threshold and does not have the first preset identifier, the pre-played audio may be music audio, movie audio, or game audio, and at this time, the type of the pre-played audio is detected to detect whether the pre-played audio is music audio, movie audio, or game audio.
When the detection result shows that the pre-played audio is music audio, playing the audio in a music playing mode; when the detection result shows that the pre-played audio is the movie audio, playing the audio in a movie playing mode; and when the detection result shows that the pre-played audio is game audio, playing the audio in a game playing mode.
The playing of the pre-played audio is performed through a playing mode corresponding to the type of the pre-played audio in the electronic device according to the type of the pre-played audio, and may specifically be:
and adjusting the dynamic range of the relative loudness of the audio according to the type of the pre-played audio to obtain the adjusted pre-played audio, and playing the adjusted pre-played audio.
When the dynamic range of the relative loudness of the audio is adjusted for the pre-played audio, the adjustment is performed according to the type of the pre-played audio, for example: for a certain type of audio, the dynamic adjustment amplitude of the relative loudness is large and needs to be larger than a certain preset threshold; or, for another type of audio, the dynamic adjustment amplitude of the relative loudness is small, and needs to be smaller than another preset threshold, which is not specifically limited herein.
In addition, the processor 62 determines whether the pre-played audio meets a first preset condition, and if so, the pre-played audio is of a first audio type, which may specifically be:
processor 62 determines whether the pre-played audio has a second predetermined identifier, where the second predetermined identifier is a flag for a voice audio file when the voice audio file is obtained, and if so, the pre-played audio is a voice audio type file, and the voice audio type file includes: voice chat audio files and recorded audio files.
When the electronic equipment collects the voice audio file, the collected voice audio file is marked to indicate that the audio file with the second preset identification is the voice audio file, so that whether the audio file is the voice audio file is judged directly by detecting whether the audio file has the second preset identification.
Wherein the voice audio type file includes: voice chat audio files and recorded audio files.
Playing the pre-played audio through a voice playing mode corresponding to the first audio type in the electronic device may specifically be:
loading a firmware program corresponding to a voice playing mode by calling a local sound effect processing chip so as to play the pre-played audio through the voice playing mode corresponding to the first audio type; or calling a part of program modules of the voice output module of the locally installed third-party application program, and outputting the pre-played audio based on the part of program modules of the voice output module of the third-party application program, so that the pre-played audio is played in a voice playing mode corresponding to the first audio type.
The third-party application program may be: WeChat or QQ.
No matter a local sound effect processing chip is adopted, or a part of program modules of a voice output module of a locally installed third-party application program are called, the sound effect of the third party is avoided, such as: dolby, SRS or waves and the like, the process of optimizing the pre-played audio avoids the dynamic range adjustment of the pre-played audio, namely the voice audio, with a larger range amplitude, and ensures the playing effect of the voice audio.
The electronic device disclosed in this embodiment receives an audio playing instruction through the processor, where the audio playing instruction includes a pre-played audio, and when the pre-played audio meets a first preset condition, the pre-played audio is of a first audio type, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the electronic device. According to the scheme, when the pre-played audio is of the first audio type, the voice playing mode is directly called to play the pre-played audio, so that the audio of the first audio type is played in an independent playing mode, the problem that the audio of the first audio type is not suitable for the playing mode of the type is solved, the pre-played audio is played in a mode according with the type, and the playing effect is improved.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A data processing method applied to electronic equipment is characterized by comprising the following steps:
receiving an audio playing instruction, wherein the audio playing instruction comprises pre-played audio;
judging whether the pre-played audio meets a first preset condition or not;
if so, the pre-played audio is of a first audio type, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the electronic device, specifically: loading a firmware program corresponding to a voice playing mode by calling a local sound effect processing chip so as to play the pre-played audio through the voice playing mode corresponding to the first audio type, or calling a partial program module of a voice output module of a locally installed third-party application program and outputting the pre-played audio based on the partial program module of the voice output module of the third-party application program so as to play the pre-played audio through the voice playing mode corresponding to the first audio type;
wherein, judge whether the audio frequency of broadcast in advance accords with first preset condition, if, the audio frequency of broadcast in advance is first audio frequency type, include:
judging whether the sampling rate of the pre-played audio is smaller than a first preset threshold value or not;
and if so, the pre-played audio is a chat audio file.
2. The method of claim 1, further comprising:
when the pre-played audio does not accord with a first preset condition, detecting whether the pre-played audio has a first preset identifier, wherein the first preset identifier is used for marking a recording audio file when the recording audio file is acquired;
if so, the pre-played audio is a recording audio file, and the pre-played audio is played through a voice playing mode in the electronic equipment.
3. The method of claim 2, further comprising:
when the pre-played audio does not have a first preset identifier, detecting the type of the pre-played audio;
and playing the pre-played audio through a playing mode corresponding to the type of the pre-played audio in the electronic equipment according to the type of the pre-played audio.
4. The method according to claim 3, wherein the playing the pre-played audio according to the type of the pre-played audio through a playing mode corresponding to the type of the pre-played audio in the electronic device comprises:
adjusting the dynamic range of the relative loudness of the audio according to the type of the pre-played audio to obtain the adjusted pre-played audio;
and playing the adjusted pre-played audio.
5. The method according to claim 1, wherein the determining whether the pre-played audio meets a first preset condition, if yes, the pre-played audio is of a first audio type, specifically:
judging whether the pre-played audio has a second preset identifier, wherein the second preset identifier is used for marking the voice audio file when the voice audio file is acquired;
if so, the pre-played audio is a voice audio type file, and the voice audio type file comprises: voice chat audio files and recorded audio files.
6. An electronic device, comprising: audio player and processor, wherein:
the audio player is used for playing audio;
the processor receives an audio playing instruction, the audio playing instruction includes a pre-played audio, whether the pre-played audio meets a first preset condition is judged, if yes, the pre-played audio is of a first audio type, and the pre-played audio is played through a voice playing mode corresponding to the first audio type in the audio player, specifically, the method includes: loading a firmware program corresponding to a voice playing mode by calling a local sound effect processing chip so as to play the pre-played audio through the voice playing mode corresponding to the first audio type, or calling a partial program module of a voice output module of a locally installed third-party application program and outputting the pre-played audio based on the partial program module of the voice output module of the third-party application program so as to play the pre-played audio through the voice playing mode corresponding to the first audio type;
wherein, the processor judges whether the pre-played audio accords with a first preset condition, if so, the pre-played audio is of a first audio type, and the method comprises the following steps:
the processor judges whether the sampling rate of the pre-played audio is smaller than a first preset threshold value, and if so, the pre-played audio is a voice chat audio file.
7. The electronic device of claim 6, wherein the processor is further configured to:
when the pre-played audio is judged not to be in accordance with a first preset condition, whether the pre-played audio has a first preset identification or not is detected, the first preset identification is a mark carried out on the recording audio file when the recording audio file is obtained, if yes, the pre-played audio is the recording audio file, and the pre-played audio is played through a voice playing mode in the audio player.
8. The electronic device of claim 7, wherein the processor is further configured to:
and when the pre-played audio is judged not to have the first preset identifier, detecting the type of the pre-played audio, and playing the pre-played audio through a playing mode corresponding to the type of the pre-played audio in the audio player according to the type of the pre-played audio.
9. The electronic device of claim 8, wherein the processor plays the pre-played audio according to the type of the pre-played audio through a play mode corresponding to the type of the pre-played audio in the audio player, and the playing comprises:
and the processor adjusts the dynamic range of the relative loudness of the audio according to the type of the pre-played audio to obtain the adjusted pre-played audio, and the adjusted pre-played audio is played through the audio player.
10. The electronic device of claim 6, wherein the processor determines whether the pre-played audio meets a first preset condition, and if so, the pre-played audio is of a first audio type, specifically:
the processor judges whether the pre-played audio has a second preset identifier, the second preset identifier is used for marking the voice audio file when the voice audio file is acquired, if so, the pre-played audio is a voice audio type file, and the voice audio type file comprises: voice chat audio files and recorded audio files.
CN201610507769.1A 2016-06-29 2016-06-29 A kind of data processing method and electronic equipment Active CN106066782B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610507769.1A CN106066782B (en) 2016-06-29 2016-06-29 A kind of data processing method and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610507769.1A CN106066782B (en) 2016-06-29 2016-06-29 A kind of data processing method and electronic equipment

Publications (2)

Publication Number Publication Date
CN106066782A CN106066782A (en) 2016-11-02
CN106066782B true CN106066782B (en) 2019-11-26

Family

ID=57420638

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610507769.1A Active CN106066782B (en) 2016-06-29 2016-06-29 A kind of data processing method and electronic equipment

Country Status (1)

Country Link
CN (1) CN106066782B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109445863B (en) * 2018-11-01 2021-12-17 郑州云海信息技术有限公司 Data processing method, device, equipment and medium based on FPGA
CN109686371A (en) * 2018-12-25 2019-04-26 广州灵聚信息科技有限公司 A kind of music intelligent playing method and device
CN110891216A (en) * 2019-11-05 2020-03-17 南京中感微电子有限公司 Earphone device
CN111601157B (en) * 2020-05-11 2022-06-14 海信视像科技股份有限公司 Audio output method and display device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920947A (en) * 2006-09-15 2007-02-28 清华大学 Voice/music detector for audio frequency coding with low bit ratio
CN104735528A (en) * 2015-03-02 2015-06-24 青岛海信电器股份有限公司 Sound effect matching method and device
CN105244048A (en) * 2015-09-25 2016-01-13 小米科技有限责任公司 Audio play control method and apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130061279A1 (en) * 2010-05-14 2013-03-07 Panasonic Corporation Digital broadcast reception device and digital broadcast reception method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1920947A (en) * 2006-09-15 2007-02-28 清华大学 Voice/music detector for audio frequency coding with low bit ratio
CN104735528A (en) * 2015-03-02 2015-06-24 青岛海信电器股份有限公司 Sound effect matching method and device
CN105244048A (en) * 2015-09-25 2016-01-13 小米科技有限责任公司 Audio play control method and apparatus

Also Published As

Publication number Publication date
CN106066782A (en) 2016-11-02

Similar Documents

Publication Publication Date Title
US11011178B2 (en) Detecting replay attacks in voice-based authentication
CN103152668B (en) Adjusting method of output audio and system thereof
KR101455710B1 (en) Method and apparatus for audio intelligibility enhancement and computing apparatus
CN106878866B (en) Audio signal processing method and device and terminal
CN106302997B (en) Output control method, electronic equipment and system
US20100158275A1 (en) Method and apparatus for automatic volume adjustment
CN106066782B (en) A kind of data processing method and electronic equipment
CN108449503B (en) Voice call data processing method and device, storage medium and mobile terminal
KR20060110100A (en) Audio data processing apparatus and method therefor
CN110956976B (en) Echo cancellation method, device and equipment and readable storage medium
US10510361B2 (en) Audio processing apparatus that outputs, among sounds surrounding user, sound to be provided to user
CN107147795A (en) A kind of reminding method and mobile terminal
CN108172237B (en) Voice call data processing method and device, storage medium and mobile terminal
CN108418968A (en) Voice communication data processing method, device, storage medium and mobile terminal
US9251803B2 (en) Voice filtering method, apparatus and electronic equipment
CN108449499A (en) Voice communication data processing method, device, storage medium and mobile terminal
WO2020020043A1 (en) Compressor target curve to avoid boosting noise
CN110611862A (en) Microphone gain adjusting method, device, system and storage medium
KR101722686B1 (en) Method and Apparatus for outputting bell sound
CN108449498B (en) Voice call data processing method and device, storage medium and mobile terminal
US9070371B2 (en) Method and system for peak limiting of speech signals for delay sensitive voice communication
CN116132869A (en) Earphone volume adjusting method, earphone and storage medium
JP4495704B2 (en) Sound image localization emphasizing reproduction method, apparatus thereof, program thereof, and storage medium thereof
US11206001B2 (en) Inference and correction of automatic gain compensation
EP2849181A1 (en) Voice filtering method, apparatus and electronic equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant