Audio playback control method, device, terminal and computer readable storage medium
By playing ultrasonic signals and detecting Doppler frequency shifts in speaker playback mode, the problem of low operating efficiency of traditional audio playback control is solved, interfaceless audio playback control is realized, and operation convenience and efficiency are improved.
Patent Information
- Application Number
- CN201880098332.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2018-12-05
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2038-12-05
AI Technical Summary
Traditional audio playback control operation efficiency is low, and users need to frequently open the audio playback interface for control.
By detecting the terminal audio playback mode, if it is the speaker playback mode, it plays the ultrasonic signal of the preset frequency and receives the Doppler frequency shift of the reflected signal to change the playback state of the audio signal and achieve interfaceless control.
The operating efficiency of audio playback control is improved. Users can control audio playback without opening the audio or video playback interface, which enhances convenience and efficiency.
Smart Images

Figure CN112789576B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of electronic equipment, and in particular, relates to a method, device, terminal and computer-readable storage medium for controlling audio playback. Background Art
[0002] Currently, most users are accustomed to using mobile phones and other terminals to listen to music while doing other things.
[0003] However, when it is necessary to control the playing of music, it is generally necessary to open the audio playing interface to perform the control operation of the music playing, which has the disadvantage of low operating efficiency. Summary of the invention
[0004] The embodiments of the present application provide a method, device, terminal and computer-readable storage medium for controlling audio playback, which can solve the technical problem of low efficiency of traditional audio playback control operations.
[0005] A first aspect of an embodiment of the present application provides a method for controlling audio playback, including:
[0006] Check whether the current audio playback mode of the terminal is speaker playback mode;
[0007] If the current audio playback mode of the terminal is the speaker playback mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played;
[0008] A reflected signal of the ultrasonic signal is received, and it is identified whether a Doppler frequency shift occurs in the reflected signal; if a Doppler frequency shift occurs in the reflected signal, a playing state of the audio signal to be played is changed.
[0009] A second aspect of an embodiment of the present application provides an audio playback control device, including:
[0010] A detection unit, used to detect whether the current audio playback mode of the terminal is a speaker playback mode;
[0011] A playback unit, configured to play an ultrasonic signal of a preset frequency while playing the audio signal to be played if the current audio playback mode of the terminal is a speaker playback mode;
[0012] The changing unit is used to receive the reflection signal of the ultrasonic signal and identify whether the reflection signal has Doppler frequency shift; if the reflection signal has Doppler frequency shift, the playing state of the audio signal to be played is changed.
[0013] A third aspect of an embodiment of the present application provides a terminal, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0014] Check whether the current audio playback mode of the terminal is speaker playback mode;
[0015] If the current audio playback mode of the terminal is the speaker playback mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played;
[0016] A reflected signal of the ultrasonic signal is received, and it is identified whether a Doppler frequency shift occurs in the reflected signal; if a Doppler frequency shift occurs in the reflected signal, a playing state of the audio signal to be played is changed.
[0017] A fourth aspect of an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the method described in the first aspect are implemented. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a schematic diagram of the implementation flow of the audio playback control method provided in the embodiment of the present application;
[0020] Figure 2 This is a schematic diagram of a first specific implementation flow of step 103 of the audio playback control method provided in an embodiment of the present application;
[0021] Figure 3 This is a second specific implementation flow diagram of step 103 of the audio playback control method provided in an embodiment of the present application;
[0022] Figure 4 is a schematic diagram of a setting interface of a control mode provided in an embodiment of the present application;
[0023] Figure 5 is a schematic diagram of a specific implementation flow of step 307 of the audio playback control method provided in an embodiment of the present application;
[0024] Figure 6 This is a schematic diagram of a third specific implementation flow of step 103 of the audio playback control method provided in an embodiment of the present application;
[0025] Figure 7 is a schematic diagram of the structure of the control device for audio playback provided in an embodiment of the present application;
[0026] Figure 8 It is a schematic diagram of the structure of the terminal provided in the embodiment of the present application. DETAILED DESCRIPTION
[0027] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. At the same time, in the description of the present application, the terms "first", "second", etc. are only used to distinguish descriptions and cannot be understood as indicating or implying relative importance.
[0028] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0029] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0030] In order to illustrate the technical solution described in this application, a specific embodiment is provided below for illustration.
[0031] In an embodiment of the present application, by detecting whether the current audio playback mode of the terminal is the speaker playback mode, when the current audio playback mode of the terminal is the speaker playback mode, an ultrasonic signal of a preset frequency can be played while the audio signal to be played is played, so that the playback state of the audio signal to be played can be controlled according to whether a Doppler frequency shift occurs in the reflected signal of the ultrasonic signal. The user does not need to open the audio or video playback interface to perform audio playback control operations, thereby improving the operational efficiency of audio playback control.
[0032] Figure 1 A schematic diagram of a control method for audio playback provided by an embodiment of the present application is shown. The control method is applied to a terminal and can be executed by an audio playback control device configured on the terminal. The audio playback control device can be implemented in hardware and / or software and is suitable for situations where efficient and convenient audio playback control is required. The audio playback control method may include steps 101 to 103.
[0033] Step 101, detecting whether the current audio playback mode of the terminal is a speaker playback mode.
[0034] The terminal includes terminal devices such as smart phones, tablet computers, personal digital assistants (PDAs), learning machines, MP3s, MP4s, portable multimedia players (PMPs), etc. The terminal device may be installed with applications such as audio players, video players, WeChat, game A, game B, e-book readers, and browsers. The audio player may include: Kugou Music, NetEase Cloud Music, QQ Music, and the audio player that comes with the terminal.
[0035] In the embodiment of the present application, the audio playback mode of the terminal may include a speaker playback mode, a headphone playback mode, and a receiver playback mode. Among them, the receiver playback mode is suitable for audio playback that requires privacy protection, such as answering a call, and the speaker playback mode and the headphone playback mode are suitable for audio playback of an audio player and a video player.
[0036] For example, when a user opens an audio player and selects a song from a playlist to play, the user can plug in headphones. At this time, the audio playback mode of the terminal is the headphone mode; when the terminal is not plugged in headphones to play music, the audio playback mode of the terminal is the speaker mode.
[0037] Step 102: If the current audio playback mode of the terminal is the speaker playback mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played.
[0038] The audio signal to be played refers to an audio signal that needs to be played normally and can be perceived by the user's ears during playback, for example, music, broadcasting and other audio signals.
[0039] Specifically, the frequency range of sound that the human ear can hear is approximately 20Hz to 20000Hz, and the audio signal with a frequency greater than 20000Hz is an ultrasonic signal. In the embodiment of the present application, while the audio signal to be played is being played, the ultrasonic signal of the preset frequency played will not be audible to the human ear, that is, it will not affect the playback quality of the normal audio signal.
[0040] Optionally, the preset frequency of the ultrasonic signal only needs to be greater than 20,000 Hz. For example, the preset frequency of the ultrasonic signal may be 25,000 Hz or 25,500 Hz.
[0041] Optionally, playing the ultrasonic signal of a preset frequency while playing the audio signal to be played may include: mixing the audio signal to be played with the ultrasonic signal of the preset frequency and then playing them.
[0042] For example, the audio signal to be played is mixed with the ultrasonic signal of the preset frequency into an audio playback signal and then played.
[0043] Step 103, receiving a reflection signal of the ultrasonic signal, and identifying whether a Doppler frequency shift occurs in the reflection signal, and if a Doppler frequency shift occurs in the reflection signal, changing the playing state of the audio signal to be played.
[0044] Doppler shift refers to the change in phase and frequency of the wavelength of radiation from an object due to the relative motion between the wave source and the observer. In front of the moving wave source, the wave is compressed, the wavelength becomes shorter, and the frequency becomes higher. When the movement is behind the wave source, the opposite effect occurs, the wavelength becomes longer, and the frequency becomes lower.
[0045] For example, when a train approaches from far away, the sound of the whistle becomes stronger and the pitch becomes higher. When the train moves from near to far, the sound of the whistle becomes weaker and the pitch becomes lower. This is because there is relative motion between the vibration source and the observer, which makes the frequency of the sound heard by the observer different from the frequency of the vibration source. This is the frequency shift phenomenon.
[0046] When the sound source is moving relative to the observer, the sound heard by the observer will change. When the sound source moves away from the observer, the wavelength of the sound wave increases and the pitch becomes lower. When the sound source approaches the observer, the wavelength of the sound wave decreases and the pitch becomes higher. The change in pitch is related to the ratio of the relative speed between the sound source and the observer to the speed of sound. The larger this ratio is, the more significant the change is.
[0047] Specifically, the frequency relationship between the observer and the emission source is: f′ is the observed frequency; f is the original emission frequency of the emission source in the medium; v is the speed of the wave in the medium; v0 is the observer's moving speed. If the observer is close to the emission source, the operator symbol in front is +, otherwise it is -; v s is the moving speed of the emission source. If it is close to the observer, the preceding operation sign is -, otherwise it is +.
[0048] In an embodiment of the present application, by receiving a reflected signal of an ultrasonic signal and identifying whether a Doppler frequency shift occurs in the reflected signal, when a Doppler frequency shift occurs in the reflected signal, it indicates that an object is approaching or moving away from the terminal. At this time, the playback state of the audio signal to be played can be changed according to the Doppler frequency shift of the reflected signal, thereby achieving the goal that the user does not need to open the audio or video playback interface to perform audio playback control operations, thereby improving the operational efficiency of audio playback control.
[0049] For example, when a user turns on an audio player or a video player to play audio, the terminal is triggered to detect whether the current audio playback mode of the terminal is the speaker playback mode. When the current audio playback mode of the terminal is the speaker playback mode, while playing the audio signal to be played, an ultrasonic signal of a preset frequency is played, and the reflected signal of the ultrasonic signal is received through the microphone. At this time, when the user needs to pause the audio playback or turn off the audio playback, the frequency of the reflected signal can be changed by quickly bringing the palm close to the terminal, that is, the reflected signal has a Doppler frequency shift, so that the terminal can control the pause of the audio signal to be played, or turn off the playback when recognizing that the reflected signal has a Doppler frequency shift. The user does not need to open the audio or video playback interface to control the audio playback, which improves the operational efficiency of audio playback control.
[0050] In some embodiments of the present application, the changing the playing state of the audio signal to be played may include: changing the playing state of the audio signal to be played according to the control object of the audio playback pre-set by the terminal. For example, the control object of the audio playback may include: pausing the playing of the audio signal to be played, turning off the playing of the audio signal to be played, adjusting the sound intensity of the audio signal to be played, switching the audio to the previous audio, and switching the audio to the next audio.
[0051] Optional, such as Figure 2 As shown, in the above step 103, identifying whether the reflected signal has a Doppler frequency shift may include: steps 201 to 203.
[0052] Step 201: Acquire a frequency domain signal corresponding to the reflected signal.
[0053] For example, Fourier transform or fast Fourier transform is performed on the reflection signal to obtain a frequency domain signal corresponding to the reflection signal.
[0054] Step 202: Calculate the difference between the signal strength of the first preset frequency band and the signal strength of the second preset frequency band in the frequency domain signal.
[0055] Step 203: If the difference is greater than a first preset threshold, it is confirmed that Doppler frequency shift occurs in the reflected signal.
[0056] For example, when the ultrasonic signal of the preset frequency is 25500 Hz, the difference between the signal strength of the audio signal of 24000 Hz-25500 Hz and the audio signal of 25500 Hz-27000 Hz in the frequency domain signal is calculated, and if the difference is greater than the first preset threshold, it is confirmed that the reflected signal has a Doppler frequency shift. The value of the first preset threshold can be calculated based on practical experience.
[0057] For another example, if the signal strength of the audio signal of 24000Hz-25500Hz is greater than that of the audio signal of 25500Hz-27000Hz, and the difference is greater than the first preset threshold, the audio is switched to the next audio or the sound intensity of the audio signal to be played is reduced; if the signal strength of the audio signal of 24000Hz-25500Hz is less than that of the audio signal of 25500Hz-27000Hz, and the difference is greater than the first preset threshold, the audio is switched to the previous audio or the sound intensity of the audio signal to be played is increased. In other words, the user can switch the audio to the next audio or reduce the sound intensity of the audio signal to be played by quickly moving the palm away from the terminal, and switch the audio to the previous audio or increase the sound intensity of the audio signal to be played by quickly moving the palm close to the terminal.
[0058] For another example, when the difference is greater than a first preset threshold, if the audio signal to be played is being played, the playing of the audio signal to be played is paused, or the playing of the audio signal to be played is turned off; if the audio signal to be played is in a paused playing state, the audio signal to be played continues to be played.
[0059] Optional, such as Figure 3 As shown, the above step 103 may also include: step 301 to step 302.
[0060] Step 301: If the current audio playback mode of the terminal is the speaker playback mode, the audio playback control mode is obtained.
[0061] Step 302: If the control mode of the audio playback is the preset first gesture control mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played.
[0062] The above-mentioned preset first gesture control mode may refer to a gesture of a palm or other object quickly approaching or moving away from the terminal.
[0063] When the control mode of the terminal's audio playback is the preset first gesture control mode, it means that whether an object is approaching or moving away from the terminal can be detected by playing an ultrasonic signal. Therefore, while the audio signal to be played is being played, an ultrasonic signal of a preset frequency is played so that the playback state of the audio signal to be played can be controlled according to the reflected signal.
[0064] Optional, such as Figure 3 As shown, in the above step 301, after obtaining the control mode of the audio playback, steps 303 to 305 may also be included.
[0065] Step 303: If the control mode of the audio playback is not the preset first gesture control mode, load a setting interface of the control mode.
[0066] Step 304: reset the control mode of the terminal audio playback according to the control mode setting instruction received in the control mode setting interface.
[0067] Step 305: If the reset audio playback control mode is the preset first gesture control mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played.
[0068] For example, Figure 4 As shown, it is a schematic diagram of the setting interface of the control mode provided in the embodiment of the present application. Among them, the setting interface 40 of the control mode can be provided with a first gesture control mode selection control, a second gesture control mode selection control and a standard control mode selection control. When the second gesture control mode selection control is selected, it indicates that the control mode of the audio playback is to control the audio playback state according to the echo strength of the speaker sound outlet; when the standard control mode selection control is selected, it indicates that the control mode of the audio playback is to control the audio playback state by receiving the trigger instruction in the audio playback interface.
[0069] In the embodiment of the present application, if the control mode of the audio playback is not the preset first gesture control mode, then the following is loaded: Figure 4 The control mode setting interface 40 shown is used to remind the user to set the control mode of audio playback and receive the user's setting operation on the setting interface 40. If the reset audio playback control mode is the preset first gesture control mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played.
[0070] Optional, such as Figure 3 As shown, after resetting the control mode of the terminal audio playback according to the control mode setting instruction received in the control mode setting interface, the process may further include: step 306 to step 308.
[0071] Step 306: If the reset audio playback control mode is the preset second gesture control mode, the echo strength of the speaker sound outlet is obtained while the audio signal to be played is being played.
[0072] For example, an echo detection device is provided at the sound outlet of the loudspeaker to detect in real time the echo intensity reflected back from the audio signal to be played played by the loudspeaker.
[0073] Step 307: determine whether the sound outlet of the speaker is blocked according to the echo intensity.
[0074] In the embodiment of the present application, judging whether the sound outlet of the speaker is blocked according to the echo intensity may include judging according to whether the echo intensity is greater than a third preset threshold.
[0075] For example, if the echo intensity is greater than a third preset threshold, the sound outlet of the speaker is blocked; if the echo intensity is less than or equal to the third preset threshold, the sound outlet of the speaker is not blocked.
[0076] The third preset threshold may be a preset threshold set according to practical experience. For example, the third preset threshold is the echo intensity corresponding to the speech that a user with normal hearing can hear clearly in a quiet environment when the sound outlet of the speaker is partially blocked by the user's hand.
[0077] Optional, such as Figure 5 As shown, in some embodiments of the present application, judging whether the sound outlet of the speaker is blocked according to the echo intensity may also include: step 501 to step 503.
[0078] Step 501, obtaining the signal strength of the audio signal to be played;
[0079] Step 502, determining whether the ratio of the echo intensity of the sound outlet of the speaker to the signal intensity of the audio signal to be played is greater than a second preset threshold;
[0080] Step 503: If the ratio of the echo intensity of the sound outlet of the speaker to the signal intensity of the audio signal to be played is greater than the second preset threshold, it is determined that the sound outlet of the speaker is blocked.
[0081] Since the echo intensity of the speaker's sound outlet is related to the voice intensity of the voice played by the speaker, the greater the voice intensity of the voice played by the speaker, under the same blockage condition, the greater the echo intensity of the speaker's sound outlet will be. Therefore, judging whether the speaker's sound outlet is blocked based on the ratio of the echo intensity of the speaker's sound outlet to the signal strength of the audio signal to be played is more accurate than using the echo intensity to judge whether the speaker's sound outlet is blocked.
[0082] The second preset threshold may be a preset threshold set according to practical experience. For example, the second preset threshold is the ratio of the echo intensity corresponding to the voice that a user with normal hearing can hear clearly in a quiet environment to the signal intensity of the audio signal to be played when the sound outlet of the speaker is partially blocked by the user's hand.
[0083] Step 308: If the sound outlet of the speaker is blocked, the playing state of the audio signal to be played is changed.
[0084] For example, if the sound outlet of the speaker is blocked, the playing of the audio signal to be played is paused or the playing of the audio signal to be played is turned off.
[0085] Optional, such as Figure 6 As shown, in the above described implementation, in the above step 103, after changing the playing state of the to-be-played audio signal, the following steps may be included: step 601 to step 603.
[0086] Step 601: Play an ultrasonic signal of a preset frequency after a first preset time period.
[0087] Step 602: Receive a reflection signal of the ultrasonic signal, and identify whether a Doppler frequency shift occurs in the reflection signal within a second preset time period.
[0088] Step 603: If the reflected signal has a Doppler frequency shift within the second preset time period, then the playing of the audio signal to be played is resumed.
[0089] In an embodiment of the present application, the user can quickly approach the terminal with his palm, for example, by waving his palm back and forth in front of the terminal, so that the reflected signal of the ultrasonic signal has a Doppler frequency shift, and the playback state of the audio signal to be played is changed.
[0090] However, in actual applications, the user quickly approaches the terminal with his palm or waves his hands back and forth in front of the terminal, causing the reflected signal of the ultrasonic signal to have a Doppler frequency shift. After the terminal has changed the playback state of the audio signal to be played according to the Doppler frequency shift of the reflected signal, the user may still be approaching or waving, resulting in the terminal changing the playback state of the audio signal to be played. If the terminal continues to play the ultrasonic signal of the preset frequency after changing the playback state of the audio signal to be played, it is possible that the reflected signal with a Doppler frequency shift will be received again in a short time.
[0091] Therefore, in order to avoid the erroneous operation of the terminal changing the playing state of the audio signal to be played and resuming the playing of the audio signal to be played back and forth in this case, in an embodiment of the present application, after changing the playing state of the audio signal to be played, the ultrasonic signal of the preset frequency can be played again after a first preset time period, for example, the first preset time period can be 5s, 7s or 10s, and then, if the Doppler frequency shift of the reflected signal is identified in the second preset time period, the playing of the audio signal to be played is resumed. The second preset time period can be the default time period set when the terminal leaves the factory, or it can be a time period set by the user, for example, 5 minutes, 10 minutes.
[0092] Optionally, in some implementations of the present application, after step 602, if the reflected signal does not show a Doppler frequency shift within a second preset time period, the application for playing the audio is closed.
[0093] In an embodiment of the present application, when the reflected signal of the ultrasonic signal does not show Doppler frequency shift within the second preset time period, it indicates that the user may need to directly turn off the audio playback instead of pausing it. Therefore, the power consumption of the terminal can be reduced by executing the operation of turning off the audio playback application.
[0094] The above-mentioned audio playback application may include an audio player, a video player and other applications that can output audio.
[0095] Optionally, after closing the application for playing the audio, the method further includes: setting the terminal to a screen-off state.
[0096] After closing the audio playback application, the terminal may be in a screen-on state. Therefore, after closing the audio playback application, the terminal may be set to a screen-off state to further reduce the power consumption of the terminal.
[0097] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0098] Figure 7 A schematic structural diagram of an audio playback control device 700 provided in an embodiment of the present application is shown, which includes a detection unit 701, a playback unit 702 and a change unit 703.
[0099] The detection unit 701 is used to detect whether the current audio playback mode of the terminal is the speaker playback mode;
[0100] The playing unit 702 is configured to play an ultrasonic signal of a preset frequency while playing the audio signal to be played if the current audio playing mode of the terminal is the speaker playing mode;
[0101] The changing unit 703 is used to receive the reflection signal of the ultrasonic signal and identify whether the reflection signal has Doppler frequency shift; if the reflection signal has Doppler frequency shift, change the playing state of the audio signal to be played.
[0102] It should be noted that, for the convenience and simplicity of description, the specific working process of the audio playback control device 700 described above can refer to the above Figures 1 to 6 The corresponding process of the method described in will not be repeated here.
[0103] like Figure 8 As shown, the present application provides a terminal for implementing the above-mentioned audio playback control method, and the terminal can be a smart phone, a tablet computer, a personal computer (PC), a personal digital assistant (PDA), a learning machine, etc., including: a processor 81, a memory 82, one or more input devices 83 ( Figure 8 only one is shown) and one or more output devices 84 ( Figure 8 The processor 81, the memory 82, the input device 83 and the output device 84 are connected via a bus 85.
[0104] The memory 82 stores a computer program, which can be run on the processor 81. When the processor executes the computer program, the following steps are implemented:
[0105] Check whether the current audio playback mode of the terminal is speaker playback mode;
[0106] If the current audio playback mode of the terminal is the speaker playback mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played;
[0107] A reflected signal of the ultrasonic signal is received, and whether a Doppler frequency shift occurs in the reflected signal is identified; if a Doppler frequency shift occurs in the reflected signal, the playing state of the audio signal to be played is changed.
[0108] Assuming that the above is the first possible implementation, in a second possible implementation provided on the basis of the first possible implementation, the processor further implements the following steps when executing the computer program:
[0109] Acquire a frequency domain signal corresponding to the reflected signal;
[0110] Calculating a difference between a signal strength of a first preset frequency band and a signal strength of a second preset frequency band in the frequency domain signal;
[0111] If the difference is greater than a first preset threshold, it is confirmed that Doppler frequency shift occurs in the reflected signal.
[0112] In a third possible implementation provided on the basis of the first possible implementation, the processor further implements the following steps when executing the computer program:
[0113] If the current audio playback mode of the terminal is the speaker playback mode, obtain the control mode of the audio playback;
[0114] If the control mode of the audio playback is the preset first gesture control mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played.
[0115] In a fourth possible implementation provided on the basis of the third possible implementation, the processor further implements the following steps when executing the computer program:
[0116] After acquiring the control mode of the audio playback, if the control mode of the audio playback is not a preset first gesture control mode, loading a setting interface of the control mode;
[0117] Resetting the control mode of the terminal audio playback according to the control mode setting instruction received in the control mode setting interface;
[0118] If the reset audio playback control mode is the preset first gesture control mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played.
[0119] In a fifth possible implementation provided on the basis of the fourth possible implementation, after resetting the control mode of the terminal audio playback according to the control mode setting instruction received in the control mode setting interface, the processor further implements the following steps when executing the computer program:
[0120] If the reset audio playback control mode is the preset second gesture control mode, the echo strength of the sound outlet of the speaker is obtained while the audio signal to be played is being played;
[0121] Determining whether the sound outlet of the speaker is blocked according to the echo intensity;
[0122] If the sound outlet of the speaker is blocked, the playing state of the audio signal to be played is changed.
[0123] In a sixth possible implementation provided on the basis of the fifth possible implementation, when the processor executes the computer program, the processor further implements the following steps:
[0124] Get the signal strength of the audio signal to be played;
[0125] Determine whether the ratio of the echo intensity of the sound outlet of the speaker to the signal intensity of the audio signal to be played is greater than a second preset threshold;
[0126] If the ratio of the echo intensity of the sound outlet of the speaker to the signal intensity of the audio signal to be played is greater than the second preset threshold, it is determined that the sound outlet of the speaker is blocked.
[0127] In the first to fifth possible implementations described above, the processor further implements the following steps when executing the computer program:
[0128] If the current audio playback mode of the terminal is the speaker playback mode, the audio signal to be played is mixed with the ultrasonic signal of the preset frequency and then played.
[0129] It should be understood that in the embodiment of the present application, the processor 81 may be a central processing unit (CPU), and the processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0130] The input device 83 may include a keyboard, a touch pad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint direction information), a microphone, etc., and the output device 84 may include a display, a speaker, etc.
[0131] The memory 82 may include a read-only memory and a random access memory, and provides instructions and data to the processor 81. A part or all of the memory 81 may also include a non-volatile random access memory. For example, the memory 82 may also store information on the device type.
[0132] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0133] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0134] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0135] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminals and methods can be implemented in other ways. For example, the device / terminal embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0138] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0139] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for controlling audio playback, It is characterized in that include: Check whether the current audio playback mode of the terminal is speaker playback mode; If the current audio playback mode of the terminal is the speaker playback mode, obtain the control mode of the audio playback; If the control mode of the audio playback is the preset first gesture control mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played; receiving a reflection signal of the ultrasonic signal, and identifying whether the reflection signal has a Doppler frequency shift; if the reflection signal has a Doppler frequency shift, changing the playing state of the audio signal to be played; If the control mode of the audio playback is not the preset first gesture control mode, loading a setting interface of the control mode; Resetting the control mode of the terminal audio playback according to the control mode setting instruction received in the control mode setting interface; If the reset audio playback control mode is the preset second gesture control mode, the echo strength of the sound outlet of the speaker is obtained while the audio signal to be played is being played; Determining whether the sound outlet of the speaker is blocked according to the echo intensity; If the sound outlet of the speaker is blocked, changing the playing state of the audio signal to be played; The changing of the playing state of the audio signal to be played includes: pausing the playing of the audio signal to be played, or closing the playing of the audio signal to be played.
2. The method according to claim 1, It is characterized in that The identifying whether the reflected signal has a Doppler frequency shift comprises: Acquire a frequency domain signal corresponding to the reflected signal; Calculating a difference between a signal strength of a first preset frequency band and a signal strength of a second preset frequency band in the frequency domain signal; If the difference is greater than a first preset threshold, it is confirmed that Doppler frequency shift occurs in the reflected signal.
3. The method according to claim 1, It is characterized in that After resetting the control mode of the terminal audio playback according to the control mode setting instruction received in the control mode setting interface, the method includes: If the reset audio playback control mode is the preset first gesture control mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played.
4. The method according to claim 1, It is characterized in that The determining, according to the echo intensity, whether the sound outlet of the speaker is blocked includes: Obtain the signal strength of the audio signal to be played; Determine whether the ratio of the echo intensity of the sound outlet of the speaker to the signal intensity of the audio signal to be played is greater than a second preset threshold; If the ratio of the echo intensity of the sound outlet of the speaker to the signal intensity of the audio signal to be played is greater than the second preset threshold, it is determined that the sound outlet of the speaker is blocked.
5. The method according to any one of claims 1 to 4, It is characterized in that The method of playing an ultrasonic signal of a preset frequency while playing the audio signal to be played includes: The audio signal to be played is mixed with the ultrasonic signal of the preset frequency and then played.
6. The method according to claim 1, It is characterized in that After the playing state of the to-be-played audio signal is changed, the method further comprises: Playing an ultrasonic signal of a preset frequency after a first preset time period; receiving a reflection signal of the ultrasonic signal, and identifying whether a Doppler frequency shift occurs in the reflection signal within a second preset time period; If the reflected signal has a Doppler frequency shift within the second preset time period, the playing of the audio signal to be played is resumed.
7. The method according to claim 6, It is characterized in that After identifying whether the reflected signal has a Doppler frequency shift within a second preset time period, the method further comprises: If the reflected signal does not have a Doppler frequency shift within the second preset time period, the application for playing the audio is closed.
8. The method according to claim 7, It is characterized in that After closing the application for playing the audio, the method includes: The terminal is set to a screen-off state.
9. A control device for audio playback, It is characterized in that include: A detection unit, used to detect whether the current audio playback mode of the terminal is a speaker playback mode; A playback unit, configured to obtain a control mode of audio playback if the current audio playback mode of the terminal is a speaker playback mode; If the control mode of the audio playback is the preset first gesture control mode, an ultrasonic signal of a preset frequency is played while the audio signal to be played is played; a changing unit, configured to receive a reflection signal of the ultrasonic signal and identify whether a Doppler frequency shift occurs in the reflection signal; If the reflected signal has a Doppler frequency shift, the playing state of the audio signal to be played is changed; wherein the changing the playing state of the audio signal to be played includes: pausing the playing of the audio signal to be played, or closing the playing of the audio signal to be played; a loading unit, configured to load a setting interface of the control mode if the control mode of the audio playback is not a preset first gesture control mode; A setting unit, configured to reset the control mode of the terminal audio playback according to a control mode setting instruction received in the control mode setting interface; The changing unit is also used to obtain the echo strength of the speaker sound hole while the audio signal to be played is being played if the control mode of the reset audio playback is the preset second gesture control mode; determine whether the speaker sound hole is blocked according to the echo strength; if the speaker sound hole is blocked, change the playback state of the audio signal to be played.
10. A terminal comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
11. A computer-readable storage medium storing a computer program. It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Volume regulating apparatus and automatic volume regulating method
CN101312600A
Acoustic system
CN103402156A
Audio Doppler characteristic quantification-based gesture identification method
CN107526437A
Voice frequency processing method and electronic equipment
CN107785027A
