CN110297543B - Audio playing method and terminal equipment - Google Patents

Audio playing method and terminal equipment Download PDF

Info

Publication number
CN110297543B
CN110297543B CN201910578771.1A CN201910578771A CN110297543B CN 110297543 B CN110297543 B CN 110297543B CN 201910578771 A CN201910578771 A CN 201910578771A CN 110297543 B CN110297543 B CN 110297543B
Authority
CN
China
Prior art keywords
information
audio
playing
audio information
environment
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
CN201910578771.1A
Other languages
Chinese (zh)
Other versions
CN110297543A (en
Inventor
覃宝强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201910578771.1A priority Critical patent/CN110297543B/en
Publication of CN110297543A publication Critical patent/CN110297543A/en
Application granted granted Critical
Publication of CN110297543B publication Critical patent/CN110297543B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/011Arrangements for interaction with the human body, e.g. for user immersion in virtual reality
    • 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
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11BINFORMATION STORAGE BASED ON RELATIVE MOVEMENT BETWEEN RECORD CARRIER AND TRANSDUCER
    • G11B20/00Signal processing not specific to the method of recording or reproducing; Circuits therefor
    • G11B20/10Digital recording or reproducing
    • G11B20/10527Audio or video recording; Data buffering arrangements
    • G11B2020/10537Audio or video recording
    • G11B2020/10546Audio or video recording specifically adapted for audio data
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Circuit For Audible Band Transducer (AREA)

Abstract

The invention relates to the technical field of communication, and provides an audio playing method and terminal equipment to solve the problem of poor playing effect. The method comprises the following steps: determining environmental characteristic information of an environment where the terminal equipment is located according to the first information, wherein the first information comprises at least one of target audio information and distance information measured by at least two ultrasonic sensors in the terminal equipment, and the target audio information comprises the first audio information and recording information obtained by playing the first audio information under the environment and recording; determining an audio playing parameter value based on the environment characteristic information; and playing the audio information to be played according to the audio playing parameter value. Because the environment characteristic information is determined by at least one of the target audio information and the distance information measured in the environment, and the audio playing parameter value is determined according to the environment characteristic information, the audio playing parameter value can be accurately adapted to the environment where the terminal equipment is located, the audio playing parameter value is used for playing, and the playing effect can be improved.

Description

Audio playing method and terminal equipment
Technical Field
The present invention relates to the field of computer technologies, and in particular, to an audio playing method, a terminal device, and a computer-readable storage medium.
Background
With the rapid development of computer technology, the functions of terminal devices are more and more powerful, and the requirements of users on the terminal devices are higher and higher. The playing of sound is a common function of the terminal device, for example, music playing can be performed by using the terminal device.
In the process of playing sound, the current terminal equipment plays sound according to default sound parameters or parameters manually set by a user. However, in different situations, the default sound parameters are used for playing, which easily results in poor playing effect. If the parameters manually set by the user are used for playing, the parameters are not only manually set by the user, but also subjectivity is provided for the user, and the set parameters cannot be accurately adapted to the environment, so that the playing effect is poor.
Disclosure of Invention
The embodiment of the invention provides an audio playing method, terminal equipment and a computer readable storage medium, which aim to solve the problem of poor sound playing effect in the prior art.
In order to solve the technical problem, the invention is realized as follows:
in a first aspect, an embodiment of the present invention provides an audio playing method, which is applied to a terminal device, and includes:
determining environmental characteristic information of the environment where the terminal equipment is located according to first information, wherein the first information comprises at least one of the following items: target audio information and distance information measured by at least two ultrasonic sensors in the terminal equipment under the environment, wherein the target audio information comprises first audio information and recording information obtained by playing and recording the first audio information under the environment, and the distance information comprises the distance between each ultrasonic sensor and a first object in the ultrasonic signal emission direction of the ultrasonic sensor;
determining an audio playing parameter value based on the environment characteristic information;
and performing audio playing on the audio information to be played according to the audio playing parameter value.
In a second aspect, an embodiment of the present invention further provides an audio playing terminal device, including:
an environment characteristic information determining module, configured to determine, according to first information, environment characteristic information of an environment where the terminal device is located, where the first information includes at least one of: target audio information and distance information measured by at least two ultrasonic sensors in the terminal equipment under the environment, wherein the target audio information comprises first audio information and recording information obtained by playing and recording the first audio information under the environment, and the distance information comprises the distance between each ultrasonic sensor and a first object in the ultrasonic signal emission direction of the ultrasonic sensor;
the parameter determining module is used for determining the audio playing parameter value based on the environment characteristic information;
and the playing module is used for carrying out audio playing on the audio information to be played according to the audio playing parameter value.
In a third aspect, an embodiment of the present invention further provides a terminal device, including: the audio playing method comprises a memory and a processor, wherein the memory stores a computer program, and the processor realizes the steps of the audio playing method provided by the embodiment of the invention when executing the computer program.
In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements the steps in the audio playing method provided in the embodiment of the present invention.
In the audio playing method of the embodiment of the present invention, at first, according to at least one item of target audio information and distance information measured by at least two ultrasonic sensors in the terminal device in the environment, environment characteristic information corresponding to the terminal device is determined, where the target audio information includes first audio information and recording information obtained by playing and recording the first audio information in the environment, and the distance information includes a distance between each ultrasonic sensor and a first object in an ultrasonic signal emission direction of the ultrasonic sensor. And then, determining an audio playing parameter required for playing the audio information to be played by utilizing the environment characteristic information, wherein the determined environment characteristic information is related to the recording information when the first audio information is played in the environment and the distance information measured by the ultrasonic sensor in the environment, so that the audio playing parameter value can be accurately adapted to the environment where the terminal equipment is located, the audio playing parameter value is used for playing, and the playing effect can be improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive exercise.
Fig. 1 is a flowchart of a chat group creation method according to an embodiment of the present invention;
fig. 2 is a second flowchart of a chat group creation method according to an embodiment of the present invention;
fig. 3 is a schematic block diagram of a terminal device according to an embodiment of the present invention.
Fig. 4 is a schematic diagram of a hardware structure of a terminal device according to an embodiment of the present invention.
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 some, not all, embodiments of the present invention. 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 provides an audio playing method of an embodiment, which is applied to terminal equipment, and as shown in fig. 1, the method comprises the following steps:
step 101: and determining the environmental characteristic information of the environment where the terminal equipment is located according to the first information.
The first information includes at least one of: the target audio information comprises first audio information and recording information obtained by playing the first audio information and recording in the environment, and the distance information comprises the distance between each ultrasonic sensor and a first object in the ultrasonic signal emission direction of the ultrasonic sensor. That is, each ultrasonic sensor measures a distance, and the distances correspond to the ultrasonic sensors one by one, that is, the distance information includes the distances between at least two ultrasonic sensors and the first object in the ultrasonic signal emission direction of the ultrasonic sensors. In the process of distance measurement, each ultrasonic sensor firstly transmits an ultrasonic signal, if a first object (which can be understood as an entity capable of generating reflection on the ultrasonic signal) exists in the ultrasonic signal transmitting direction, the ultrasonic signal is incident to the first object and is reflected back, the ultrasonic sensor can receive the ultrasonic reflection signal of the transmitted ultrasonic signal reflected by the first object, and the ultrasonic sensor can determine the distance between the ultrasonic sensor and the first object in the direction of transmitting the ultrasonic signal by itself according to the transmitted ultrasonic signal and the ultrasonic reflection signal.
For example, in an example, the environment characteristic information may include at least one of a size and a shape of a space, and the size and the shape of the space are different in different environments. The terminal equipment plays audio by the same playing parameters under different environments, the playing effects are different, the playing effect is better under some environments, but the playing effect is not good under other environments. Therefore, in the audio playing process, the environmental characteristic information of the environment where the terminal equipment is located can be determined firstly, and the playing of the audio is controlled by utilizing the environmental characteristic information. In this embodiment, the environment characteristic information of the environment where the terminal device is located may be determined according to first audio information and recording information obtained by playing and recording the first audio information in the environment. The environmental characteristic information of the environment where the terminal device is located can also be determined according to the distance information measured by at least two ultrasonic sensors in the terminal device in the environment. The environmental characteristic information of the environment where the terminal equipment is located can be determined according to the first audio information, the recording information obtained by playing and recording the first audio information in the environment and the distance information measured by the at least two ultrasonic sensors in the environment. The recording information obtained in different environments is different, and the distance information is also different, namely, the recording information in the target audio information and the distance information measured by at least two ultrasonic sensors in the terminal equipment are both related to the environment where the terminal equipment is located, so that the environmental characteristic information of the environment where the terminal equipment is located can be accurately determined through the target audio information and the distance information.
Step 102: and determining the audio playing parameter value based on the environment characteristic information.
Step 103: and carrying out audio playing on the audio information to be played according to the audio playing parameter value.
After determining the environmental characteristic information of the environment where the terminal device is located, the environmental characteristic information may be used to determine an audio playing parameter, where different audio playing parameter values have different playing effects, in this embodiment, the audio playing parameter value is determined based on the environmental characteristic information, so that the audio playing parameter value is adapted to the environment, and the audio information to be played is played by using the audio playing parameter, which may improve the playing effect of the terminal device in the environment of the environmental characteristic information.
In the audio playing method of the embodiment of the present invention, at first, according to at least one item of target audio information and distance information measured by at least two ultrasonic sensors in the terminal device in the environment, environment characteristic information corresponding to the terminal device is determined, where the target audio information includes first audio information and recording information obtained by playing and recording the first audio information in the environment, and the distance information includes a distance between each ultrasonic sensor and a first object in an ultrasonic signal emission direction of the ultrasonic sensor. And then, determining an audio playing parameter required for playing the audio information to be played by utilizing the environment characteristic information, wherein the determined environment characteristic information is related to the recording information when the first audio information is played in the environment and the distance information measured by the ultrasonic sensor in the environment, so that the audio playing parameter value can be accurately adapted to the environment where the terminal equipment is located, the audio playing parameter value is used for playing, and the playing effect can be improved.
In the embodiment of the present invention, the audio playing method may be applied to a terminal device, for example: a Mobile phone, a Tablet Personal Computer (Tablet Personal Computer), a Laptop Computer (Laptop Computer), a Personal Digital Assistant (PDA), a Mobile Internet Device (MID), a Wearable Device (Wearable Device), or the like.
In one embodiment, determining the audio playback parameter value based on the environmental characteristic information includes: determining a target play mode matched with the environmental characteristic information from at least two preset play modes; and determining a pre-stored playing parameter value corresponding to the target playing mode as an audio playing parameter value.
The terminal equipment is provided with at least two preset playing modes (which can be understood as playing sound effect), different preset playing modes correspond to different playing parameter values, and corresponding playing effects are different when audio playing is carried out in different preset playing modes. After the environmental characteristic information corresponding to the terminal device is determined, a target playing mode matched with the environmental characteristic information can be determined from at least two preset playing modes, and then a pre-stored playing parameter value corresponding to the target playing mode is determined as an audio playing parameter value, so that the audio information to be played is played by using the pre-stored playing parameter value corresponding to the target playing mode, and the audio information to be played can be understood as being played by using the target playing mode. Therefore, the terminal equipment can adaptively switch the playing mode according to the environmental characteristic information so as to adapt to the target playing mode of the environment to play audio and improve the playing effect.
In one embodiment, before determining the environment characteristic information of the environment where the terminal device is located according to the first information, the method includes: and playing the first audio information under the environment, and recording to obtain recording information, wherein the starting time of recording is earlier than or equal to the playing starting time of the first audio information. Determining environmental characteristic information of the environment where the terminal equipment is located according to the first information, wherein the determining comprises the following steps: determining echo information corresponding to the first audio information in the sound recording information; determining a value of a first parameter based on the echo information and the first audio information; and determining the environmental characteristic information corresponding to the terminal equipment according to the value of the first parameter. That is, as shown in fig. 2, in this embodiment, an audio playing method is provided, which is applied to a terminal device, and the method includes:
step 201: and playing the first audio information under the environment, and recording to obtain recording information.
The terminal equipment plays the first audio information in the environment, and records the audio information to obtain the recording information, wherein the starting time of the recording is earlier than or equal to the playing starting time of the first audio information.
The recording can be started while the first audio information is controlled, or the voice is started before the first audio information is played, so that the recording is not later than the starting time of playing the first audio information, and accurate recording can be ensured. The recording can be carried out in real time, and can be carried out periodically, so that the resource consumption is avoided. In one example, the first audio information may be music audio information or ultrasonic audio information. In one example, the first audio information and the audio information to be played may belong to the same source audio, that is, the source audio includes the first audio information and the audio information to be played, the first audio information and echo information thereof may be played first, and after determining the audio playing parameter, the audio information to be played is played according to the audio playing parameter.
Step 202: echo information corresponding to the first audio information in the sound recording information is determined.
The echo information may be understood as a reflected audio frequency of the first audio information reflected by the external environment, the recording information may include not only the echo information but also the environmental sound, and the echo information corresponding to the first audio information may be determined from the recording information. In one example, echo information corresponding to the first audio information may be separated from the sound recording information according to a characteristic of the first audio information.
Step 203: a value of the first parameter is determined based on the echo information and the first audio information.
The first parameter is a parameter for measuring a difference between the echo information and the first audio information, that is, a difference existing between the echo information and the first audio information can be measured by the first parameter. In one example, the first parameter may include a volume difference between a volume level of the echo information and a volume level of the first audio information and a time difference between a start time of the echo information (which may be understood as a time when the echo information is received) and a play start time of the first audio information (which may be understood as a time when the first audio information starts to be played).
Step 204: and determining the environmental characteristic information corresponding to the terminal equipment according to the value of the first parameter.
Because the first parameter can measure the difference between the echo information and the first audio information, the environment characteristic information corresponding to the terminal equipment can be determined according to the value of the first parameter. For example, the spatial size of the environment or/and the shape of the environment, etc. may be determined.
Step 205: and determining the audio playing parameter value based on the environment characteristic information.
Step 206: and carrying out audio playing on the audio information to be played according to the audio playing parameter value.
The steps 205 and 206 correspond to the steps 102 and 103 one by one, and are not described herein again.
Different spaces may have different echo effects, also called reverberation effects, depending on the size of the space, the sound absorption and reflection materials, and the values of the first parameter may be different, for example, the delays (i.e., time differences) of the echoes may be different, and the volumes may be different. So that the environmental characteristics (e.g., the size and shape of the space, etc.) can be judged according to the value of the first parameter. Specifically, when the playing is started, the recording can be started simultaneously, the recorded return information in the recording information is compared with the played first audio information, the reverberation effect is analyzed, the characteristics of the current environment are judged, the audio playing parameter value is determined according to the characteristics, and the playing effect is adjusted. For example, if the sound is determined to be a relatively closed space, the reverberation effect may not be added to the playing effect (i.e., the audio playing parameter may not include the reverberation parameter, which is a parameter required for realizing reverberation, such as decay time, delay time of front reflection, high and low frequency cut-off, reverberation density, early reflection volume, stereo width, etc.), because the space may cause the played sound to generate the reverberation effect. Otherwise, if it is an open place, it is not.
In one embodiment, the first audio information comprises ultrasonic audio information and second audio information.
In this embodiment, determining the value of the first parameter based on the echo information and the first audio information includes: filtering first part of echo information corresponding to second audio information in the echo information to obtain second part of echo information corresponding to the ultrasonic audio information; and determining the value of the first parameter according to the second part of echo information and the ultrasonic audio information.
The second audio information may be sound audible to human ears, for example, music audio information, and the ultrasonic audio information is inserted in the playing, that is, the ultrasonic audio information is inserted in the second audio information, and after recording, only the ultrasonic audio information is analyzed and compared, and the ultrasonic audio information is information that cannot be heard by human ears, so that the insertion of the ultrasonic audio information into the second audio information is not detected, and thus the listening of the user is not affected. In addition, the ultrasonic audio information can be selected by self, the comparison process of the ultrasonic audio information and the second part of echo information is relatively simple, and the subsequent comparison analysis is facilitated.
In one example, the first parameter may include a volume difference between a volume level of the second partial echo information and a volume level of the first audio information, and a time difference between a start time of the second partial echo information (which may be understood as a time at which the second partial echo information is received) and a play start time of the first audio information (which may be understood as a time at which the first audio information starts to be played).
In one embodiment, the first audio information includes at least two sub-audio information, each corresponding to a different frequency.
In this embodiment, after determining the echo information corresponding to the first audio information in the sound recording information, the method further includes: acquiring at least two pieces of sub-echo information corresponding to at least two pieces of sub-audio information in echo information; and determining the value of the second parameter based on the frequencies of the at least two pieces of sub-audio information and the frequencies of the at least two pieces of sub-echo information.
The audio playing of the audio information to be played according to the audio playing parameter value comprises: and performing audio playing on the audio information to be played according to the value of the second parameter and the audio playing parameter value.
The sub-audio information corresponds to the sub-echo information one to one, the difference between the frequency of the audio information and the frequency of the sub-echo information corresponding to the audio information can measure the attenuation degree of the frequency, so that the value of a second parameter can be determined according to the frequencies of at least two sub-audio information and the frequencies of at least two sub-echo information, and the value of the second parameter is determined based on the difference between the frequency of the audio information and the frequency of the sub-echo information corresponding to the audio information. In one example, the second parameters may include Equalizer (EQ) parameters, i.e., parameters required by the equalizer to achieve the adjustment of the frequency components.
For the situation that the position of the terminal device is fixed, the recording judgment can be performed by first playing the first audio information (e.g. noise) with richer frequency components, and the mode of playing music after setting the playing effect suitable for the current environment is good can be adopted. In this way, the noise can be freely chosen and the frequency content can be richer, such as white noise, pink noise or swept tone sources. By adopting the noise with rich frequency components, not only can the environment characteristic information be determined, but also the attenuation degree of the environment to each frequency can be analyzed, so that the EQ parameters suitable for the playing of the environment can be adaptively adjusted, namely the gain value of each frequency is adjusted, the frequency response of the space can be improved, the playing effect is improved, and better and richer listening experience is brought to a user.
Specifically, before the audio to be played can be played, the noise judgment is performed first, that is, the noise with the time length of T can be played first, and the recording is performed. Because of echo delay problems, the duration of the recording should be longer than the duration of the played noise. The played noise needs to have difference before and after and during the process so as to be better and more accurate to analyze. And determining environmental characteristic information according to the comparison between the echo information corresponding to the noise in the recording information and the noise, and playing the music after adjusting the proper play EQ parameter and the play sound effect suitable for the current space. This is suitable for situations where the playback device is not moving, such as when the user is in the bathroom, in the kitchen, in the living room, etc. When the terminal equipment moves from the position A to the position B, a user can conveniently adjust the playing sound effect at any time, namely, the sound effect suitable for the position A is adjusted to the sound effect suitable for the position B.
In one embodiment, the terminal device has at least two ultrasonic sensors, and the orientation of each ultrasonic sensor is different.
In this embodiment, before determining the environment characteristic information of the environment where the terminal device is located according to the first information, the method includes: and acquiring distance information measured by at least two ultrasonic sensors under the environment.
The ultrasonic sensors are arranged in different directions of the terminal equipment, and because the directions of the ultrasonic sensors are different, namely, each ultrasonic sensor has a corresponding direction, and each ultrasonic sensor performs distance measurement in the corresponding direction in the environment, the terminal equipment can acquire the distance information measured in the corresponding direction by at least two ultrasonic sensors in the environment, and accordingly, the environmental characteristic information of the environment where the terminal equipment is located is determined. The characteristics of the ultrasonic sensor for detecting the environment are utilized, and the method is simple and convenient.
In one example, the ultrasonic sensor may include an infrared transceiver or/and a distance sensor. Infrared is a commonly used light source, and is an invisible light source. The infrared sensor can be used for measuring the distance, the infrared sensor can be arranged on each direction of the equipment, the distance of each direction and other directions can be measured respectively, and environmental characteristic information such as the size and the shape of a space can be estimated according to the measured distance. And then, the playing effect of the terminal equipment is adaptively adjusted according to the environment characteristic information, so that the playing effect is improved, and a user can obtain a better listening effect in the environment. The ultrasonic sensor is used for measuring the distance, the environment characteristic information is determined according to the distance, the playing effect is determined according to the environment characteristic information, and the playing of the terminal equipment cannot be interfered.
In summary, the environment has a great influence on the played effect, for example, the playing effect in a bathroom with a small space and the playing effect in a living room with a large space are greatly different, and the playing effect in the indoor space is different from that in the outdoor space. These differences are caused by the size of the space and the reflection effect of the space on sound and the sound absorption effect of the space material. However, it has also been found that different terminal devices play the same music in the same space, and the listening experience obtained by the user is also different. Obviously, besides the influence of the space itself on the music, the playing sound effect of the terminal device should also be different according to the environmental characteristic information. However, the playing sound effect of the current terminal equipment is relatively fixed and single. The audio playing method provided by the embodiment of the invention can properly adjust the playing sound effect in time according to the characteristics of the playing space (namely the environmental characteristic information of the environment), thereby improving the playing effect and enabling a user to obtain better music listening experience.
For example, when a user plays in an empty and closed space, the space will generate significant reverberation, so that it is unnecessary to add or weaken the reverberation effect to the playing effect. When a user is in a closed space with more things, the things in the space may absorb sound, reducing the sound of a certain frequency or frequencies, and the frequencies can be increased to compensate for the playing effect. When a user is in an open space, such as outdoors, the high frequency can be properly improved, the sound penetrability is increased, and the user can sound louder. The low and medium frequency can be improved when the device is indoors, so that a user can obtain a shocking effect. In addition, the scheme provided by the embodiment of the invention only uses the resources of the terminal equipment, and does not increase the hardware cost additionally.
As shown in fig. 3, the present invention further provides a terminal device 300 of an embodiment, including:
an environment characteristic information determining module 301, configured to determine, according to first information, environment characteristic information of an environment where the terminal device is located, where the first information includes at least one of the following: target audio information and distance information measured by at least two ultrasonic sensors in the terminal equipment under the environment, wherein the target audio information comprises first audio information and recording information obtained by playing and recording the first audio information under the environment, and the distance information comprises the distance between each ultrasonic sensor and a first object in the ultrasonic signal emission direction of the ultrasonic sensor;
a parameter determining module 302, configured to determine an audio playing parameter value based on the environment characteristic information;
the playing module 303 is configured to perform audio playing on the audio information to be played according to the audio playing parameter value.
In one embodiment, the parameter determination module includes:
the playing mode determining module is used for determining a target playing mode matched with the environmental characteristic information from at least two preset playing modes;
and the audio playing parameter determining module is used for determining a pre-stored playing parameter value corresponding to the target playing mode as an audio playing parameter value.
In one embodiment, the terminal device further includes:
the recording module is used for playing the first audio information in the environment and recording to obtain recording information, wherein the starting time of recording is earlier than or equal to the playing starting time of the first audio information;
the environment characteristic information determination module includes:
the echo determining module is used for determining echo information corresponding to the first audio information in the sound recording information;
the first parameter determining module is used for determining the value of the first parameter based on the echo information and the first audio information;
and the first determining module is used for determining the environmental characteristic information corresponding to the terminal equipment according to the value of the first parameter.
In one embodiment, the first audio information comprises ultrasonic audio information and second audio information;
a first parameter determination module comprising:
the filtering module is used for filtering a first part of echo information corresponding to second audio information in the echo information to obtain a second part of echo information corresponding to the ultrasonic audio information;
and the second determining module is used for determining the value of the first parameter according to the second part of echo information and the ultrasonic audio information.
In one embodiment, the first audio information includes at least two sub-audio information, each corresponding to a different frequency;
the terminal equipment still includes:
the sub information acquisition module is used for acquiring at least two pieces of sub echo information corresponding to at least two pieces of sub audio information in the echo information;
the second parameter determining module is used for determining the value of a second parameter based on the frequencies of the at least two pieces of sub-audio information and the frequencies of the at least two pieces of sub-echo information;
the playing module is configured to perform audio playing on the audio information to be played according to the audio playing parameter value, and includes: and performing audio playing on the audio information to be played according to the value of the second parameter and the audio playing parameter value.
In one embodiment, the orientation of each ultrasonic sensor is different;
the terminal equipment still includes:
the distance information acquisition module is used for acquiring distance information measured by at least two ultrasonic sensors;
the technical features in the terminal device provided in the embodiment of the present invention correspond to the technical features in the audio playing method, and each process of the audio playing method is implemented by the terminal device, and the same effect can be obtained.
Fig. 4 is a schematic diagram of a hardware structure of a terminal device 400 for implementing various embodiments of the present invention, where the terminal device 400 includes, but is not limited to: radio frequency unit 401, network module 402, audio output unit 403, input unit 404, sensor 405, display unit 406, user input unit 407, interface unit 408, memory 409, processor 410, and power supply 411. Those skilled in the art will appreciate that the terminal device configuration shown in fig. 4 does not constitute a limitation of the terminal device, and that the terminal device may include more or fewer components than shown, or combine certain components, or a different arrangement of components. In the embodiment of the present invention, the terminal device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal device, a wearable device, a pedometer, and the like.
The processor 410 is configured to determine environmental characteristic information of an environment where the terminal device is located according to first information, where the first information includes at least one of: target audio information and distance information measured by at least two ultrasonic sensors in the terminal equipment under the environment, wherein the target audio information comprises first audio information and recording information obtained by playing and recording the first audio information under the environment; determining an audio playing parameter value based on the environment characteristic information; and carrying out audio playing on the audio information to be played according to the audio playing parameter value.
According to the terminal equipment of the embodiment of the invention, the environmental characteristic information corresponding to the terminal equipment is firstly determined according to the target audio information and at least one item of the distance information measured by at least two ultrasonic sensors in the terminal equipment under the environment, the audio playing parameter required for playing the audio information to be played is determined by utilizing the environmental characteristic information, and the audio playing parameter value can be accurately adapted to the environment where the terminal equipment is located due to the fact that the audio playing parameter value is determined according to the environmental characteristic information, the audio playing parameter value is used for playing, and the playing effect can be improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 may be used for receiving and sending signals during a message sending and receiving process or a call process, and specifically, receives downlink data from a base station and then processes the received downlink data to the processor 410; in addition, the uplink data is transmitted to the base station. Typically, radio unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. Further, the radio unit 401 can also communicate with a network and other devices through a wireless communication system.
The terminal device provides wireless broadband internet access to the user through the network module 402, such as helping the user send and receive e-mails, browse web pages, and access streaming media.
The audio output unit 403 may convert audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output as sound. Also, the audio output unit 403 may also provide audio output related to a specific function performed by the terminal apparatus 400 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
The input unit 404 is used to receive audio or video signals. The input Unit 404 may include a Graphics Processing Unit (GPU) 4041 and a microphone 4042, and the Graphics processor 4041 processes image data of still pictures or videos obtained by an image capturing terminal device (such as a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 406. The image frames processed by the graphic processor 4041 may be stored in the memory 409 (or other storage medium) or transmitted via the radio frequency unit 401 or the network module 402. The microphone 4042 may receive sound, and may be capable of processing such sound into audio data. The processed audio data may be converted into a format output transmittable to a mobile communication base station via the radio frequency unit 401 in case of the phone call mode.
The terminal device 400 further comprises at least one sensor 405, such as light sensors, motion sensors and other sensors. Specifically, the light sensor includes an ambient light sensor that adjusts the brightness of the display panel 4091 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 4091 and/or a backlight when the terminal device 400 is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally three axes), detect the magnitude and direction of gravity when stationary, and can be used to identify the terminal device posture (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration identification related functions (such as pedometer, tapping), and the like; the sensors 405 may also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be described in detail herein.
The display unit 406 is used to display information input by the user or information provided to the user. The Display unit 406 may include a Display panel 4061, and the Display panel 4061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
The user input unit 407 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the terminal device. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. Touch panel 4071, also referred to as a touch screen, may collect touch operations by a user on or near it (e.g., operations by a user on or near touch panel 4071 using a finger, a stylus, or any suitable object or attachment). The touch panel 4071 may include two parts, a touch detection terminal device and a touch controller. The touch detection terminal equipment detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection terminal device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 410, receives a command sent by the processor 410, and executes the command. In addition, the touch panel 4071 can be implemented by using various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may include other input devices 4072. Specifically, the other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a track ball, a mouse, and a joystick, which are not described herein again.
Further, the touch panel 4071 can be overlaid on the display panel 4061, and when the touch panel 4071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 410 to determine the type of the touch event, and then the processor 410 provides a corresponding visual output on the display panel 4061 according to the type of the touch event. Although in fig. 4, the touch panel 4071 and the display panel 4061 are two independent components to implement the input and output functions of the terminal device, in some embodiments, the touch panel 4071 and the display panel 4061 may be integrated to implement the input and output functions of the terminal device, which is not limited herein.
The interface unit 408 is an interface for connecting an external terminal device with the terminal device 400. For example, the external terminal device may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a terminal device having an identification module, an audio input/output (I/O) port, a video I/O port, an earphone port, and the like. The interface unit 408 may be used to receive input (e.g., data information, power, etc.) from an external terminal device and transmit the received input to one or more elements within the terminal device 400 or may be used to transmit data between the terminal device 400 and an external terminal device.
The memory 409 may be used to store software programs as well as various data. The memory 409 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 409 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 410 is a control center of the terminal device, connects various parts of the entire terminal device by using various interfaces and lines, and performs various functions of the terminal device and processes data by operating or executing software programs and/or modules stored in the memory 409 and calling data stored in the memory 409, thereby performing overall monitoring of the terminal device. Processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 410.
The terminal device 400 may further include a power supply 411 (e.g., a battery) for supplying power to various components, and preferably, the power supply 411 may be logically connected to the processor 410 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system.
In addition, the terminal device 400 includes some functional modules that are not shown, and are not described in detail herein.
The embodiment of the present invention further provides a terminal device, which includes a processor and a memory, where the memory stores a computer program that can run on the processor, and when the computer program is executed by the processor, the computer program implements each process in the above-mentioned audio playing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, the description is omitted here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the computer program implements each process of the above-mentioned audio playing method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here. The computer-readable storage medium may be a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or terminal that comprises the element.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present invention.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
While the present invention has been described with reference to the particular illustrative embodiments, it is to be understood that the invention is not limited to the disclosed embodiments, but is intended to cover various modifications, equivalent arrangements, and equivalents thereof, which may be made by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. An audio playing method is applied to terminal equipment and is characterized by comprising the following steps:
determining environmental characteristic information of the environment where the terminal equipment is located according to first information, wherein the first information comprises: target audio information or target audio information and distance information measured by at least two ultrasonic sensors in the terminal equipment under the environment, wherein the target audio information comprises first audio information and recording information obtained by playing and recording the first audio information under the environment, and the distance information comprises the distance between each ultrasonic sensor and a first object in the ultrasonic signal emission direction of the ultrasonic sensor;
determining an audio playing parameter value based on the environment characteristic information;
performing audio playing on the audio information to be played according to the audio playing parameter value;
before determining the environmental characteristic information of the environment where the terminal device is located according to the first information, the method includes:
playing first audio information in the environment, and recording to obtain recording information, wherein the recording start time is earlier than or equal to the playing start time of the first audio information, and the first audio information and the audio information to be played belong to the same source audio;
the determining the environmental characteristic information of the environment where the terminal device is located according to the first information includes:
determining echo information corresponding to the first audio information in the recording information;
determining a value of a first parameter based on the echo information and the first audio information, wherein the first parameter is a parameter for measuring a difference between the echo information and the first audio information, and the first parameter includes a volume difference between a volume of the echo information and a volume of the first audio information, and a time difference between a start time of the echo information and a play start time of the first audio information;
and determining the environmental characteristic information corresponding to the terminal equipment according to the value of the first parameter.
2. The method of claim 1, wherein the first audio information comprises ultrasonic audio information and second audio information;
the determining a value of a first parameter based on the echo information and the first audio information comprises:
filtering a first part of echo information corresponding to the second audio information in the echo information to obtain a second part of echo information corresponding to the ultrasonic audio information;
and determining the value of the first parameter according to the second part of echo information and the ultrasonic audio information.
3. The method according to claim 1, wherein the first audio information comprises at least two sub-audio information, each of the sub-audio information corresponding to a different frequency;
after determining the echo information corresponding to the first audio information in the recording information, the method further includes: acquiring at least two pieces of sub-echo information corresponding to the at least two pieces of sub-audio information in the echo information; determining a value of a second parameter based on the frequencies of the at least two sub-audio information and the frequencies of the at least two sub-echo information;
the audio playing of the audio information to be played according to the audio playing parameter value comprises: and performing audio playing on the audio information to be played according to the value of the second parameter and the audio playing parameter value.
4. The method of claim 1, wherein the orientation of each of the ultrasonic sensors is different;
before determining the environmental characteristic information of the environment where the terminal device is located according to the first information, the method includes:
and acquiring distance information measured by the at least two ultrasonic sensors under the environment.
5. An audio playback terminal device, comprising:
an environment characteristic information determining module, configured to determine environment characteristic information of an environment where the terminal device is located according to first information, where the first information includes: target audio information or target audio information and distance information measured by at least two ultrasonic sensors in the terminal equipment under the environment, wherein the target audio information comprises first audio information and recording information obtained by playing and recording the first audio information under the environment, and the distance information comprises the distance between each ultrasonic sensor and a first object in the ultrasonic signal emission direction of the ultrasonic sensor;
the parameter determining module is used for determining an audio playing parameter value based on the environment characteristic information;
the playing module is used for carrying out audio playing on the audio information to be played according to the audio playing parameter value;
the terminal device further includes:
the recording module is used for playing first audio information in the environment and recording to obtain recording information, wherein the starting time of recording is earlier than or equal to the playing starting time of the first audio information, and the first audio information and the audio information to be played belong to the same source audio;
the environment characteristic information determination module comprises:
the echo determining module is used for determining echo information corresponding to the first audio information in the sound recording information;
a first parameter determining module, configured to determine a value of a first parameter based on the echo information and the first audio information, where the first parameter is a parameter for measuring a difference between the echo information and the first audio information, and the first parameter includes a difference between a volume of the echo information and a volume of the first audio information, and a time difference between a start time of the echo information and a play start time of the first audio information;
and the first determining module is used for determining the environmental characteristic information corresponding to the terminal equipment according to the value of the first parameter.
6. The terminal device of claim 5, wherein the first audio information comprises ultrasonic audio information and second audio information;
the first parameter determination module includes:
the filtering module is used for filtering a first part of echo information corresponding to the second audio information in the echo information to obtain a second part of echo information corresponding to the ultrasonic audio information;
and the second determining module is used for determining the value of the first parameter according to the second part of echo information and the ultrasonic audio information.
7. The terminal device according to claim 5, wherein the first audio information comprises at least two sub-audio information, and the frequency of each sub-audio information is different;
the terminal device further includes:
a sub information obtaining module, configured to obtain at least two sub echo information corresponding to the at least two sub audio information in the echo information;
a second parameter determining module, configured to determine a value of a second parameter based on the frequencies of the at least two pieces of sub audio information and the frequencies of the at least two pieces of sub echo information;
and the playing module is used for processing the audio information to be played according to the value of the second parameter and the audio playing parameter value, obtaining the target playing sound information and playing the target playing sound information.
8. The terminal device of claim 5, wherein the orientation of each of the ultrasonic sensors is different;
the terminal device further includes:
and the distance information acquisition module is used for acquiring the distance information measured by the at least two ultrasonic sensors in the positions.
9. A terminal device, comprising: a memory storing a computer program and a processor implementing the steps in the audio playback method as claimed in any one of claims 1 to 4 when executing the computer program.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the audio playback method according to one of claims 1 to 4.
CN201910578771.1A 2019-06-28 2019-06-28 Audio playing method and terminal equipment Active CN110297543B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910578771.1A CN110297543B (en) 2019-06-28 2019-06-28 Audio playing method and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910578771.1A CN110297543B (en) 2019-06-28 2019-06-28 Audio playing method and terminal equipment

Publications (2)

Publication Number Publication Date
CN110297543A CN110297543A (en) 2019-10-01
CN110297543B true CN110297543B (en) 2022-05-20

Family

ID=68029507

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910578771.1A Active CN110297543B (en) 2019-06-28 2019-06-28 Audio playing method and terminal equipment

Country Status (1)

Country Link
CN (1) CN110297543B (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412761A (en) * 2021-05-27 2022-11-29 Oppo广东移动通信有限公司 Sound effect matching method and device, multimedia playing equipment and storage medium
CN114071220B (en) * 2021-11-04 2024-01-19 深圳Tcl新技术有限公司 Sound effect adjusting method and device, storage medium and electronic equipment
CN118138953B (en) * 2024-04-30 2024-08-13 山西尊特智能科技有限公司 Intelligent Bluetooth sound box control system and method with self-adaptation function

Family Cites Families (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101196751B1 (en) * 2012-04-23 2012-11-07 엘지전자 주식회사 Mobile terminal and control method thereof
US9271102B2 (en) * 2012-08-16 2016-02-23 Turtle Beach Corporation Multi-dimensional parametric audio system and method
KR20140114238A (en) * 2013-03-18 2014-09-26 삼성전자주식회사 Method for generating and displaying image coupled audio
US20150205572A1 (en) * 2014-01-20 2015-07-23 Nvidia Corporation Determination and application of audio processing presets in handheld devices
GB2543276A (en) * 2015-10-12 2017-04-19 Nokia Technologies Oy Distributed audio capture and mixing
CN106612482B (en) * 2015-10-23 2020-06-19 中兴通讯股份有限公司 Method for adjusting audio parameters and mobile terminal
US10321258B2 (en) * 2017-04-19 2019-06-11 Microsoft Technology Licensing, Llc Emulating spatial perception using virtual echolocation
US10264380B2 (en) * 2017-05-09 2019-04-16 Microsoft Technology Licensing, Llc Spatial audio for three-dimensional data sets
CN108305603B (en) * 2017-10-20 2021-07-27 腾讯科技(深圳)有限公司 Sound effect processing method and equipment, storage medium, server and sound terminal thereof
CN107749925B (en) * 2017-10-31 2020-12-04 北京小米移动软件有限公司 Audio playing method and device
CN108964787B (en) * 2018-07-06 2021-02-19 南京航空航天大学 Information broadcasting method based on ultrasonic waves
CN109545246A (en) * 2019-01-21 2019-03-29 维沃移动通信有限公司 A kind of sound processing method and terminal device

Also Published As

Publication number Publication date
CN110297543A (en) 2019-10-01

Similar Documents

Publication Publication Date Title
CN108737921B (en) Play control method, system, earphone and mobile terminal
CN110297543B (en) Audio playing method and terminal equipment
CN108319445B (en) Audio playing method and mobile terminal
CN107562406B (en) Volume adjusting method, mobile terminal and computer readable storage medium
CN111370018B (en) Audio data processing method, electronic device and medium
CN111405416B (en) Stereo recording method, electronic device and storage medium
CN107765251B (en) Distance detection method and terminal equipment
CN107785027B (en) Audio processing method and electronic equipment
CN109243488B (en) Audio detection method, device and storage medium
WO2017215661A1 (en) Scenario-based sound effect control method and electronic device
CN111147919A (en) Play adjustment method, electronic equipment and computer readable storage medium
CN110062273B (en) Screenshot method and mobile terminal
CN107135308A (en) Multimedia file plays audio control method, mobile terminal and readable storage medium storing program for executing
CN109862172B (en) Screen parameter adjusting method and terminal
CN108848267B (en) Audio playing method and mobile terminal
CN107633850A (en) A kind of volume adjusting method and electronic equipment
CN107911777B (en) Processing method and device for return-to-ear function and mobile terminal
CN107786751A (en) A kind of method for broadcasting multimedia file and mobile terminal
CN111049972B (en) Audio playing method and terminal equipment
CN110058837B (en) Audio output method and terminal
CN109451146B (en) Vibration processing method and terminal
CN111182118A (en) Volume adjusting method and electronic equipment
CN110995909A (en) Sound compensation method and device
CN108093119B (en) Strange incoming call number marking method and mobile terminal
CN108319440B (en) Audio output method and mobile terminal

Legal Events

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