CN112789576A - Audio playing control method and device, terminal and computer readable storage medium - Google Patents

Audio playing control method and device, terminal and computer readable storage medium Download PDF

Info

Publication number
CN112789576A
CN112789576A CN201880098332.4A CN201880098332A CN112789576A CN 112789576 A CN112789576 A CN 112789576A CN 201880098332 A CN201880098332 A CN 201880098332A CN 112789576 A CN112789576 A CN 112789576A
Authority
CN
China
Prior art keywords
playing
audio
signal
played
control mode
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
Application number
CN201880098332.4A
Other languages
Chinese (zh)
Inventor
林进全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Shenzhen Huantai Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd, Shenzhen Huantai Technology Co Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Publication of CN112789576A publication Critical patent/CN112789576A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Telephone Function (AREA)

Abstract

A control method, a device, a terminal and a computer readable storage medium for audio playing are provided, wherein the method comprises the following steps: detecting whether a current audio playing mode of the terminal is a loudspeaker playing mode (101); if the current audio playing mode of the terminal is a loudspeaker playing mode, playing an ultrasonic signal with a preset frequency while playing an audio signal to be played (102); receiving a reflected signal of the ultrasonic signal, and identifying whether Doppler frequency shift occurs in the reflected signal; if the Doppler frequency shift occurs in the reflected signal, changing the playing state of the audio signal to be played (103); the user does not need to open an audio or video playing interface to control the audio playing, and the operating efficiency of the audio playing control is improved.

Description

