WO2021238844A1 - Audio output method and electronic device - Google Patents
Audio output method and electronic device Download PDFInfo
- Publication number
- WO2021238844A1 WO2021238844A1 PCT/CN2021/095471 CN2021095471W WO2021238844A1 WO 2021238844 A1 WO2021238844 A1 WO 2021238844A1 CN 2021095471 W CN2021095471 W CN 2021095471W WO 2021238844 A1 WO2021238844 A1 WO 2021238844A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- electronic device
- audio data
- sound transmission
- output
- directional sound
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 72
- 230000005540 biological transmission Effects 0.000 claims abstract description 159
- 238000004590 computer program Methods 0.000 claims description 12
- 230000004044 response Effects 0.000 claims description 11
- 230000006870 function Effects 0.000 description 18
- 230000008569 process Effects 0.000 description 13
- 238000012545 processing Methods 0.000 description 10
- 238000004891 communication Methods 0.000 description 6
- 238000001514 detection method Methods 0.000 description 4
- 230000000694 effects Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000008878 coupling Effects 0.000 description 3
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000010586 diagram Methods 0.000 description 3
- 238000005516 engineering process Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 3
- 238000012795 verification Methods 0.000 description 2
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- 230000001133 acceleration Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 230000005484 gravity Effects 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 238000009527 percussion Methods 0.000 description 1
- 230000000644 propagated effect Effects 0.000 description 1
- 238000010897 surface acoustic wave method Methods 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/02—Constructional features of telephone sets
- H04M1/19—Arrangements of transmitters, receivers, or complete sets to prevent eavesdropping, to attenuate local noise or to prevent undesired transmission; Mouthpieces or receivers specially adapted therefor
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input 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/16—Sound input; Sound output
- G06F3/165—Management of the audio stream, e.g. setting of volume, audio stream path
Definitions
- the embodiments of the present invention relate to the field of communication technologies, and in particular, to an audio output method and electronic equipment.
- the sound transmission mode of the loudspeaker is generally based on the linear acoustic theory. The sound is produced directly through the horn vibrating air molecules, and the sound waves propagate in all directions. The sound field is approximately spherical, that is, flying non-directional sound transmission. This sound transmission mode In scenarios such as call mode or voice chat mode, due to the non-directional nature of sound wave transmission, it is not conducive to privacy protection when outputting audio data.
- the present invention provides a method for controlling a sound transmission mode and an electronic device, so as to solve the problem of unfavorable privacy protection when outputting audio data in the prior art.
- the present invention is implemented as follows:
- an embodiment of the present invention provides an audio output method applied to an electronic device, and the method includes:
- the electronic device outputs audio data in a non-directional sound transmission mode
- the electronic device When the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner.
- an embodiment of the present invention also provides an electronic device, including:
- the first output module is used to output audio data in a non-directional sound transmission mode
- the second output module is configured to output audio data in a directional sound transmission mode when the distance between the electronic device and the target object is updated to the first predetermined range.
- an embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored on the memory and running on the processor, and the computer program is executed by the processor. When executed, the steps of the audio output method as described above are realized.
- an embodiment of the present invention also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the audio output method described above is implemented. step.
- the embodiments of the present invention also provide a computer software product, the computer software product is stored in a non-volatile storage medium, and the software product is configured to be executed by at least one processor to achieve the above The steps of the audio output method described.
- an embodiment of the present invention also provides an electronic device configured to execute the audio output method described above.
- the electronic device when the distance between the electronic device and the target object is updated to the first predetermined range, switches from outputting audio data in a non-directional sound transmission mode to switching in a directional transmission mode.
- the audio data is output by sound, so that when the user needs to listen to the audio data with higher privacy near the electronic device, by switching the directional sound transmission method to output the audio data, the risk of privacy leakage can be reduced, and the privacy of the audio output can be improved. safety.
- FIG. 1 shows one of the flowcharts of the audio output method according to the embodiment of the present invention
- Figure 2 shows the second flow chart of the audio output method of the embodiment of the present invention
- Figure 3 shows a block diagram of an electronic device according to an embodiment of the present invention
- FIG. 4 shows a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention.
- an embodiment of the present invention provides an audio output method, which is applied to an electronic device, and the method includes:
- Step 11 The electronic device outputs audio data in a non-directional sound transmission manner.
- Step 12 When the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner.
- the electronic device has a sound transmission component
- the sound transmission component has a directional sound transmission mode (that is, audio data can be output in a directional sound mode) and a non-directional sound transmission mode (that is, a non-directional sound transmission mode can be used). Output audio data in a way).
- the sound transmission component may include a directional sound transmission device and a non-directional sound transmission device, wherein the directional sound transmission device realizes a directional sound transmission mode, and the non-directional sound transmission device realizes a non-directional sound transmission mode.
- the sound transmission component may include a sound transmission device with a non-directional sound transmission mode and a directional sound transmission mode.
- the sound-transmitting component can be an earpiece, speaker, etc. in an electronic device.
- the sound-transmitting component can modulate the audio signal into an ultrasonic signal, and use the nonlinear interaction of ultrasonic propagation in the air to self-demodulate a high
- the directional audible sound beam that is, the directional sound transmission mode; the directional sound transmission mode restricts the sound wave to directional propagation in a certain direction, and the sound field is distributed in a long and narrow cone, ensuring that the sound wave can hardly be obtained in the area outside the sound field, or Only weak sound waves can be obtained to ensure the privacy of sound transmission.
- the sound transmission component may also have a non-directional sound transmission mode, which directly generates sound by vibrating air molecules through the horn according to the linear acoustic theory, so that the sound waves propagate in all directions, and the sound field is approximately spherical.
- the electronic device includes but is not limited to: mobile phones, tablet computers, wearable devices (such as smart watches, smart bracelets, earphones, etc.), computers, smart TVs, etc.
- the sound transmission component can be arranged at any position or combination of the top, bottom, and sides of the mobile phone, which is not specifically limited in the embodiment of the present invention.
- the electronic device when the electronic device outputs audio data through the earpiece, such as voice calls, voice output in video calls, audio output in instant messaging applications, etc., the default electronic device outputs in a non-directional sound transmission mode Audio data; when it is detected that the distance between the electronic device and the target object is within the first predetermined range, such as when the electronic device is close to the human ear, the electronic device switches to output audio data in a directional sound transmission mode to output audio through the earpiece Realize privacy protection while data, and improve the privacy security of audio output.
- Audio data such as voice calls, voice output in video calls, audio output in instant messaging applications, etc.
- the default electronic device when it is detected that the distance between the electronic device and the target object is within the first predetermined range, such as when the electronic device is close to the human ear, the electronic device switches to output audio data in a directional sound transmission mode to output audio through the earpiece Realize privacy protection while data, and improve the privacy security of audio output.
- the method may further include: in the case where the distance between the electronic device and the target object is updated to a first predetermined range, if the electronic device is connected to a headset (such as a wired headset) Or wireless earphones, etc.), the electronic device outputs audio data through the earphones.
- a headset such as a wired headset
- wireless earphones etc.
- the electronic device switches from outputting audio data in a non-directional sound transmission mode to a directional sound transmission mode Output audio data, so that when the user needs to listen to the audio data with higher privacy close to the electronic device, outputting the audio data by switching the directional sound transmission mode can reduce the risk of privacy leakage, thereby improving the privacy security of audio output.
- an embodiment of the present invention also provides an audio output method, including:
- Step 21 The electronic device outputs audio data in a non-directional sound transmission manner.
- Step 22 When the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner.
- Step 23 After the distance between the electronic device and the target object is updated to exceed the first predetermined range, and the distance between the electronic device and the target object is updated to the first predetermined range again , The electronic device outputs audio data in a non-directional sound transmission manner.
- the electronic device when the user answers by bringing the electronic device close to the ear, the electronic device outputs audio data in a directional sound transmission mode to improve the privacy and security of audio data output; further, the user can use the electronic device The way the device is far away from the human ear, and close to the human ear again, makes the electronic device switch to output audio data in a non-directional sound transmission mode, so as to realize the rapid switching of the audio data output mode, and avoid the need for the user to input through the display interface To switch the cumbersome operation of the audio data output mode.
- the foregoing step 23 may further include:
- the electronic device maintains the orientation Output audio data by way of sound transmission
- the electronic device After the distance between the electronic device and the target object is updated to exceed the first predetermined range, and within the first predetermined time period, the distance between the electronic device and the target object is updated to the first In the case of a predetermined range, the electronic device outputs audio data in a non-directional sound transmission manner.
- the electronic device In the call mode, when the electronic device is close to the ear or is already in the state of receiving the ear, if it is detected that the electronic device is far away from the ear or not close to the ear and reaches the first preset time period, the electronic device can keep the current
- the audio data is output in the manner of directional sound transmission; if the electronic device is detected to be far away from the ear or not close to the ear within the first preset period of time, it is detected again that the electronic device is close to the ear or is already in the state of receiving the ear.
- the device automatically switches to the previous mode, namely: output audio data in non-directional sound transmission; or when the electronic device is connected to earphones, it can also output audio data through earphones, thus realizing fast switching of the audio data output mode, and By setting the time limit of the switching response, it is beneficial to ensure the timeliness of the response of the electronic device and the accuracy of the switching of the audio data output mode.
- the method may further include:
- the electronic device displays the first icon
- the first icon is used to instruct the electronic device to output audio data in a directional sound transmission manner.
- the first icon when the electronic device is in the call mode, if the current display interface is the phone answering interface, the first icon can be displayed on the phone answering interface; if the current phone interface is running in the background, it can be in the top status bar The first icon is displayed; if the current display interface is a lock screen interface, the first icon may be displayed on the lock screen interface. In this way, by displaying the first icon on the display screen, it is convenient to prompt the user that the current electronic device outputs audio data in a directional sound transmission mode.
- the method may further include:
- the electronic device In response to the first input, the electronic device outputs audio data in a non-directional sound transmission manner, and updates the first icon to the second icon;
- the second icon is used to instruct the electronic device to output audio data in a non-directional sound transmission mode.
- the first input can be a click input for the first icon, or a sliding input that acts on the first icon and along a certain distance, or a sliding input that acts on the first icon and follows a predetermined track, etc.
- the embodiments of the invention are not limited thereto.
- a second input of the user to the second icon may also be received; and in response to the second input, the electronic device Switch to output audio data in a directional sound transmission mode, and update the second icon to be the first icon.
- the user switches the output mode of the audio data of the electronic device by inputting the first icon displayed on the display interface of the electronic device, so as to provide the user with manual operation when he knows the current audio output mode of the electronic device. Switch to avoid misoperation caused by blind switching.
- the step of outputting audio data by the electronic device in a directional sound transmission manner further It can specifically include:
- the electronic device When the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner through the first sound transmission component.
- the method may also include:
- the electronic device switches to output audio data in a directional sound transmission manner through the second sound transmission component.
- the first sound transmission component may be an earpiece
- the second sound transmission component may be a speaker
- the electronic device when the electronic device is in a call mode and the audio data is output through the earpiece in a directional sound transmission mode, if it is detected
- the distance from the electronic device to the user (such as the user’s ear) is updated to the second predetermined range, it is directly switched to output audio data through the speaker; wherein, the second predetermined range may mean that the audio data output through the earpiece does not meet the user's answering condition The distance range, so that the audio data is output by switching to the speaker to ensure the effect of the user listening to the audio data.
- the speaker when the electronic device is switched to output audio data through a speaker, the speaker outputs the audio data in a directional sound transmission manner, so as to reduce the risk of privacy leakage, thereby improving the privacy security of audio output.
- an embodiment of the present invention also provides an audio output method, which is applied to an electronic device, and the method includes:
- the audio output mode may include, but is not limited to: call mode (e.g., voice call mode, video call mode), voice chat mode (e.g., voice chat can be achieved through a communication application with voice conversation function), audio playback mode , Video playback mode, etc.
- call mode e.g., voice call mode, video call mode
- voice chat mode e.g., voice chat can be achieved through a communication application with voice conversation function
- audio playback mode e.g., video playback mode
- Video playback mode e.g., Video playback mode
- the electronic device When the current audio output mode is the target output mode, the electronic device outputs audio data in a directional sound transmission manner.
- the target output mode may be a pre-set audio output mode that requires directional sound transmission to output audio data.
- the user can preset the call mode, voice chat mode, and audio playback according to usage requirements. Any one or combination of mode, video playback mode, etc., is used as the target output mode.
- the target output mode can also be pre-configured by the system.
- audio output modes with high privacy requirements such as call mode and voice chat mode can be pre-configured by the system as the target output mode; this way, when the electronic device is in the target output mode, In the case of the mode, the sound transmission component is controlled to switch to the directional sound transmission mode, so that the audio signal in the target output mode can be directionally propagated in a predetermined direction, thereby reducing the risk of privacy leakage to a certain extent.
- the system can also pre-configure the target output mode as audio playback mode, video playback mode, etc., so that when the electronic device is in the target output mode, it switches to directional sound transmission to output audio data, so that the target output
- the audio signal in the mode can be directed to propagate in a predetermined direction, which can reduce the interference to the external environment during audio/video playback to a certain extent.
- the method may further include: acquiring audio data to be output in a case where the current audio output mode is not the target output mode.
- the target sound transmission mode is the directional sound transmission mode and the target sound transmission mode.
- the electronic device transmits according to the directional transmission
- the audio data is output in an acoustic manner; if the source application of the audio data and/or the content of the audio data does not meet the preset conditions, the electronic device outputs the audio in the non-directional sound transmission manner data.
- the target output mode is call mode or voice chat mode
- the audio data to be output comes from a recording application and other applications that may be at risk of privacy leakage
- the audio data to be output contains
- keywords such as keywords that carry private information
- the audio data is output by directional sound transmission when playing the audio data, so that the audio data can be directionally transmitted in a predetermined direction, which can reduce privacy to a certain extent Risk of leakage.
- the foregoing step of determining the target sound transmission mode of the audio data output by the electronic device according to the source application of the audio data may specifically include:
- the electronic device In the case that the source application is the target application, the electronic device outputs the audio data in the directional sound transmission mode
- the electronic device In the case that the source application is not the target application, the electronic device outputs the audio data in the non-directional sound transmission manner.
- the target application may be preset by the user or configured in advance by the system; for example, the target application may be a recording application, an application that sends verification code information by voice, etc., the embodiment of the present invention is not limited to this.
- the foregoing step of determining the target sound transmission mode for the electronic device to output the audio data according to the content of the audio data may specifically include:
- the electronic device In a case where the content of the audio data includes the preset keyword, the electronic device outputs the audio data in the manner of directional sound transmission;
- the electronic device In the case that the content of the audio data does not include the preset keyword, the electronic device outputs the audio data in the non-directional sound transmission manner.
- the preset keyword can be customized by the user, or pre-configured by the system, or can also be determined by the system using big data processing; for example, the preset keyword can be verification code information, user identity information , Property data information, etc.
- the embodiments of the present invention are not limited thereto.
- the foregoing step of determining the target sound transmission mode for the electronic device to output the audio data according to the source application of the audio data and the content of the audio data may specifically include:
- the electronic device In the case that the source application is the target application, the electronic device outputs the audio data in the directional sound transmission mode
- the source application is not the target application, performing content recognition processing on the audio data to determine whether the content of the audio data contains preset keywords;
- the electronic device In a case where the content of the audio data includes the preset keyword, the electronic device outputs the audio data in the manner of directional sound transmission;
- the electronic device In the case that the content of the audio data does not include the preset keyword, the electronic device outputs the audio data in the non-directional sound transmission manner.
- the content recognition process is used to determine whether the content of the audio data contains a preset Keywords, this can reduce the amount of data processing for content recognition processing for each audio data, which can improve processing efficiency to a certain extent.
- the step of outputting the audio data by the electronic device in the directional sound transmission mode may specifically include:
- the electronic device In the case that the current audio output mode is the target output mode, if it is detected that the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs in the manner of directional sound transmission The audio data;
- the method further includes:
- the electronic device changes from Outputting the audio data in the directional sound transmission mode is switched to output the audio data in the non-directional sound transmission mode.
- the electronic device when the electronic device is in a call mode (such as just making a call or connected to a call), the electronic device defaults to outputting audio data in a non-directional sound transmission mode; if it is detected that the electronic device is close to the ear or is already in the ear-receiving state , The electronic device automatically switches to output the audio data according to the directional sound transmission mode, which realizes the rapid switching of the audio data output mode.
- a call mode such as just making a call or connected to a call
- the electronic device defaults to outputting audio data in a non-directional sound transmission mode; if it is detected that the electronic device is close to the ear or is already in the ear-receiving state , The electronic device automatically switches to output the audio data according to the directional sound transmission mode, which realizes the rapid switching of the audio data output mode.
- the electronic device may Keep outputting the audio data according to the current directional sound transmission mode; if it is detected that the electronic device is far away from the ear or not close to the ear within a predetermined period of time, the electronic device is detected again close to the ear or is already in the ear listening state, then the electronic device Automatically switch to output the audio data according to the non-directional sound transmission mode, thereby realizing the rapid switching of the audio data output mode of the electronic device in the call mode, and setting the switching response time limit is beneficial to ensure the response of the electronic device Timeliness and to ensure the accuracy of the audio data output mode switching.
- the step of outputting the audio data by the electronic device in the directional sound transmission mode may specifically include:
- the electronic device When the electronic device is in the target audio output mode and the earphone is not connected to the electronic device, the electronic device outputs the audio data in the directional sound transmission mode.
- the electronic device when the electronic device is in the call mode (such as just making a call or connected to the phone), it is detected whether the electronic device is currently connected with a headset (such as a Bluetooth headset, a wired headset, etc.); if the electronic device is detected If a headset is currently connected, audio data is output through the headset; if it is detected that the electronic device is not currently connected with a headset, the electronic device outputs the audio data in the manner of directional sound transmission.
- a headset such as a Bluetooth headset, a wired headset, etc.
- the electronic device when the electronic device is in the call mode, and the electronic device is close to the ear or is already in the ear-answering state, if it is detected that the electronic device is far away from the ear or not close to the ear and reaches the first preset time period, the electronic device The audio data can be output in the current directional sound transmission mode; if it is detected that the electronic device is far away from the ear or not close to the ear within a predetermined period of time, it is detected again that the electronic device is close to the ear or is already in the ear listening state, then The electronic device automatically switches to the previous mode (for example, the electronic device outputs the audio data in a non-directional sound transmission mode or outputs the audio data through earphones), thereby realizing the rapid switching of the audio data output mode in the call mode .
- the previous mode for example, the electronic device outputs the audio data in a non-directional sound transmission mode or outputs the audio data through earphones
- the electronic device when the electronic device is in the call mode (such as just making a call or connected to the phone), it is detected whether the electronic device is currently connected with a headset (such as a Bluetooth headset, a wired headset, etc.); if the electronic device is detected If the device is currently connected to a headset, the audio data will be output through the headset; if it is detected that the electronic device is not currently connected to the headset, the electronic device will first output audio data in a non-directional sound transmission mode by default; if it is detected that the electronic device is close to the ear or has been When in the ear listening state, the electronic device automatically switches to output the audio data in a directional sound transmission mode.
- a headset such as a Bluetooth headset, a wired headset, etc.
- the speaker is activated to output the audio data in the manner of directional sound transmission, so as to ensure that when the distance between the electronic device and the user does not meet the conditions for the user to listen through the earpiece, the audio is output by switching to the speaker
- the data is used to ensure that the user listens to the audio data, and the speaker outputs the audio data in a directional sound transmission manner, which is further beneficial to reduce the risk of privacy leakage, thereby improving the privacy security of audio output.
- the electronic device can automatically switch different sound transmission modes to output audio data by identifying different audio output modes, and can reduce the manual operation of the user.
- this solution also reduces the risk of privacy leakage when audio data is output by outputting audio data in a directional sound transmission mode by the electronic device in a specific scenario, thereby improving the privacy security of audio data output.
- an embodiment of the present invention also provides an electronic device 300, and the electronic device 300 includes:
- the first output module 310 is configured to output audio data in a non-directional sound transmission mode
- the second output module 320 is configured to output audio data in a directional sound transmission mode when the distance between the electronic device and the target object is updated to a first predetermined range.
- the electronic device 300 further includes:
- the third output module is configured to update the distance between the electronic device and the target object to exceed the first predetermined range, and to update the distance between the electronic device and the target object to the In the case of the first predetermined range, the audio data is output in a non-directional sound transmission manner.
- the electronic device 300 further includes:
- a display module configured to display a first icon on the electronic device when the distance between the electronic device and the target object is updated to a first predetermined range
- the first icon is used to instruct the electronic device to output audio data in a directional sound transmission manner.
- the electronic device 300 further includes:
- the first receiving module is configured to receive a user's first input to the first icon
- the first response module is configured to output audio data in a non-directional sound transmission mode in response to the first input, and update the first icon to be the second icon;
- the second icon is used to instruct the electronic device to output audio data in a non-directional sound transmission manner.
- the second output module 320 is further specifically configured to: when the distance between the electronic device and the target object is updated to a first predetermined range, use the first sound transmission component to transmit sound in a directional manner.
- Output audio data when the distance between the electronic device and the target object is updated to a first predetermined range, use the first sound transmission component to transmit sound in a directional manner.
- the electronic device 300 further includes:
- the fourth output module is configured to switch the electronic device to output audio data in a directional sound transmission manner through the second sound transmission component when the distance between the electronic device and the target object is updated to a second predetermined range .
- the electronic device provided by the embodiment of the present invention can implement the various processes implemented by the electronic device in the method embodiments of FIG. 1 to FIG.
- the electronic device 300 when the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device switches from outputting audio data in a non-directional sound transmission mode to The audio data is output in the way of directional sound transmission, so that when the user needs to listen to the more private audio data close to the electronic device, by switching the directional sound transmission method to output the audio data, the risk of privacy leakage can be reduced, thereby improving the audio The privacy security of the output.
- Fig. 4 is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present invention.
- the electronic device 400 includes, but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, a processor 410, and Power supply 411 and other components.
- a radio frequency unit 401 includes, but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, a processor 410, and Power supply 411 and other components.
- Those skilled in the art can understand that the structure of the electronic device shown in FIG. 4 does not constitute a limitation on the electronic device.
- the electronic device may include more or less components than those shown in the figure, or a combination of certain components, or different components. Layout.
- electronic devices include, but are not limited to, mobile phones, tablet computers
- the audio output unit 403 includes a sound transmission component that has a directional sound transmission mode (that is, audio data can be output in a directional sound mode) and a non-directional sound transmission mode (that is, a non-directional sound transmission mode can be used. Output audio data).
- the processor 410 is configured to control the sound transmission component in the electronic device to output audio data in a non-directional sound transmission mode; and the situation where the distance between the electronic device and the target object is updated to the first predetermined range Next, the sound transmission component in the electronic device is controlled to output audio data in a directional sound transmission manner.
- the electronic device 400 when the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device switches from outputting audio data in a non-directional sound transmission mode to The audio data is output in the way of directional sound transmission, so that when the user needs to listen to the more private audio data close to the electronic device, by switching the directional sound transmission method to output the audio data, the risk of privacy leakage can be reduced, thereby improving the audio The privacy security of the output.
- the radio frequency unit 401 can be used for receiving and sending signals during the process of sending and receiving information or talking. Specifically, the downlink data from the base station is received and processed by the processor 410; in addition, Uplink data is sent to the base station.
- the radio frequency unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like.
- the radio frequency unit 401 can also communicate with the network and other devices through a wireless communication system.
- the electronic device provides users with wireless broadband Internet access through the network module 402, such as helping users to send and receive emails, browse web pages, and access streaming media.
- the audio output unit 403 can convert the audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output it as sound. Moreover, the audio output unit 403 may also provide audio output related to a specific function performed by the electronic device 400 (for example, call signal reception sound, message reception sound, etc.).
- the audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
- the input unit 404 is used to receive audio or video signals.
- the input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042.
- the graphics processor 4041 is configured to monitor images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode.
- the data is processed.
- the processed image frame may be displayed on the display unit 406.
- the image frame processed by the graphics processor 4041 may be stored in the memory 409 (or other storage medium) or sent via the radio frequency unit 401 or the network module 402.
- the microphone 4042 can receive sound, and can process such sound into audio data.
- the processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 401 in the case of a telephone call mode for output.
- the electronic device 400 also includes at least one sensor 405, such as a light sensor, a motion sensor, and other sensors.
- the light sensor includes an ambient light sensor and a proximity sensor.
- the ambient light sensor can adjust the brightness of the display panel 4061 according to the brightness of the ambient light.
- the proximity sensor can turn off the display panel 4061 and the display panel 4061 when the electronic device 400 is moved to the ear. / Or backlight.
- the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games) , Magnetometer attitude calibration), vibration recognition related functions (such as pedometer, percussion), etc.; sensor 405 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.
- the display unit 406 is used to display information input by the user or information provided to the user.
- the display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
- LCD liquid crystal display
- OLED organic light-emitting diode
- the user input unit 407 can be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the electronic device.
- the user input unit 407 includes a touch panel 4071 and other input devices 4072.
- the touch panel 4071 also called a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 4071 or near the touch panel 4071. operate).
- the touch panel 4071 may include two parts: a touch detection device and a touch controller.
- the touch detection device detects the user's touch position, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 410, the command sent by the processor 410 is received and executed.
- the touch panel 4071 can be realized by various types such as resistive, capacitive, infrared, and surface acoustic wave.
- the user input unit 407 may also include other input devices 4072.
- other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
- the touch panel 4071 can cover the display panel 4061.
- the touch panel 4071 detects a touch operation on or near it, it transmits it to the processor 410 to determine the type of the touch event, and then the processor 410 determines the type of touch event according to the touch The type of event provides corresponding visual output on the display panel 4061.
- the touch panel 4071 and the display panel 4061 are used as two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 4071 and the display panel 4061 can be integrated
- the implementation of the input and output functions of the electronic device is not specifically limited here.
- the interface unit 408 is an interface for connecting an external device and the electronic device 400.
- the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (Input/Output, I/O) port, video I/O port, headphone port, etc.
- the interface unit 408 can be used to receive input (for example, data information, power, etc.) from an external device and transmit the received input to one or more elements in the electronic device 400 or can be used to connect the electronic device 400 to an external device. Transfer data between devices.
- the memory 409 can be used to store software programs and various data.
- the memory 409 may mainly include a program storage area and a data storage area.
- the program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc.
- the memory 409 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
- the processor 410 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, runs or executes the software programs and/or modules stored in the memory 409, and calls the data stored in the memory 409 , Perform various functions of electronic equipment and process data, so as to monitor the electronic equipment as a whole.
- the processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc., and the modem
- the processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 410.
- the electronic device 400 may also include a power source 411 (such as a battery) for supplying power to various components.
- a power source 411 such as a battery
- the power source 411 may be logically connected to the processor 410 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. And other functions.
- the electronic device 400 includes some functional modules not shown, which will not be repeated here.
- the embodiment of the present invention also provides an electronic device, including a processor 410, a memory 409, and a computer program stored on the memory 409 and running on the processor 410.
- an electronic device including a processor 410, a memory 409, and a computer program stored on the memory 409 and running on the processor 410.
- the computer program is executed by the processor 410,
- the various processes of the foregoing embodiment of the control method for the sound transmission mode are realized, and the same technical effect can be achieved. In order to avoid repetition, the details are not repeated here.
- the embodiment of the present invention also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium.
- a computer program is stored on the computer-readable storage medium.
- the computer-readable storage medium such as read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM for short), magnetic disk, or optical disk, etc.
- the disclosed device and method may be implemented in other ways.
- the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented.
- the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
- the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
- the functional units in the various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
- the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present invention.
- a terminal which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.
- the program can be stored in a computer readable storage medium. When executed, it may include the procedures of the above-mentioned method embodiments.
- the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
- modules, units, and sub-units can be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (Digital Signal Processor, DSP), and digital signal processing equipment (DSP Device, DSPD). ), programmable logic devices (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, used to execute the present disclosure Described functions in other electronic units or combinations thereof.
- ASIC application specific integrated circuits
- DSP Digital Signal Processor
- DSP Device digital signal processing equipment
- PLD programmable logic devices
- Field-Programmable Gate Array Field-Programmable Gate Array
- FPGA Field-Programmable Gate Array
- the technology described in the embodiments of the present disclosure can be implemented by modules (for example, procedures, functions, etc.) that perform the functions described in the embodiments of the present disclosure.
- the software codes can be stored in the memory and executed by the processor.
- the memory can be implemented in the processor or external to the processor.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- General Health & Medical Sciences (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Signal Processing (AREA)
- Telephone Function (AREA)
Abstract
The present invention provides an audio output method and an electronic device. The method comprises: an electronic device outputs audio data in a non-directional sound transmission mode; when the distance between the electronic device and a target object is updated to a first predetermined range, the electronic device outputs the audio data in a directional sound transmission mode.
Description
相关申请的交叉引用Cross-references to related applications
本申请主张在2020年5月28日在中国提交的中国专利申请号No.202010465868.4的优先权,其全部内容通过引用包含于此。This application claims the priority of Chinese Patent Application No. 202010465868.4 filed in China on May 28, 2020, the entire content of which is incorporated herein by reference.
本发明实施例涉及通信技术领域,尤其涉及一种音频输出方法及电子设备。The embodiments of the present invention relate to the field of communication technologies, and in particular, to an audio output method and electronic equipment.
电子设备基本具备扬声器并且通过定制芯片等方式能够实现更好的传声效果。目前,扬声器的传声模式一般是以线性声学理论为主要依据,直接通过喇叭振动空气分子发声,声波向各个方向传播,其声场近似于球形分布,即飞非定向传声,这种传声模式在通话模式或者语音聊天模式下等场景中,由于声波传输的不定向性,在输出音频数据时不利于隐私保护。Electronic equipment is basically equipped with speakers and can achieve better sound transmission effects by customizing chips and other methods. At present, the sound transmission mode of the loudspeaker is generally based on the linear acoustic theory. The sound is produced directly through the horn vibrating air molecules, and the sound waves propagate in all directions. The sound field is approximately spherical, that is, flying non-directional sound transmission. This sound transmission mode In scenarios such as call mode or voice chat mode, due to the non-directional nature of sound wave transmission, it is not conducive to privacy protection when outputting audio data.
发明内容Summary of the invention
本发明提供了一种传声模式的控制方法及电子设备,以解决现有技术中在输出音频数据时不利于隐私保护的问题。The present invention provides a method for controlling a sound transmission mode and an electronic device, so as to solve the problem of unfavorable privacy protection when outputting audio data in the prior art.
为了解决上述技术问题,本发明是这样实现的:In order to solve the above technical problems, the present invention is implemented as follows:
第一方面,本发明实施例提供了一种音频输出方法,应用于电子设备,所述方法包括:In the first aspect, an embodiment of the present invention provides an audio output method applied to an electronic device, and the method includes:
所述电子设备按照非定向传声的方式输出音频数据;The electronic device outputs audio data in a non-directional sound transmission mode;
在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备按照定向传声的方式输出音频数据。When the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner.
第二方面,本发明实施例还提供了一种电子设备,包括:In the second aspect, an embodiment of the present invention also provides an electronic device, including:
第一输出模块,用于按照非定向传声的方式输出音频数据;The first output module is used to output audio data in a non-directional sound transmission mode;
第二输出模块,用于在所述电子设备与目标物体之间的距离更新至第一 预定范围的情况下,按照定向传声的方式输出音频数据。The second output module is configured to output audio data in a directional sound transmission mode when the distance between the electronic device and the target object is updated to the first predetermined range.
第三方面,本发明实施例还提供了一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如上所述的音频输出方法的步骤。In a third aspect, an embodiment of the present invention also provides an electronic device, including a processor, a memory, and a computer program stored on the memory and running on the processor, and the computer program is executed by the processor. When executed, the steps of the audio output method as described above are realized.
第四方面,本发明实施例还提供了一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如上所述的音频输出方法的步骤。In a fourth aspect, an embodiment of the present invention also provides a computer-readable storage medium having a computer program stored on the computer-readable storage medium, and when the computer program is executed by a processor, the audio output method described above is implemented. step.
第五方面,本发明实施例还提供了一种计算机软件产品,所述计算机软件产品被存储在非易失的存储介质中,所述软件产品被配置成被至少一个处理器执行以实现如上所述的音频输出方法的步骤。In a fifth aspect, the embodiments of the present invention also provide a computer software product, the computer software product is stored in a non-volatile storage medium, and the software product is configured to be executed by at least one processor to achieve the above The steps of the audio output method described.
第六方面,本发明实施例还提供了一种电子设备,所述电子设备被配置成用于执行如上所述的音频输出方法。In a sixth aspect, an embodiment of the present invention also provides an electronic device configured to execute the audio output method described above.
在本发明实施例中,在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备从按照非定向传声的方式输出音频数据,切换为按照定向传声的方式输出音频数据,这样在用户需要靠近电子设备收听隐私性较高的音频数据的情况下,通过切换定向传声的方式输出音频数据,可以降低隐私泄露的风险,从而提高音频输出的隐私安全性。In the embodiment of the present invention, when the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device switches from outputting audio data in a non-directional sound transmission mode to switching in a directional transmission mode. The audio data is output by sound, so that when the user needs to listen to the audio data with higher privacy near the electronic device, by switching the directional sound transmission method to output the audio data, the risk of privacy leakage can be reduced, and the privacy of the audio output can be improved. safety.
为了更清楚地说明本发明实施例的技术方案,下面将对本发明实施例的描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to explain the technical solutions of the embodiments of the present invention more clearly, the following will briefly introduce the accompanying drawings used in the description of the embodiments of the present invention. Obviously, the drawings in the following description are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.
图1表示本发明实施例的音频输出方法的流程图之一;FIG. 1 shows one of the flowcharts of the audio output method according to the embodiment of the present invention;
图2表示本发明实施例的音频输出方法的流程图之二;Figure 2 shows the second flow chart of the audio output method of the embodiment of the present invention;
图3表示本发明实施例的电子设备的框图;Figure 3 shows a block diagram of an electronic device according to an embodiment of the present invention;
图4表示本发明实施例的电子设备的硬件结构示意图。FIG. 4 shows a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present invention.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all of them. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative work shall fall within the protection scope of the present invention.
如图1所示,本发明实施例提供了一种音频输出方法,应用于电子设备,所述方法包括:As shown in FIG. 1, an embodiment of the present invention provides an audio output method, which is applied to an electronic device, and the method includes:
步骤11:所述电子设备按照非定向传声的方式输出音频数据。Step 11: The electronic device outputs audio data in a non-directional sound transmission manner.
步骤12:在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备按照定向传声的方式输出音频数据。Step 12: When the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner.
可选地,所述电子设备具有传声组件,所述传声组件具有定向传声模式(即可以采用定向传声的方式输出音频数据)和非定向传声模式(即可以采用非定向传声的方式输出音频数据)。例如:该传声组件可以包括定向传声器件和非定向传声器件,其中定向传声器件实现定向传声模式,非定向传声器件实现非定向传声模式。再例如:该传声组件可以包括具有非定向传声模式和定向传声模式的传声器件。Optionally, the electronic device has a sound transmission component, and the sound transmission component has a directional sound transmission mode (that is, audio data can be output in a directional sound mode) and a non-directional sound transmission mode (that is, a non-directional sound transmission mode can be used). Output audio data in a way). For example: the sound transmission component may include a directional sound transmission device and a non-directional sound transmission device, wherein the directional sound transmission device realizes a directional sound transmission mode, and the non-directional sound transmission device realizes a non-directional sound transmission mode. For another example: the sound transmission component may include a sound transmission device with a non-directional sound transmission mode and a directional sound transmission mode.
可选的,传声组件可以是电子设备中的听筒、扬声器等,传声组件可以将音频信号调制到超声信号中,利用超声在空气中传播时的非线性交互作用而自解调出具备高度指向性的可听声束,即定向传声模式;定向传声模式是将声波限制在某一方向定向传播,声场呈狭长锥形分布,保证在该声场外的区域几乎不能获取该声波,或者仅能获取微弱的声波,保证声音传输的私密性。传声组件还可以具有非定向传声模式,该非定向传声模式依据线性声学理论直接通过喇叭振动空气分子发声,使得声波向各个方向传播,其声场近似于球形分布。Optionally, the sound-transmitting component can be an earpiece, speaker, etc. in an electronic device. The sound-transmitting component can modulate the audio signal into an ultrasonic signal, and use the nonlinear interaction of ultrasonic propagation in the air to self-demodulate a high The directional audible sound beam, that is, the directional sound transmission mode; the directional sound transmission mode restricts the sound wave to directional propagation in a certain direction, and the sound field is distributed in a long and narrow cone, ensuring that the sound wave can hardly be obtained in the area outside the sound field, or Only weak sound waves can be obtained to ensure the privacy of sound transmission. The sound transmission component may also have a non-directional sound transmission mode, which directly generates sound by vibrating air molecules through the horn according to the linear acoustic theory, so that the sound waves propagate in all directions, and the sound field is approximately spherical.
可选的,该电子设备包括但不限于:手机、平板电脑、可穿戴设备(如:智能手表、智能手环、耳机等)、电脑、智能电视等。例如:以手机为例,该传声组件可以设置于手机的顶部、底部和侧边中的任意一个位置或组合,本发明实施例不做具体限定。Optionally, the electronic device includes but is not limited to: mobile phones, tablet computers, wearable devices (such as smart watches, smart bracelets, earphones, etc.), computers, smart TVs, etc. For example, taking a mobile phone as an example, the sound transmission component can be arranged at any position or combination of the top, bottom, and sides of the mobile phone, which is not specifically limited in the embodiment of the present invention.
可选地,电子设备在通过听筒输出音频数据的情况下,如语音通话、视频通话中的语音输出、即时通信类应用中的音频输出等场景下,默认电子设 备按照非定向传声的方式输出音频数据;当检测到电子设备与目标物体之间的距离在第一预定范围内,如电子设备靠近人耳时,电子设备切换为按照定向传声的方式输出音频数据,以在通过听筒输出音频数据时实现隐私保护,提高音频输出的隐私安全性。Optionally, when the electronic device outputs audio data through the earpiece, such as voice calls, voice output in video calls, audio output in instant messaging applications, etc., the default electronic device outputs in a non-directional sound transmission mode Audio data; when it is detected that the distance between the electronic device and the target object is within the first predetermined range, such as when the electronic device is close to the human ear, the electronic device switches to output audio data in a directional sound transmission mode to output audio through the earpiece Realize privacy protection while data, and improve the privacy security of audio output.
可选地,上述步骤11之后,所述方法还可以包括:在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,若所述电子设备连接有耳机(如有线耳机或者无线耳机等),则电子设备通过所述耳机输出音频数据。Optionally, after the above step 11, the method may further include: in the case where the distance between the electronic device and the target object is updated to a first predetermined range, if the electronic device is connected to a headset (such as a wired headset) Or wireless earphones, etc.), the electronic device outputs audio data through the earphones.
上述方案中,在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备从按照非定向传声的方式输出音频数据,切换为按照定向传声的方式输出音频数据,这样在用户需要靠近电子设备收听隐私性较高的音频数据的情况下,通过切换定向传声的方式输出音频数据,可以降低隐私泄露的风险,从而提高音频输出的隐私安全性。In the above solution, when the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device switches from outputting audio data in a non-directional sound transmission mode to a directional sound transmission mode Output audio data, so that when the user needs to listen to the audio data with higher privacy close to the electronic device, outputting the audio data by switching the directional sound transmission mode can reduce the risk of privacy leakage, thereby improving the privacy security of audio output.
如图2,本发明实施例还提供了一种音频输出方法,包括:As shown in Figure 2, an embodiment of the present invention also provides an audio output method, including:
步骤21:所述电子设备按照非定向传声的方式输出音频数据。Step 21: The electronic device outputs audio data in a non-directional sound transmission manner.
步骤22:在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备按照定向传声的方式输出音频数据。Step 22: When the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner.
步骤23:在所述电子设备与目标物体之间的距离更新至超出所述第一预定范围后,并且所述电子设备与目标物体之间的距离再次更新至所述第一预定范围的情况下,所述电子设备按照非定向传声的方式输出音频数据。Step 23: After the distance between the electronic device and the target object is updated to exceed the first predetermined range, and the distance between the electronic device and the target object is updated to the first predetermined range again , The electronic device outputs audio data in a non-directional sound transmission manner.
可选地,以语音通话为例,用户通过将电子设备靠近耳朵接听时,电子设备按照定向传声的方式输出音频数据,以提高音频数据输出的隐私安全性;进一步地,用户可以通过将电子设备远离人耳,并再一次靠近人耳的方式,使得电子设备切换为按照非定向传声的方式输出音频数据,从而实现音频数据的输出方式的快速切换,避免用户需要通过针对显示界面的输入来切换音频数据的输出方式的繁琐操作。Optionally, taking a voice call as an example, when the user answers by bringing the electronic device close to the ear, the electronic device outputs audio data in a directional sound transmission mode to improve the privacy and security of audio data output; further, the user can use the electronic device The way the device is far away from the human ear, and close to the human ear again, makes the electronic device switch to output audio data in a non-directional sound transmission mode, so as to realize the rapid switching of the audio data output mode, and avoid the need for the user to input through the display interface To switch the cumbersome operation of the audio data output mode.
可选地,上述步骤23可以进一步包括:Optionally, the foregoing step 23 may further include:
在所述电子设备与目标物体之间的距离更新至超出所述第一预定范围,且超出所述第一预定范围的时长超过第一预设时间段的情况下,所述电子设备保持按照定向传声的方式输出音频数据;In the case that the distance between the electronic device and the target object is updated to exceed the first predetermined range, and the time period beyond the first predetermined range exceeds the first preset time period, the electronic device maintains the orientation Output audio data by way of sound transmission;
在所述电子设备与目标物体之间的距离更新至超出所述第一预定范围后,并在所述第一预定时间段内所述电子设备与目标物体之间的距离再次更新至所述第一预定范围的情况下,所述电子设备按照非定向传声的方式输出音频数据。After the distance between the electronic device and the target object is updated to exceed the first predetermined range, and within the first predetermined time period, the distance between the electronic device and the target object is updated to the first In the case of a predetermined range, the electronic device outputs audio data in a non-directional sound transmission manner.
例如:在通话模式下,电子设备靠近耳朵或已处于耳朵接听的状态的情况下,若检测到电子设备远离耳朵或非靠近耳朵的状态并达到第一预设时间段时,电子设备可以保持当前的按照定向传声的方式输出音频数据;若检测到电子设备远离耳朵或非靠近耳朵的状态后的第一预设时间段内再次检测到电子设备靠近耳朵或已处于耳朵接听的状态,则电子设备自动切换到先前的模式,即:非定向传声的方式输出音频数据;或者在电子设备连接耳机的情况下还可以通过耳机输出音频数据,从而实现了音频数据的输出方式的快速切换,并且通过设置切换响应的时限,有利于保证电子设备响应的及时性以及保证音频数据的输出方式切换的准确性。For example: In the call mode, when the electronic device is close to the ear or is already in the state of receiving the ear, if it is detected that the electronic device is far away from the ear or not close to the ear and reaches the first preset time period, the electronic device can keep the current The audio data is output in the manner of directional sound transmission; if the electronic device is detected to be far away from the ear or not close to the ear within the first preset period of time, it is detected again that the electronic device is close to the ear or is already in the state of receiving the ear. The device automatically switches to the previous mode, namely: output audio data in non-directional sound transmission; or when the electronic device is connected to earphones, it can also output audio data through earphones, thus realizing fast switching of the audio data output mode, and By setting the time limit of the switching response, it is beneficial to ensure the timeliness of the response of the electronic device and the accuracy of the switching of the audio data output mode.
可选地,根据以上至少一个实施例,所述方法还可以包括:Optionally, according to at least one of the above embodiments, the method may further include:
在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备显示第一图标;In a case where the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device displays the first icon;
其中,所述第一图标用于指示所述电子设备按照定向传声的方式输出音频数据。Wherein, the first icon is used to instruct the electronic device to output audio data in a directional sound transmission manner.
例如:电子设备处于通话模式的情况下,若当前显示界面为电话接听界面,则可以在该电话接听界面上显示所述第一图标;若当前电话界面处于后台运行,则可以在顶部状态栏中显示所述第一图标;若当前显示界面为锁屏界面,则可以在该锁屏界面上显示所述第一图标。这样,通过在显示屏中显示第一图标,以便于提示用户当前电子设备为按照定向传声的方式输出音频数据。For example: when the electronic device is in the call mode, if the current display interface is the phone answering interface, the first icon can be displayed on the phone answering interface; if the current phone interface is running in the background, it can be in the top status bar The first icon is displayed; if the current display interface is a lock screen interface, the first icon may be displayed on the lock screen interface. In this way, by displaying the first icon on the display screen, it is convenient to prompt the user that the current electronic device outputs audio data in a directional sound transmission mode.
可选地,所述电子设备显示第一图标的步骤之后,所述方法还可以包括:Optionally, after the step of displaying the first icon on the electronic device, the method may further include:
接收用户对所述第一图标的第一输入;Receiving a user's first input on the first icon;
响应于所述第一输入,所述电子设备按照非定向传声的方式输出音频数据,并更新所述第一图标为第二图标;In response to the first input, the electronic device outputs audio data in a non-directional sound transmission manner, and updates the first icon to the second icon;
其中,所述第二图标用于指示所述电子设备按照非定向传声的方式输出 音频数据。Wherein, the second icon is used to instruct the electronic device to output audio data in a non-directional sound transmission mode.
例如:该第一输入可以是针对第一图标的点击输入,或者是作用于第一图标上并沿一定距离的滑动输入,或者是作用于第一图标上并沿预定轨迹的滑动输入等,本发明实施例不以此为限。For example: the first input can be a click input for the first icon, or a sliding input that acts on the first icon and along a certain distance, or a sliding input that acts on the first icon and follows a predetermined track, etc. The embodiments of the invention are not limited thereto.
进一步地,在电子设备中的显示界面中显示有所述第二图标的情况下,还可以接收用户对所述第二图标的第二输入;并响应于所述第二输入,所述电子设备切换为按照定向传声的方式输出音频数据,并更新所述第二图标为第一图标。Further, when the second icon is displayed on the display interface of the electronic device, a second input of the user to the second icon may also be received; and in response to the second input, the electronic device Switch to output audio data in a directional sound transmission mode, and update the second icon to be the first icon.
该实施例中,用户通过对电子设备的显示界面中显示的第一图标的输入,来切换电子设备的音频数据的输出方式,以便于提供用户知悉当前电子设备的音频输出模式的情况下进行手动切换,避免盲目切换导致的误操作。In this embodiment, the user switches the output mode of the audio data of the electronic device by inputting the first icon displayed on the display interface of the electronic device, so as to provide the user with manual operation when he knows the current audio output mode of the electronic device. Switch to avoid misoperation caused by blind switching.
可选地,根据以上至少一个实施例,在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备按照定向传声的方式输出音频数据的步骤,还可以具体包括:Optionally, according to at least one of the above embodiments, in the case where the distance between the electronic device and the target object is updated to a first predetermined range, the step of outputting audio data by the electronic device in a directional sound transmission manner, further It can specifically include:
在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备通过第一传声组件按照定向传声的方式输出音频数据。When the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner through the first sound transmission component.
进一步地,所述在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备通过第一传声组件按照定向传声的方式输出音频数据的步骤之后,所述方法还可以包括:Further, after the step of the electronic device outputting audio data in a directional sound transmission manner through the first sound transmission component in the case where the distance between the electronic device and the target object is updated to the first predetermined range, The method may also include:
在所述电子设备与目标物体之间的距离更新至第二预定范围的情况下,所述电子设备切换为通过第二传声组件按照定向传声的方式输出音频数据。When the distance between the electronic device and the target object is updated to the second predetermined range, the electronic device switches to output audio data in a directional sound transmission manner through the second sound transmission component.
可选地,该第一传声组件可以是听筒,该第二传声组件可以是扬声器;例如:电子设备处于通话模式,且通过听筒按照定向传声的方式输出音频数据的情况下,若检测到电子设备到用户(如用户耳朵)的距离更新至第二预定范围,则直接切换为通过扬声器输出音频数据;其中,该第二预定范围可以是指通过听筒输出音频数据不满足用户接听条件的距离范围,这样通过切换为扬声器输出音频数据以保证用户接听音频数据的效果。Optionally, the first sound transmission component may be an earpiece, and the second sound transmission component may be a speaker; for example, when the electronic device is in a call mode and the audio data is output through the earpiece in a directional sound transmission mode, if it is detected When the distance from the electronic device to the user (such as the user’s ear) is updated to the second predetermined range, it is directly switched to output audio data through the speaker; wherein, the second predetermined range may mean that the audio data output through the earpiece does not meet the user's answering condition The distance range, so that the audio data is output by switching to the speaker to ensure the effect of the user listening to the audio data.
进一步地,在所述电子设备切换为通过通过扬声器输出音频数据的情况下,该扬声器按照定向传声的方式输出音频数据,以降低隐私泄露的风险, 从而提高音频输出的隐私安全性。Further, when the electronic device is switched to output audio data through a speaker, the speaker outputs the audio data in a directional sound transmission manner, so as to reduce the risk of privacy leakage, thereby improving the privacy security of audio output.
可选地,本发明实施例还提供了一种音频输出方法,应用于电子设备,所述方法包括:Optionally, an embodiment of the present invention also provides an audio output method, which is applied to an electronic device, and the method includes:
确定所述电子设备的当前音频输出模式。Determine the current audio output mode of the electronic device.
可选的,音频输出模式可以包括但不限于:通话模式(如:语音通话模式、视频通话模式)、语音聊天模式(如:通过具有语音会话功能的通讯应用可实现语音聊天)、音频播放模式、视频播放模式等。Optionally, the audio output mode may include, but is not limited to: call mode (e.g., voice call mode, video call mode), voice chat mode (e.g., voice chat can be achieved through a communication application with voice conversation function), audio playback mode , Video playback mode, etc.
在所述当前音频输出模式为目标输出模式的情况下,所述电子设备按照定向传声的方式输出音频数据。When the current audio output mode is the target output mode, the electronic device outputs audio data in a directional sound transmission manner.
可选的,该目标输出模式可以是预先设定的需要采用定向传声的方式来输出音频数据的音频输出模式,例如:用户可以根据使用需求来预先设定通话模式、语音聊天模式、音频播放模式、视频播放模式等中的任意一个或组合,作为目标输出模式。Optionally, the target output mode may be a pre-set audio output mode that requires directional sound transmission to output audio data. For example, the user can preset the call mode, voice chat mode, and audio playback according to usage requirements. Any one or combination of mode, video playback mode, etc., is used as the target output mode.
当然,该目标输出模式也可以是由系统预先配置,例如:针对通话模式、语音聊天模式等隐私需求较高的音频输出模式,可以由系统预先配置为目标输出模式;这样当电子设备处于目标输出模式的情况下,即控制传声组件切换至定向传声模式,以使得目标输出模式下的音频信号能够在预定方向定向传播,从而可以在一定程度上降低隐私泄露的风险。Of course, the target output mode can also be pre-configured by the system. For example, audio output modes with high privacy requirements such as call mode and voice chat mode can be pre-configured by the system as the target output mode; this way, when the electronic device is in the target output mode, In the case of the mode, the sound transmission component is controlled to switch to the directional sound transmission mode, so that the audio signal in the target output mode can be directionally propagated in a predetermined direction, thereby reducing the risk of privacy leakage to a certain extent.
再例如:系统也可以是预先配置目标输出模式为音频播放模式、视频播放模式等,这样当电子设备处于目标输出模式的情况下,即切换至定向传声的方式输出音频数据,以使得目标输出模式下的音频信号能够在预定方向定向传播,从而可以在一定程度上降低音频/视频播放时对外界环境的干扰。For another example: the system can also pre-configure the target output mode as audio playback mode, video playback mode, etc., so that when the electronic device is in the target output mode, it switches to directional sound transmission to output audio data, so that the target output The audio signal in the mode can be directed to propagate in a predetermined direction, which can reduce the interference to the external environment during audio/video playback to a certain extent.
可选地,在确定所述电子设备的当前音频输出模式的步骤之后,所述方法还可以包括:在所述当前音频输出模式不是所述目标输出模式的情况下,获取待输出的音频数据。Optionally, after the step of determining the current audio output mode of the electronic device, the method may further include: acquiring audio data to be output in a case where the current audio output mode is not the target output mode.
根据所述音频数据的来源应用和/或所述音频数据的内容,确定所述电子设备输出所述音频数据的目标传声方式;所述目标传声方式为所述定向传声的方式和所述非定向传声的方式中的一个。According to the source application of the audio data and/or the content of the audio data, determine the target sound transmission mode for the electronic device to output the audio data; the target sound transmission mode is the directional sound transmission mode and the target sound transmission mode. One of the non-directional sound transmission methods.
具体的,在所述当前音频输出模式不是所述目标输出模式的情况下,若 所述音频数据的来源应用和/或所述音频数据的内容符合预设条件,则电子设备按照所述定向传声的方式输出所述音频数据;若所述音频数据的来源应用和/或所述音频数据的内容不符合预设条件,则所述电子设备按照所述非定向传声的方式输出所述音频数据。Specifically, in the case that the current audio output mode is not the target output mode, if the source application of the audio data and/or the content of the audio data meets a preset condition, the electronic device transmits according to the directional transmission The audio data is output in an acoustic manner; if the source application of the audio data and/or the content of the audio data does not meet the preset conditions, the electronic device outputs the audio in the non-directional sound transmission manner data.
例如:在目标输出模式为通话模式、语音聊天模式的情况下,若检测到待输出的音频数据来源于录音应用等可能存在隐私泄露风险的应用,和/或,待输出的音频数据中包含有预设关键词(如携带隐私信息的关键词)时,则在播放该音频数据时采用定向传声的方式进行输出,使得该音频数据能够在预定方向定向传播,从而可以在一定程度上降低隐私泄露的风险。For example: when the target output mode is call mode or voice chat mode, if it is detected that the audio data to be output comes from a recording application and other applications that may be at risk of privacy leakage, and/or the audio data to be output contains When keywords (such as keywords that carry private information) are preset, the audio data is output by directional sound transmission when playing the audio data, so that the audio data can be directionally transmitted in a predetermined direction, which can reduce privacy to a certain extent Risk of leakage.
可选的,上述根据所述音频数据的来源应用,确定所述电子设备输出所述音频数据的目标传声方式的步骤,可以具体包括:Optionally, the foregoing step of determining the target sound transmission mode of the audio data output by the electronic device according to the source application of the audio data may specifically include:
获取所述音频数据的来源应用;Obtain the source application of the audio data;
在所述来源应用为目标应用的情况下,所述电子设备按照所述定向传声的方式输出所述音频数据;In the case that the source application is the target application, the electronic device outputs the audio data in the directional sound transmission mode;
在所述来源应用不是所述目标应用的情况下,所述电子设备按照所述非定向传声的方式输出所述音频数据。In the case that the source application is not the target application, the electronic device outputs the audio data in the non-directional sound transmission manner.
其中,目标应用可以由用户预先设定或者由系统预先配置;如该目标应用可以是录音应用、通过语音方式发送验证码信息的应用等,本发明实施例不以此为限。The target application may be preset by the user or configured in advance by the system; for example, the target application may be a recording application, an application that sends verification code information by voice, etc., the embodiment of the present invention is not limited to this.
可选的,上述根据所述音频数据的内容,确定所述电子设备输出所述音频数据的目标传声方式的步骤,可以具体包括:Optionally, the foregoing step of determining the target sound transmission mode for the electronic device to output the audio data according to the content of the audio data may specifically include:
对所述音频数据进行内容识别处理,确定所述音频数据的内容中是否包含预设关键词;Performing content recognition processing on the audio data to determine whether the content of the audio data contains preset keywords;
在所述音频数据的内容包含所述预设关键词的情况下,所述电子设备按照所述定向传声的方式输出所述音频数据;In a case where the content of the audio data includes the preset keyword, the electronic device outputs the audio data in the manner of directional sound transmission;
在所述音频数据的内容不包含所述预设关键词的情况下,所述电子设备按照所述非定向传声的方式输出所述音频数据。In the case that the content of the audio data does not include the preset keyword, the electronic device outputs the audio data in the non-directional sound transmission manner.
其中,该预设关键词可以由用户自定义设置,或者由系统预先配置,或者还可以是由系统采用大数据处理的方式确定;如:该预设关键词可以是验 证码信息、用户身份信息、财产数据信息等,本发明实施例不以此为限。Among them, the preset keyword can be customized by the user, or pre-configured by the system, or can also be determined by the system using big data processing; for example, the preset keyword can be verification code information, user identity information , Property data information, etc. The embodiments of the present invention are not limited thereto.
可选的,上述根据所述音频数据的来源应用和所述音频数据的内容,确定所述电子设备输出所述音频数据的目标传声方式的步骤,可以具体包括:Optionally, the foregoing step of determining the target sound transmission mode for the electronic device to output the audio data according to the source application of the audio data and the content of the audio data may specifically include:
获取所述音频数据的来源应用;Obtain the source application of the audio data;
在所述来源应用为目标应用的情况下,所述电子设备按照所述定向传声的方式输出所述音频数据;In the case that the source application is the target application, the electronic device outputs the audio data in the directional sound transmission mode;
在所述来源应用不是所述目标应用的情况下,对所述音频数据进行内容识别处理,确定所述音频数据的内容中是否包含预设关键词;In the case that the source application is not the target application, performing content recognition processing on the audio data to determine whether the content of the audio data contains preset keywords;
在所述音频数据的内容包含所述预设关键词的情况下,所述电子设备按照所述定向传声的方式输出所述音频数据;In a case where the content of the audio data includes the preset keyword, the electronic device outputs the audio data in the manner of directional sound transmission;
在所述音频数据的内容不包含所述预设关键词的情况下,所述电子设备按照所述非定向传声的方式输出所述音频数据。In the case that the content of the audio data does not include the preset keyword, the electronic device outputs the audio data in the non-directional sound transmission manner.
该实施例中,电子设备的当前音频输出模式不是目标输出模式,且待输出的音频数据的来源应用也不是目标应用的情况下,才通过内容识别处理判断该音频数据的内容中是否包含预设关键词,这样可以降低针对每一个音频数据都进行内容识别处理的数据处理量,从而可以在一定程度上提高处理效率。In this embodiment, when the current audio output mode of the electronic device is not the target output mode, and the source application of the audio data to be output is not the target application, the content recognition process is used to determine whether the content of the audio data contains a preset Keywords, this can reduce the amount of data processing for content recognition processing for each audio data, which can improve processing efficiency to a certain extent.
可选的,根据以上至少一个实施例,在所述当前音频输出模式为目标输出模式的情况下,所述电子设备按照所述定向传声的方式输出所述音频数据的步骤,可以具体包括:Optionally, according to at least one of the above embodiments, when the current audio output mode is the target output mode, the step of outputting the audio data by the electronic device in the directional sound transmission mode may specifically include:
在所述当前音频输出模式为目标输出模式的情况下,若检测到所述电子设备与目标物体之间的距离更新至第一预定范围,则所述电子设备按照所述定向传声的方式输出所述音频数据;In the case that the current audio output mode is the target output mode, if it is detected that the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs in the manner of directional sound transmission The audio data;
进一步地,所述电子设备按照所述定向传声的方式输出所述音频数据之后,还包括:Further, after the electronic device outputs the audio data in the directional sound transmission mode, the method further includes:
在检测到所述电子设备与目标物体的距离更新至超出所述第一预定范围,并且所述电子设备与目标物体的距离再次更新至所述第一预定范围的情况下,所述电子设备从按照所述定向传声的方式输出所述音频数据切换为按照所述非定向传声的方式输出所述音频数据。When it is detected that the distance between the electronic device and the target object is updated to exceed the first predetermined range, and the distance between the electronic device and the target object is updated to the first predetermined range again, the electronic device changes from Outputting the audio data in the directional sound transmission mode is switched to output the audio data in the non-directional sound transmission mode.
具体的,当电子设备处于通话模式(如刚拨打电话或接通电话)时,电子设备默认处于按照非定向传声的方式输出音频数据;若检测到电子设备靠近耳朵或已处于耳朵接听状态时,电子设备自动切换到按照定向传声的方式输出所述音频数据,实现了音频数据的输出方式的快速切换。Specifically, when the electronic device is in a call mode (such as just making a call or connected to a call), the electronic device defaults to outputting audio data in a non-directional sound transmission mode; if it is detected that the electronic device is close to the ear or is already in the ear-receiving state , The electronic device automatically switches to output the audio data according to the directional sound transmission mode, which realizes the rapid switching of the audio data output mode.
进一步地,当电子设备处于通话模式,且电子设备靠近耳朵或已处于耳朵接听状态的情况下,若检测到电子设备远离耳朵或非靠近耳朵状态并达到第一预设时间段时,电子设备可以保持按照当前的定向传声的方式输出所述音频数据;若检测到电子设备远离耳朵或非靠近耳朵状态的预定时间段内,再次检测到电子设备靠近耳朵或已处于耳朵接听状态,则电子设备自动切换到按照非定向传声的方式输出所述音频数据,从而实现了在通话模式下电子设备的音频数据的输出方式的快速切换,并且通过设置切换响应的时限,有利于保证电子设备响应的及时性以及保证音频数据的输出方式切换的准确性。Further, when the electronic device is in the call mode and the electronic device is close to the ear or is already in the ear-answering state, if it is detected that the electronic device is far away from the ear or not close to the ear and reaches the first preset time period, the electronic device may Keep outputting the audio data according to the current directional sound transmission mode; if it is detected that the electronic device is far away from the ear or not close to the ear within a predetermined period of time, the electronic device is detected again close to the ear or is already in the ear listening state, then the electronic device Automatically switch to output the audio data according to the non-directional sound transmission mode, thereby realizing the rapid switching of the audio data output mode of the electronic device in the call mode, and setting the switching response time limit is beneficial to ensure the response of the electronic device Timeliness and to ensure the accuracy of the audio data output mode switching.
可选的,根据以上至少一个实施例,在所述当前音频输出模式为目标输出模式的情况下,电子设备按照所述定向传声的方式输出所述音频数据的步骤,可以具体包括:Optionally, according to at least one of the above embodiments, when the current audio output mode is the target output mode, the step of outputting the audio data by the electronic device in the directional sound transmission mode may specifically include:
在所述电子设备处于目标音频输出模式,且所述电子设备未连接耳机的情况下,电子设备按照所述定向传声的方式输出所述音频数据。When the electronic device is in the target audio output mode and the earphone is not connected to the electronic device, the electronic device outputs the audio data in the directional sound transmission mode.
具体的,作为一种实现方式:当电子设备处于通话模式(如刚拨打电话或接通电话)时,检测电子设备当前是否连接有耳机(如蓝牙耳机、有线耳机等);若检测到电子设备当前连接有耳机,则通过该耳机输出音频数据;若检测到电子设备当前未连接有耳机,则电子设备按照所述定向传声的方式输出所述音频数据。Specifically, as an implementation method: when the electronic device is in the call mode (such as just making a call or connected to the phone), it is detected whether the electronic device is currently connected with a headset (such as a Bluetooth headset, a wired headset, etc.); if the electronic device is detected If a headset is currently connected, audio data is output through the headset; if it is detected that the electronic device is not currently connected with a headset, the electronic device outputs the audio data in the manner of directional sound transmission.
进一步地,当电子设备处于通话模式,且电子设备靠近耳朵或已处于耳朵接听状态的情况下,若检测到电子设备远离耳朵或非靠近耳朵状态时并达到第一预设时间段时,电子设备可以保持按照当前的定向传声的方式输出所述音频数据;若检测到电子设备远离耳朵或非靠近耳朵状态的预定时间段内,再一次检测到电子设备靠近耳朵或已处于耳朵接听状态,则电子设备自动切换到先前的模式(如:电子设备按照非定向传声的方式输出所述音频数据或通过耳机输出所述音频数据),从而实现了在通话模式下音频数据的输出方式 的快速切换。Further, when the electronic device is in the call mode, and the electronic device is close to the ear or is already in the ear-answering state, if it is detected that the electronic device is far away from the ear or not close to the ear and reaches the first preset time period, the electronic device The audio data can be output in the current directional sound transmission mode; if it is detected that the electronic device is far away from the ear or not close to the ear within a predetermined period of time, it is detected again that the electronic device is close to the ear or is already in the ear listening state, then The electronic device automatically switches to the previous mode (for example, the electronic device outputs the audio data in a non-directional sound transmission mode or outputs the audio data through earphones), thereby realizing the rapid switching of the audio data output mode in the call mode .
具体的,作为另一种实现方式:当电子设备处于通话模式(如刚拨打电话或接通电话)时,检测电子设备当前是否连接有耳机(如蓝牙耳机、有线耳机等);若检测到电子设备当前连接有耳机,则通过该耳机输出音频数据;若检测到电子设备当前未连接有耳机,则电子设备默认先按照非定向传声的方式输出音频数据;若检测到电子设备靠近耳朵或已处于耳朵接听状态时,电子设备自动切换到按照定向传声的方式输出所述音频数据。Specifically, as another implementation method: when the electronic device is in the call mode (such as just making a call or connected to the phone), it is detected whether the electronic device is currently connected with a headset (such as a Bluetooth headset, a wired headset, etc.); if the electronic device is detected If the device is currently connected to a headset, the audio data will be output through the headset; if it is detected that the electronic device is not currently connected to the headset, the electronic device will first output audio data in a non-directional sound transmission mode by default; if it is detected that the electronic device is close to the ear or has been When in the ear listening state, the electronic device automatically switches to output the audio data in a directional sound transmission mode.
可选地,当电子设备处于通话模式,且检测到电子设备当前连接有耳机之后,若检测电子设备从连接耳机的状态切换到未连接耳机的状态,且电子设备与目标物体之间的距离大于第二预定距离的情况下,则启动扬声器按照定向传声的方式输出所述音频数据,以保证在电子设备与用户之间的距离不满足用户通过听筒接听的条件时,通过切换为扬声器输出音频数据以保证用户接听音频数据的效果,并且该扬声器按照定向传声的方式输出所述音频数据还进一步有利于降低隐私泄露的风险,从而提高音频输出的隐私安全性。Optionally, when the electronic device is in the call mode and it is detected that the electronic device is currently connected to the headset, if the detection electronic device switches from the state of connecting the headset to the state of not connecting the headset, and the distance between the electronic device and the target object is greater than In the case of the second predetermined distance, the speaker is activated to output the audio data in the manner of directional sound transmission, so as to ensure that when the distance between the electronic device and the user does not meet the conditions for the user to listen through the earpiece, the audio is output by switching to the speaker The data is used to ensure that the user listens to the audio data, and the speaker outputs the audio data in a directional sound transmission manner, which is further beneficial to reduce the risk of privacy leakage, thereby improving the privacy security of audio output.
上述方案中,电子设备通过识别不同的音频输出模式,可以自动切换不同的传声方式来输出音频数据,并且可以减少用户的手动操作。此外本方案还通过在特定场景下电子设备按照定向传声的方式输出音频数据,以降低音频数据输出时的隐私泄露风险,从而提高音频数据输出的隐私安全性。In the above solution, the electronic device can automatically switch different sound transmission modes to output audio data by identifying different audio output modes, and can reduce the manual operation of the user. In addition, this solution also reduces the risk of privacy leakage when audio data is output by outputting audio data in a directional sound transmission mode by the electronic device in a specific scenario, thereby improving the privacy security of audio data output.
如图3所示,本发明实施例还提供了一种电子设备300,所述电子设备300包括:As shown in FIG. 3, an embodiment of the present invention also provides an electronic device 300, and the electronic device 300 includes:
第一输出模块310,用于按照非定向传声的方式输出音频数据;The first output module 310 is configured to output audio data in a non-directional sound transmission mode;
第二输出模块320,用于在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,按照定向传声的方式输出音频数据。The second output module 320 is configured to output audio data in a directional sound transmission mode when the distance between the electronic device and the target object is updated to a first predetermined range.
可选地,所述电子设备300还包括:Optionally, the electronic device 300 further includes:
第三输出模块,用于在所述电子设备与目标物体之间的距离更新至超出所述第一预定范围后,并且所述在所述电子设备与目标物体之间的距离再次更新至所述第一预定范围的情况下,按照非定向传声的方式输出音频数据。The third output module is configured to update the distance between the electronic device and the target object to exceed the first predetermined range, and to update the distance between the electronic device and the target object to the In the case of the first predetermined range, the audio data is output in a non-directional sound transmission manner.
可选地,所述电子设备300还包括:Optionally, the electronic device 300 further includes:
显示模块,用于在所述电子设备与目标物体之间的距离更新至第一预定 范围的情况下,所述电子设备显示第一图标;A display module, configured to display a first icon on the electronic device when the distance between the electronic device and the target object is updated to a first predetermined range;
其中,所述第一图标用于指示所述电子设备按照定向传声的方式输出音频数据。Wherein, the first icon is used to instruct the electronic device to output audio data in a directional sound transmission manner.
可选地,所述电子设备300还包括:Optionally, the electronic device 300 further includes:
第一接收模块,用于接收用户对所述第一图标的第一输入;The first receiving module is configured to receive a user's first input to the first icon;
第一响应模块,用于响应于所述第一输入,按照非定向传声的方式输出音频数据,并更新所述第一图标为第二图标;The first response module is configured to output audio data in a non-directional sound transmission mode in response to the first input, and update the first icon to be the second icon;
其中,所述第二图标用于指示所述电子设备按照非定向传声的方式输出音频数据。Wherein, the second icon is used to instruct the electronic device to output audio data in a non-directional sound transmission manner.
可选地,所述第二输出模块320还具体用于:在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,通过第一传声组件按照定向传声的方式输出音频数据;Optionally, the second output module 320 is further specifically configured to: when the distance between the electronic device and the target object is updated to a first predetermined range, use the first sound transmission component to transmit sound in a directional manner. Output audio data;
所述电子设备300还包括:The electronic device 300 further includes:
第四输出模块,用于在所述电子设备与目标物体之间的距离更新至第二预定范围的情况下,所述电子设备切换为通过第二传声组件按照定向传声的方式输出音频数据。The fourth output module is configured to switch the electronic device to output audio data in a directional sound transmission manner through the second sound transmission component when the distance between the electronic device and the target object is updated to a second predetermined range .
本发明实施例提供的电子设备能够实现图1至图2的方法实施例中电子设备实现的各个过程,为避免重复,这里不再赘述。The electronic device provided by the embodiment of the present invention can implement the various processes implemented by the electronic device in the method embodiments of FIG. 1 to FIG.
本发明实施例中的电子设备300,在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备从按照非定向传声的方式输出音频数据,切换为按照定向传声的方式输出音频数据,这样在用户需要靠近电子设备收听隐私性较高的音频数据的情况下,通过切换定向传声的方式输出音频数据,可以降低隐私泄露的风险,从而提高音频输出的隐私安全性。In the electronic device 300 in the embodiment of the present invention, when the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device switches from outputting audio data in a non-directional sound transmission mode to The audio data is output in the way of directional sound transmission, so that when the user needs to listen to the more private audio data close to the electronic device, by switching the directional sound transmission method to output the audio data, the risk of privacy leakage can be reduced, thereby improving the audio The privacy security of the output.
图4为实现本发明各个实施例的一种电子设备的硬件结构示意图。Fig. 4 is a schematic diagram of the hardware structure of an electronic device that implements various embodiments of the present invention.
该电子设备400包括但不限于:射频单元401、网络模块402、音频输出单元403、输入单元404、传感器405、显示单元406、用户输入单元407、接口单元408、存储器409、处理器410、以及电源411等部件。本领域技术人员可以理解,图4中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的 部件布置。在本发明实施例中,电子设备包括但不限于手机、平板电脑、笔记本电脑、掌上电脑、车载终端、可穿戴设备、以及计步器等。The electronic device 400 includes, but is not limited to: a radio frequency unit 401, a network module 402, an audio output unit 403, an input unit 404, a sensor 405, a display unit 406, a user input unit 407, an interface unit 408, a memory 409, a processor 410, and Power supply 411 and other components. Those skilled in the art can understand that the structure of the electronic device shown in FIG. 4 does not constitute a limitation on the electronic device. The electronic device may include more or less components than those shown in the figure, or a combination of certain components, or different components. Layout. In the embodiments of the present invention, electronic devices include, but are not limited to, mobile phones, tablet computers, notebook computers, palmtop computers, vehicle-mounted terminals, wearable devices, and pedometers.
其中,音频输出单元403包括传声组件,所述传声组件具有定向传声模式(即可以采用定向传声的方式输出音频数据)和非定向传声模式(即可以采用非定向传声的方式输出音频数据)。Among them, the audio output unit 403 includes a sound transmission component that has a directional sound transmission mode (that is, audio data can be output in a directional sound mode) and a non-directional sound transmission mode (that is, a non-directional sound transmission mode can be used. Output audio data).
其中,处理器410,用于控制所述电子设备中的传声组件按照非定向传声的方式输出音频数据;以及在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,控制所述电子设备中的传声组件按照定向传声的方式输出音频数据。Wherein, the processor 410 is configured to control the sound transmission component in the electronic device to output audio data in a non-directional sound transmission mode; and the situation where the distance between the electronic device and the target object is updated to the first predetermined range Next, the sound transmission component in the electronic device is controlled to output audio data in a directional sound transmission manner.
本发明实施例中的电子设备400,在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备从按照非定向传声的方式输出音频数据,切换为按照定向传声的方式输出音频数据,这样在用户需要靠近电子设备收听隐私性较高的音频数据的情况下,通过切换定向传声的方式输出音频数据,可以降低隐私泄露的风险,从而提高音频输出的隐私安全性。In the electronic device 400 in the embodiment of the present invention, when the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device switches from outputting audio data in a non-directional sound transmission mode to The audio data is output in the way of directional sound transmission, so that when the user needs to listen to the more private audio data close to the electronic device, by switching the directional sound transmission method to output the audio data, the risk of privacy leakage can be reduced, thereby improving the audio The privacy security of the output.
应理解的是,本发明实施例中,射频单元401可用于收发信息或通话过程中,信号的接收和发送,具体的,将来自基站的下行数据接收后,给处理器410处理;另外,将上行的数据发送给基站。通常,射频单元401包括但不限于天线、至少一个放大器、收发信机、耦合器、低噪声放大器、双工器等。此外,射频单元401还可以通过无线通信系统与网络和其他设备通信。It should be understood that, in the embodiment of the present invention, the radio frequency unit 401 can be used for receiving and sending signals during the process of sending and receiving information or talking. Specifically, the downlink data from the base station is received and processed by the processor 410; in addition, Uplink data is sent to the base station. Generally, the radio frequency unit 401 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier, a duplexer, and the like. In addition, the radio frequency unit 401 can also communicate with the network and other devices through a wireless communication system.
电子设备通过网络模块402为用户提供了无线的宽带互联网访问,如帮助用户收发电子邮件、浏览网页和访问流式媒体等。The electronic device provides users with wireless broadband Internet access through the network module 402, such as helping users to send and receive emails, browse web pages, and access streaming media.
音频输出单元403可以将射频单元401或网络模块402接收的或者在存储器409中存储的音频数据转换成音频信号并且输出为声音。而且,音频输出单元403还可以提供与电子设备400执行的特定功能相关的音频输出(例如,呼叫信号接收声音、消息接收声音等等)。音频输出单元403包括扬声器、蜂鸣器以及受话器等。The audio output unit 403 can convert the audio data received by the radio frequency unit 401 or the network module 402 or stored in the memory 409 into an audio signal and output it as sound. Moreover, the audio output unit 403 may also provide audio output related to a specific function performed by the electronic device 400 (for example, call signal reception sound, message reception sound, etc.). The audio output unit 403 includes a speaker, a buzzer, a receiver, and the like.
输入单元404用于接收音频或视频信号。输入单元404可以包括图形处理器(Graphics Processing Unit,GPU)4041和麦克风4042,图形处理器4041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静 态图片或视频的图像数据进行处理。处理后的图像帧可以显示在显示单元406上。经图形处理器4041处理后的图像帧可以存储在存储器409(或其它存储介质)中或者经由射频单元401或网络模块402进行发送。麦克风4042可以接收声音,并且能够将这样的声音处理为音频数据。处理后的音频数据可以在电话通话模式的情况下转换为可经由射频单元401发送到移动通信基站的格式输出。The input unit 404 is used to receive audio or video signals. The input unit 404 may include a graphics processing unit (GPU) 4041 and a microphone 4042. The graphics processor 4041 is configured to monitor images of still pictures or videos obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The data is processed. The processed image frame may be displayed on the display unit 406. The image frame processed by the graphics processor 4041 may be stored in the memory 409 (or other storage medium) or sent via the radio frequency unit 401 or the network module 402. The microphone 4042 can receive sound, and can process such sound into audio data. The processed audio data can be converted into a format that can be sent to a mobile communication base station via the radio frequency unit 401 in the case of a telephone call mode for output.
电子设备400还包括至少一种传感器405,比如光传感器、运动传感器以及其他传感器。具体地,光传感器包括环境光传感器及接近传感器,其中,环境光传感器可根据环境光线的明暗来调节显示面板4061的亮度,接近传感器可在电子设备400移动到耳边时,关闭显示面板4061和/或背光。作为运动传感器的一种,加速计传感器可检测各个方向上(一般为三轴)加速度的大小,静止时可检测出重力的大小及方向,可用于识别电子设备姿态(比如横竖屏切换、相关游戏、磁力计姿态校准)、振动识别相关功能(比如计步器、敲击)等;传感器405还可以包括指纹传感器、压力传感器、虹膜传感器、分子传感器、陀螺仪、气压计、湿度计、温度计、红外线传感器等,在此不再赘述。The electronic device 400 also includes at least one sensor 405, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor. The ambient light sensor can adjust the brightness of the display panel 4061 according to the brightness of the ambient light. The proximity sensor can turn off the display panel 4061 and the display panel 4061 when the electronic device 400 is moved to the ear. / Or backlight. As a kind of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in various directions (usually three-axis), and can detect the magnitude and direction of gravity when stationary, and can be used to identify the posture of electronic devices (such as horizontal and vertical screen switching, related games) , Magnetometer attitude calibration), vibration recognition related functions (such as pedometer, percussion), etc.; sensor 405 can also include fingerprint sensors, pressure sensors, iris sensors, molecular sensors, gyroscopes, barometers, hygrometers, thermometers, Infrared sensors, etc., will not be repeated here.
显示单元406用于显示由用户输入的信息或提供给用户的信息。显示单元406可包括显示面板4061,可以采用液晶显示器(Liquid Crystal Display,LCD)、有机发光二极管(Organic Light-Emitting Diode,OLED)等形式来配置显示面板4061。The display unit 406 is used to display information input by the user or information provided to the user. The display unit 406 may include a display panel 4061, and the display panel 4061 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.
用户输入单元407可用于接收输入的数字或字符信息,以及产生与电子设备的用户设置以及功能控制有关的键信号输入。具体地,用户输入单元407包括触控面板4071以及其他输入设备4072。触控面板4071,也称为触摸屏,可收集用户在其上或附近的触摸操作(比如用户使用手指、触笔等任何适合的物体或附件在触控面板4071上或在触控面板4071附近的操作)。触控面板4071可包括触摸检测装置和触摸控制器两个部分。其中,触摸检测装置检测用户的触摸方位,并检测触摸操作带来的信号,将信号传送给触摸控制器;触摸控制器从触摸检测装置上接收触摸信息,并将它转换成触点坐标,再送给处理器410,接收处理器410发来的命令并加以执行。此外,可以采用电 阻式、电容式、红外线以及表面声波等多种类型实现触控面板4071。除了触控面板4071,用户输入单元407还可以包括其他输入设备4072。具体地,其他输入设备4072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The user input unit 407 can be used to receive inputted numeric or character information, and generate key signal input related to user settings and function control of the electronic device. Specifically, the user input unit 407 includes a touch panel 4071 and other input devices 4072. The touch panel 4071, also called a touch screen, can collect the user's touch operations on or near it (for example, the user uses any suitable objects or accessories such as fingers, stylus, etc.) on the touch panel 4071 or near the touch panel 4071. operate). The touch panel 4071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch position, and detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into contact coordinates, and then sends it To the processor 410, the command sent by the processor 410 is received and executed. In addition, the touch panel 4071 can be realized by various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 4071, the user input unit 407 may also include other input devices 4072. Specifically, other input devices 4072 may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), trackball, mouse, and joystick, which will not be repeated here.
进一步的,触控面板4071可覆盖在显示面板4061上,当触控面板4071检测到在其上或附近的触摸操作后,传送给处理器410以确定触摸事件的类型,随后处理器410根据触摸事件的类型在显示面板4061上提供相应的视觉输出。虽然在图4中,触控面板4071与显示面板4061是作为两个独立的部件来实现电子设备的输入和输出功能,但是在某些实施例中,可以将触控面板4071与显示面板4061集成而实现电子设备的输入和输出功能,具体此处不做限定。Further, the touch panel 4071 can cover the display panel 4061. When the touch panel 4071 detects a touch operation on or near it, it transmits it to the processor 410 to determine the type of the touch event, and then the processor 410 determines the type of touch event according to the touch The type of event provides corresponding visual output on the display panel 4061. Although in FIG. 4, the touch panel 4071 and the display panel 4061 are used as two independent components to implement the input and output functions of the electronic device, in some embodiments, the touch panel 4071 and the display panel 4061 can be integrated The implementation of the input and output functions of the electronic device is not specifically limited here.
接口单元408为外部装置与电子设备400连接的接口。例如,外部装置可以包括有线或无线头戴式耳机端口、外部电源(或电池充电器)端口、有线或无线数据端口、存储卡端口、用于连接具有识别模块的装置的端口、音频输入/输出(Input/Output,I/O)端口、视频I/O端口、耳机端口等等。接口单元408可以用于接收来自外部装置的输入(例如,数据信息、电力等等)并且将接收到的输入传输到电子设备400内的一个或多个元件或者可以用于在电子设备400和外部装置之间传输数据。The interface unit 408 is an interface for connecting an external device and the electronic device 400. For example, the external device may include a wired or wireless headset port, an external power source (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, audio input/output (Input/Output, I/O) port, video I/O port, headphone port, etc. The interface unit 408 can be used to receive input (for example, data information, power, etc.) from an external device and transmit the received input to one or more elements in the electronic device 400 or can be used to connect the electronic device 400 to an external device. Transfer data between devices.
存储器409可用于存储软件程序以及各种数据。存储器409可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序(比如声音播放功能、图像播放功能等)等;存储数据区可存储根据手机的使用所创建的数据(比如音频数据、电话本等)等。此外,存储器409可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。The memory 409 can be used to store software programs and various data. The memory 409 may mainly include a program storage area and a data storage area. The program storage area may store an operating system, an application program required by at least one function (such as a sound playback function, an image playback function, etc.), etc.; Data created by the use of mobile phones (such as audio data, phone book, etc.), etc. In addition, the memory 409 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices.
处理器410是电子设备的控制中心,利用各种接口和线路连接整个电子设备的各个部分,通过运行或执行存储在存储器409内的软件程序和/或模块,以及调用存储在存储器409内的数据,执行电子设备的各种功能和处理数据,从而对电子设备进行整体监控。处理器410可包括一个或多个处理单元;优选的,处理器410可集成应用处理器和调制解调处理器,其中,应用处理器 主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器410中。The processor 410 is the control center of the electronic device. It uses various interfaces and lines to connect the various parts of the entire electronic device, runs or executes the software programs and/or modules stored in the memory 409, and calls the data stored in the memory 409 , Perform various functions of electronic equipment and process data, so as to monitor the electronic equipment as a whole. The processor 410 may include one or more processing units; preferably, the processor 410 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, application programs, etc., and the modem The processor mainly deals with wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 410.
电子设备400还可以包括给各个部件供电的电源411(比如电池),优选的,电源411可以通过电源管理系统与处理器410逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。The electronic device 400 may also include a power source 411 (such as a battery) for supplying power to various components. Preferably, the power source 411 may be logically connected to the processor 410 through a power management system, so as to manage charging, discharging, and power consumption management through the power management system. And other functions.
另外,电子设备400包括一些未示出的功能模块,在此不再赘述。In addition, the electronic device 400 includes some functional modules not shown, which will not be repeated here.
优选的,本发明实施例还提供一种电子设备,包括处理器410,存储器409,存储在存储器409上并可在所述处理器410上运行的计算机程序,该计算机程序被处理器410执行时实现上述传声模式的控制方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Preferably, the embodiment of the present invention also provides an electronic device, including a processor 410, a memory 409, and a computer program stored on the memory 409 and running on the processor 410. When the computer program is executed by the processor 410, The various processes of the foregoing embodiment of the control method for the sound transmission mode are realized, and the same technical effect can be achieved. In order to avoid repetition, the details are not repeated here.
本发明实施例还提供一种计算机可读存储介质,计算机可读存储介质上存储有计算机程序,该计算机程序被处理器执行时实现上述传声模式的控制方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。其中,所述的计算机可读存储介质,如只读存储器(Read-Only Memory,简称ROM)、随机存取存储器(Random Access Memory,简称RAM)、磁碟或者光盘等。The embodiment of the present invention also provides a computer-readable storage medium, and a computer program is stored on the computer-readable storage medium. The same technical effect, in order to avoid repetition, will not be repeated here. Wherein, the computer-readable storage medium, such as read-only memory (Read-Only Memory, ROM for short), random access memory (Random Access Memory, RAM for short), magnetic disk, or optical disk, etc.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。It should be noted that in this article, the terms "including", "including" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements not only includes those elements, It also includes other elements that are not explicitly listed, or elements inherent to the process, method, article, or device. If there are no more restrictions, the element defined by the sentence "including a..." does not exclude the existence of other identical elements in the process, method, article, or device that includes the element.
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本公开的范围。A person of ordinary skill in the art may be aware that the units and algorithm steps of the examples described in combination with the embodiments disclosed herein can be implemented by electronic hardware or a combination of computer software and electronic hardware. Whether these functions are executed by hardware or software depends on the specific application and design constraint conditions of the technical solution. Professionals and technicians can use different methods for each specific application to implement the described functions, but such implementation should not be considered as going beyond the scope of the present disclosure.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统、装置和单元的具体工作过程,可以参考前述方法实施例中的对应 过程,在此不再赘述。Those skilled in the art can clearly understand that, for the convenience and conciseness of description, the specific working process of the system, device and unit described above can refer to the corresponding process in the foregoing method embodiment, which will not be repeated here.
在本申请所提供的实施例中,应该理解到,所揭露的装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。In the embodiments provided in this application, it should be understood that the disclosed device and method may be implemented in other ways. For example, the device embodiments described above are merely illustrative, for example, the division of the units is only a logical function division, and there may be other divisions in actual implementation, for example, multiple units or components can be combined or It can be integrated into another system, or some features can be ignored or not implemented. In addition, the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, and may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objectives of the solutions of the embodiments.
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, the functional units in the various embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units may be integrated into one unit.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本发明的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本发明各个实施例所述的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the method of the above embodiments can be implemented by means of software plus the necessary general hardware platform. Of course, it can also be implemented by hardware, but in many cases the former is better.的实施方式。 Based on this understanding, the technical solution of the present invention essentially or the part that contributes to the existing technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM/RAM, magnetic disk, The optical disc) includes several instructions to make a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the method described in each embodiment of the present invention.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来控制相关的硬件来完成,所述的程序可存储于计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储器(Read-Only Memory,ROM)或随机存取存储器(Random Access Memory,RAM)等。A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be implemented by controlling the relevant hardware through a computer program. The program can be stored in a computer readable storage medium. When executed, it may include the procedures of the above-mentioned method embodiments. Wherein, the storage medium may be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.
可以理解的是,本公开实施例描述的这些实施例可以用硬件、软件、固件、中间件、微码或其组合来实现。对于硬件实现,模块、单元、子单元可 以实现在一个或多个专用集成电路(Application Specific Integrated Circuits,ASIC)、数字信号处理器(Digital Signal Processor,DSP)、数字信号处理设备(DSP Device,DSPD)、可编程逻辑设备(Programmable Logic Device,PLD)、现场可编程门阵列(Field-Programmable Gate Array,FPGA)、通用处理器、控制器、微控制器、微处理器、用于执行本公开所述功能的其它电子单元或其组合中。It can be understood that the embodiments described in the embodiments of the present disclosure may be implemented by hardware, software, firmware, middleware, microcode, or a combination thereof. For hardware implementation, modules, units, and sub-units can be implemented in one or more application specific integrated circuits (ASIC), digital signal processors (Digital Signal Processor, DSP), and digital signal processing equipment (DSP Device, DSPD). ), programmable logic devices (Programmable Logic Device, PLD), Field-Programmable Gate Array (Field-Programmable Gate Array, FPGA), general-purpose processors, controllers, microcontrollers, microprocessors, used to execute the present disclosure Described functions in other electronic units or combinations thereof.
对于软件实现,可通过执行本公开实施例所述功能的模块(例如过程、函数等)来实现本公开实施例所述的技术。软件代码可存储在存储器中并通过处理器执行。存储器可以在处理器中或在处理器外部实现。For software implementation, the technology described in the embodiments of the present disclosure can be implemented by modules (for example, procedures, functions, etc.) that perform the functions described in the embodiments of the present disclosure. The software codes can be stored in the memory and executed by the processor. The memory can be implemented in the processor or external to the processor.
上面结合附图对本发明的实施例进行了描述,但是本发明并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本发明的启示下,在不脱离本发明宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本发明的保护之内。The embodiments of the present invention are described above with reference to the accompanying drawings, but the present invention is not limited to the above-mentioned specific embodiments. The above-mentioned specific embodiments are only illustrative and not restrictive. Those of ordinary skill in the art are Under the enlightenment of the present invention, many forms can be made without departing from the purpose of the present invention and the scope of protection of the claims, and they all fall within the protection of the present invention.
Claims (14)
- 一种音频输出方法,应用于电子设备,包括:An audio output method applied to electronic equipment, including:所述电子设备按照非定向传声的方式输出音频数据;The electronic device outputs audio data in a non-directional sound transmission mode;在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备按照定向传声的方式输出音频数据。When the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner.
- 根据权利要求1所述的音频输出方法,其中,所述电子设备按照定向传声的方式输出音频数据之后,所述方法还包括:The audio output method according to claim 1, wherein after the electronic device outputs the audio data in a directional sound transmission mode, the method further comprises:在所述电子设备与目标物体之间的距离更新至超出所述第一预定范围后,并且所述电子设备与目标物体之间的距离再次更新至所述第一预定范围的情况下,所述电子设备按照非定向传声的方式输出音频数据。After the distance between the electronic device and the target object is updated to exceed the first predetermined range, and the distance between the electronic device and the target object is updated to the first predetermined range again, the The electronic device outputs audio data in a non-directional sound transmission mode.
- 根据权利要求1所述的音频输出方法,还包括:The audio output method according to claim 1, further comprising:在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备显示第一图标;In a case where the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device displays the first icon;其中,所述第一图标用于指示所述电子设备按照定向传声的方式输出音频数据。Wherein, the first icon is used to instruct the electronic device to output audio data in a directional sound transmission manner.
- 根据权利要求3所述的音频输出方法,其中,所述电子设备显示第一图标之后,所述方法还包括:The audio output method according to claim 3, wherein after the electronic device displays the first icon, the method further comprises:接收用户对所述第一图标的第一输入;Receiving a user's first input on the first icon;响应于所述第一输入,所述电子设备按照非定向传声的方式输出音频数据,并更新所述第一图标为第二图标;In response to the first input, the electronic device outputs audio data in a non-directional sound transmission manner, and updates the first icon to the second icon;其中,所述第二图标用于指示所述电子设备按照非定向传声的方式输出音频数据。Wherein, the second icon is used to instruct the electronic device to output audio data in a non-directional sound transmission manner.
- 根据权利要求1所述的音频输出方法,其中,所述在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备按照定向传声的方式输出音频数据,包括:The audio output method according to claim 1, wherein, in the case where the distance between the electronic device and the target object is updated to a first predetermined range, the electronic device outputs audio data in a directional sound transmission manner ,include:在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备通过第一传声组件按照定向传声的方式输出音频数据;In the case where the distance between the electronic device and the target object is updated to the first predetermined range, the electronic device outputs audio data in a directional sound transmission manner through the first sound transmission component;所述在所述电子设备与目标物体之间的距离更新至第一预定范围的情况 下,所述电子设备按照定向传声的方式输出音频数据之后,还包括:In the case where the distance between the electronic device and the target object is updated to the first predetermined range, after the electronic device outputs audio data in a directional sound transmission mode, the method further includes:在所述电子设备与目标物体之间的距离更新至第二预定范围的情况下,所述电子设备切换为通过第二传声组件按照定向传声的方式输出音频数据。When the distance between the electronic device and the target object is updated to the second predetermined range, the electronic device switches to output audio data in a directional sound transmission manner through the second sound transmission component.
- 一种电子设备,包括:An electronic device including:第一输出模块,用于按照非定向传声的方式输出音频数据;The first output module is used to output audio data in a non-directional sound transmission mode;第二输出模块,用于在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,按照定向传声的方式输出音频数据。The second output module is configured to output audio data in a directional sound transmission mode when the distance between the electronic device and the target object is updated to the first predetermined range.
- 根据权利要求6所述的电子设备,还包括:The electronic device according to claim 6, further comprising:第三输出模块,用于在所述电子设备与目标物体之间的距离更新至超出所述第一预定范围后,并且所述电子设备与目标物体之间的距离再次更新至所述第一预定范围的情况下,按照非定向传声的方式输出音频数据。The third output module is configured to update the distance between the electronic device and the target object to exceed the first predetermined range, and update the distance between the electronic device and the target object to the first predetermined range again In the case of range, the audio data is output in a non-directional sound transmission mode.
- 根据权利要求6所述的电子设备,还包括:The electronic device according to claim 6, further comprising:显示模块,用于在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,所述电子设备显示第一图标;A display module, configured to display a first icon on the electronic device when the distance between the electronic device and the target object is updated to a first predetermined range;其中,所述第一图标用于指示所述电子设备按照定向传声的方式输出音频数据。Wherein, the first icon is used to instruct the electronic device to output audio data in a directional sound transmission manner.
- 根据权利要求8所述的电子设备,还包括:The electronic device according to claim 8, further comprising:第一接收模块,用于接收用户对所述第一图标的第一输入;The first receiving module is configured to receive a user's first input to the first icon;第一响应模块,用于响应于所述第一输入,按照非定向传声的方式输出音频数据,并更新所述第一图标为第二图标;The first response module is configured to output audio data in a non-directional sound transmission mode in response to the first input, and update the first icon to be the second icon;其中,所述第二图标用于指示所述电子设备按照非定向传声的方式输出音频数据。Wherein, the second icon is used to instruct the electronic device to output audio data in a non-directional sound transmission manner.
- 根据权利要求6所述的电子设备,其中,所述第二输出模块还具体用于:在所述电子设备与目标物体之间的距离更新至第一预定范围的情况下,通过第一传声组件按照定向传声的方式输出音频数据;The electronic device according to claim 6, wherein the second output module is further specifically configured to: when the distance between the electronic device and the target object is updated to a first predetermined range, pass the first sound transmission The component outputs audio data in a directional sound transmission mode;所述电子设备还包括:The electronic device also includes:第四输出模块,用于在所述电子设备与目标物体之间的距离更新至第二预定范围的情况下,所述电子设备切换为通过第二传声组件按照定向传声的方式输出音频数据。The fourth output module is configured to switch the electronic device to output audio data in a directional sound transmission manner through the second sound transmission component when the distance between the electronic device and the target object is updated to a second predetermined range .
- 一种电子设备,包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的计算机程序,所述计算机程序被所述处理器执行时实现如权利要求1至5中任一项所述的音频输出方法的步骤。An electronic device, comprising a processor, a memory, and a computer program stored on the memory and capable of running on the processor, the computer program being executed by the processor to implement any of claims 1 to 5 One of the steps of the audio output method.
- 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1至5中任一项所述的音频输出方法的步骤。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of the audio output method according to any one of claims 1 to 5 are realized.
- 一种计算机软件产品,所述计算机软件产品被存储在非易失的存储介质中,所述软件产品被配置成被至少一个处理器执行以实现如权利要求1至5中任一项所述的音频输出方法的步骤。A computer software product, the computer software product is stored in a non-volatile storage medium, and the software product is configured to be executed by at least one processor to implement the method according to any one of claims 1 to 5 The steps of the audio output method.
- 一种电子设备,所述电子设备被配置成用于执行如权利要求1至5中任一项所述的音频输出方法。An electronic device configured to execute the audio output method according to any one of claims 1 to 5.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010465868.4A CN111683171A (en) | 2020-05-28 | 2020-05-28 | Audio output method and electronic equipment |
CN202010465868.4 | 2020-05-28 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2021238844A1 true WO2021238844A1 (en) | 2021-12-02 |
Family
ID=72434761
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2021/095471 WO2021238844A1 (en) | 2020-05-28 | 2021-05-24 | Audio output method and electronic device |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN111683171A (en) |
WO (1) | WO2021238844A1 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023151518A1 (en) * | 2022-02-09 | 2023-08-17 | 维沃移动通信有限公司 | Method and apparatus for managing separable module of terminal, and terminal |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111683171A (en) * | 2020-05-28 | 2020-09-18 | 维沃移动通信有限公司 | Audio output method and electronic equipment |
CN117119092B (en) * | 2023-02-22 | 2024-06-07 | 荣耀终端有限公司 | Audio processing method and electronic equipment |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1774871A (en) * | 2003-04-15 | 2006-05-17 | 专利创投公司 | Directional speakers |
CN103002376A (en) * | 2011-09-09 | 2013-03-27 | 联想(北京)有限公司 | Method for orientationally transmitting voice and electronic equipment |
CN106973349A (en) * | 2017-05-24 | 2017-07-21 | 广东小天才科技有限公司 | Directional loudspeaker control method, directional loudspeaker control device and intelligent terminal |
WO2019112087A1 (en) * | 2017-12-06 | 2019-06-13 | 주식회사 피티지 | Directional acoustic system for vehicle |
CN110855823A (en) * | 2019-10-23 | 2020-02-28 | 深圳市沃特沃德股份有限公司 | Call terminal, receiving mode selection method and computer equipment |
CN111683171A (en) * | 2020-05-28 | 2020-09-18 | 维沃移动通信有限公司 | Audio output method and electronic equipment |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105992099A (en) * | 2015-02-03 | 2016-10-05 | 中兴通讯股份有限公司 | Terminal and method for terminal to broadcast audio signals directionally |
CN105827793B (en) * | 2015-05-29 | 2019-08-20 | 维沃移动通信有限公司 | A kind of speech-oriented output method and mobile terminal |
CN106973160A (en) * | 2017-03-27 | 2017-07-21 | 广东小天才科技有限公司 | Privacy protection method, device and equipment |
CN109217943A (en) * | 2018-07-19 | 2019-01-15 | 珠海格力电器股份有限公司 | Directional broadcast method and device, household appliance and computer readable storage medium |
CN109068234A (en) * | 2018-10-29 | 2018-12-21 | 歌尔科技有限公司 | A kind of audio frequency apparatus orientation vocal technique, device, audio frequency apparatus |
CN110430320A (en) * | 2019-07-26 | 2019-11-08 | 北京小米移动软件有限公司 | Voice directional spreading method and device |
CN110933558B (en) * | 2019-12-17 | 2023-07-28 | 京东方科技集团股份有限公司 | Directional sounding method and device, ultrasonic transducer and electronic equipment |
-
2020
- 2020-05-28 CN CN202010465868.4A patent/CN111683171A/en active Pending
-
2021
- 2021-05-24 WO PCT/CN2021/095471 patent/WO2021238844A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1774871A (en) * | 2003-04-15 | 2006-05-17 | 专利创投公司 | Directional speakers |
CN103002376A (en) * | 2011-09-09 | 2013-03-27 | 联想(北京)有限公司 | Method for orientationally transmitting voice and electronic equipment |
CN106973349A (en) * | 2017-05-24 | 2017-07-21 | 广东小天才科技有限公司 | Directional loudspeaker control method, directional loudspeaker control device and intelligent terminal |
WO2019112087A1 (en) * | 2017-12-06 | 2019-06-13 | 주식회사 피티지 | Directional acoustic system for vehicle |
CN110855823A (en) * | 2019-10-23 | 2020-02-28 | 深圳市沃特沃德股份有限公司 | Call terminal, receiving mode selection method and computer equipment |
CN111683171A (en) * | 2020-05-28 | 2020-09-18 | 维沃移动通信有限公司 | Audio output method and electronic equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2023151518A1 (en) * | 2022-02-09 | 2023-08-17 | 维沃移动通信有限公司 | Method and apparatus for managing separable module of terminal, and terminal |
Also Published As
Publication number | Publication date |
---|---|
CN111683171A (en) | 2020-09-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021098678A1 (en) | Screencast control method and electronic device | |
US11635939B2 (en) | Prompting method and mobile terminal | |
WO2021109926A1 (en) | Application sharing method, electronic device and computer-readable storage medium | |
WO2021204045A1 (en) | Audio control method and electronic device | |
WO2021109907A1 (en) | Application sharing method, first electronic device and computer-readable storage medium | |
WO2020238635A1 (en) | Mobile terminal and sound outlet switching method | |
US20230254395A1 (en) | Electronic Device and Control Method Thereof | |
WO2021238844A1 (en) | Audio output method and electronic device | |
EP3691235A1 (en) | Display method and mobile terminal | |
WO2021063249A1 (en) | Control method for electronic device and electronic device | |
WO2019201271A1 (en) | Call processing method and mobile terminal | |
WO2021129529A1 (en) | Device switching method and related device | |
WO2019154182A1 (en) | Method for setting volume of application program, and mobile terminal | |
WO2021109925A1 (en) | Method for sharing application, electronic apparatus, and computer readable storage medium | |
WO2021129750A1 (en) | Radio-frequency circuit, electronic device, and srs sending method | |
WO2020238445A1 (en) | Screen recording method and terminal | |
WO2021098633A1 (en) | Information display and transmission methods, and electronic device | |
WO2021109959A1 (en) | Application sharing method and electronic device | |
WO2021104251A1 (en) | Control method and first electronic device | |
WO2020199986A1 (en) | Video call method and terminal device | |
WO2021136141A1 (en) | Playback method and electronic device | |
WO2021197311A1 (en) | Volume adjustment display method and electronic apparatus | |
JP2022522208A (en) | Mobile terminal and voice output control method | |
WO2021169869A1 (en) | Audio-playing apparatus, audio-playing method, and electronic device | |
WO2021129835A1 (en) | Volume control method and device, and computer-readable storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 21812541 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 04.05.2023) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 21812541 Country of ref document: EP Kind code of ref document: A1 |