CN111541814A - Audio playing method, electronic equipment and computer readable storage medium - Google Patents
Audio playing method, electronic equipment and computer readable storage medium Download PDFInfo
- Publication number
- CN111541814A CN111541814A CN202010276013.7A CN202010276013A CN111541814A CN 111541814 A CN111541814 A CN 111541814A CN 202010276013 A CN202010276013 A CN 202010276013A CN 111541814 A CN111541814 A CN 111541814A
- Authority
- CN
- China
- Prior art keywords
- audio
- information
- audio information
- user
- sub
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/7243—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages
- H04M1/72433—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality with interactive means for internal management of messages for voice messaging, e.g. dictaphones
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R3/00—Circuits for transducers, loudspeakers or microphones
- H04R3/04—Circuits for transducers, loudspeakers or microphones for correcting frequency response
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Business, Economics & Management (AREA)
- General Business, Economics & Management (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the invention provides an audio playing method, electronic equipment and a computer readable storage medium. The audio playing method is applied to electronic equipment, the electronic equipment comprises a plurality of audio output components, and the audio playing method comprises the following steps: determining the position information of the user according to the voice information of the user; acquiring audio information from a server according to the voice information of a user; amplifying the power of the audio information to obtain audio information after power amplification; carrying out frequency division on the audio information after power amplification to obtain a plurality of sub-audio information; determining a target audio output component from the plurality of audio output components according to the position information and the sub audio information; and controlling the target audio component to play the sub audio information. In the embodiment of the invention, the listening experience of the user can be improved.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to an audio playing method, an electronic device, and a computer-readable storage medium.
Background
At present, electronic equipment is more and more popular and becomes a necessity in daily life of people. In the process of using the electronic equipment, people often play audio through the electronic equipment.
In the related art, in the process of playing audio through the electronic device, the electronic device directly plays the audio after acquiring the audio information, which results in poor listening experience of a user.
Disclosure of Invention
The embodiment of the invention provides an audio playing method, electronic equipment and a computer readable storage medium, which can improve the listening experience of a user.
In a first aspect, an embodiment of the present invention provides an audio playing method, which is applied to an electronic device, where the electronic device includes a plurality of audio output components, and the audio playing method includes:
determining the position information of a user according to the voice information of the user;
acquiring audio information from a server according to the voice information of the user;
amplifying the audio information power to obtain audio information after power amplification;
dividing the frequency of the audio information after the power amplification to obtain a plurality of sub-audio information;
determining a target audio output component from the plurality of audio output components according to the position information and the plurality of sub-audio information;
and controlling the target audio component to play the sub audio information.
Optionally, the acquiring audio information from a server according to the voice information of the user includes:
recognizing the voice information of the user to obtain recognized voice information;
and acquiring the audio information from the server according to the recognized voice information.
Optionally, the audio information includes audio voltage information and audio current information;
the power amplifying the audio information to obtain the audio information after power amplification includes:
amplifying the audio voltage information;
and amplifying the audio current information to obtain audio information after power amplification.
Optionally, the frequency dividing the audio information after the power amplification to obtain a plurality of sub-audio information includes:
taking the audio information with the frequency within a first frequency range in the audio information after the power amplification as first sub-audio information;
taking the audio information with the frequency within a second frequency range in the audio information after the power amplification as second sub-audio information;
and taking the audio information with the frequency in the third frequency range in the audio information after the power amplification as third sub-audio information.
Optionally, the determining a target audio output component from a plurality of audio output components according to the position information and the plurality of sub-audio information includes:
dividing the sub-audio information into first audio information and second audio information according to the tone of the sub-audio information;
determining the target audio output component from the plurality of audio output components based on the location information, the first audio information, and the second audio information.
Optionally, before determining the location information of the user according to the voice information of the user, the method further includes:
and receiving the voice information of the user.
In a second aspect, an embodiment of the present invention provides an electronic device, where the electronic device includes a plurality of audio output components, and the electronic device further includes:
the first determining module is used for determining the position information of the user according to the voice information of the user;
the acquisition module is used for acquiring audio information from a server according to the voice information of the user;
the amplifying module is used for amplifying the audio information power to obtain audio information after power amplification;
the frequency division module is used for carrying out frequency division on the audio information after the power amplification to obtain a plurality of sub-audio information;
a second determining module, configured to determine a target audio output component from the plurality of audio output components according to the position information and the plurality of sub-audio information;
and the control module is used for controlling the target audio component to play the sub audio information.
Optionally, the obtaining module includes:
the recognition unit is used for recognizing the voice information of the user to obtain the recognized voice information;
and the acquisition unit is used for acquiring the audio information from the server according to the recognized voice information.
Optionally, the audio information includes audio voltage information and audio current information;
the amplification module is used for:
amplifying the audio voltage information;
and amplifying the audio current information to obtain audio information after power amplification.
Optionally, the frequency dividing module is configured to:
taking the audio information with the frequency within a first frequency range in the audio information after the power amplification as first sub-audio information;
taking the audio information with the frequency within a second frequency range in the audio information after the power amplification as second sub-audio information;
and taking the audio information with the frequency in the third frequency range in the audio information after the power amplification as third sub-audio information.
Optionally, the second determining module includes:
the dividing unit is used for dividing the sub-audio information into first audio information and second audio information according to the tone of the sub-audio information;
a determining unit that determines the target audio output component from the plurality of audio output components according to the position information, the first audio information, and the second audio information.
Optionally, the electronic device further comprises:
and the receiving module is used for receiving the voice information of the user.
In a third aspect, an embodiment of the present invention provides an electronic device, which includes a processor, a memory, and a computer program stored on the memory and executable on the processor, where the computer program, when executed by the processor, implements the steps of any one of the audio playing methods in the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the steps of any one of the audio playing methods in the first aspect.
In a fifth aspect, a computer program product is provided, which comprises instructions, which, when run on a computer, cause the computer to perform the steps of any of the audio playback methods of the first aspect described above.
The audio playing method provided by the embodiment of the invention at least has the following beneficial effects:
in the embodiment of the invention, the position information of the user is determined according to the voice information of the user, the audio information is obtained from the server according to the voice information of the user, the power of the audio information is amplified to obtain the audio information after power amplification, the frequency of the audio information after power amplification is divided to obtain a plurality of sub-audio information, a target audio output component is determined from the plurality of audio output components according to the position information and the sub-audio information, and the target audio component is controlled to play the sub-audio information. That is, in the embodiment of the present invention, the location information of the user may be determined according to the voice information of the user, and the frequency division may be performed on the obtained audio information, so that a suitable audio output component may be selected from a plurality of audio components according to the sub-audio information and the location information of different frequencies, and thus when the user is in different locations, different audio output components may be used to play audio of different frequencies, and the listening experience of the user may be further improved. In addition, in the embodiment of the invention, the signal to noise ratio of the audio information can be improved by amplifying the power of the audio information and then dividing the frequency, so that the audio effect output by the audio output assembly is better, and the listening experience of a user is further 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 labor.
Fig. 1 is a flowchart illustrating an audio playing method according to an embodiment of the present invention;
fig. 2 is a schematic diagram of an electronic device according to an embodiment of the invention;
FIG. 3 is a schematic diagram of another electronic device provided by an embodiment of the invention;
FIG. 4 is a schematic diagram of another electronic device provided by an embodiment of the invention;
fig. 5 is a schematic diagram of a hardware structure of an electronic 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.
It should be appreciated that reference throughout this specification to "one embodiment" or "an embodiment" means that a particular feature, structure or characteristic described in connection with the embodiment is included in at least one embodiment of the present invention. Thus, the appearances of the phrases "in one embodiment" or "in an embodiment" in various places throughout this specification are not necessarily all referring to the same embodiment. Furthermore, the particular features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
In various embodiments of the present invention, it should be understood that the sequence numbers of the following processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
Referring to fig. 1, a flowchart of an audio playing method according to an embodiment of the present invention is shown with reference to fig. 1. The audio playing method is applied to an electronic device, the electronic device includes a plurality of audio output components, as shown in fig. 1, the audio playing method may include the following steps:
step 101: and determining the position information of the user according to the voice information of the user.
When the sound emitted by the user reaches the electronic equipment, the positioning module can determine the position information of the user according to the voice information of the user, and then sends the position information to the processor.
The positioning module may be a dual-microphone array, and at this time, in the process of sending voice information to the electronic device by the user, a phase difference may be generated when the sound emitted by the user reaches the dual-microphone array. When the sound source positions are different, namely the user positions are different, different time differences are generated, and the user position information can be determined according to the time differences. Wherein the position information of the sound source may be determined according to the correspondence of the time difference and the position of the sound source. The correspondence of the time difference to the position of the sound source may be: when the time difference is positive, the sound source is located at the first position, and when the time difference is negative, the sound source is located at the second position.
It should be noted that the first position and the second position both refer to a position of the sound source relative to the electronic device, and the first position may be located on one side of a central axis of the electronic device, and the second position may be located on the other side of the central axis, with the central axis of the electronic device as a reference point.
For example, when the electronic device is lying flat on the ground, the first position may be located on the left side of the electronic device and the second position may be located on the right side of the electronic device.
Based on the above, the implementation manner of step 101 may be: and determining the time difference of the propagation of the voice information according to the voice information of the user, and determining the position information of the sound source according to the corresponding relation between the time difference and the position of the sound source, wherein the position information of the sound source is the position information of the user. Wherein the location information is a location of the user relative to the electronic device.
When the position information of the user is determined, the processor can be used for positioning the position of the user, and further other information can be conveniently determined according to the position information of the user.
In addition, before step 101, the embodiment of the present invention may further perform a step of receiving voice information of the user. After the user sends the voice information to the electronic equipment, the electronic equipment can receive the voice information of the user, and further the position information of the user can be determined according to the voice information of the user.
Step 102: and acquiring audio information from the server according to the voice information of the user.
Since the user sends the voice information to the electronic device and the electronic device receives the voice information, the electronic device may not be able to directly perform corresponding actions according to the voice information of the user, and therefore, after receiving the voice information of the user, the electronic device needs to recognize the voice information. At this time, the implementation manner of step 102 may be: and recognizing the voice information of the user to obtain the recognized voice information. And acquiring audio information from the server according to the recognized voice information.
The voice information of the user is recognized, and the implementation manner of obtaining the recognized voice information may be: and converting the voice information of the user into text information, extracting keywords in the text information, and taking the extracted keywords as the recognized voice information.
After the user sends the voice information to the electronic equipment, the voice information is transmitted to the electronic equipment, the electronic equipment performs ASR voice recognition on the voice information of the user, namely the voice information of the user is converted into text information, and then performs NLP semantic recognition on the text information, namely the meaning of the voice information expression of the user is recognized according to the text information. The keywords in the text information can be identified, and the meaning of the voice information expression of the user is determined according to the keywords.
For example, the user sends the voice information "play a song of zhou jilun for me" to the electronic device, after the electronic device receives the voice information, the electronic device performs ASR voice recognition on the voice information, converts the voice information into text information, and performs NLP semantic recognition on the text information, wherein keywords "zhou jilun" and "song" can be extracted, and then it is determined that what the user wants to express is to play the "song of zhou jilun" according to the keywords.
In addition, the implementation manner of acquiring the audio information from the server according to the recognized voice information may be as follows: and searching audio information corresponding to the keyword from the server according to the recognized voice information, namely the keyword, and acquiring the audio information after the audio information corresponding to the keyword is searched.
For example, after the voice information is identified, that is, the keywords are "siean" and "weather forecast", the audio information corresponding to "siean" and "weather forecast" is searched from the server, and the weather forecast information of the city of siean is searched, so that the weather forecast information of the city of siean is obtained.
Step 103: and amplifying the audio information power to obtain the audio information after power amplification. Wherein the audio information includes audio voltage information and audio current information.
Because the audio information is an electrical signal, before the audio information is played, the audio information needs to be power-amplified before being played. At this time, the implementation manner of step 103 may be: and amplifying the audio voltage information, and amplifying the audio current information to obtain audio information after power amplification.
That is, the audio voltage information in the audio information is amplified first, and then the audio current information in the audio information is amplified, so as to amplify the power of the audio information.
For example, after the audio information is acquired, the audio voltage information in the audio information is amplified first, and then the audio current information in the audio information is amplified. The amplification of the audio voltage information in the audio information may be referred to as a previous stage amplification, and the amplification of the audio current information in the audio information may be referred to as a subsequent stage amplification. That is, the audio information may be pre-amplified and then post-amplified.
Step 104: and dividing the frequency of the audio information after power amplification to obtain a plurality of sub-audio information.
In some embodiments, the implementation of step 104 may be: taking the audio information with the frequency within the first frequency range in the audio information after power amplification as first sub-audio information; taking the audio information with the frequency within the second frequency range in the audio information after power amplification as second sub-audio information; and taking the audio information with the frequency in the third frequency range in the audio information after power amplification as third sub-audio information.
For example, the first frequency range may be a frequency range smaller than 200 hz, the second frequency range may be a frequency range from 200 hz to 800 hz, and the third frequency range may be a frequency range larger than 800 hz, at this time, the audio information in the first frequency range may be called low frequency, the audio information in the second frequency range may be called medium frequency, and the audio information in the third frequency range may be called high frequency.
Of course, the first frequency range, the second frequency range, and the third frequency range may be other frequency ranges, for example, the first frequency range is 30 hz to 150 hz, the second frequency range is 150 hz to 500 hz, and the third frequency range is greater than 500 hz, which is not limited herein in the embodiments of the present invention.
In addition, in some embodiments, when steps 103 and 104 are performed, the audio voltage information in the acquired audio voltage information may be amplified, then the audio information in which the audio voltage information has been amplified is divided by frequency to obtain a plurality of sub audio information, and then the audio current information in the plurality of sub audio information is amplified. That is, the obtained audio information may be first subjected to pre-amplification, then the audio information subjected to the pre-amplification may be divided to obtain a plurality of sub-audio information, and each sub-audio information may be subjected to post-amplification.
In the embodiment of the invention, the power amplification is carried out on the acquired audio information, and then the frequency division is carried out on the audio information after the power amplification to obtain the plurality of sub audio information, so that the signal to noise ratio of the audio information can be improved, and the broadcasting effect of the audio output assembly is better when the sub audio information is played. The audio information is subjected to power amplification firstly, and then the frequency division is carried out on the audio information after the power amplification, so that the signal to noise ratio of the audio information can be improved, the broadcasting effect of the audio output assembly is improved, and the listening experience of a user is improved.
In addition, in step 103 and step 104, after the audio information is power-amplified, the power-amplified audio information is divided, and there are two ways: (1) firstly, pre-amplifying the audio information, then, post-amplifying the audio information to obtain the audio information after power amplification, and then, dividing the frequency of the audio information after power amplification. (2) The method comprises the steps of firstly carrying out pre-stage amplification on audio information, then carrying out frequency division on the audio information amplified by the pre-stage amplification to obtain a plurality of sub-audios, and carrying out post-stage amplification on each sub-audio. The embodiments of the present invention are not limited herein.
Step 105: a target audio output component is determined from the plurality of audio output components based on the location information and the sub-audio information.
In some embodiments, the implementation of step 105 may be: dividing the sub-audio information into first audio information and second audio information according to the tone of the sub-audio information; determining a target audio output component from the plurality of audio output components based on the location information, the first audio information, and the second audio information.
The implementation manner of dividing the sub-audio information into the first audio information and the second audio information according to the tone of the sub-audio information may be as follows: acquiring the tone of the sub-audio information, dividing different tones into a first tone and a second tone, and dividing the sub-audio information into first audio information and second audio information according to the first tone and the second tone.
Wherein the first type of timbre may comprise a timbre of an instrumental soundtrack in the audio and the second type of timbre may comprise a human voice. For example, when the sub-audio information is "song of zhou jilun", the first type of timbre may be a musical instrument such as piano sound and violin sound in the song, and the second type of timbre may be the sound of zhou jilun in the song.
In addition, the first type of timbre may also include a timbre of a soundtrack of a rendering atmosphere in the audio, in which case the first type of timbre includes a timbre of an instrumental soundtrack in the audio and/or a timbre of a soundtrack of a rendering atmosphere in the audio, and the second type of timbre includes human sound. For example, when the sub-audio information is audio in a movie clip, the first type of timbre includes timbres of an atmosphere rendered in the movie and timbres of accompaniment tracks in the movie, and the second type of timbre is timbres of actors or monologues.
In addition, according to the position information, the first audio information and the second audio information, the implementation manner of determining the target audio output component from the plurality of audio output components may be: and determining an initial audio output component according to the corresponding relation between the position information and the audio output components, determining a first target audio output component from the initial audio output component according to the frequency and the tone of the first audio information, and determining a second target audio output component from the initial audio output component according to the frequency and the tone of the second audio information.
The corresponding relationship between the position information and the audio output component may be: the position information comprises first position information, second position information and third position information, the audio output components comprise a first part of audio output components and a second part of audio output components, the first position information corresponds to the first part of audio output components, the second position information corresponds to the second part of audio output components, and the third position information corresponds to the first part of audio output components and the second part of audio output components. The first position information may be position information of a user located on one side of a central axis of the electronic device, the second position information may be position information of the user located on the other side of the central axis of the electronic device, the third position information may be position information of the user located on the central axis of the electronic device, the first audio output component may be an audio output component disposed on one side of the central axis of the electronic device, and the second audio output component may be an audio output component disposed on the other side of the central axis of the electronic device. It should be noted that, when the position information is the third position information, that is, when the user is located on the central axis of the electronic device, at this time, both the first part of audio output components and the second part of audio output components can be in the working state, that is, when the audio information needs to be played, both the first part of audio output components and the second part of audio output components play the audio information.
For example, referring to fig. 2, a schematic diagram of an electronic device provided by an embodiment of the invention is shown. As shown in fig. 2, the electronic device includes a plurality of audio output components, the plurality of audio output components may be divided into a first portion of audio output components and a second portion of audio output components, and the first portion of audio output components may include a first audio output unit, a second audio output unit, a third audio output unit, and a fourth audio output unit. The second partial audio output assembly may include a fifth audio output unit, a sixth audio output unit, a seventh audio output unit, and an eighth audio output unit. The first audio output unit and the fifth audio output unit are used for playing medium-high frequency musical instrument dubbing audio, the second audio output unit and the sixth sub audio output unit are used for playing human voice audio in the audio information, the third audio output unit and the seventh audio output unit are used for playing atmosphere rendering dubbing audio in the audio information, and the fourth audio output unit and the eighth audio output unit are used for playing medium-low frequency musical instrument dubbing audio in the audio information.
In addition, the position information includes first position information, second position information, and third position information, the first position information corresponding to the first portion of the audio output components, the second position information corresponding to the second portion of the audio output components, and the third position information corresponding to the first portion of the audio output components and the second portion of the audio output components.
When the position information of the user is determined to be the first position information according to the voice information of the user, the audio information acquired from the server according to the voice information is the audio in the movie clip, the audio information is subjected to power amplification, then the audio information subjected to power amplification is subjected to frequency division to obtain high-frequency sub audio information, medium-frequency sub audio information and low-frequency sub audio information, the high-frequency sub audio information is divided into the first audio information and the second audio information according to the tone colors of the high-frequency sub audio information, the medium-frequency sub audio information and the low-frequency sub audio information, the medium-frequency sub audio information is divided into the first audio information and the second audio information, and the low-frequency sub audio information is divided into the first audio information and the second audio information. The first audio information is the audio of the musical instrument score and/or the audio of the score of the rendering atmosphere, and the second audio information is the sound of people in the audio. The audio output component determined according to the first position information is a first part of audio output components, and the first audio information corresponding to the first audio output unit is determined according to the first audio information in the high-frequency sub audio.
When the position information of the user is determined to be the second position information according to the voice information of the user, the mode of the audio output component can be determined by referring to the position information of the user as the first position information, and details are not repeated here.
In the above example, the first portion of audio output components may be referred to as left audio output components and the second portion of audio output components may be referred to as right audio output components. At this time, if the user is located on the central axis of the electronic device, the left audio output assembly and the right audio output assembly are simultaneously in the working state.
For another example, referring to fig. 3, a schematic diagram of another electronic device provided by the embodiment of the invention is shown. As shown in fig. 3, the electronic device includes a plurality of audio output components, the plurality of audio output components may be divided into a first portion of audio output components, a second portion of audio output components, and a third portion of audio output components, and the first portion of audio output components may include a first audio output unit, a second audio output unit, and a third audio output unit. The second partial audio output assembly may include a fifth audio output unit, a sixth audio output unit, and a seventh audio output unit. The third partial audio output assembly may include a fourth audio output unit. The first audio output unit and the fifth audio output unit are used for playing medium-high frequency musical instrument dubbing audio, the second audio output unit and the sixth sub audio output unit are used for playing human voice audio in the audio information, the third audio output unit and the seventh audio output unit are used for playing atmosphere rendering dubbing audio in the audio information, and the fourth audio output unit is used for playing medium-low frequency musical instrument dubbing audio in the audio information.
In addition, the position information includes first position information, second position information, and third position information, the first position information corresponding to the first portion of the audio output components, the second position information corresponding to the second portion of the audio output components, and the third position information corresponding to the first portion of the audio output components and the second portion of the audio output components.
When the location information of the user is the first location information, the manner in which the location information of the user in the above example is the first location information may be referred to, and when the location information of the user is the second location information, the manner in which the location information of the user in the above example is the second location information may be referred to, which is not described herein again.
Step 106: and controlling the target audio output component to play the sub audio information.
The implementation manner of step 106 may be: and sending the sub-audio information to the corresponding target audio output component, sending a playing instruction to the target audio output component, and playing the sub-audio information by the target audio output component.
For example, when the sub audio information is audio of a low frequency of a musical instrument score, the audio of the low frequency may be sent to the fourth audio output unit in the above example, and an instruction may be sent to the fourth audio output unit, which plays the audio of the low frequency.
In addition, in the embodiment of the invention, distance information of the user can be acquired, wherein the distance information refers to the distance between the user and the electronic equipment. That is, before step 106, the distance information of the user may also be obtained, and after the distance information of the user is obtained, the target audio output component may also be controlled to play the sub audio information according to the distance information of the user.
The implementation manner of controlling the target audio output component to play the sub-audio information according to the distance information of the user may be: and controlling the broadcasting size of the target audio output component for broadcasting the sub-audio information according to the corresponding relation between the distance information of the user and the broadcasting decibel of the audio output component.
The corresponding relationship between the distance information of the user and the broadcast decibels of the audio output component can be as follows: when the distance between the user and the electronic equipment is within a first distance range, the broadcast decibel of the audio output assembly is a first decibel, when the distance between the user and the electronic equipment is within a second distance range, the broadcast decibel of the audio output assembly is a second decibel, and when the distance between the user and the electronic equipment is within a third distance range, the broadcast decibel of the audio output assembly is a third decibel. Of course, there may be other corresponding relationships between the distance information of the user and the broadcast decibel of the audio output component, and the embodiment of the present invention is not limited herein.
For example, the first distance range is 0 meter to 2 meters, the first decibel corresponding to the first distance range is 60 decibels, and when the distance between the user and the electronic device is 1 meter, the broadcasting decibel of the target audio output component for playing the sub-audio information is 60 decibels.
It should be noted that, in the embodiment of the present invention, the distance information of the user may be obtained in real time, and the target audio output component is controlled to play the sub audio information according to the distance information.
In the embodiment of the invention, the position information of the user is determined according to the voice information of the user, the audio information is obtained from the server according to the voice information of the user, the power of the audio information is amplified to obtain the audio information after power amplification, the frequency of the audio information after power amplification is divided to obtain a plurality of sub-audio information, a target audio output component is determined from the plurality of audio output components according to the position information and the sub-audio information, and the target audio component is controlled to play the sub-audio information. That is, in the embodiment of the present invention, the location information of the user may be determined according to the voice information of the user, and the frequency division may be performed on the obtained audio information, so that a suitable audio output component may be selected from a plurality of audio components according to the sub-audio information and the location information of different frequencies, and thus when the user is in different locations, different audio output components may be used to play audio of different frequencies, and the listening experience of the user may be further improved. In addition, in the embodiment of the invention, the signal to noise ratio of the audio information can be improved by amplifying the power of the audio information and then dividing the frequency, so that the audio effect output by the audio output assembly is better, and the listening experience of a user is further improved.
Referring to fig. 4, a schematic diagram of another electronic device provided by an embodiment of the invention is shown. As shown in fig. 4, the electronic device 400 includes a plurality of audio output components, and the electronic device 400 may further include:
a first determining module 401, configured to determine location information of a user according to voice information of the user;
an obtaining module 402, configured to obtain audio information from a server according to voice information of a user;
the amplifying module 403 is configured to amplify the power of the audio information to obtain audio information after power amplification;
a frequency dividing module 404, configured to frequency divide the audio information after power amplification to obtain multiple pieces of sub-audio information;
a second determining module 405, configured to determine a target audio output component from the plurality of audio output components according to the position information and the plurality of sub-audio information;
and a control module 406, configured to control the target audio component to play the sub audio information.
Optionally, the obtaining module 402 includes:
the recognition unit is used for recognizing the voice information of the user to obtain the recognized voice information;
and the acquisition unit is used for acquiring the audio information from the server according to the recognized voice information.
Optionally, the audio information comprises audio voltage information and audio current information;
the amplifying module 403 is configured to:
amplifying the audio voltage information;
and amplifying the audio current information to obtain audio information after power amplification.
Optionally, the frequency dividing module 404 is configured to:
taking the audio information with the frequency within the first frequency range in the audio information after power amplification as first sub-audio information;
taking the audio information with the frequency within the second frequency range in the audio information after power amplification as second sub-audio information;
and taking the audio information with the frequency in the third frequency range in the audio information after power amplification as third sub-audio information.
Optionally, the second determining module 405 includes:
the dividing unit is used for dividing the sub-audio information into first audio information and second audio information according to the tone of the sub-audio information;
a determining unit configured to determine a target audio output component from the plurality of audio output components according to the position information, the first audio information, and the second audio information.
Optionally, the electronic device further comprises:
and the receiving module is used for receiving the voice information of the user.
In the embodiment of the invention, the position information of the user is determined according to the voice information of the user, the audio information is obtained from the server according to the voice information of the user, the power of the audio information is amplified to obtain the audio information after power amplification, the frequency of the audio information after power amplification is divided to obtain a plurality of sub-audio information, a target audio output component is determined from the plurality of audio output components according to the position information and the sub-audio information, and the target audio component is controlled to play the sub-audio information. That is, in the embodiment of the present invention, the location information of the user may be determined according to the voice information of the user, and the frequency division may be performed on the obtained audio information, so that a suitable audio output component may be selected from a plurality of audio components according to the sub-audio information and the location information of different frequencies, and thus when the user is in different locations, different audio output components may be used to play audio of different frequencies, and the listening experience of the user may be further improved. In addition, in the embodiment of the invention, the signal to noise ratio of the audio information can be improved by amplifying the power of the audio information and then dividing the frequency, so that the audio effect output by the audio output assembly is better, and the listening experience of a user is further improved.
It should be noted that: in the electronic device provided in the above embodiment, when playing audio, only the division of the above functional modules is used for illustration, and in practical applications, the above function distribution may be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the above described functions. In addition, the electronic device and the audio playing method provided by the above embodiments belong to the same concept, and specific implementation processes thereof are described in the method embodiments for details, which are not described herein again.
Referring to fig. 5, a hardware structure diagram of an electronic device according to an embodiment of the present invention is shown.
Fig. 5 is a schematic diagram of a hardware structure of an electronic device 500 for implementing various embodiments of the present invention, where the electronic device 500 includes, but is not limited to: a radio frequency unit 501, a network module 502, an audio output unit 503, an input unit 504, a sensor 505, a display unit 505, a user input unit 507, an interface unit 508, a memory 509, a processor 510, a power supply 511, and the like. Those skilled in the art will appreciate that the electronic device configuration shown in fig. 5 does not constitute a limitation of the electronic device, and that the electronic device may include more or fewer components than shown, or some components may be combined, or a different arrangement of components. In the embodiment of the present invention, the electronic device includes, but is not limited to, a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted terminal, a wearable device, a pedometer, and the like.
The processor 510 is configured to determine location information of a user according to voice information of the user, obtain audio information from a server according to the voice information of the user, power-amplify the audio information to obtain power-amplified audio information, divide the frequency of the power-amplified audio information to obtain a plurality of sub-audio information, determine a target audio output component from the plurality of audio output components according to the location information and the sub-audio information, and control the target audio component to play the sub-audio information.
The electronic device provided by the embodiment of the invention determines the position information of the user according to the voice information of the user, acquires the audio information from the server according to the voice information of the user, amplifies the power of the audio information to obtain the audio information after power amplification, divides the frequency of the audio information after power amplification to obtain a plurality of sub-audio information, determines the target audio output component from the plurality of audio output components according to the position information and the sub-audio information, and controls the target audio component to play the sub-audio information. That is, in the embodiment of the present invention, the location information of the user may be determined according to the voice information of the user, and the frequency division may be performed on the obtained audio information, so that a suitable audio output component may be selected from a plurality of audio components according to the sub-audio information and the location information of different frequencies, and thus when the user is in different locations, different audio output components may be used to play audio of different frequencies, and the listening experience of the user may be further improved. In addition, in the embodiment of the invention, the signal to noise ratio of the audio information can be improved by amplifying the power of the audio information and then dividing the frequency, so that the audio effect output by the audio output assembly is better, and the listening experience of a user is further improved.
It should be understood that, in the embodiment of the present invention, the radio frequency unit 501 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 510; in addition, the uplink data is transmitted to the base station. In general, radio frequency unit 501 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. In addition, the radio frequency unit 501 can also communicate with a network and other devices through a wireless communication system.
The electronic device provides wireless broadband internet access to the user via the network module 502, such as assisting the user in sending and receiving e-mails, browsing web pages, and accessing streaming media.
The audio output unit 503 may convert audio data received by the radio frequency unit 501 or the network module 502 or stored in the memory 509 into an audio signal and output as sound. Also, the audio output unit 503 may also provide audio output related to a specific function performed by the electronic apparatus 500 (e.g., a call signal reception sound, a message reception sound, etc.). The audio output unit 503 includes a speaker, a buzzer, a receiver, and the like.
The input unit 504 is used to receive an audio or video signal. The input Unit 504 may include a Graphics Processing Unit (GPU) 5041 and a microphone 5042, and the Graphics processor 5041 processes image data of a still picture or video obtained by an image capturing device (e.g., a camera) in a video capturing mode or an image capturing mode. The processed image frames may be displayed on the display unit 506. The image frames processed by the graphic processor 5041 may be stored in the memory 509 (or other storage medium) or transmitted via the radio frequency unit 501 or the network module 502. The microphone 5042 may receive sounds and may be capable of processing such sounds 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 501 in case of the phone call mode.
The electronic device 500 also includes at least one sensor 505, such as light sensors, motion sensors, and other sensors. Specifically, the light sensor includes an ambient light sensor that can adjust the brightness of the display panel 5061 according to the brightness of ambient light, and a proximity sensor that can turn off the display panel 5061 and/or a backlight when the electronic device 500 is moved to the ear. As one type of motion sensor, an 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 posture of an electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), and vibration identification related functions (such as pedometer, tapping); the sensors 505 may also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc., which are not described in detail herein.
The display unit 506 is used to display information input by the user or information provided to the user. The Display unit 506 may include a Display panel 5061, the Display panel 5061 may be configured in a form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like, and the Display panel 5061 is a screen of an electronic device, where the screen of the electronic device includes N regions, and a photosensitive sensor is correspondingly disposed under each region.
The user input unit 507 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the electronic device. Specifically, the user input unit 507 includes a touch panel 5071 and other input devices 5072. Touch panel 5071, 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 5071 using a finger, stylus, or any suitable object or attachment). The touch panel 5071 may include two parts of a touch detection device and a touch controller. The touch detection device 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 sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 510, and receives and executes commands sent by the processor 510. In addition, the touch panel 5071 may be implemented in various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 5071, the user input unit 507 may include other input devices 5072. In particular, other input devices 5072 may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
Further, the touch panel 5071 may be overlaid on the display panel 5061, and when the touch panel 5071 detects a touch operation thereon or nearby, the touch operation is transmitted to the processor 510 to determine the type of the touch event, and then the processor 510 provides a corresponding visual output on the display panel 5061 according to the type of the touch event. Although in fig. 5, the touch panel 5071 and the display panel 5061 are two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 5071 and the display panel 5061 may be integrated to implement the input and output functions of the electronic device, and is not limited herein.
The interface unit 508 is an interface for connecting an external device to the electronic apparatus 500. For example, the external 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 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 508 may be used to receive input (e.g., data information, power, etc.) from external devices and transmit the received input to one or more elements within the electronic apparatus 500 or may be used to transmit data between the electronic apparatus 500 and external devices.
The memory 509 may be used to store software programs as well as various data. The memory 509 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 509 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 510 is a control center of the electronic device, connects various parts of the whole electronic device by using various interfaces and lines, performs various functions of the electronic device and processes data by running or executing software programs and/or modules stored in the memory 509 and calling data stored in the memory 509, thereby performing overall monitoring of the electronic device. Processor 510 may include one or more processing units; preferably, the processor 510 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 processor 510.
The electronic device 500 may further include a power supply 511 (e.g., a battery) for supplying power to various components, and preferably, the power supply 511 may be logically connected to the processor 510 via a power management system, so as to implement functions of managing charging, discharging, and power consumption via the power management system.
In addition, the electronic device 500 includes some functional modules that are not shown, and are not described in detail herein.
Preferably, an embodiment of the present invention further provides an electronic device, which includes a processor 510, a memory 509, and a computer program that is stored in the memory 509 and can be run on the processor 510, and when the computer program is executed by the processor 510, the processes of the above-mentioned screen uniformity calibration method embodiment are implemented, and the same technical effect can be achieved, and in order to avoid repetition, details are not described here again.
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 screen uniformity calibration 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 the present specification, the embodiments are all described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments may be referred to each other.
While alternative embodiments of the present invention have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including alternative embodiments and all such alterations and modifications as fall within the true scope of the embodiments of the invention.
While the technical solutions provided by the present invention have been described in detail, the principles and embodiments of the present invention are described herein by using specific examples, and meanwhile, for a person of ordinary skill in the art, according to the principles and embodiments of the present invention, the specific embodiments and application scope may be changed, and in summary, the content of the present description should not be construed as limiting the present invention.
Claims (10)
1. An audio playing method applied to an electronic device, wherein the electronic device includes a plurality of audio output components, the audio playing method includes:
determining the position information of a user according to the voice information of the user;
acquiring audio information from a server according to the voice information of the user;
amplifying the audio information power to obtain audio information after power amplification;
dividing the frequency of the audio information after the power amplification to obtain a plurality of sub-audio information;
determining a target audio output component from the plurality of audio output components according to the position information and the sub-audio information;
and controlling the target audio component to play the sub audio information.
2. The audio playing method according to claim 1, wherein the obtaining audio information from a server according to the voice information of the user comprises:
recognizing the voice information of the user to obtain recognized voice information;
and acquiring the audio information from the server according to the recognized voice information.
3. The audio playing method according to claim 1, wherein the audio information comprises audio voltage information and audio current information;
the power amplifying the audio information to obtain the audio information after power amplification includes:
amplifying the audio voltage information;
and amplifying the audio current information to obtain audio information after power amplification.
4. The audio playing method of claim 1, wherein the dividing the frequency of the audio information after the power amplification to obtain a plurality of sub-audio information comprises:
taking the audio information with the frequency within a first frequency range in the audio information after the power amplification as first sub-audio information;
taking the audio information with the frequency within a second frequency range in the audio information after the power amplification as second sub-audio information;
and taking the audio information with the frequency in the third frequency range in the audio information after the power amplification as third sub-audio information.
5. The audio playing method according to claim 1, wherein the determining a target audio output component from a plurality of audio output components according to the position information and the sub audio information comprises:
dividing the sub-audio information into first audio information and second audio information according to the tone of the sub-audio information;
determining the target audio output component from the plurality of audio output components based on the location information, the first audio information, and the second audio information.
6. The audio playing method according to claim 1, wherein before the determining the position information of the user according to the voice information of the user, the audio playing method further comprises:
and receiving the voice information of the user.
7. An electronic device, wherein the electronic device comprises a plurality of audio output components, the electronic device further comprising:
the first determining module is used for determining the position information of the user according to the voice information of the user;
the acquisition module is used for acquiring audio information from a server according to the voice information of the user;
the amplifying module is used for amplifying the audio information power to obtain audio information after power amplification;
the frequency division module is used for carrying out frequency division on the audio information after the power amplification to obtain a plurality of sub-audio information;
a second determining module, configured to determine a target audio output component from the plurality of audio output components according to the position information and the sub-audio information;
and the control module is used for controlling the target audio component to play the sub audio information.
8. The electronic device of claim 7, wherein the obtaining module comprises:
the recognition unit is used for recognizing the voice information of the user to obtain the recognized voice information;
and the acquisition unit is used for acquiring the audio information from the server according to the recognized voice information.
9. An electronic device comprising a processor, a memory and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the audio playback method as claimed in any one of claims 1 to 6.
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 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010276013.7A CN111541814A (en) | 2020-04-09 | 2020-04-09 | Audio playing method, electronic equipment and computer readable storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010276013.7A CN111541814A (en) | 2020-04-09 | 2020-04-09 | Audio playing method, electronic equipment and computer readable storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111541814A true CN111541814A (en) | 2020-08-14 |
Family
ID=71980127
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010276013.7A Pending CN111541814A (en) | 2020-04-09 | 2020-04-09 | Audio playing method, electronic equipment and computer readable storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111541814A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104581543A (en) * | 2013-10-10 | 2015-04-29 | 三星电子株式会社 | Audio system, method of outputting audio, and speaker apparatus |
CN106028226A (en) * | 2016-05-27 | 2016-10-12 | 北京奇虎科技有限公司 | Sound playing method and equipment |
CN205912235U (en) * | 2016-06-29 | 2017-01-25 | 江西联创宏声电子股份有限公司 | Intelligent sound box |
CN108401498A (en) * | 2018-02-06 | 2018-08-14 | 万魔声学科技有限公司 | Frequency division module earphone and audio control method |
CN110062309A (en) * | 2019-04-28 | 2019-07-26 | 百度在线网络技术(北京)有限公司 | Method and apparatus for controlling intelligent sound box |
-
2020
- 2020-04-09 CN CN202010276013.7A patent/CN111541814A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104581543A (en) * | 2013-10-10 | 2015-04-29 | 三星电子株式会社 | Audio system, method of outputting audio, and speaker apparatus |
CN106028226A (en) * | 2016-05-27 | 2016-10-12 | 北京奇虎科技有限公司 | Sound playing method and equipment |
CN205912235U (en) * | 2016-06-29 | 2017-01-25 | 江西联创宏声电子股份有限公司 | Intelligent sound box |
CN108401498A (en) * | 2018-02-06 | 2018-08-14 | 万魔声学科技有限公司 | Frequency division module earphone and audio control method |
CN110062309A (en) * | 2019-04-28 | 2019-07-26 | 百度在线网络技术(北京)有限公司 | Method and apparatus for controlling intelligent sound box |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106782600B (en) | Scoring method and device for audio files | |
CN108874357B (en) | Prompting method and mobile terminal | |
CN108922537B (en) | Audio recognition method, device, terminal, earphone and readable storage medium | |
CN110568926B (en) | Sound signal processing method and terminal equipment | |
CN109918039B (en) | Volume adjusting method and mobile terminal | |
WO2017215660A1 (en) | Scene sound effect control method, and electronic device | |
CN110097872B (en) | Audio processing method and electronic equipment | |
CN108668024B (en) | Voice processing method and terminal | |
CN109086027B (en) | Audio signal playing method and terminal | |
CN111083289B (en) | Audio playing method and device, storage medium and mobile terminal | |
CN107731241B (en) | Method, apparatus and storage medium for processing audio signal | |
CN109885162B (en) | Vibration method and mobile terminal | |
CN111405416B (en) | Stereo recording method, electronic device and storage medium | |
CN111370018B (en) | Audio data processing method, electronic device and medium | |
CN111343540B (en) | Piano audio processing method and electronic equipment | |
WO2017215511A1 (en) | Control method of scene sound effect and related products | |
CN106506437B (en) | Audio data processing method and device | |
WO2021098698A1 (en) | Audio playback method and terminal device | |
CN111614329B (en) | Power amplifier, electronic equipment, voltage control method and device | |
WO2020228226A1 (en) | Instrumental music detection method and apparatus, and storage medium | |
CN107786751A (en) | A kind of method for broadcasting multimedia file and mobile terminal | |
CN110808019A (en) | Song generation method and electronic equipment | |
WO2023011370A1 (en) | Audio playing method and apparatus | |
CN110677770B (en) | Sound production control method, electronic device, and medium | |
CN107872584A (en) | A kind of multi-media processing method, multimedia equipment and 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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200814 |
|
RJ01 | Rejection of invention patent application after publication |