Audio playing control method and device, terminal and computer readable storage medium Technical Field
The present application belongs to the technical field of electronic devices, and in particular, to a method, an apparatus, a terminal and a computer-readable storage medium for controlling audio playing.
Background
Currently, many users are accustomed to doing other things while listening to music using a terminal such as a mobile phone.
However, when music playing control is required, the control operation of playing music is generally required to open the audio playing interface, which has the disadvantage of low operation efficiency.
Disclosure of Invention
The embodiment of the application provides a control method, a control device, a terminal and a computer readable storage medium for audio playing, which can solve the technical problem of low operation efficiency of the traditional audio playing control.
A first aspect of an embodiment of the present application provides a method for controlling audio playing, including:
detecting whether the current audio playing mode of the terminal is a loudspeaker playing mode;
if the current audio playing mode of the terminal is a loudspeaker playing mode, playing an ultrasonic signal with a preset frequency while playing an audio signal to be played;
receiving a reflected signal of the ultrasonic signal, and identifying whether Doppler frequency shift occurs in the reflected signal; and if the Doppler frequency shift occurs in the reflected signal, changing the playing state of the audio signal to be played.
A second aspect of the embodiments of the present application provides an apparatus for controlling audio playback, including:
the detection unit is used for detecting whether the current audio playing mode of the terminal is a loudspeaker playing mode;
the playing unit is used for playing the ultrasonic signal with the preset frequency while playing the audio signal to be played if the current audio playing mode of the terminal is a loudspeaker playing mode;
the changing unit is used for receiving a reflected signal of the ultrasonic signal and identifying whether Doppler frequency shift occurs in the reflected signal; and if the Doppler frequency shift occurs in the reflected signal, changing the playing state of the audio signal to be played.
A third aspect of the embodiments 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, where the processor executes the computer program to implement the following steps:
detecting whether the current audio playing mode of the terminal is a loudspeaker playing mode;
if the current audio playing mode of the terminal is a loudspeaker playing mode, playing an ultrasonic signal with a preset frequency while playing an audio signal to be played;
receiving a reflected signal of the ultrasonic signal, and identifying whether Doppler frequency shift occurs in the reflected signal; and if the Doppler frequency shift occurs in the reflected signal, changing the playing state of the audio signal to be played.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the steps of the method according to the first aspect.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.
Fig. 1 is a schematic implementation flowchart of a control method for audio playing provided by an embodiment of the present application;
fig. 2 is a schematic flowchart of a first specific implementation of step 103 of a control method for audio playing provided in an embodiment of the present application;
fig. 3 is a flowchart illustrating a second specific implementation of step 103 of the method for controlling audio playing according to the embodiment of the present application;
FIG. 4 is a schematic diagram of a setting interface of a control mode provided by an embodiment of the present application;
fig. 5 is a flowchart illustrating a specific implementation of step 307 of the method for controlling audio playing according to the embodiment of the present application;
fig. 6 is a schematic flowchart of a third specific implementation of step 103 of the method for controlling audio playing according to the embodiment of the present application;
fig. 7 is a schematic structural diagram of a control device for audio playback according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a terminal according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the present application herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
In the embodiment of the application, whether the current audio playing mode of the terminal is the speaker playing mode is detected, so that when the current audio playing mode of the terminal is the speaker playing mode, the ultrasonic signal with the preset frequency is played while the audio signal to be played is played, and according to whether the Doppler frequency shift occurs in the reflected signal of the ultrasonic signal, the audio signal to be played is controlled to be in the playing state, a user does not need to open an audio or video playing interface to control the audio playing, and the operating efficiency of the audio playing control is improved.
Fig. 1 shows a schematic flow chart of an implementation process of an audio playing control method provided in an embodiment of the present application, where the control method is applied to a terminal, and can be executed by an audio playing control device configured on the terminal, and the audio playing control device can be implemented in a hardware and/or software manner, and is suitable for a situation where audio playing control needs to be performed efficiently and conveniently. The control method for audio playing may include steps 101 to 103.
Step 101, detecting whether the current audio playing mode of the terminal is a speaker playing mode.
The terminal comprises terminal equipment such as a smart phone, a tablet computer, a Personal Digital Assistant (PDA), a learning machine, MP3, MP4, a Portable Multimedia Player (PMP) and the like. The terminal device can be provided with applications such as an audio player, a video player, WeChat, game A, game B, an electronic book reader, a browser and the like. The audio player may include: the terminal comprises cool dog music, Internet cloud music, QQ music and an audio player carried by the terminal.
In this embodiment, the audio playing mode of the terminal may include a speaker playing mode, an earphone playing mode, and an earphone playing mode. The earphone playing mode is suitable for audio playing needing privacy protection such as answering a telephone, and the loudspeaker playing mode and the earphone playing mode are suitable for audio playing of an audio player and a video player.
For example, when the user opens the audio player and selects a song in the song play list to play, an earphone can be plugged in, and the audio play mode of the terminal is an earphone mode at this time; when the terminal is not plugged with the earphone to play music, the audio playing mode of the terminal is the loudspeaker mode at the moment.
Step 102, if the current audio playing mode of the terminal is a speaker playing mode, playing an ultrasonic signal with a preset frequency while playing an audio signal to be played.
The audio signal to be played refers to an audio signal that needs to be played normally and can be perceived by the ear of the user when played, for example, an audio signal such as music and broadcast.
Specifically, the frequency range of the sound that human ear can hear is about 20 Hz-20000 Hz, and the audio signal with the frequency greater than 20000Hz is an ultrasonic signal.
Optionally, the preset frequency of the ultrasonic signal only needs to be greater than 20000Hz, for example, the preset frequency of the ultrasonic signal may be 25000Hz or 25500 Hz.
Optionally, when the audio signal to be played is played, playing the ultrasonic signal with the preset frequency may include: and mixing the audio signal to be played with the ultrasonic signal with the preset frequency and then playing.
For example, the audio signal to be played and the ultrasonic signal with the preset frequency are mixed into one path of audio playing signal and then played.
Step 103, receiving a reflected signal of the ultrasonic signal, identifying whether the reflected signal has a doppler shift, and if the reflected signal has the doppler shift, changing a playing state of the audio signal to be played.
Doppler shift refers to the change in phase and frequency of the wavelength of object radiation due to the relative motion of the source and the observer. In front of the moving source the wave is compressed and the wavelength becomes shorter and the frequency becomes higher, and when the movement is behind the source the opposite effect occurs and the wavelength becomes longer and the frequency becomes lower.
For example, when the train is far away from the near, the whistle becomes strong and the tone becomes high, and when the train is near from the near, the whistle becomes weak and the tone becomes low; this is because there is a relative motion between the sound source and the observer, and the frequency of the sound heard by the observer is different from the frequency of the sound source, which is a frequency shift phenomenon.
When a sound source moves relative to an observer, the sound heard by the observer changes. As the sound source moves away from the observer, the wavelength of the sound wave increases and the pitch becomes darker, and as the sound source moves closer to the observer, the wavelength of the sound wave decreases and the pitch becomes higher. The pitch changes are related to the ratio of the relative speed and speed of sound between the source and the observer. The larger this ratio, the more significant the change.
Specifically, the frequency relationship between the observer and the emission source is:
Figure PCTCN2018119381-APPB-000001
f' is the observed frequency; f is the original emission frequency of the emission source in the medium; wherein v is the traveling speed of the wave in the medium; v. of0The moving speed of the observer is the plus sign if approaching the emission source, otherwise, the plus sign is the minus sign; v. ofsThe forward symbol is a minus sign if approaching the observer, and a plus sign if not.
In the embodiment of the application, by receiving the reflected signal of the ultrasonic signal and identifying whether the reflected signal has doppler shift, when the reflected signal has doppler shift, it indicates that an object is close to or far away from the terminal, and at this time, the playing state of the audio signal to be played can be changed according to the doppler shift appearing in the reflected signal, so that a user does not need to open an audio or video playing interface to perform audio playing control operation, and the operating efficiency of audio playing control is improved.
For example, when a user starts an audio player or a video player to play audio, the terminal is triggered to detect whether a current audio playing mode of the terminal is a speaker playing mode, when the current audio playing mode of the terminal is the speaker playing mode, an ultrasonic signal with a preset frequency is played while an audio signal to be played is played, and a reflected signal of the ultrasonic signal is received through the microphone, at this time, the user can change the frequency of the reflected signal by quickly approaching a palm to the terminal when the user needs to pause the playing of the audio, or when the playing of the audio is closed, 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 close the playing when the terminal recognizes that the doppler frequency shift of the reflected signal has occurred. The user does not need to open an audio or video playing interface to control the audio playing, and the operating efficiency of the audio playing control is improved.
In some embodiments of the application, the changing the playing state of the audio signal to be played may include: and changing the playing state of the audio signal to be played according to a preset audio playing control object of the terminal. For example, the control objects for audio playback may include: pausing the playing of the audio signal to be played, closing 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.
Optionally, as shown in fig. 2, the identifying whether the doppler shift occurs in the reflected signal in step 103 may include: step 201 to step 203.
Step 201, obtaining a frequency domain signal corresponding to the reflection signal.
For example, fourier transform or fast fourier transform is performed on the reflected signal to obtain a frequency domain signal corresponding to the reflected signal.
Step 202, calculating a difference between the signal intensity of the first preset frequency band and the signal intensity of the second preset frequency band in the frequency domain signal.
Step 203, if the difference is greater than a first preset threshold, confirming that the reflected signal has a doppler shift.
For example, when the ultrasonic signal with the preset frequency is 25500Hz, calculating a difference value between the signal intensity of the 24000Hz-25500Hz audio signal and the 25500Hz-27000Hz audio signal in the frequency domain signal, and if the difference value is greater than a first preset threshold value, determining that the doppler shift occurs in the reflected signal. The value of the first preset threshold can be calculated according to practical experience.
For another example, if the signal intensity of the 24000Hz-25500Hz audio signal is greater than the 25500Hz-27000Hz audio signal, and the difference is greater than a first preset threshold, switching the audio to the next audio or reducing the sound intensity of the audio signal to be played; if the signal intensity of the 24000Hz-25500Hz audio signal is smaller than the 25500Hz-27000Hz audio signal and the difference value is larger than a first preset threshold value, switching the audio to the previous audio or increasing the sound intensity of the audio signal to be played. That is to say, the user can leave away from the terminal through the palm fast, switch over the audio frequency to next audio frequency or reduce the sound intensity of audio signal that waits to play, through the palm fast near the terminal, switch over the audio frequency to last audio frequency or increase the sound intensity of audio signal that waits to play.
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 suspended, or the playing of the audio signal to be played is closed, and if the audio signal to be played is in a suspended playing state, the audio signal to be played continues to be played.
Optionally, as shown in fig. 3, the step 103 may further include: step 301 to step 302.
Step 301, if the current audio playing mode of the terminal is the speaker playing mode, obtaining a control mode of audio playing.
Step 302, if the control mode of the audio playing is a preset first gesture control mode, playing the audio signal to be played while playing the ultrasonic signal with a preset frequency.
The preset first gesture control mode may refer to a gesture in which a palm or another object is rapidly close to or away from the terminal.
When the control mode of the audio playing of the terminal is a preset first gesture control mode, whether an object is close to or far away from the terminal can be detected by playing the ultrasonic signal, therefore, the ultrasonic signal with the preset frequency is played while the audio signal to be played is played, so that the playing state of the audio signal to be played is controlled according to the reflection signal.
Optionally, as shown in fig. 3, after the control mode of audio playing is acquired in step 301, steps 303 to 305 may be further included.
Step 303, if the control mode of the audio playing is not the preset first gesture control mode, loading a setting interface of the control mode.
And step 304, resetting the control mode of the terminal audio playing according to the control mode setting instruction received in the setting interface of the control mode.
In step 305, if the control mode of the audio playing after resetting is the preset first gesture control mode, the ultrasonic signal with the preset frequency is played while the audio signal to be played is played.
For example, as shown in fig. 4, a schematic view of a setting interface of a control mode provided in an embodiment of the present application is provided. The setting interface 40 of the control mode may 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, the control mode for representing the audio playing is to control the audio playing state according to the echo intensity of the sound outlet of the loudspeaker; and when the standard control mode selection control is selected, the control mode for representing the audio playing is to control the audio playing state by receiving a trigger instruction in an audio playing interface.
In the embodiment of the present application, if the control mode of the audio playing is not the preset first gesture control mode, the setting interface 40 of the control mode shown in fig. 4 is loaded to remind the user to set the control mode of the audio playing, and receive the setting operation on the setting interface 40 by the user, and if the control mode of the audio playing after being reset is the preset first gesture control mode, the ultrasonic signal of the preset frequency is played while the audio signal to be played is played.
Optionally, as shown in fig. 3, after the resetting the control mode of the terminal audio playing according to the control mode setting instruction received in the setting interface of the control mode, the method may further include: step 306 to step 308.
Step 306, if the reset control mode of the audio playing is the preset second gesture control mode, acquiring the echo intensity of the sound outlet of the loudspeaker while the audio signal to be played is played.
For example, by arranging an echo detection device at the sound outlet hole of the speaker, the echo intensity reflected by the audio signal to be played by the speaker is detected in real time.
And 307, judging whether the sound outlet hole of the loudspeaker is blocked or not according to the echo intensity.
In this embodiment of the application, the determining whether the sound outlet hole of the speaker is blocked according to the echo intensity may include determining whether the echo intensity is greater than a third preset threshold.
For example, if the echo intensity is greater than a third preset threshold, the sound outlet of the speaker is blocked, and if the echo intensity is less than or equal to the third preset threshold, the sound outlet of the speaker is not blocked.
The third preset threshold may be a preset threshold set according to practical experience. For example, the third preset threshold is an echo intensity corresponding to a voice that a user with normal hearing can clearly hear in a quiet environment when the sound outlet hole of the speaker is blocked by the hand of the user.
Optionally, as shown in fig. 5, in some embodiments of the present application, the determining whether a sound outlet hole of the speaker is blocked according to the echo intensity may further include: step 501 to step 503.
Step 501, acquiring the signal intensity of an audio signal to be played;
step 502, judging whether the ratio of the echo intensity of the sound outlet hole of the loudspeaker to the signal intensity of the audio message to be played is greater than a second preset threshold value;
step 503, if the ratio of the echo intensity of the sound outlet hole of the speaker to the signal intensity of the audio message to be played is greater than the second preset threshold, determining that the sound outlet hole of the speaker is blocked.
Because the echo intensity of the sound outlet hole of the loudspeaker is related to the voice intensity of the voice played by the loudspeaker, the voice intensity of the voice played by the loudspeaker is higher, and under the same blockage condition, the echo intensity of the sound outlet hole of the loudspeaker is higher, so that whether the sound outlet hole of the loudspeaker is blocked or not is judged according to the ratio of the echo intensity of the sound outlet hole of the loudspeaker to the signal intensity of the audio message to be played, and the method has the characteristic of being more accurate compared with the method for judging whether the sound outlet hole of the loudspeaker is blocked or not by using the echo intensity.
The second preset threshold may be a preset threshold set according to practical experience. For example, the second preset threshold is a ratio of an echo intensity corresponding to a voice that can be clearly heard by a user with normal hearing in a quiet environment to a signal intensity of the audio message to be played when the sound outlet hole of the speaker is partially blocked by the hand of the user.
And 308, if the sound outlet hole of the loudspeaker is blocked, changing the playing state of the audio signal to be played.
For example, if the sound outlet hole of the speaker is blocked, the playing of the audio signal to be played is suspended or the playing of the audio signal to be played is closed.
Optionally, as shown in fig. 6, in the above-described embodiment, after the step 103 changes the playing state of the audio signal to be played, the method may include: step 601 to step 603.
Step 601, playing an ultrasonic signal with a preset frequency after a first preset time interval.
Step 602, receiving a reflected signal of the ultrasonic signal, and identifying whether the reflected signal has a doppler shift within a second preset time period.
Step 603, if the reflected signal has doppler shift within a second preset time period, resuming the playing of the audio signal to be played.
In this embodiment, a user may quickly approach the terminal through a palm, for example, by waving a hand back and forth in front of the terminal, so that a doppler shift occurs in a reflected signal of the ultrasonic signal, and a change of a playing state of the audio signal to be played is realized.
However, in practical applications, a user may quickly approach the terminal through a palm or wave his hand back and forth in front of the terminal, so that a doppler shift occurs in a reflected signal of the ultrasonic signal, and after the terminal has changed a playing state of the audio signal to be played according to the doppler shift occurring in the reflected signal, the user may still perform an approach or wave his hand, so that after the terminal changes the playing state of the audio signal to be played, if the ultrasonic signal with a preset frequency continues to be played, the reflected signal with the doppler shift may be received again in a short time.
Therefore, in order to avoid the misoperation that the terminal performs back and forth changing the playing state of the audio signal to be played and resuming the playing of the audio signal to be played, in this embodiment of the application, after the playing state of the audio signal to be played is changed, the ultrasonic signal with a preset frequency may be played after a first preset time period, for example, the first preset time period may be 5s, 7s, or 10s, and then, if the doppler frequency shift of the reflected signal is identified within a second preset time period, the playing of the audio signal to be played is resumed. The second preset time period may be a time period default set by the terminal when the terminal leaves the factory, or may be a time period self-defined by the user, for example, 5 minutes, 10 minutes.
Optionally, in some embodiments of the present application, after the step 602, if the doppler shift does not occur in the reflected signal within a second preset time period, the application for playing the audio is turned off.
In the embodiment of the application, when the doppler shift does not occur in the reflected signal of the ultrasonic signal within the second preset time period, it indicates that the user may need to directly turn off the audio playing instead of performing the pause operation, and therefore, the power consumption of the terminal may be reduced by performing the operation of turning off the application of the audio playing.
The application for playing the audio may include an audio player, a video player, and other applications that can output audio.
Optionally, after the closing the application performing the audio playing, the method includes: and setting the terminal to be in a screen-off state.
After the application for playing the audio is closed, the terminal may be in a bright screen state, so that after the application for playing the audio is closed, the terminal may be placed in a screen-off state, so as to further reduce the power consumption of the terminal.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an 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 application.
Fig. 7 shows a schematic structural diagram of a control apparatus 700 for audio playing provided in an embodiment of the present application, including a detection unit 701, a playing unit 702, and a changing unit 703.
A detecting unit 701, configured to detect whether a current audio playing mode of the terminal is a speaker playing mode;
the playing unit 702 is configured to play an ultrasonic signal with a preset frequency while playing an audio signal to be played if a current audio playing mode of the terminal is a speaker playing mode;
a changing unit 703, configured to receive a reflected signal of the ultrasonic signal, and identify whether a doppler shift occurs in the reflected signal; and if the Doppler frequency shift occurs in the reflected signal, changing the playing state of the audio signal to be played.
It should be noted that, for convenience and brevity of description, the specific working process of the control apparatus 700 for audio playing described above may refer to the corresponding process of the method described in fig. 1 to fig. 6, and is not described herein again.
As shown in fig. 8, the present application provides a terminal for implementing the above-mentioned control method for audio playing, where the terminal may be a terminal such as a smart phone, a tablet computer, a Personal Computer (PC), a Personal Digital Assistant (PDA), a learning machine, and includes: a processor 81, a memory 82, one or more input devices 83 (only one shown in fig. 8), and one or more output devices 84 (only one shown in fig. 8). The processor 81, memory 82, input device 83 and output device 84 are connected by a bus 85.
The memory 82 stores a computer program that is executable on the processor 81, which when executed performs the steps of:
detecting whether the current audio playing mode of the terminal is a loudspeaker playing mode;
if the current audio playing mode of the terminal is a loudspeaker playing mode, playing an ultrasonic signal with a preset frequency while playing an audio signal to be played;
receiving a reflected signal of the ultrasonic signal, and identifying whether Doppler frequency shift occurs in the reflected signal; and if the Doppler frequency shift occurs in the reflected signal, changing the playing state of the audio signal to be played.
Assuming that the above is the first possible implementation manner, in a second possible implementation manner provided on the basis of the first possible implementation manner, the processor executes the computer program to further implement the following steps:
acquiring a frequency domain signal corresponding to the reflection signal;
calculating a difference value between the signal intensity of a first preset frequency band and the signal intensity of a second preset frequency band in the frequency domain signals;
and if the difference is larger than a first preset threshold value, confirming that the Doppler frequency shift occurs in the reflected signal.
In a third possible implementation manner provided as a basis for the first possible implementation manner, the processor, when executing the computer program, further implements the following steps:
if the current audio playing mode of the terminal is a loudspeaker playing mode, acquiring a control mode of audio playing;
and if the control mode of the audio playing is a preset first gesture control mode, playing the ultrasonic signal with a preset frequency while playing the audio signal to be played.
In a fourth possible implementation manner provided on the basis of the third possible implementation manner, the processor, when executing the computer program, further implements the following steps:
after the control mode of audio playing is obtained, if the control mode of audio playing is not a preset first gesture control mode, loading a setting interface of the control mode;
resetting the control mode of the terminal audio playing according to the control mode setting instruction received in the setting interface of the control mode;
if the reset control mode of the audio playing is the preset first gesture control mode, the ultrasonic signal with the preset frequency is played while the audio signal to be played is played.
In a fifth possible implementation manner provided on the basis of the fourth possible implementation manner, after the control mode of the terminal audio playing is reset according to the control mode setting instruction received in the setting interface of the control mode, the processor executes the computer program to further implement the following steps:
if the reset control mode of the audio playing is the preset second gesture control mode, acquiring the echo intensity of the sound outlet of the loudspeaker while playing the audio signal to be played;
judging whether a sound outlet hole of the loudspeaker is blocked or not according to the echo intensity;
and if the sound outlet hole of the loudspeaker is blocked, changing the playing state of the audio signal to be played.
In a sixth possible implementation manner provided on the basis of the fifth possible implementation manner, the processor, when executing the computer program, further implements the following steps:
acquiring the signal intensity of an audio message to be played;
judging whether the ratio of the echo intensity of the sound outlet hole of the loudspeaker to the signal intensity of the audio message to be played is greater than a second preset threshold value or not;
and if the ratio of the echo intensity of the sound outlet hole of the loudspeaker to the signal intensity of the audio message to be played is greater than the second preset threshold value, determining that the sound outlet hole of the loudspeaker is blocked.
In the first to fifth possible implementation manners, the processor, when executing the computer program, further implements the following steps:
and if the current audio playing mode of the terminal is a loudspeaker playing mode, mixing the audio signal to be played with the ultrasonic signal with the preset frequency and then playing.
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 processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The input device 83 may include a keyboard, a touch pad, a fingerprint sensor (for collecting fingerprint information of a user and direction information of the fingerprint), a microphone, etc., and the output device 84 may include a display, a speaker, etc.
The memory 82 may include a read-only memory and a random access memory, and provides instructions and data to the processor 81. A portion or all of the memory 81 may also include non-volatile random access memory. For example, the memory 82 may also store device type information.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal and method may be implemented in other ways. For example, the above-described apparatus/terminal embodiments are merely illustrative, and for example, the division of the modules or units is only one logical division, and there may be other divisions when actually implemented, for example, a plurality of units or components may be combined or may be integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, executable files or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (20)

  1. A method for controlling audio playback, comprising:
    detecting whether the current audio playing mode of the terminal is a loudspeaker playing mode;
    if the current audio playing mode of the terminal is a loudspeaker playing mode, playing an ultrasonic signal with a preset frequency while playing an audio signal to be played;
    receiving a reflected signal of the ultrasonic signal, and identifying whether Doppler frequency shift occurs in the reflected signal; and if the Doppler frequency shift occurs in the reflected signal, changing the playing state of the audio signal to be played.
  2. The method of claim 1, wherein said identifying whether the reflected signal exhibits doppler shift comprises:
    acquiring a frequency domain signal corresponding to the reflection signal;
    calculating a difference value between the signal intensity of a first preset frequency band and the signal intensity of a second preset frequency band in the frequency domain signals;
    and if the difference is larger than a first preset threshold value, confirming that the Doppler frequency shift occurs in the reflected signal.
  3. The method of claim 1, wherein if the current audio playing mode of the terminal is a speaker playing mode, playing the ultrasonic signal with a preset frequency while playing the audio signal to be played comprises:
    if the current audio playing mode of the terminal is a loudspeaker playing mode, acquiring a control mode of audio playing;
    and if the control mode of the audio playing is a preset first gesture control mode, playing the ultrasonic signal with a preset frequency while playing the audio signal to be played.
  4. The method of claim 3, wherein after said obtaining the control pattern for audio playback, comprising:
    if the control mode of the audio playing is not the preset first gesture control mode, loading a setting interface of the control mode;
    resetting the control mode of the terminal audio playing according to the control mode setting instruction received in the setting interface of the control mode;
    if the reset control mode of the audio playing is the preset first gesture control mode, the ultrasonic signal with the preset frequency is played while the audio signal to be played is played.
  5. The method of claim 4, wherein after the resetting of the control mode of the terminal audio playing according to the control mode setting instruction received in the setting interface of the control mode, the method comprises:
    if the reset control mode of the audio playing is the preset second gesture control mode, acquiring the echo intensity of the sound outlet of the loudspeaker while playing the audio signal to be played;
    judging whether a sound outlet hole of the loudspeaker is blocked or not according to the echo intensity;
    and if the sound outlet hole of the loudspeaker is blocked, changing the playing state of the audio signal to be played.
  6. The switching method according to claim 5, wherein said determining whether the sound outlet hole of the speaker is blocked according to the echo intensity comprises:
    acquiring the signal intensity of an audio message to be played;
    judging whether the ratio of the echo intensity of the sound outlet hole of the loudspeaker to the signal intensity of the audio message to be played is greater than a second preset threshold value or not;
    and if the ratio of the echo intensity of the sound outlet hole of the loudspeaker to the signal intensity of the audio message to be played is greater than the second preset threshold value, determining that the sound outlet hole of the loudspeaker is blocked.
  7. The method according to any one of claims 1 to 6, wherein the playing the ultrasonic signal with the preset frequency while the audio signal to be played is played comprises:
    and mixing the audio signal to be played with the ultrasonic signal with the preset frequency and then playing.
  8. The method according to any of claims 1-6, wherein said changing the play state of the audio signal to be played comprises,
    and pausing the playing of the audio signal to be played, or closing the playing of the audio signal to be played.
  9. The method of claim 8, after said changing the play state of the audio signal to be played, comprising:
    playing an ultrasonic signal with a preset frequency after a first preset time period;
    receiving a reflected signal of the ultrasonic signal, and identifying whether Doppler frequency shift occurs in the reflected signal within a second preset time period;
    and if the Doppler frequency shift occurs in the reflected signal within a second preset time period, the playing of the audio signal to be played is resumed.
  10. The method of claim 9, wherein after said identifying whether the reflected signal is doppler shifted within a second predetermined time period, comprising:
    and if the Doppler frequency shift does not occur in the reflected signal within a second preset time period, closing the application for playing the audio.
  11. The method of claim 10, wherein said closing the application for audio playback comprises, after said closing:
    and setting the terminal to be in a screen-off state.
  12. An apparatus for controlling audio playback, comprising:
    the detection unit is used for detecting whether the current audio playing mode of the terminal is a loudspeaker playing mode;
    the playing unit is used for playing the ultrasonic signal with the preset frequency while playing the audio signal to be played if the current audio playing mode of the terminal is a loudspeaker playing mode;
    the changing unit is used for receiving a reflected signal of the ultrasonic signal and identifying whether Doppler frequency shift occurs in the reflected signal; and if the Doppler frequency shift occurs in the reflected signal, changing the playing state of the audio signal to be played.
  13. A terminal comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor when executing the computer program implements the steps of:
    detecting whether the current audio playing mode of the terminal is a loudspeaker playing mode;
    if the current audio playing mode of the terminal is a loudspeaker playing mode, playing an ultrasonic signal with a preset frequency while playing an audio signal to be played;
    receiving a reflected signal of the ultrasonic signal, and identifying whether Doppler frequency shift occurs in the reflected signal; and if the Doppler frequency shift occurs in the reflected signal, changing the playing state of the audio signal to be played.
  14. The terminal according to claim 13, wherein the processor, when executing the computer program, further performs the steps of:
    acquiring a frequency domain signal corresponding to the reflection signal;
    calculating a difference value between the signal intensity of a first preset frequency band and the signal intensity of a second preset frequency band in the frequency domain signals;
    and if the difference is larger than a first preset threshold value, confirming that the Doppler frequency shift occurs in the reflected signal.
  15. The terminal according to claim 13, wherein the processor, when executing the computer program, further performs the steps of:
    if the current audio playing mode of the terminal is a loudspeaker playing mode, acquiring a control mode of audio playing;
    and if the control mode of the audio playing is a preset first gesture control mode, playing the ultrasonic signal with a preset frequency while playing the audio signal to be played.
  16. The terminal according to claim 15, wherein the processor, when executing the computer program, further performs the steps of:
    after the control mode of audio playing is obtained, if the control mode of audio playing is not a preset first gesture control mode, loading a setting interface of the control mode;
    resetting the control mode of the terminal audio playing according to the control mode setting instruction received in the setting interface of the control mode;
    if the reset control mode of the audio playing is the preset first gesture control mode, the ultrasonic signal with the preset frequency is played while the audio signal to be played is played.
  17. The terminal according to claim 16, wherein after the control mode of the terminal audio playing is reset according to the control mode setting instruction received in the setting interface of the control mode, the processor executes the computer program to further implement the following steps:
    if the reset control mode of the audio playing is the preset second gesture control mode, acquiring the echo intensity of the sound outlet of the loudspeaker while playing the audio signal to be played;
    judging whether a sound outlet hole of the loudspeaker is blocked or not according to the echo intensity;
    and if the sound outlet hole of the loudspeaker is blocked, changing the playing state of the audio signal to be played.
  18. The terminal according to claim 17, wherein the processor, when executing the computer program, further performs the steps of:
    acquiring the signal intensity of an audio message to be played;
    judging whether the ratio of the echo intensity of the sound outlet hole of the loudspeaker to the signal intensity of the audio message to be played is greater than a second preset threshold value or not;
    and if the ratio of the echo intensity of the sound outlet hole of the loudspeaker to the signal intensity of the audio message to be played is greater than the second preset threshold value, determining that the sound outlet hole of the loudspeaker is blocked.
  19. A terminal according to any of claims 13-17, wherein the processor, when executing the computer program, further performs the steps of:
    and if the current audio playing mode of the terminal is a loudspeaker playing mode, mixing the audio signal to be played with the ultrasonic signal with the preset frequency and then playing.
  20. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 11.
CN201880098332.4A 2018-12-05 2018-12-05 Audio playing control method and device, terminal and computer readable storage medium Pending CN112789576A (en)

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/119381 WO2020113473A1 (en) 2018-12-05 2018-12-05 Audio playing control method and apparatus, and terminal and computer-readable storage medium

Publications (1)

Publication Number Publication Date
CN112789576A true CN112789576A (en) 2021-05-11

Family

ID=70974450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201880098332.4A Pending CN112789576A (en) 2018-12-05 2018-12-05 Audio playing control method and device, terminal and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN112789576A (en)
WO (1) WO2020113473A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992985A (en) * 2021-10-25 2022-01-28 上海艾为电子技术股份有限公司 Intelligent playing method and intelligent playing device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101312600A (en) * 2007-05-22 2008-11-26 鸿富锦精密工业(深圳)有限公司 Volume regulating apparatus and automatic volume regulating method
CN103402156A (en) * 2013-07-25 2013-11-20 瑞声科技(南京)有限公司 Acoustic system
CN107526437A (en) * 2017-07-31 2017-12-29 武汉大学 A kind of gesture identification method based on Audio Doppler characteristic quantification
CN107785027A (en) * 2017-10-31 2018-03-09 维沃移动通信有限公司 A kind of audio-frequency processing method and electronic equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105320252A (en) * 2014-06-26 2016-02-10 中兴通讯股份有限公司 Interactive method and device for player
CN105472497A (en) * 2015-12-07 2016-04-06 京东方科技集团股份有限公司 Headset control device, headset, wearable equipment and headset control method
CN108307268A (en) * 2017-12-12 2018-07-20 深圳依偎控股有限公司 A kind of live broadcasting method and live streaming equipment based on multi-microphone

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101312600A (en) * 2007-05-22 2008-11-26 鸿富锦精密工业(深圳)有限公司 Volume regulating apparatus and automatic volume regulating method
CN103402156A (en) * 2013-07-25 2013-11-20 瑞声科技(南京)有限公司 Acoustic system
CN107526437A (en) * 2017-07-31 2017-12-29 武汉大学 A kind of gesture identification method based on Audio Doppler characteristic quantification
CN107785027A (en) * 2017-10-31 2018-03-09 维沃移动通信有限公司 A kind of audio-frequency processing method and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113992985A (en) * 2021-10-25 2022-01-28 上海艾为电子技术股份有限公司 Intelligent playing method and intelligent playing device
CN113992985B (en) * 2021-10-25 2024-03-08 上海艾为电子技术股份有限公司 Intelligent playing method and intelligent playing device

Also Published As

Publication number Publication date
WO2020113473A1 (en) 2020-06-11

Similar Documents

Publication Publication Date Title
RU2666966C2 (en) Audio playback control method and device
CN107105367B (en) Audio signal processing method and terminal
CN108900770B (en) Method and device for controlling rotation of camera, smart watch and mobile terminal
CN111050203B (en) Video processing method and device, video processing equipment and storage medium
CN108174031B (en) Volume adjusting method, terminal equipment and computer readable storage medium
WO2021017943A1 (en) Ultrasonic processing method and apparatus, electronic device, and computer-readable medium
CN110809214B (en) Audio playing method, audio playing device and terminal equipment
CN109062535B (en) Sound production control method and device, electronic device and computer readable medium
JP7386289B2 (en) User interface for managing audio exposure
CN109032470A (en) Screenshot method, device, terminal and computer readable storage medium
CN108683801B (en) Method, device and terminal for controlling audio playing and computer readable storage medium
CN111986689A (en) Audio playing method, audio playing device and electronic equipment
CN107483735A (en) Method for controlling volume, device and the storage medium and mobile terminal of mobile terminal
WO2022017006A1 (en) Video processing method and apparatus, and terminal device and computer-readable storage medium
CN110175015B (en) Method and device for controlling volume of terminal equipment and terminal equipment
CN104935718A (en) Control method and mobile terminal
CN107770845B (en) mobile hotspot management method and device, terminal and storage medium
CN107734121B (en) Volume control method and device, storage medium and electronic equipment
CN110086941B (en) Voice playing method and device and terminal equipment
CN112789576A (en) Audio playing control method and device, terminal and computer readable storage medium
CN104572007A (en) Method for adjusting sound volume of terminal
CN109274826B (en) Voice playing mode switching method and device, terminal and computer readable storage medium
CN109584877A (en) Interactive voice control method and device
CN106776083B (en) Test control method and device and terminal equipment
CN105162998B (en) The denoising method and device of touch-tone signal

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