WO2023011370A1 - Audio playing method and apparatus - Google Patents
Audio playing method and apparatus Download PDFInfo
- Publication number
- WO2023011370A1 WO2023011370A1 PCT/CN2022/109180 CN2022109180W WO2023011370A1 WO 2023011370 A1 WO2023011370 A1 WO 2023011370A1 CN 2022109180 W CN2022109180 W CN 2022109180W WO 2023011370 A1 WO2023011370 A1 WO 2023011370A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- audio
- information
- audio data
- bluetooth device
- preset
- Prior art date
Links
- 238000000034 method Methods 0.000 title claims abstract description 90
- 230000006870 function Effects 0.000 claims description 26
- 230000009467 reduction Effects 0.000 claims description 17
- 238000004891 communication Methods 0.000 claims description 13
- 238000012545 processing Methods 0.000 claims description 11
- 238000004590 computer program Methods 0.000 claims 1
- 230000008569 process Effects 0.000 description 14
- 230000005236 sound signal Effects 0.000 description 9
- 238000010586 diagram Methods 0.000 description 6
- 230000000694 effects Effects 0.000 description 5
- 238000005516 engineering process Methods 0.000 description 3
- 230000008859 change Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 230000001960 triggered effect Effects 0.000 description 2
- 210000001260 vocal cord Anatomy 0.000 description 2
- 241000699670 Mus sp. Species 0.000 description 1
- 238000001514 detection method Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 238000007599 discharging Methods 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G10—MUSICAL INSTRUMENTS; ACOUSTICS
- G10L—SPEECH ANALYSIS TECHNIQUES OR SPEECH SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING TECHNIQUES; SPEECH OR AUDIO CODING OR DECODING
- G10L25/00—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
- G10L25/48—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
- G10L25/51—Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use for comparison or discrimination
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1041—Mechanical or electronic switches, or control elements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R1/00—Details of transducers, loudspeakers or microphones
- H04R1/10—Earpieces; Attachments therefor ; Earphones; Monophonic headphones
- H04R1/1091—Details not provided for in groups H04R1/1008 - H04R1/1083
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04W—WIRELESS COMMUNICATION NETWORKS
- H04W4/00—Services specially adapted for wireless communication networks; Facilities therefor
- H04W4/80—Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2201/00—Details of transducers, loudspeakers or microphones covered by H04R1/00 but not provided for in any of its subgroups
- H04R2201/10—Details of earpieces, attachments therefor, earphones or monophonic headphones covered by H04R1/10 but not provided for in any of its subgroups
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04R—LOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
- H04R2430/00—Signal processing covered by H04R, not provided for in its groups
- H04R2430/01—Aspects of volume control, not necessarily automatic, in sound systems
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D30/00—Reducing energy consumption in communication networks
- Y02D30/70—Reducing energy consumption in communication networks in wireless communication networks
Definitions
- the present application belongs to the technical field of communication, and in particular relates to an audio playing method and device.
- bluetooth devices such as bluetooth earphones or car bluetooth devices
- Bluetooth devices have become a common device in daily life.
- users can wear Bluetooth devices to listen to audio information.
- the purpose of the embodiment of the present application is to provide an audio playing method and device, which can solve the problem that the flexibility of playing audio is poor, so that the user may miss important audio information in the sound source of the external environment.
- the embodiment of the present application provides an audio playback method, the method comprising: in the case of playing the first audio file in the electronic device, the Bluetooth device acquires audio data in the external environment; When at least one preset audio data included in the Bluetooth device does not match, the Bluetooth device sends the audio data to the electronic device; the Bluetooth device receives the first result information sent by the electronic device, and executes the target operation according to the first result information; wherein , the first result information is sent by the electronic device when the audio information included in the audio data meets a first preset condition; the target operation includes at least one of the following: stop playing the first audio file, play the audio data For the corresponding second audio file, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and vibrate the Bluetooth device for a preset number of times.
- the embodiment of the present application provides an audio playback method, the method includes: the electronic device receives the audio data sent by the Bluetooth device, and the audio data is obtained by the Bluetooth device from the external environment; the electronic device obtains the audio data included in the audio data. Audio information; when the audio information meets the first preset condition, the electronic device sends first result information to the Bluetooth device; wherein the first result information is used to instruct the Bluetooth device to perform a target operation, and the target operation includes at least one of the following Item: Stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and vibrate the Bluetooth device for a preset number of times.
- the embodiment of the present application provides an audio playback device, and the audio playback device includes: an acquisition module, a sending module, a receiving module, and a processing module.
- the acquiring module is configured to acquire the audio data in the external environment by the bluetooth device when playing the first audio file in the electronic device.
- the sending module is configured to send the audio data to the electronic device when it is determined that the audio data acquired by the acquiring module does not match at least one preset audio data included in the Bluetooth device.
- the receiving module is used for the bluetooth device to receive the first result information sent by the electronic device.
- a processing module configured to perform a target operation according to the first result information after the receiving module receives the first result information; wherein, the first result information is that the audio information included in the audio data of the electronic device satisfies a first preset condition
- the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, and reduce the Bluetooth device’s ability to play the first audio.
- the embodiment of the present application provides an audio playback device, and the audio playback device includes: a receiving module, an acquiring module, and a sending module.
- the receiving module is used for the electronic device to receive the audio data sent by the Bluetooth device, and the audio data is acquired by the Bluetooth device from the external environment.
- the obtaining module is used for the electronic device to obtain the audio information contained in the audio data received by the receiving module.
- a sending module configured to send the electronic device to the Bluetooth device first result information when the audio information satisfies a first preset condition; wherein the first result information is used to instruct the Bluetooth device to perform a target operation, and the target operation includes At least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and vibrate the Bluetooth device for a preset number of times .
- the embodiment of the present application provides a bluetooth device
- the bluetooth device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor.
- the program or instruction is executed by the processor, the following The steps of the method in the first aspect above.
- the embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor.
- the program or instruction is executed by the processor, the following The steps of the method in the second aspect above.
- the embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the above-mentioned method in the first aspect or the second aspect is implemented. step.
- the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above-mentioned first or second aspect. method.
- the Bluetooth device acquires audio data in the external environment; when it is determined that the audio data does not match at least one preset audio data included in the Bluetooth device
- the Bluetooth device sends the audio data to the electronic device
- the Bluetooth device receives the first result information sent by the electronic device, and performs the target operation according to the first result information
- the first result information is the electronic device in the audio data
- the included audio information is sent when the first preset condition is met;
- the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, and turn off the noise reduction of the Bluetooth device
- the function is to reduce the volume of the first audio file played by the Bluetooth device, and the Bluetooth device vibrates for a preset number of times.
- the bluetooth device can receive the first result information of the audio data sent by the electronic device, so the bluetooth device can perform the target operation according to the first result information, so that through the target operation, the user can listen to the sound in the external environment, so as to Avoid missing important audio information from external audio sources.
- FIG. 1 is a schematic diagram of an audio playback method provided in an embodiment of the present application
- FIG. 2 is one of the structural schematic diagrams of the audio playback device provided by the embodiment of the present application.
- Fig. 3 is the second structural schematic diagram of the audio playback device provided by the embodiment of the present application.
- FIG. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application.
- FIG. 5 is a schematic diagram of hardware of an electronic device provided by an embodiment of the present application.
- words such as “exemplary” or “for example” are used as examples, illustrations or illustrations. Any embodiment or design scheme described as “exemplary” or “for example” in the embodiments of the present application shall not be construed as being more advantageous than other embodiments or design schemes. Rather, the use of words such as “exemplary” or “such as” is intended to present related concepts in a concrete manner.
- plural means two or more, for example, a plurality of elements refers to two or more elements.
- the embodiment of the present application provides an audio playing method, which is applied to bluetooth devices and electronic devices, and the method can monitor external sound sources in real time.
- the electronic device is used to judge whether the audio data obtained from the external sound source includes preset audio information, and send the result information to the bluetooth device.
- the bluetooth device plays the audio file corresponding to the audio data according to the result information, so as to prevent the user from missing important information in the external audio source.
- the embodiments of the present application provide a bluetooth device and an electronic device.
- the bluetooth device may include: a bluetooth module, a voice recognition module, a main control module, a storage module and the like.
- the smart bluetooth device establishes a bluetooth communication connection with the communication connection module of the smart mobile terminal through the bluetooth module.
- the voice recognition module on the smart bluetooth device is used to convert the sound signal transmitted by the microphone into an electrical signal (such as an audio signal) and send it to the electronic device for processing.
- Electronic devices may include communication link modules, processing modules, and the like.
- the communication connection module of the electronic device is used to receive the audio data sent by the smart bluetooth device, compare and process the information of the audio data through the processing module, and send the judged result information to the bluetooth device through bluetooth communication.
- an embodiment of the present application provides an audio playback method, and the method includes the following S101 to S103.
- the method is applied to a bluetooth device that establishes a connection with an electronic device.
- the Bluetooth device acquires audio data in an external environment.
- the Bluetooth device may be a Bluetooth headset, a vehicle-mounted Bluetooth device, or other devices that may have a Bluetooth function, which is not limited in this embodiment of the present application.
- multiple audio files may be stored in the electronic device, and the first audio file is an audio file in the multiple audio files.
- the type of the first audio file may be any of the following: music type, news type, radio type, audio novel type, and the like.
- the Bluetooth device is in a connected state with the electronic device.
- the establishment of a connection between a Bluetooth device and an electronic device may include two methods: one method, the electronic device and the Bluetooth device establish a wireless connection after successfully pairing through Bluetooth; Port connection, that is, the electronic device establishes a wired connection with the Bluetooth device.
- Port connection that is, the electronic device establishes a wired connection with the Bluetooth device.
- the Bluetooth device acquires audio data in the external environment refers to: receiving a sound signal in the external environment through a component in the Bluetooth device, that is, a microphone, and converting the sound signal into audio data (that is, audio data). Signal).
- the above audio data may come from sound signals output by devices in the external environment, sounds from vocal cord vibrations of the human body, and the like.
- the type of the audio data may be music, voice or sound effect, etc.
- the Bluetooth device sends the audio data to the electronic device.
- the at least one preset audio data is audio data that the Bluetooth device needs to ignore, that is, the sound corresponding to the at least one preset audio data may be noise.
- the audio playback method provided by the embodiment of the present application may further include: the Bluetooth device acquires the characteristic information included in the audio data; if at least one preset characteristic information does not include the characteristic information, the Bluetooth device determines the Audio data does not match at least one preset audio data.
- one preset feature information is used to indicate one preset audio data in the at least one preset audio data.
- the feature information may include at least one of the following: feature information such as amplitude, frequency, phase, decibel, and the like.
- one piece of preset feature information can be used to indicate one piece of preset audio data. For example, taking the feature information as frequency as an example, when the frequency range is 20Hz--250Hz, it corresponds to low-frequency noise audio data.
- At least one piece of preset audio data and at least one piece of preset feature information may be pre-stored in the Bluetooth device.
- one piece of preset feature information corresponds to one piece of preset audio data.
- the Bluetooth device may determine that the audio data does not match the at least one preset audio data.
- exemplary take feature information as frequency as an example. It is assumed that preset audio data of 20 Hz, preset audio data of 30 Hz, and preset audio data of 40 Hz are stored in the Bluetooth device. When the frequency of the audio data acquired by the Bluetooth device is 25 Hz, it can be determined that the audio data does not match the three types of preset audio data included in the Bluetooth device.
- the Bluetooth device receives the first result information sent by the electronic device, and executes a target operation according to the first result information.
- the above-mentioned first result information is sent by the electronic device when the audio information included in the audio data meets the first preset condition;
- the target operation includes at least one of the following: stop playing the first audio file, play the first audio file corresponding to the audio data;
- For the second audio file turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and the preset number of vibrations of the Bluetooth device.
- the type of the second audio file is determined by audio data. Reference may be made to the specific description of the first audio file in the foregoing embodiments, which will not be repeated in this embodiment of the present application.
- the preset number of times and the first result information can be factory-set by the manufacturer or customized by the user.
- the user When the user is dissatisfied with the content or form of the first result information, or the value of the preset times, it may be triggered to change the content of the first result information, or modify the value of the preset times.
- the preset number of times may be three times, that is, the Bluetooth device vibrates three times.
- the first result information may be any of the following: text information, symbol information, icon information, and the like.
- the specific embodiments of the present application may be determined according to actual usage conditions, and are not limited in the embodiments of the present application.
- the first result information may be "the audio data is valid, and the Bluetooth device needs to process this".
- the Bluetooth device when the Bluetooth device receives the first result information sent by the electronic device, the Bluetooth device can determine that the audio data includes important information, so that the Bluetooth device can perform the target operation, so that the user will not miss the important information included in the audio data .
- the audio information included in the audio data may be audio content information and/or audio timbre information.
- the audio content information is used to indicate the specific content included in the audio data
- the audio timbre information is used to indicate the characteristics of the sound corresponding to the audio data.
- the audio information may be audio content information as an example.
- the audio content information is "Passengers, please pay attention, the next stop xxx station is about to arrive"; the audio information may be audio timbre information as an example.
- the audio timbre information is any one of the following: piano timbre, violin timbre, guitar timbre, boy timbre, girl timbre, man timbre, woman timbre, old man timbre, etc.
- the first preset condition may include at least one of the following: the audio content information includes preset keywords, and the audio timbre information matches the preset timbre information .
- the preset keywords and preset tone information can be factory-set by the manufacturer or customized by the user.
- the preset keyword and the preset timbre information cannot meet the needs of the user, the user can trigger modification of the preset keyword and the preset timbre information according to his own wishes.
- the number of types of preset keywords and preset timbre information may be one or more.
- the number of preset keywords and preset timbre information is one, it means that the audio playback method provided by the embodiment of this application can only be applied to a specific usage scenario;
- the number of types of timbre information is multiple, since one usage scenario corresponds to one preset keyword or preset timbre information, it means that the audio playback method provided by the embodiment of the present application can be applied to multiple uses scene.
- the preset keywords may be "attention, passengers”, “movies”, “tv series” or “anime”.
- the user may trigger the electronic device to pre-record a piece of sound, and then the electronic device records the timbre information of the sound, and uses the timbre information of the sound as the preset timbre information.
- the parent records a section of voice of the child through an electronic device, and records the timbre information of the section of sound, that is, the timbre of the child is the preset timbre information.
- the Bluetooth headset may send the audio data to the electronic device.
- the Bluetooth headset can receive the first result message sent by the electronic device: "The audio data is valid, and the Bluetooth device needs to process this".
- the bluetooth earphone can stop playing the music according to the first result information, and play the voice corresponding to the audio data "Passengers, please pay attention, station A will arrive soon, passengers please bring your belongings”.
- the user will not miss the important information in this voice, and when the bus arrives at the stop, the user is guaranteed to get off in time.
- the embodiment of the present application provides an audio playback method.
- the Bluetooth device can receive the first result information of the audio data sent by the electronic device, so the Bluetooth device can perform the target operation according to the first result information, so that through the target operation, the user can listen to Sound in the external environment to avoid missing important audio information in the external sound source.
- the audio playing method provided in the embodiment of the present application may further include the following S104.
- the Bluetooth device receives the second result information sent by the electronic device, and stores the audio data according to the second result information
- the above-mentioned second result information is sent by the electronic device when the audio information included in the audio data satisfies the second preset condition.
- the audio information may include audio content information and audio timbre information.
- the second preset condition includes: the audio content information does not include a preset keyword, and the audio timbre information does not match the preset timbre information.
- the second result information is information different from the first result information.
- the second result information refer to the detailed description of the first result information in the above embodiment, which will not be repeated in this embodiment of the present application. .
- the second result information may be "audio data is invalid noise”.
- the Bluetooth device can determine that the audio data does not include important information, that is, the audio data is useless noise for the user, so that the Bluetooth device can store the information. Audio data, so that when the Bluetooth device receives the same audio data in the future, the Bluetooth device does not send the audio data to the electronic device, thereby avoiding unnecessary operations and saving resources (such as power) of the electronic device.
- the embodiment of the present application provides an audio playback method, the method includes the following S201 to S203, and the method is applied to an electronic device that is establishing a connection with a Bluetooth device.
- the electronic device receives audio data sent by the Bluetooth device.
- the audio data is obtained from the external environment when the Bluetooth device plays the first audio file.
- the "audio data sent by the Bluetooth device" in the above S201 refers to: receiving a sound signal in the external environment through a component in the Bluetooth device, that is, a microphone, and converting the sound signal into audio data (that is, the audio signal ).
- the above-mentioned audio data may be a sound signal output from a device in an external environment, a sound emitted by a human body's vocal cord vibration, and the like.
- the type of the audio data may be music, voice or sound effect, etc.
- multiple audio files may be stored in the electronic device, and the first audio file is an audio file in the multiple audio files.
- the type of the first audio file may be any of the following: music type, news type, radio type, audio novel type, and the like.
- the Bluetooth device is in a connected state with the electronic device.
- the establishment of a connection between a Bluetooth device and an electronic device may include two methods: one method, the electronic device and the Bluetooth device establish a wireless connection after successfully pairing through Bluetooth; Port connection, that is, the electronic device establishes a wired connection with the Bluetooth device.
- Port connection that is, the electronic device establishes a wired connection with the Bluetooth device.
- the Bluetooth device may be a Bluetooth headset, a vehicle-mounted Bluetooth device, or other devices that may have a Bluetooth function, which is not limited in this embodiment of the present application.
- the electronic device acquires audio information included in the audio data.
- the audio information included in the audio data may include at least one of the following: audio content information and audio timbre information.
- audio content information is used to indicate the specific content included in the audio data
- audio timbre information is used to indicate the characteristics of the sound corresponding to the audio data.
- the audio information may be audio content information as an example.
- the audio content information is "Passengers, please pay attention, the next stop xxx station is about to arrive"; the audio information may be audio timbre information as an example.
- the audio timbre information is any one of the following: piano timbre, violin timbre, guitar timbre, boy timbre, girl timbre, man timbre, woman timbre, old man timbre, etc.
- the electronic device sends first result information to the Bluetooth device.
- the first result information is used to instruct the Bluetooth device to perform a target operation
- the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the
- the bluetooth device plays the volume of the first audio file, and the bluetooth device vibrates for a preset number of times.
- the first preset condition includes at least one of the following: the audio content information includes a preset keyword, the audio timbre information and the preset timbre information match.
- the preset keywords and preset tone information can be factory-set by the manufacturer or customized by the user.
- the preset keyword and the preset timbre information cannot meet the needs of the user, the user can trigger modification of the preset keyword and the preset timbre information according to his own wishes.
- the number of types of preset keywords and preset timbre information may be one or more.
- the number of preset keywords and preset timbre information is one, it means that the audio playback method provided by the embodiment of this application can only be applied to a specific usage scenario;
- the number of types of timbre information is multiple, since one usage scenario corresponds to one preset keyword or preset timbre information, it means that the audio playback method provided by the embodiment of the present application can be applied to multiple uses scene.
- the preset keywords may be "attention, passengers”, “movies”, “tv series” or “anime”.
- the user may trigger the electronic device to pre-record a piece of sound, and then the electronic device records the timbre information of the sound, and uses the timbre information of the sound as the preset timbre information.
- the parent records a section of voice of the child through an electronic device, and records the timbre information of the section of sound, that is, the timbre of the child is the preset timbre information.
- the above-mentioned preset times and first result information may be factory-set by the manufacturer or customized by the user.
- the user When the user is dissatisfied with the content or form of the first result information, or the value of the preset times, it may be triggered to change the content of the first result information, or modify the value of the preset times.
- the preset number of times may be three times, that is, the Bluetooth device vibrates three times.
- the first result information may be any of the following: text information, symbol information, icon information, and the like.
- the specific embodiments of the present application may be determined according to actual usage conditions, and are not limited in the embodiments of the present application.
- the first result information may be "the audio data is valid, and the Bluetooth device needs to process this".
- the electronic device can receive the audio data of the voice output from the speaker of the bus obtained by the Bluetooth headset from the external environment, when the electronic device obtains the audio content information of the audio data includes "Passengers, please pay attention ", the electronic device may send to the Bluetooth headset first result information for instructing the Bluetooth headset to play the voice corresponding to the audio data: "The audio data is valid, and the Bluetooth device needs to process this". In this way, after the user hears the voice corresponding to the audio data played through the Bluetooth headset "Passengers, please pay attention, station A will arrive soon, please bring your belongings", when the bus arrives, it can ensure that the user gets off in time, that is, Users will not miss important information in this voice.
- the embodiment of the present application provides an audio playback method. After the electronic device receives the audio data sent by the Bluetooth device, the electronic device can acquire the audio information included in the audio data. Because the audio information satisfies the first preset condition , the electronic device can send the first result information for instructing the Bluetooth device to perform the target operation to the Bluetooth device, so the electronic device can control the Bluetooth device to perform the target operation according to the first result information, so that through the target operation, the user can listen to the outside world ambient sound to avoid missing important audio information from external sound sources.
- the audio information includes audio content information and audio timbre information.
- the audio playing method provided in the embodiment of the present application may further include the following S204. That is, one of S203 and S204 is executed.
- the electronic device sends second result information to the Bluetooth device.
- the second result information is used to instruct the Bluetooth device to store audio data;
- the second preset condition includes: the audio content information does not include a preset keyword, and the audio timbre information does not match the preset timbre information.
- the second result information is information different from the first result information.
- the second result information refer to the detailed description of the first result information in the above embodiment, which will not be repeated in this embodiment of the present application. .
- the second result information may be "audio data is invalid noise”.
- the electronic device can determine that the audio data does not include important information, that is, the audio data is useless noise for the user, so the electronic device can send
- the second result information is used to instruct the bluetooth device to store the audio data, so that the electronic device will not receive the same audio data sent by the bluetooth device again, and then judge the audio data. In this way, the electronic device avoids unnecessary operations, and also saves resources (such as power) of the electronic device.
- An embodiment of the present application provides an audio playback method, the method includes the following steps S301 to S306, and the method is applied to an electronic device and a Bluetooth device in a connected state.
- the Bluetooth device acquires audio data in an external environment.
- the Bluetooth device sends the audio data to the electronic device.
- the electronic device receives the audio data sent by the Bluetooth device.
- the electronic device acquires audio information included in the audio data.
- the electronic device sends first result information to the Bluetooth device.
- the first result information is used to instruct the Bluetooth device to perform the target operation.
- the Bluetooth device receives the first result information sent by the electronic device, and executes a target operation according to the first result information.
- the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and prevent the vibration of the Bluetooth device. Set the number of times.
- the audio information includes audio content information and audio timbre information.
- the audio playing method provided in the embodiment of the present application may further include the following S307 and S308. That is, one of S305 and S306, or S307 and S308 is executed.
- the electronic device sends second result information to the Bluetooth device.
- the Bluetooth device receives the second result information sent by the electronic device, and stores the audio data according to the second result information.
- the embodiment of the present application provides an audio playback method.
- the Bluetooth device can send the audio data to the electronic device, so when the electronic device determines that the audio information included in the audio data meets the first preset condition, the first result of the audio data sent to the electronic device is information, so that after the Bluetooth device receives the first result information sent by the electronic device, the Bluetooth device can execute the target operation according to the first result information.
- the electronic device controls the bluetooth device to perform the target operation, so that the user can listen to the sound in the external environment, and avoid missing important audio information in the external sound source.
- the audio playback method provided in the embodiment of the present application may be executed by an audio playback device, or a control module in the audio playback device for executing the audio playback method.
- the audio playing device provided in the embodiment of the present application is described by taking the audio playing device executing the audio playing method as an example.
- the embodiment of the present application provides an audio playback device 400
- the audio playback device includes an acquisition module 401 , a sending module 402 , a receiving module 403 and a processing module 404 .
- the audio playback device may be the Bluetooth device in the first embodiment above or a functional module in the Bluetooth device.
- the acquiring module 401 may be configured to enable the Bluetooth device to acquire audio data in the external environment when the first audio file in the electronic device is played.
- the sending module 402 may be configured to send the audio data to the electronic device from the Bluetooth device when it is determined that the audio data obtained by the obtaining module 401 does not match at least one preset audio data included in the Bluetooth device.
- the receiving module 403 may be used for the Bluetooth device to receive the first result information sent by the electronic device.
- the processing module 404 may be configured to perform a target operation according to the first result information after the receiving module 403 receives the first result information; wherein, the first result information is that the audio information included in the audio data of the electronic device satisfies the first Sent under preset conditions; the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the Bluetooth device to play the The volume of the first audio file, the preset number of vibrations of the Bluetooth device.
- the audio playback device may also include a receiving module and a storage module.
- the receiving module can also be used for the Bluetooth device to receive the second result information sent by the electronic device.
- the storage module may be configured to store the audio data according to the second result information after the receiving module receives the second result information; wherein, the second result information is that the audio information included in the audio data of the electronic device satisfies the second preset sent under condition.
- the audio playback device may also include a determination module.
- the obtaining module can also be used for the bluetooth device to obtain the feature information included in the audio data.
- the determining module may be configured to determine that the audio data does not match at least one preset audio data if the feature information is not included in the at least one preset feature information, and the preset feature information is used to indicate the at least one preset feature information One preset audio data in audio data.
- the embodiment of the present application provides an audio playback device.
- the Bluetooth device When playing the first audio file in the electronic device, after the Bluetooth device obtains the audio data in the external environment, when the audio data and at least one audio file included in the Bluetooth device When the preset audio data does not match, the Bluetooth device can receive the first result information of the audio data sent by the electronic device, so the Bluetooth device can perform the target operation according to the first result information, so that through the target operation, the user can listen to Sound in the external environment to avoid missing important audio information in the external sound source.
- the embodiment of the present application provides an audio playback device 500 ; the audio playback device includes a receiving module 501 , an acquiring module 502 and a sending module 503 .
- the audio playback device may be the electronic device or a functional module in the electronic device in the second embodiment above.
- the receiving module 501 is configured for the electronic device to receive audio data sent by the Bluetooth device, where the audio data is obtained from the external environment when the Bluetooth device plays the first audio file.
- the acquiring module 502 is configured for the electronic device to acquire the audio information included in the audio data received by the receiving module 501 .
- the sending module 503 is configured to send the first result information to the Bluetooth device when the audio information satisfies the first preset condition; wherein the first result information is used to instruct the Bluetooth device to perform a target operation, and the target operation Including at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and preset the vibration of the Bluetooth device frequency.
- the audio information includes at least one of the following: audio content information, audio timbre information;
- the first preset condition includes at least one of the following: the audio content information includes preset keywords, and the audio timbre information and preset Timbre information matches.
- the audio information includes audio content information and audio timbre information.
- the sending module is also used to send the second result information to the Bluetooth device when the audio information satisfies the second preset condition; wherein, the second result information is used to instruct the Bluetooth device to store the audio data; the second The preset conditions include: the audio content information does not include preset keywords, and the audio timbre information does not match the preset timbre information.
- the embodiment of the present application provides an audio playback device. After the electronic device receives the audio data sent by the Bluetooth device, the electronic device can acquire the audio information included in the audio data. Because the audio information satisfies the first preset condition , the electronic device can send the first result information for instructing the Bluetooth device to perform the target operation to the Bluetooth device, so the electronic device can control the Bluetooth device to perform the target operation according to the first result information, so that through the target operation, the user can listen to the outside world ambient sound to avoid missing important audio information from external sound sources.
- the audio playback device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal.
- the device may be a mobile electronic device or a non-mobile electronic device.
- the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device (such as a Bluetooth headset), an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal Digital assistant (personal digital assistant, PDA), etc.
- non-mobile electronic devices can be server, network attached storage (network attached storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machines, etc., which are not specifically limited in this embodiment of the application.
- the audio playback device in the embodiment of the present application may be a device with an operating system.
- the operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
- the audio playback device provided by the embodiment of the present application can realize various processes realized by the method embodiment in FIG. 1 , and details are not repeated here to avoid repetition.
- the embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and operable on the processor 601.
- the program when the instructions are executed by the processor 601, the various processes of the above-mentioned audio playback method embodiments can be achieved, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
- the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
- FIG. 5 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
- the electronic device 700 includes, but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710, etc. part.
- the electronic device 700 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 710 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions.
- a power supply such as a battery
- the structure of the electronic device shown in FIG. 5 does not constitute a limitation to the electronic device.
- the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange different components, and details will not be repeated here. .
- the input unit 704 is the microphone of the Bluetooth device in the embodiment of the present application, and is used for the Bluetooth device to obtain audio data in the external environment when the first audio file in the electronic device is played.
- the radio frequency unit 701 is configured to send the audio data to the electronic device from the Bluetooth device when it is determined that the audio data does not match at least one preset audio data included in the Bluetooth device; and is used for the Bluetooth device to receive the first result sent by the electronic device information.
- the processor 710 is configured to perform a target operation according to the first result information after the radio frequency unit 701 receives the first result information; where the first result information is that the audio information included in the audio data of the electronic device satisfies the first predetermined requirement.
- the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, and reduce the Bluetooth device to play the second audio file.
- the volume of an audio file, and the Bluetooth device vibrates a preset number of times.
- the radio frequency unit 701 is also used for the Bluetooth device to receive the second result information sent by the electronic device.
- the processor 710 is configured to store the audio data according to the second result information after the radio frequency unit 701 receives the second result information; wherein, the second result information is that the audio information included in the audio data of the electronic device satisfies the second predetermined requirement. Sent under conditions.
- the processor 710 is also used for the Bluetooth device to obtain the feature information included in the audio data; and for the Bluetooth device to determine that the audio data is consistent with at least one preset audio The data do not match, and one piece of preset characteristic information is used to indicate one preset audio data in the at least one preset audio data.
- the embodiment of the present application provides a bluetooth device.
- the bluetooth device acquires audio data in the external environment, when the audio data is associated with at least one preset
- the Bluetooth device can receive the first result information of the audio data sent by the electronic device, so the Bluetooth device can perform the target operation according to the first result information, so that through the target operation, the user can listen to the outside world ambient sound to avoid missing important audio information from external sound sources.
- the radio frequency unit 701 is configured for the electronic device to receive audio data sent by the Bluetooth device, where the audio data is obtained from the external environment when the Bluetooth device plays the first audio file.
- the processor 710 is configured for the electronic device to acquire audio information included in the audio data received by the radio frequency unit 701 .
- the radio frequency unit 701 is further configured to send the electronic device to the Bluetooth device first result information when the audio information satisfies the first preset condition; wherein the first result information is used to instruct the Bluetooth device to perform a target operation, and the target
- the operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and pre-vibrate the Bluetooth device. Set the number of times.
- the audio information includes audio content information and audio timbre information.
- the radio frequency unit 701 is further configured to, when the audio information satisfies a second preset condition, the electronic device send second result information to the Bluetooth device; wherein, the second result information is used to instruct the Bluetooth device to store audio data; the first The second preset condition includes: the audio content information does not include a preset keyword, and the audio timbre information does not match the preset timbre information.
- An embodiment of the present application provides an electronic device. After the electronic device receives the audio data sent by the Bluetooth device, the electronic device can obtain the audio information included in the audio data. Since the audio information satisfies the first preset condition, The electronic device can send the first result information for instructing the Bluetooth device to perform the target operation to the Bluetooth device, so the electronic device can control the Bluetooth device to perform the target operation according to the first result information, so that through the target operation, the user can listen to the external environment to avoid missing important audio information from external sources.
- the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 is used for the image capture device (such as the image data of the still picture or video obtained by the camera) for processing.
- the display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like.
- the user input unit 707 includes a touch panel 7071 and other input devices 7072 .
- the touch panel 7071 is also called a touch screen.
- the touch panel 7071 may include two parts, a touch detection device and a touch controller.
- Other input devices 7072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, and joysticks, which will not be repeated here.
- Memory 709 may be used to store software programs as well as various data, including but not limited to application programs and operating systems.
- the processor 710 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, user interface, application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 710 .
- the embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, each process of the above-mentioned audio playback method embodiment is realized, and can achieve the same Technical effects, in order to avoid repetition, will not be repeated here.
- the processor is the processor in the electronic device in the above embodiment.
- the readable storage medium includes a computer readable storage medium, such as a computer read-only memory (read-only memory, ROM), a random access memory (random access memory, RAM), a magnetic disk or an optical disk, and the like.
- the embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to realize the various processes of the above audio playback method embodiments, and can achieve the same To avoid repetition, the technical effects will not be repeated here.
- chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
- the term “comprising”, “comprising” or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase “comprising a " does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element.
- the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
- the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation.
- the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods in various embodiments of the present application.
Landscapes
- Engineering & Computer Science (AREA)
- Signal Processing (AREA)
- Physics & Mathematics (AREA)
- Acoustics & Sound (AREA)
- Computer Networks & Wireless Communication (AREA)
- Computational Linguistics (AREA)
- Health & Medical Sciences (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Human Computer Interaction (AREA)
- Multimedia (AREA)
- Telephone Function (AREA)
- Circuit For Audible Band Transducer (AREA)
Abstract
Disclosed in the present application are an audio playing method and apparatus. The method comprises: when a first audio file in an electronic device is played, a Bluetooth device acquiring audio data from an external environment; when it is determined that the audio data does not match at least one piece of preset audio data, which is comprised in the Bluetooth device, the Bluetooth device sending the audio data to the electronic device; and the Bluetooth device receiving first result information, which is sent by the electronic device, and executing a target operation according to the first result information, wherein the first result information is sent by the electronic device when audio information comprised in the audio data satisfies a first preset condition.
Description
相关申请的交叉引用Cross References to Related Applications
本申请主张在2021年08月04日在中国提交的中国专利申请号202110891461.2的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202110891461.2 filed in China on August 04, 2021, the entire contents of which are hereby incorporated by reference.
本申请属于通信技术领域,具体涉及一种音频播放方法、装置。The present application belongs to the technical field of communication, and in particular relates to an audio playing method and device.
随着蓝牙技术、智能手机的发展,蓝牙设备(例如蓝牙耳机或车载蓝牙设备等)已经成为日常生活中的一种常用设备。例如,在开车、乘车、走路、运动等场景下,用户可以佩戴蓝牙设备收听音频信息。With the development of bluetooth technology and smart phones, bluetooth devices (such as bluetooth earphones or car bluetooth devices) have become a common device in daily life. For example, in scenarios such as driving, riding, walking, and exercising, users can wear Bluetooth devices to listen to audio information.
通常,在用户佩戴蓝牙设备收听音频信息的情况下,外界环境中可能会出现一些其它音源。然而,对于具备降噪功能的蓝牙设备,会屏蔽这些音源;或者,当蓝牙设备正在播放音频的音量较大时,用户可能无法清晰的听到这些音源的音频信息。Generally, when a user wears a Bluetooth device to listen to audio information, some other sound sources may appear in the external environment. However, for a Bluetooth device with a noise reduction function, these audio sources will be blocked; or, when the Bluetooth device is playing audio at a high volume, the user may not be able to clearly hear the audio information of these audio sources.
如此,可能会导致播放音频的灵活性较差,从而使得用户可能错过外界环境的音源中的重要的音频信息。In this way, the flexibility of playing audio may be poor, so that the user may miss important audio information in the sound source of the external environment.
发明内容Contents of the invention
本申请实施例的目的是提供一种音频播放方法、装置,能够解决播放音频的灵活性较差,使得用户可能错过外界环境的音源中的重要的音频信息的问题。The purpose of the embodiment of the present application is to provide an audio playing method and device, which can solve the problem that the flexibility of playing audio is poor, so that the user may miss important audio information in the sound source of the external environment.
为了解决上述技术问题,本申请是这样实现的:In order to solve the above-mentioned technical problems, the application is implemented as follows:
第一方面,本申请实施例提供了一种音频播放方法,该方法包括:在播放电子设备中的第一音频文件的情况下,蓝牙设备获取外界环境中的音频数据;在确定该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配的情况下,蓝牙设备向电子设备发送该音频数据;蓝牙设备接收电子设备发送的第一结果信息,并根据该第一结果信息执行目标操作;其中,该第一结果信息为电子设备在该音频数据包括的音频信息满足第一预设条件的情况下发送的;该目标操作包括以下至少一项:停止播放该第一音频文件,播放该音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放该第一音频文件的音量,蓝牙设备震动预设次数。In the first aspect, the embodiment of the present application provides an audio playback method, the method comprising: in the case of playing the first audio file in the electronic device, the Bluetooth device acquires audio data in the external environment; When at least one preset audio data included in the Bluetooth device does not match, the Bluetooth device sends the audio data to the electronic device; the Bluetooth device receives the first result information sent by the electronic device, and executes the target operation according to the first result information; wherein , the first result information is sent by the electronic device when the audio information included in the audio data meets a first preset condition; the target operation includes at least one of the following: stop playing the first audio file, play the audio data For the corresponding second audio file, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and vibrate the Bluetooth device for a preset number of times.
第二方面,本申请实施例提供了一种音频播放方法,该方法包括:电子设备接收蓝牙设备发送的音频数据,该音频数据为蓝牙设备从外界环境中获取;电子设备获取该音频数据包括的音频信息;在该音频信息满足第一预设条件的情况下,电子设备向蓝牙设备发送第一结果信息;其中,第一结果信息用于指示蓝牙设备执行目标操作,该目标操作包括以下至少一项:停止播放第一音频文件,播放该音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放该第一音频文件的音量,蓝牙设备震动预设次数。In the second aspect, the embodiment of the present application provides an audio playback method, the method includes: the electronic device receives the audio data sent by the Bluetooth device, and the audio data is obtained by the Bluetooth device from the external environment; the electronic device obtains the audio data included in the audio data. Audio information; when the audio information meets the first preset condition, the electronic device sends first result information to the Bluetooth device; wherein the first result information is used to instruct the Bluetooth device to perform a target operation, and the target operation includes at least one of the following Item: Stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and vibrate the Bluetooth device for a preset number of times.
第三方面,本申请实施例提供了一种音频播放装置,该音频播放装置包括:获取模块、发送模块、接收模块和处理模块。获取模块,用于在播放电子设备中的第一音频文件的情况下,蓝牙设备获取外界环境中的音频数据。发送模块,用于在确定获取模块获取的该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配的情况下,蓝牙设备向电子设备发送该音频数据。接收模块,用于蓝牙设备接收电子设备发送的第一结果信息。处理模块,用于在接收模块接收该第一结果信息之后,根据该第一结果信息执行目标操作;其中,该第一结果信息为电子设备在该音频数据包括的音频信息满足第一预设条件的情况下发送的;该目标操作包括以下至少一项:停止播放该第一音频文件,播放该音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放该第一音频文件的音量,蓝牙设备震动预设次数。In a third aspect, the embodiment of the present application provides an audio playback device, and the audio playback device includes: an acquisition module, a sending module, a receiving module, and a processing module. The acquiring module is configured to acquire the audio data in the external environment by the bluetooth device when playing the first audio file in the electronic device. The sending module is configured to send the audio data to the electronic device when it is determined that the audio data acquired by the acquiring module does not match at least one preset audio data included in the Bluetooth device. The receiving module is used for the bluetooth device to receive the first result information sent by the electronic device. A processing module, configured to perform a target operation according to the first result information after the receiving module receives the first result information; wherein, the first result information is that the audio information included in the audio data of the electronic device satisfies a first preset condition The target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, and reduce the Bluetooth device’s ability to play the first audio. The volume of the file, the preset number of times the Bluetooth device vibrates.
第四方面,本申请实施例提供了一种音频播放装置,该音频播放装置包括:接收模块、获取模块和发送模块。接收模块,用于电子设备接收蓝牙设备发送的音频数据,该音频数据为蓝牙设备从外界环境中获取。获取模块,用于电子设备获取接收模块接收的该音频数据包括的音频信息。发送模块,用于在该音频信息满足第一预设条件的情况下,电子设备向蓝牙设备发送第一结果信息;其中,该第一结果信息用于指示蓝牙设备执行目标操作,该目标操作包括以下至少一项:停止播放该第一音频文件,播放该音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放该第一音频文件的音量,蓝牙设备震动预设次数。In a fourth aspect, the embodiment of the present application provides an audio playback device, and the audio playback device includes: a receiving module, an acquiring module, and a sending module. The receiving module is used for the electronic device to receive the audio data sent by the Bluetooth device, and the audio data is acquired by the Bluetooth device from the external environment. The obtaining module is used for the electronic device to obtain the audio information contained in the audio data received by the receiving module. A sending module, configured to send the electronic device to the Bluetooth device first result information when the audio information satisfies a first preset condition; wherein the first result information is used to instruct the Bluetooth device to perform a target operation, and the target operation includes At least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and vibrate the Bluetooth device for a preset number of times .
第五方面,本申请实施例提供了一种蓝牙设备,该蓝牙设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如上述第一方面中的方法的步骤。In the fifth aspect, the embodiment of the present application provides a bluetooth device, the bluetooth device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor. When the program or instruction is executed by the processor, the following The steps of the method in the first aspect above.
第六方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在存储器上并可在处理器上运行的程序或指令,程序或指令被处理器执行时实现如上述第二方面中的方法的步骤。In the sixth aspect, the embodiment of the present application provides an electronic device, the electronic device includes a processor, a memory, and a program or instruction stored in the memory and operable on the processor. When the program or instruction is executed by the processor, the following The steps of the method in the second aspect above.
第七方面,本申请实施例提供了一种可读存储介质,该可读存储介质上存储程序或指令,程序或指令被处理器执行时实现如上述第一方面或第二方面中的方法的步骤。In the seventh aspect, the embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the above-mentioned method in the first aspect or the second aspect is implemented. step.
第八方面,本申请实施例提供了一种芯片,该芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现如上述第一方面或第二方面中的方法。In the eighth aspect, the embodiment of the present application provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the above-mentioned first or second aspect. method.
在本申请实施例中,在播放电子设备中的第一音频文件的情况下,蓝牙设备获取外界环境中的音频数据;在确定该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配的情况下,蓝牙设备向电子设备发送该音频数据;蓝牙设备接收电子设备发送的第一结果信息,并根据该第一结果信息执行目标操作;其中,该第一结果信息为电子设备在该音频数据包括的音频信息满足第一预设条件的情况下发送的;该目标操作包括以下至少一项:停止播放该第一音频文件,播放该音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放该第一音频文件的音量,蓝牙设备震动预设次数。通过该方案,在播放电子设备中的第一音频文件的情况下,在蓝牙设备获取到外界环境中的音频数据之后,由于当该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配时,蓝牙设备可以接收到电子设备发送的该音频数据的第一结果信息, 因此蓝牙设备可以根据该第一结果信息执行目标操作,从而通过该目标操作,用户可以收听到外界环境中的声音,以避免错失外界音源中的重要的音频信息。In the embodiment of the present application, in the case of playing the first audio file in the electronic device, the Bluetooth device acquires audio data in the external environment; when it is determined that the audio data does not match at least one preset audio data included in the Bluetooth device In this case, the Bluetooth device sends the audio data to the electronic device; the Bluetooth device receives the first result information sent by the electronic device, and performs the target operation according to the first result information; wherein, the first result information is the electronic device in the audio data The included audio information is sent when the first preset condition is met; the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, and turn off the noise reduction of the Bluetooth device The function is to reduce the volume of the first audio file played by the Bluetooth device, and the Bluetooth device vibrates for a preset number of times. Through this solution, in the case of playing the first audio file in the electronic device, after the Bluetooth device obtains the audio data in the external environment, because when the audio data does not match at least one preset audio data included in the Bluetooth device , the bluetooth device can receive the first result information of the audio data sent by the electronic device, so the bluetooth device can perform the target operation according to the first result information, so that through the target operation, the user can listen to the sound in the external environment, so as to Avoid missing important audio information from external audio sources.
图1为本申请实施例提供的一种音频播放方法的示意图;FIG. 1 is a schematic diagram of an audio playback method provided in an embodiment of the present application;
图2为本申请实施例提供的音频播放装置的结构示意图之一;FIG. 2 is one of the structural schematic diagrams of the audio playback device provided by the embodiment of the present application;
图3为本申请实施例提供的音频播放装置的结构示意图之二;Fig. 3 is the second structural schematic diagram of the audio playback device provided by the embodiment of the present application;
图4为本申请实施例提供的电子设备的结构示意图;FIG. 4 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;
图5为本申请实施例提供的电子设备的硬件示意图。FIG. 5 is a schematic diagram of hardware of an electronic device provided by an embodiment of the present application.
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of them. Based on the embodiments in this application, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second" and the like in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific sequence or sequence. It is to be understood that the data so used are interchangeable under appropriate circumstances such that the embodiments of the application can be practiced in sequences other than those illustrated or described herein. In addition, "and/or" in the specification and claims means at least one of the connected objects, and the character "/" generally means that the related objects are an "or" relationship.
在本申请实施例中,“示例性的”或者“例如”等词用于表示作例子、例证或说明。本申请实施例中被描述为“示例性的”或者“例如”的任何实施例或设计方案不应被解释为比其它实施例或设计方案更具优势。确切而言,使用“示例性的”或者“例如”等词旨在以具体方式呈现相关概念。In the embodiments of the present application, words such as "exemplary" or "for example" are used as examples, illustrations or illustrations. Any embodiment or design scheme described as "exemplary" or "for example" in the embodiments of the present application shall not be construed as being more advantageous than other embodiments or design schemes. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete manner.
在本申请实施例的描述中,除非另有说明,“多个”的含义是指两个或者两个以上,例如,多个元件是指两个或者两个以上的元件等。In the description of the embodiments of the present application, unless otherwise specified, "plurality" means two or more, for example, a plurality of elements refers to two or more elements.
本申请实施例提供了一种音频播放方法,将该音频播放方法应用于蓝牙设备和电子设备,该方法可以对外界音源进行实时监听。具体地,电子设备用于判断从外界音源中获取的音频数据是否包括符合预设音频信息,并将结果信息发送至蓝牙设备。蓝牙设备根据该结果信息,播放该音频数据对应的音频文件,以避免用户错失外界音源中的重要信息。The embodiment of the present application provides an audio playing method, which is applied to bluetooth devices and electronic devices, and the method can monitor external sound sources in real time. Specifically, the electronic device is used to judge whether the audio data obtained from the external sound source includes preset audio information, and send the result information to the bluetooth device. The bluetooth device plays the audio file corresponding to the audio data according to the result information, so as to prevent the user from missing important information in the external audio source.
进一步地,本申请实施例提供一种蓝牙设备和电子设备。Further, the embodiments of the present application provide a bluetooth device and an electronic device.
其中,蓝牙设备可以包括:蓝牙模块、语音识别模块、主控制模块和存储模块等。具体地,智能蓝牙设备通过蓝牙模块与智能移动终端的通信连接模块建立起蓝牙通信连接。智能蓝牙设备上的语音识别模块,用于将麦克风传输来的声音信号转化为电信号(例如音频信号)发送至电子设备处理。电子设备可以包括通信连接模块、处理模块等。Wherein, the bluetooth device may include: a bluetooth module, a voice recognition module, a main control module, a storage module and the like. Specifically, the smart bluetooth device establishes a bluetooth communication connection with the communication connection module of the smart mobile terminal through the bluetooth module. The voice recognition module on the smart bluetooth device is used to convert the sound signal transmitted by the microphone into an electrical signal (such as an audio signal) and send it to the electronic device for processing. Electronic devices may include communication link modules, processing modules, and the like.
电子设备的通信连接模块用于接收智能蓝牙设备所发送的音频数据,并通过处理模块对音频数据的信息进行比对处理,以及将判断得的结果信息通过蓝牙通信发送至蓝牙设备。The communication connection module of the electronic device is used to receive the audio data sent by the smart bluetooth device, compare and process the information of the audio data through the processing module, and send the judged result information to the bluetooth device through bluetooth communication.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的音频播放方法、装置及设备进行详细地说明。The audio playback method, device, and equipment provided in the embodiments of the present application will be described in detail below through specific embodiments and application scenarios with reference to the accompanying drawings.
实施例一Embodiment one
如图1所示,本申请实施例提供一种音频播放方法,该方法包括下述S101至S103。该方法应用于与电子设备建立连接的蓝牙设备。As shown in FIG. 1 , an embodiment of the present application provides an audio playback method, and the method includes the following S101 to S103. The method is applied to a bluetooth device that establishes a connection with an electronic device.
S101、在播放电子设备中的第一音频文件的情况下,蓝牙设备获取外界环境中的音频数据。S101. In the case of playing a first audio file in the electronic device, the Bluetooth device acquires audio data in an external environment.
可选的,蓝牙设备可以为蓝牙耳机、车载蓝牙设备或其他可能具备蓝牙功能的设备,本申请实施例对此不作限定。Optionally, the Bluetooth device may be a Bluetooth headset, a vehicle-mounted Bluetooth device, or other devices that may have a Bluetooth function, which is not limited in this embodiment of the present application.
可选的,电子设备中可以存储多个音频文件,第一音频文件为该多个音频文件中的音频文件。Optionally, multiple audio files may be stored in the electronic device, and the first audio file is an audio file in the multiple audio files.
进一步地,上述第一音频文件的类型可以为以下任意一项:音乐类型、新闻类型、广播类型、有声小说类型等。Further, the type of the first audio file may be any of the following: music type, news type, radio type, audio novel type, and the like.
需要说明的是,本申请实施例中,蓝牙设备与电子设备处于连接状态。具体地,蓝牙设备与电子设备建立连接可以包括两种方式:一种方式,电子设备与蓝牙设备通过蓝牙配对成功后建立无线连接;另一种方式,通过数据线将电子设备的与蓝牙设备的端口连接,即电子设备与蓝牙设备建立有线连接。具体可参照相关技术中的描述,本申请实施例对此不予赘述。It should be noted that, in the embodiment of the present application, the Bluetooth device is in a connected state with the electronic device. Specifically, the establishment of a connection between a Bluetooth device and an electronic device may include two methods: one method, the electronic device and the Bluetooth device establish a wireless connection after successfully pairing through Bluetooth; Port connection, that is, the electronic device establishes a wired connection with the Bluetooth device. For details, reference may be made to the description in related technologies, which will not be repeated in this embodiment of the present application.
此外,上述S101中“蓝牙设备获取外界环境中的音频数据”是指:通过蓝牙设备中的一个部件,即麦克风接收到外接环境中的声音信号,并将该声音信号转化为音频数据(即音频信号)。In addition, "the Bluetooth device acquires audio data in the external environment" in the above S101 refers to: receiving a sound signal in the external environment through a component in the Bluetooth device, that is, a microphone, and converting the sound signal into audio data (that is, audio data). Signal).
可选的,上述音频数据可以来自外界环境中的设备输出的声音信号、人体的声带震动发出的声音等。此外,该音频数据的类型可以为音乐、语音或音效等。Optionally, the above audio data may come from sound signals output by devices in the external environment, sounds from vocal cord vibrations of the human body, and the like. In addition, the type of the audio data may be music, voice or sound effect, etc.
S102、在确定该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配的情况下,蓝牙设备向电子设备发送该音频数据。S102. In a case where it is determined that the audio data does not match at least one piece of preset audio data included in the Bluetooth device, the Bluetooth device sends the audio data to the electronic device.
可选的,本申请实施例中,上述至少一个预设音频数据为蓝牙设备需要忽略的音频数据,即至少一个预设音频数据对应的声音可能为噪声。Optionally, in this embodiment of the present application, the at least one preset audio data is audio data that the Bluetooth device needs to ignore, that is, the sound corresponding to the at least one preset audio data may be noise.
可选的,在上述S102之前,本申请实施例提供的音频播放方法还可以包括:蓝牙设备获取音频数据包括的特征信息;若至少一个预设特征信息中不包括特征信息,则蓝牙设备确定该音频数据与至少一个预设音频数据不匹配。其中,一个预设特征信息用于指示该至少一个预设音频数据中的一个预设音频数据。Optionally, before the above S102, the audio playback method provided by the embodiment of the present application may further include: the Bluetooth device acquires the characteristic information included in the audio data; if at least one preset characteristic information does not include the characteristic information, the Bluetooth device determines the Audio data does not match at least one preset audio data. Wherein, one preset feature information is used to indicate one preset audio data in the at least one preset audio data.
可选的,上述特征信息可以包括以下至少一项:振幅、频率、相位、分贝等特征信息。Optionally, the feature information may include at least one of the following: feature information such as amplitude, frequency, phase, decibel, and the like.
进一步地,由于不同的音频数据,其对应的特征信息也不同,因此一个预设特征信息可以用于指示一个预设音频数据。例如,以特征信息为频率为例,当频率范围为20Hz--250Hz时,对应低频的噪音音频数据。Further, since different audio data have different corresponding feature information, one piece of preset feature information can be used to indicate one piece of preset audio data. For example, taking the feature information as frequency as an example, when the frequency range is 20Hz--250Hz, it corresponds to low-frequency noise audio data.
需要说明的是,蓝牙设备中可以预先存储有至少一个预设音频数据和至少一个预设特征信息。其中,一个预设特征信息对应一个预设音频数据。进而,当该至少一个预设特征信息中不包括蓝牙设备获取的音频数据的特征信息时,蓝牙设备可以确定该音频数据与至少一个预设音频数据不匹配。It should be noted that at least one piece of preset audio data and at least one piece of preset feature information may be pre-stored in the Bluetooth device. Wherein, one piece of preset feature information corresponds to one piece of preset audio data. Furthermore, when the at least one preset feature information does not include the feature information of the audio data acquired by the Bluetooth device, the Bluetooth device may determine that the audio data does not match the at least one preset audio data.
示例性的,以特征信息为频率为例。假设蓝牙设备中存储有20赫兹的预设音频数据、30赫兹的预设音频数据、40赫兹的预设音频数据。当蓝牙设备获取到音频数据的频率为 25赫兹时,可以确定该音频数据与蓝牙设备包括的这3个类型的预设音频数据不匹配。Exemplarily, take feature information as frequency as an example. It is assumed that preset audio data of 20 Hz, preset audio data of 30 Hz, and preset audio data of 40 Hz are stored in the Bluetooth device. When the frequency of the audio data acquired by the Bluetooth device is 25 Hz, it can be determined that the audio data does not match the three types of preset audio data included in the Bluetooth device.
S103、蓝牙设备接收电子设备发送的第一结果信息,并根据该第一结果信息执行目标操作。S103. The Bluetooth device receives the first result information sent by the electronic device, and executes a target operation according to the first result information.
其中,上述第一结果信息为电子设备在音频数据包括的音频信息满足第一预设条件的情况下发送的;目标操作包括以下至少一项:停止播放第一音频文件,播放音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放第一音频文件的音量、蓝牙设备震动预设次数。Wherein, the above-mentioned first result information is sent by the electronic device when the audio information included in the audio data meets the first preset condition; the target operation includes at least one of the following: stop playing the first audio file, play the first audio file corresponding to the audio data; For the second audio file, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and the preset number of vibrations of the Bluetooth device.
可选的,上述第二音频文件的类型由音频数据决定。可以参照上述实施例中对第一音频文件的具体描述,本申请实施例对此不再赘述。Optionally, the type of the second audio file is determined by audio data. Reference may be made to the specific description of the first audio file in the foregoing embodiments, which will not be repeated in this embodiment of the present application.
可选的,预设次数和第一结果信息可以为厂商出厂设置或为用户自定义设置。当用户对该第一结果信息的内容或形式、预设次数的取值不满意时,可以触发更改该第一结果信息的内容,或修改预设次数的取值。Optionally, the preset number of times and the first result information can be factory-set by the manufacturer or customized by the user. When the user is dissatisfied with the content or form of the first result information, or the value of the preset times, it may be triggered to change the content of the first result information, or modify the value of the preset times.
例如,预设次数可以为三次,即蓝牙设备震动三次。For example, the preset number of times may be three times, that is, the Bluetooth device vibrates three times.
可选的,第一结果信息可以为以下任一项:文字信息、符号信息、图标信息等。具体本申请实施例可以根据实际使用情况确定,本申请实施例对此不作限定。Optionally, the first result information may be any of the following: text information, symbol information, icon information, and the like. The specific embodiments of the present application may be determined according to actual usage conditions, and are not limited in the embodiments of the present application.
示例性地,以第一结果信息可以为文字信息为例,第一结果信息可以为“音频数据有效,蓝牙设备需要对此处理”。Exemplarily, taking the first result information as text information as an example, the first result information may be "the audio data is valid, and the Bluetooth device needs to process this".
可以理解,当蓝牙设备接收电子设备发送的第一结果信息时,蓝牙设备可以确定音频数据中包括重要的信息,从而蓝牙设备可以执行目标操作,以便于用户不会错失音频数据中包括重要的信息。It can be understood that when the Bluetooth device receives the first result information sent by the electronic device, the Bluetooth device can determine that the audio data includes important information, so that the Bluetooth device can perform the target operation, so that the user will not miss the important information included in the audio data .
可选的,上述音频数据包括的音频信息可以为音频内容信息和/或音频音色信息。其中,音频内容信息用于指示音频数据包括的具体内容,音频音色信息用于指示该音频数据对应的声音的特征。Optionally, the audio information included in the audio data may be audio content information and/or audio timbre information. Wherein, the audio content information is used to indicate the specific content included in the audio data, and the audio timbre information is used to indicate the characteristics of the sound corresponding to the audio data.
可以理解的是,由于不同的物体或人物发出的声音的音色也不同,因此不同的音频数据,对应的音频音色信息也不相同,从而可以根据该音频音色信息,确定发声体。It can be understood that since the timbres of sounds emitted by different objects or persons are different, different audio data have different corresponding audio timbre information, so that the sounding body can be determined according to the audio timbre information.
示例性,以音频信息可以为音频内容信息为例。音频内容信息为“乘客们请注意,下一站xxx站即将到达”;以音频信息可以为音频音色信息为例。音频音色信息为以下任意一项:钢琴的音色、小提琴的音色、吉他的音色、男孩的音色、女孩的音色、男人的音色、女人的音色、老人的音色等。Exemplarily, the audio information may be audio content information as an example. The audio content information is "Passengers, please pay attention, the next stop xxx station is about to arrive"; the audio information may be audio timbre information as an example. The audio timbre information is any one of the following: piano timbre, violin timbre, guitar timbre, boy timbre, girl timbre, man timbre, woman timbre, old man timbre, etc.
可选的,在音频信息包括音频内容信息和音频音色信息的情况下,第一预设条件可以包括以下至少一项:音频内容信息中包括预设关键字,音频音色信息与预设音色信息匹配。Optionally, when the audio information includes audio content information and audio timbre information, the first preset condition may include at least one of the following: the audio content information includes preset keywords, and the audio timbre information matches the preset timbre information .
可选的,预设关键字和预设音色信息可以为厂商出厂设置或为用户自定义设置的。当预设关键字和预设音色信息不能满足用户需求时,用户可以按照自己的意愿触发对该预设关键字和该预设音色信息进行修改。Optionally, the preset keywords and preset tone information can be factory-set by the manufacturer or customized by the user. When the preset keyword and the preset timbre information cannot meet the needs of the user, the user can trigger modification of the preset keyword and the preset timbre information according to his own wishes.
进一步地,预设关键字和预设音色信息的种类的数量可以为一种或多种。在预设关键字和预设音色信息的种类的数量为一种的情况下,意味着本申请实施例提供的音频播放方法只能应用于某种特定使用场景中;在预设关键字和预设音色信息的种类的数量为多种的情况下,由于一种使用场景对应一种预设关键字或预设音色信息,因此意味着本申请实施例提供的音频播放方法可以应用于多种使用场景中。Further, the number of types of preset keywords and preset timbre information may be one or more. In the case where the number of preset keywords and preset timbre information is one, it means that the audio playback method provided by the embodiment of this application can only be applied to a specific usage scenario; When the number of types of timbre information is multiple, since one usage scenario corresponds to one preset keyword or preset timbre information, it means that the audio playback method provided by the embodiment of the present application can be applied to multiple uses scene.
示例性的,预设关键字可以为“乘客们请注意”、“电影”、“电视剧”或“动漫”等。Exemplarily, the preset keywords may be "attention, passengers", "movies", "tv series" or "anime".
示例性的,用户可以触发电子设备预先录制一段声音,然后电子设备记录下该段声音的音色信息,并将该段声音的音色信息作为预设音色信息。例如,家长通过电子设备录制小孩的一段声音,并记录下该段声音的音色信息,即这个小孩的音色为预设音色信息。Exemplarily, the user may trigger the electronic device to pre-record a piece of sound, and then the electronic device records the timbre information of the sound, and uses the timbre information of the sound as the preset timbre information. For example, the parent records a section of voice of the child through an electronic device, and records the timbre information of the section of sound, that is, the timbre of the child is the preset timbre information.
示例性的,以预设关键字为“乘客们请注意”为例。假设在用户乘坐公交的过程中,用户正在佩戴蓝牙耳机收听电子设备中播放的歌曲。当公交车到达用户回家地点的A站点时,公交车的广告开始播报“乘客们请注意,A站马上到达,请乘客们带好自己的物品”的一段语音。蓝牙耳机获取到外界环境中来自于公交车的扬声器输出的该段语音的音频数据。当确定该音频数据与蓝牙耳机包括的至少一个预设音频数据不匹配的情况下,蓝牙耳机可以向电子设备发送该音频数据。当电子设备获取到音频数据的音频内容信息中包括“乘客们请注意”时,蓝牙耳机可以接收到电子设备发送的第一结果信息:“音频数据有效,蓝牙设备需要对此处理”。如此,蓝牙耳机可以根据该第一结果信息,停止播放音乐,并播放音频数据对应的语音“乘客们请注意,A站马上到达,请乘客们带好自己的物品”。进而,用户不会错过这段语音中的重要信息,当公交车到站时确保用户及时下车。Exemplarily, take the preset keyword as "Passengers, please pay attention" as an example. Assume that the user is wearing a bluetooth headset to listen to songs played on the electronic device while the user is taking the bus. When the bus arrives at station A where the user goes home, the advertisement of the bus starts to broadcast a voice saying "Passengers, please pay attention, station A will arrive soon, please bring your belongings". The bluetooth earphone obtains the audio data of the segment of voice output from the loudspeaker of the bus in the external environment. When it is determined that the audio data does not match at least one preset audio data included in the Bluetooth headset, the Bluetooth headset may send the audio data to the electronic device. When the audio content information of the audio data obtained by the electronic device includes "Passengers, please pay attention", the Bluetooth headset can receive the first result message sent by the electronic device: "The audio data is valid, and the Bluetooth device needs to process this". In this way, the bluetooth earphone can stop playing the music according to the first result information, and play the voice corresponding to the audio data "Passengers, please pay attention, station A will arrive soon, passengers please bring your belongings". Furthermore, the user will not miss the important information in this voice, and when the bus arrives at the stop, the user is guaranteed to get off in time.
本申请实施例提供一种音频播放方法,在播放电子设备中的第一音频文件的情况下,在蓝牙设备获取到外界环境中的音频数据之后,由于当该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配时,蓝牙设备可以接收到电子设备发送的该音频数据的第一结果信息,因此蓝牙设备可以根据该第一结果信息执行目标操作,从而通过该目标操作,用户可以收听到外界环境中的声音,以避免错失外界音源中的重要的音频信息。The embodiment of the present application provides an audio playback method. In the case of playing the first audio file in the electronic device, after the Bluetooth device obtains the audio data in the external environment, when the audio data and at least one audio file included in the Bluetooth device When the preset audio data does not match, the Bluetooth device can receive the first result information of the audio data sent by the electronic device, so the Bluetooth device can perform the target operation according to the first result information, so that through the target operation, the user can listen to Sound in the external environment to avoid missing important audio information in the external sound source.
可选的,在上述S102之后,本申请实施例提供的音频播放方法还可以包括下述S104。Optionally, after the above S102, the audio playing method provided in the embodiment of the present application may further include the following S104.
S104、蓝牙设备接收电子设备发送的第二结果信息,并根据第二结果信息存储音频数据;S104. The Bluetooth device receives the second result information sent by the electronic device, and stores the audio data according to the second result information;
其中,上述第二结果信息为电子设备在音频数据包括的音频信息满足第二预设条件的情况下发送的。Wherein, the above-mentioned second result information is sent by the electronic device when the audio information included in the audio data satisfies the second preset condition.
可选的,音频信息可以包括音频内容信息和音频音色信息。第二预设条件包括:该音频内容信息中不包括预设关键字、且该音频音色信息与预设音色信息不匹配。Optionally, the audio information may include audio content information and audio timbre information. The second preset condition includes: the audio content information does not include a preset keyword, and the audio timbre information does not match the preset timbre information.
可选的,第二结果信息为与第一结果信息不同的信息,对于第二结果信息的说明,可以参照上述实施例中对第一结果信息的详细描述,本申请实施例对此不再赘述。Optionally, the second result information is information different from the first result information. For the description of the second result information, refer to the detailed description of the first result information in the above embodiment, which will not be repeated in this embodiment of the present application. .
示例性地,以第二结果信息可以为文字信息为例,第二结果信息可以为“音频数据是无效噪音”。Exemplarily, taking the second result information as text information as an example, the second result information may be "audio data is invalid noise".
可以理解的是,当蓝牙设备接收电子设备发送的第二结果信息时,蓝牙设备可以确定音频数据中不包括重要的信息,即音频数据对于用户来说是无用的噪声,从而蓝牙设备可以存储该音频数据,以便于当蓝牙设备在以后接收到同样的音频数据时,蓝牙设备不向电子设备该音频数据,从而避免了不必要的操作,也节省了电子设备的资源(例如电量)。It can be understood that when the Bluetooth device receives the second result information sent by the electronic device, the Bluetooth device can determine that the audio data does not include important information, that is, the audio data is useless noise for the user, so that the Bluetooth device can store the information. Audio data, so that when the Bluetooth device receives the same audio data in the future, the Bluetooth device does not send the audio data to the electronic device, thereby avoiding unnecessary operations and saving resources (such as power) of the electronic device.
实施例二Embodiment two
如图1所示,本申请实施例提供一种音频播放方法,该方法包括下述S201至S203,该方法应用于处于与蓝牙设备建立连接的电子设备。As shown in FIG. 1 , the embodiment of the present application provides an audio playback method, the method includes the following S201 to S203, and the method is applied to an electronic device that is establishing a connection with a Bluetooth device.
S201、电子设备接收蓝牙设备发送的音频数据。S201. The electronic device receives audio data sent by the Bluetooth device.
其中,音频数据为在蓝牙设备播放第一音频文件的情况下从外界环境中获取的。Wherein, the audio data is obtained from the external environment when the Bluetooth device plays the first audio file.
可选的,上述S201中“蓝牙设备发送的音频数据”是指:通过蓝牙设备中的一个部件,即麦克风接收到外接环境中的声音信号,并将该声音信号转化为音频数据(即音频信号)。Optionally, the "audio data sent by the Bluetooth device" in the above S201 refers to: receiving a sound signal in the external environment through a component in the Bluetooth device, that is, a microphone, and converting the sound signal into audio data (that is, the audio signal ).
进一步地,上述音频数据可以为来自外界环境中的设备输出的声音信号、人体的声带震动发出的声音等。此外,该音频数据的类型可以为音乐、语音或音效等。Further, the above-mentioned audio data may be a sound signal output from a device in an external environment, a sound emitted by a human body's vocal cord vibration, and the like. In addition, the type of the audio data may be music, voice or sound effect, etc.
可选的,电子设备中可以存储多个音频文件,第一音频文件为该多个音频文件中的音频文件。Optionally, multiple audio files may be stored in the electronic device, and the first audio file is an audio file in the multiple audio files.
进一步地,上述第一音频文件的类型可以为以下任意一项:音乐类型、新闻类型、广播类型、有声小说类型等。Further, the type of the first audio file may be any of the following: music type, news type, radio type, audio novel type, and the like.
需要说明的是,本申请实施例中,蓝牙设备与电子设备处于连接状态。具体地,蓝牙设备与电子设备建立连接可以包括两种方式:一种方式,电子设备与蓝牙设备通过蓝牙配对成功后建立无线连接;另一种方式,通过数据线将电子设备的与蓝牙设备的端口连接,即电子设备与蓝牙设备建立有线连接。具体可参照相关技术中的描述,本申请实施例对此不予赘述。It should be noted that, in the embodiment of the present application, the Bluetooth device is in a connected state with the electronic device. Specifically, the establishment of a connection between a Bluetooth device and an electronic device may include two methods: one method, the electronic device and the Bluetooth device establish a wireless connection after successfully pairing through Bluetooth; Port connection, that is, the electronic device establishes a wired connection with the Bluetooth device. For details, reference may be made to the description in related technologies, which will not be repeated in this embodiment of the present application.
可选的,蓝牙设备可以为蓝牙耳机、车载蓝牙设备或其他可能具备蓝牙功能的设备,本申请实施例对此不作限定。Optionally, the Bluetooth device may be a Bluetooth headset, a vehicle-mounted Bluetooth device, or other devices that may have a Bluetooth function, which is not limited in this embodiment of the present application.
S202、电子设备获取该音频数据包括的音频信息。S202. The electronic device acquires audio information included in the audio data.
可选的,上述音频数据包括的音频信息可以包括以下至少一项:音频内容信息、音频音色信息。其中,音频内容信息用于指示音频数据包括的具体内容,音频音色信息用于指示该音频数据对应的声音的特征。Optionally, the audio information included in the audio data may include at least one of the following: audio content information and audio timbre information. Wherein, the audio content information is used to indicate the specific content included in the audio data, and the audio timbre information is used to indicate the characteristics of the sound corresponding to the audio data.
可以理解的是,由于不同的物体或人物发出的声音的音色也不同,因此不同的音频数据,对应的音频音色信息也不相同,从而可以根据该音频音色信息,确定发声体。It can be understood that since the timbres of sounds emitted by different objects or persons are different, different audio data have different corresponding audio timbre information, so that the sounding body can be determined according to the audio timbre information.
示例性,以音频信息可以为音频内容信息为例。音频内容信息为“乘客们请注意,下一站xxx站即将到达”;以音频信息可以为音频音色信息为例。音频音色信息为以下任意一项:钢琴的音色、小提琴的音色、吉他的音色、男孩的音色、女孩的音色、男人的音色、女人的音色、老人的音色等。Exemplarily, the audio information may be audio content information as an example. The audio content information is "Passengers, please pay attention, the next stop xxx station is about to arrive"; the audio information may be audio timbre information as an example. The audio timbre information is any one of the following: piano timbre, violin timbre, guitar timbre, boy timbre, girl timbre, man timbre, woman timbre, old man timbre, etc.
S203、在该音频信息满足第一预设条件的情况下,电子设备向蓝牙设备发送第一结果信息。S203. When the audio information satisfies the first preset condition, the electronic device sends first result information to the Bluetooth device.
其中,第一结果信息用于指示蓝牙设备执行目标操作,该目标操作包括以下至少一项:停止播放第一音频文件,播放音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放第一音频文件的音量、蓝牙设备震动预设次数。Wherein, the first result information is used to instruct the Bluetooth device to perform a target operation, and the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the The bluetooth device plays the volume of the first audio file, and the bluetooth device vibrates for a preset number of times.
可选的,在音频信息包括音频内容信息和音频音色信息的情况下,第一预设条件包括以下至少一项:该音频内容信息中包括预设关键字,该音频音色信息与预设音色信息匹配。Optionally, when the audio information includes audio content information and audio timbre information, the first preset condition includes at least one of the following: the audio content information includes a preset keyword, the audio timbre information and the preset timbre information match.
可选的,预设关键字和预设音色信息可以为厂商出厂设置或为用户自定义设置的。当预设关键字和预设音色信息不能满足用户需求时,用户可以按照自己的意愿触发对该预设关键字和该预设音色信息进行修改。Optionally, the preset keywords and preset tone information can be factory-set by the manufacturer or customized by the user. When the preset keyword and the preset timbre information cannot meet the needs of the user, the user can trigger modification of the preset keyword and the preset timbre information according to his own wishes.
进一步地,预设关键字和预设音色信息的种类的数量可以为一种或多种。在预设关键字和预设音色信息的种类的数量为一种的情况下,意味着本申请实施例提供的音频播放方 法只能应用于某种特定使用场景中;在预设关键字和预设音色信息的种类的数量为多种的情况下,由于一种使用场景对应一种预设关键字或预设音色信息,因此意味着本申请实施例提供的音频播放方法可以应用于多种使用场景中。Further, the number of types of preset keywords and preset timbre information may be one or more. In the case where the number of preset keywords and preset timbre information is one, it means that the audio playback method provided by the embodiment of this application can only be applied to a specific usage scenario; When the number of types of timbre information is multiple, since one usage scenario corresponds to one preset keyword or preset timbre information, it means that the audio playback method provided by the embodiment of the present application can be applied to multiple uses scene.
示例性的,预设关键字可以为“乘客们请注意”、“电影”、“电视剧”或“动漫”等。Exemplarily, the preset keywords may be "attention, passengers", "movies", "tv series" or "anime".
示例性的,用户可以触发电子设备预先录制一段声音,然后电子设备记录下该段声音的音色信息,并将该段声音的音色信息作为预设音色信息。例如,家长通过电子设备录制小孩的一段声音,并记录下该段声音的音色信息,即这个小孩的音色为预设音色信息。Exemplarily, the user may trigger the electronic device to pre-record a piece of sound, and then the electronic device records the timbre information of the sound, and uses the timbre information of the sound as the preset timbre information. For example, the parent records a section of voice of the child through an electronic device, and records the timbre information of the section of sound, that is, the timbre of the child is the preset timbre information.
可选的,上述预设次数和第一结果信息可以为厂商出厂设置或为用户自定义设置。当用户对该第一结果信息的内容或形式、预设次数的取值不满意时,可以触发更改该第一结果信息的内容,或修改预设次数的取值。Optionally, the above-mentioned preset times and first result information may be factory-set by the manufacturer or customized by the user. When the user is dissatisfied with the content or form of the first result information, or the value of the preset times, it may be triggered to change the content of the first result information, or modify the value of the preset times.
例如,预设次数可以为三次,即蓝牙设备震动三次。For example, the preset number of times may be three times, that is, the Bluetooth device vibrates three times.
可选的,第一结果信息可以为以下任一项:文字信息、符号信息、图标信息等。具体本申请实施例可以根据实际使用情况确定,本申请实施例对此不作限定。Optionally, the first result information may be any of the following: text information, symbol information, icon information, and the like. The specific embodiments of the present application may be determined according to actual usage conditions, and are not limited in the embodiments of the present application.
示例性地,以第一结果信息可以为文字信息为例,第一结果信息可以为“音频数据有效,蓝牙设备需要对此处理”。Exemplarily, taking the first result information as text information as an example, the first result information may be "the audio data is valid, and the Bluetooth device needs to process this".
示例性的,以预设关键字为“乘客们请注意”为例。假设在用户乘坐公交的过程中,用户正在佩戴蓝牙耳机收听电子设备中播放的歌曲。当公交车到达用户回家地点的A站点时,公交车的广告开始播报“乘客们请注意,A站马上到达,请乘客们带好自己的物品”的一段语音。由于电子设备可以接收到蓝牙耳机从外界环境中获取到的来自于公交车的扬声器输出的该段语音的音频数据,因此当电子设备获取到该音频数据的音频内容信息中包括“乘客们请注意”时,电子设备可以向蓝牙耳机发送用于指示蓝牙耳机播放该音频数据对应的语音的第一结果信息:“音频数据有效,蓝牙设备需要对此处理”。如此,在用户收听到通过蓝牙耳机播放音频数据对应的语音“乘客们请注意,A站马上到达,请乘客们带好自己的物品”之后,当公交车到站时可以确保用户及时下车,即用户不会错过这段语音中的重要信息。Exemplarily, take the preset keyword as "Passengers, please pay attention" as an example. Assume that the user is wearing a bluetooth headset to listen to songs played on the electronic device while the user is taking the bus. When the bus arrives at station A where the user goes home, the advertisement of the bus starts to broadcast a voice saying "Passengers, please pay attention, station A will arrive soon, please bring your belongings". Since the electronic device can receive the audio data of the voice output from the speaker of the bus obtained by the Bluetooth headset from the external environment, when the electronic device obtains the audio content information of the audio data includes "Passengers, please pay attention ", the electronic device may send to the Bluetooth headset first result information for instructing the Bluetooth headset to play the voice corresponding to the audio data: "The audio data is valid, and the Bluetooth device needs to process this". In this way, after the user hears the voice corresponding to the audio data played through the Bluetooth headset "Passengers, please pay attention, station A will arrive soon, please bring your belongings", when the bus arrives, it can ensure that the user gets off in time, that is, Users will not miss important information in this voice.
本申请实施例提供一种音频播放方法,在电子设备接收到蓝牙设备发送的音频数据之后,电子设备可以获取该音频数据包括的音频信息,由于在该音频信息满足第一预设条件的情况下,电子设备可以向蓝牙设备发送用于指示蓝牙设备执行目标操作的第一结果信息,因此电子设备可以控制蓝牙设备根据该第一结果信息执行目标操作,从而通过该目标操作,用户可以收听到外界环境中的声音,以避免错失外界音源中的重要的音频信息。The embodiment of the present application provides an audio playback method. After the electronic device receives the audio data sent by the Bluetooth device, the electronic device can acquire the audio information included in the audio data. Because the audio information satisfies the first preset condition , the electronic device can send the first result information for instructing the Bluetooth device to perform the target operation to the Bluetooth device, so the electronic device can control the Bluetooth device to perform the target operation according to the first result information, so that through the target operation, the user can listen to the outside world ambient sound to avoid missing important audio information from external sound sources.
可选的,音频信息包括音频内容信息和音频音色信息。在上述S202之后,本申请实施例提供的音频播放方法还可以包括下述S204。即S203和S204择一执行。Optionally, the audio information includes audio content information and audio timbre information. After the above S202, the audio playing method provided in the embodiment of the present application may further include the following S204. That is, one of S203 and S204 is executed.
S204、在音频信息满足第二预设条件的情况下,电子设备向蓝牙设备发送第二结果信息。S204. When the audio information satisfies the second preset condition, the electronic device sends second result information to the Bluetooth device.
其中,第二结果信息用于指示蓝牙设备存储音频数据;第二预设条件包括:音频内容信息中不包括预设关键字、且音频音色信息与预设音色信息不匹配。Wherein, the second result information is used to instruct the Bluetooth device to store audio data; the second preset condition includes: the audio content information does not include a preset keyword, and the audio timbre information does not match the preset timbre information.
可选的,第二结果信息为与第一结果信息不同的信息,对于第二结果信息的说明,可以参照上述实施例中对第一结果信息的详细描述,本申请实施例对此不再赘述。Optionally, the second result information is information different from the first result information. For the description of the second result information, refer to the detailed description of the first result information in the above embodiment, which will not be repeated in this embodiment of the present application. .
示例性地,以第二结果信息可以为文字信息为例,第二结果信息可以为“音频数据是无效噪音”。Exemplarily, taking the second result information as text information as an example, the second result information may be "audio data is invalid noise".
可以理解的是,由于当音频信息满足第二预设条件时,电子设备可以确定音频数据中不包括重要的信息,即音频数据对于用户来说是无用的噪声,因此电子设备可以向蓝牙设备发送用于指示蓝牙设备存储该音频数据的第二结果信息,从而电子设备不会再次接收到蓝牙设备发送的同样的音频数据,进而对该音频数据进行判断。如此,电子设备避免了不必要的操作,也节省了电子设备的资源(例如电量)。It can be understood that, since when the audio information satisfies the second preset condition, the electronic device can determine that the audio data does not include important information, that is, the audio data is useless noise for the user, so the electronic device can send The second result information is used to instruct the bluetooth device to store the audio data, so that the electronic device will not receive the same audio data sent by the bluetooth device again, and then judge the audio data. In this way, the electronic device avoids unnecessary operations, and also saves resources (such as power) of the electronic device.
实施例三Embodiment three
本申请实施例提供一种音频播放方法,该方法包括下述S301至S306,该方法应用于处于已连接状态的电子设备和蓝牙设备。An embodiment of the present application provides an audio playback method, the method includes the following steps S301 to S306, and the method is applied to an electronic device and a Bluetooth device in a connected state.
S301、在播放电子设备中的第一音频文件的情况下,蓝牙设备获取外界环境中的音频数据。S301. In the case of playing a first audio file in the electronic device, the Bluetooth device acquires audio data in an external environment.
S302、在确定该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配的情况下,蓝牙设备向电子设备发送该音频数据。S302. In a case where it is determined that the audio data does not match at least one preset audio data included in the Bluetooth device, the Bluetooth device sends the audio data to the electronic device.
S303、电子设备接收蓝牙设备发送的音频数据。S303. The electronic device receives the audio data sent by the Bluetooth device.
S304、电子设备获取该音频数据包括的音频信息。S304. The electronic device acquires audio information included in the audio data.
S305、在该音频信息满足第一预设条件的情况下,电子设备向蓝牙设备发送第一结果信息。S305. When the audio information satisfies the first preset condition, the electronic device sends first result information to the Bluetooth device.
其中,第一结果信息用于指示蓝牙设备执行目标操作。Wherein, the first result information is used to instruct the Bluetooth device to perform the target operation.
S306、蓝牙设备接收电子设备发送的该第一结果信息,并根据该第一结果信息执行目标操作。S306. The Bluetooth device receives the first result information sent by the electronic device, and executes a target operation according to the first result information.
其中,目标操作包括以下至少一项:停止播放第一音频文件,播放音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放第一音频文件的音量,蓝牙设备震动预设次数。Wherein, the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and prevent the vibration of the Bluetooth device. Set the number of times.
对于上述S301至S306的描述,具体可以参照上述实施例一和实施例二中的相关描述,此处不再赘述。For the description of the above S301 to S306, specific reference may be made to the relevant descriptions in the above Embodiment 1 and Embodiment 2, which will not be repeated here.
可选的,音频信息包括音频内容信息和音频音色信息。在上述S304之后,本申请实施例提供的音频播放方法还可以包括下述S307和S308。即S305和S306,或者,S307和S308择一执行。Optionally, the audio information includes audio content information and audio timbre information. After the above S304, the audio playing method provided in the embodiment of the present application may further include the following S307 and S308. That is, one of S305 and S306, or S307 and S308 is executed.
S307、在音频信息满足第二预设条件的情况下,电子设备向蓝牙设备发送第二结果信息。S307. When the audio information satisfies the second preset condition, the electronic device sends second result information to the Bluetooth device.
S308、蓝牙设备接收电子设备发送的第二结果信息,并根据第二结果信息存储音频数据。S308. The Bluetooth device receives the second result information sent by the electronic device, and stores the audio data according to the second result information.
对于上述S307和S308的描述,具体可以参照上述实施例一和实施例二中的相关描述,此处不再赘述。For the description of the above S307 and S308, for details, reference may be made to the related descriptions in the above Embodiment 1 and Embodiment 2, which will not be repeated here.
本申请实施例提供一种音频播放方法,在播放电子设备中的第一音频文件的情况下,在蓝牙设备获取到外界环境中的音频数据之后,由于当该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配时,蓝牙设备可以向电子设备发送该音频数据,因此当电子设备确定该音频数据包括的音频信息满足第一预设条件时向电子设备发送的该音频数据的第 一结果信息,从而在蓝牙设备接收到电子设备发送的该第一结果信息之后,蓝牙设备可以根据该第一结果信息执行目标操作。如此,电子设备通过控制蓝牙设备执行该目标操作,使得用户可以收听到外界环境中的声音,而避免错失外界音源中的重要的音频信息。The embodiment of the present application provides an audio playback method. In the case of playing the first audio file in the electronic device, after the Bluetooth device obtains the audio data in the external environment, when the audio data and at least one audio file included in the Bluetooth device When the preset audio data does not match, the Bluetooth device can send the audio data to the electronic device, so when the electronic device determines that the audio information included in the audio data meets the first preset condition, the first result of the audio data sent to the electronic device is information, so that after the Bluetooth device receives the first result information sent by the electronic device, the Bluetooth device can execute the target operation according to the first result information. In this way, the electronic device controls the bluetooth device to perform the target operation, so that the user can listen to the sound in the external environment, and avoid missing important audio information in the external sound source.
需要说明的是,本申请实施例提供的音频播放方法,执行主体可以为音频播放装置,或者该音频播放装置中的用于执行音频播放方法的控制模块。本申请实施例中以音频播放装置执行音频播放方法为例,说明本申请实施例提供的音频播放装置。It should be noted that, the audio playback method provided in the embodiment of the present application may be executed by an audio playback device, or a control module in the audio playback device for executing the audio playback method. In the embodiment of the present application, the audio playing device provided in the embodiment of the present application is described by taking the audio playing device executing the audio playing method as an example.
如图2所示,本申请实施例提供一种音频播放装置400,该音频播放装置包括音频播放装置包括获取模块401、发送模块402、接收模块403和处理模块404。该音频播放装置可以为上述实施例一中的蓝牙设备或蓝牙设备中的功能模块。获取模块401,可以用于在播放电子设备中的第一音频文件的情况下,蓝牙设备获取外界环境中的音频数据。发送模块402,可以用于在确定获取模块401获取的该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配的情况下,蓝牙设备向电子设备发送该音频数据。接收模块403,可以用于蓝牙设备接收电子设备发送的第一结果信息。处理模块404,可以用于在接收模块403接收该第一结果信息之后,根据该第一结果信息执行目标操作;其中,该第一结果信息为电子设备在该音频数据包括的音频信息满足第一预设条件的情况下发送的;该目标操作包括以下至少一项:停止播放该第一音频文件,播放该音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放该第一音频文件的音量,蓝牙设备震动预设次数。As shown in FIG. 2 , the embodiment of the present application provides an audio playback device 400 , the audio playback device includes an acquisition module 401 , a sending module 402 , a receiving module 403 and a processing module 404 . The audio playback device may be the Bluetooth device in the first embodiment above or a functional module in the Bluetooth device. The acquiring module 401 may be configured to enable the Bluetooth device to acquire audio data in the external environment when the first audio file in the electronic device is played. The sending module 402 may be configured to send the audio data to the electronic device from the Bluetooth device when it is determined that the audio data obtained by the obtaining module 401 does not match at least one preset audio data included in the Bluetooth device. The receiving module 403 may be used for the Bluetooth device to receive the first result information sent by the electronic device. The processing module 404 may be configured to perform a target operation according to the first result information after the receiving module 403 receives the first result information; wherein, the first result information is that the audio information included in the audio data of the electronic device satisfies the first Sent under preset conditions; the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the Bluetooth device to play the The volume of the first audio file, the preset number of vibrations of the Bluetooth device.
可选的,音频播放装置还可以包括接收模块和存储模块。接收模块,还可以用于蓝牙设备接收电子设备发送的第二结果信息。存储模块,可以用于在接收模块接收该第二结果信息之后,根据该第二结果信息存储音频数据;其中,该第二结果信息为电子设备在该音频数据包括的音频信息满足第二预设条件的情况下发送的。Optionally, the audio playback device may also include a receiving module and a storage module. The receiving module can also be used for the Bluetooth device to receive the second result information sent by the electronic device. The storage module may be configured to store the audio data according to the second result information after the receiving module receives the second result information; wherein, the second result information is that the audio information included in the audio data of the electronic device satisfies the second preset sent under condition.
可选的,音频播放装置还可以包括确定模块。获取模块,还可以用于蓝牙设备获取音频数据包括的特征信息。确定模块,可以用于若至少一个预设特征信息中不包括该特征信息,则蓝牙设备确定该音频数据与至少一个预设音频数据不匹配,一个预设特征信息用于指示该至少一个预设音频数据中的一个预设音频数据。Optionally, the audio playback device may also include a determination module. The obtaining module can also be used for the bluetooth device to obtain the feature information included in the audio data. The determining module may be configured to determine that the audio data does not match at least one preset audio data if the feature information is not included in the at least one preset feature information, and the preset feature information is used to indicate the at least one preset feature information One preset audio data in audio data.
本申请实施例提供一种音频播放装置,在播放电子设备中的第一音频文件的情况下,在蓝牙设备获取到外界环境中的音频数据之后,由于当该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配时,蓝牙设备可以接收到电子设备发送的该音频数据的第一结果信息,因此蓝牙设备可以根据该第一结果信息执行目标操作,从而通过该目标操作,用户可以收听到外界环境中的声音,以避免错失外界音源中的重要的音频信息。The embodiment of the present application provides an audio playback device. When playing the first audio file in the electronic device, after the Bluetooth device obtains the audio data in the external environment, when the audio data and at least one audio file included in the Bluetooth device When the preset audio data does not match, the Bluetooth device can receive the first result information of the audio data sent by the electronic device, so the Bluetooth device can perform the target operation according to the first result information, so that through the target operation, the user can listen to Sound in the external environment to avoid missing important audio information in the external sound source.
如图3所示,本申请实施例提供一种音频播放装置500;该音频播放装置包括接收模块501、获取模块502和发送模块503。该音频播放装置可以为上述实施例二中的电子设备或电子设备中的功能模块。接收模块501,用于电子设备接收蓝牙设备发送的音频数据,该音频数据为在蓝牙设备播放第一音频文件的情况下从外界环境中获取的。获取模块502,用于电子设备获取接收模块501接收的该音频数据包括的音频信息。发送模块503,用于在该音频信息满足第一预设条件的情况下,电子设备向蓝牙设备发送第一结果信息;其中,该第一结果信息用于指示蓝牙设备执行目标操作,该目标操作包括以下至少一项:停止播放该第一音频文件,播放该音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放该第一音频文件的音量,蓝牙设备震动预设次数。As shown in FIG. 3 , the embodiment of the present application provides an audio playback device 500 ; the audio playback device includes a receiving module 501 , an acquiring module 502 and a sending module 503 . The audio playback device may be the electronic device or a functional module in the electronic device in the second embodiment above. The receiving module 501 is configured for the electronic device to receive audio data sent by the Bluetooth device, where the audio data is obtained from the external environment when the Bluetooth device plays the first audio file. The acquiring module 502 is configured for the electronic device to acquire the audio information included in the audio data received by the receiving module 501 . The sending module 503 is configured to send the first result information to the Bluetooth device when the audio information satisfies the first preset condition; wherein the first result information is used to instruct the Bluetooth device to perform a target operation, and the target operation Including at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and preset the vibration of the Bluetooth device frequency.
可选的,音频信息包括以下至少一项:音频内容信息、音频音色信息;该第一预设条件包括以下至少一项:该音频内容信息中包括预设关键字,该音频音色信息与预设音色信息匹配。Optionally, the audio information includes at least one of the following: audio content information, audio timbre information; the first preset condition includes at least one of the following: the audio content information includes preset keywords, and the audio timbre information and preset Timbre information matches.
可选的,音频信息包括音频内容信息和音频音色信息。发送模块,还用于在该音频信息满足第二预设条件的情况下,电子设备向蓝牙设备发送第二结果信息;其中,该第二结果信息用于指示蓝牙设备存储音频数据;该第二预设条件包括:该音频内容信息中不包括预设关键字、且该音频音色信息与预设音色信息不匹配。Optionally, the audio information includes audio content information and audio timbre information. The sending module is also used to send the second result information to the Bluetooth device when the audio information satisfies the second preset condition; wherein, the second result information is used to instruct the Bluetooth device to store the audio data; the second The preset conditions include: the audio content information does not include preset keywords, and the audio timbre information does not match the preset timbre information.
本申请实施例提供一种音频播放装置,在电子设备接收到蓝牙设备发送的音频数据之后,电子设备可以获取该音频数据包括的音频信息,由于在该音频信息满足第一预设条件的情况下,电子设备可以向蓝牙设备发送用于指示蓝牙设备执行目标操作的第一结果信息,因此电子设备可以控制蓝牙设备根据该第一结果信息执行目标操作,从而通过该目标操作,用户可以收听到外界环境中的声音,以避免错失外界音源中的重要的音频信息。The embodiment of the present application provides an audio playback device. After the electronic device receives the audio data sent by the Bluetooth device, the electronic device can acquire the audio information included in the audio data. Because the audio information satisfies the first preset condition , the electronic device can send the first result information for instructing the Bluetooth device to perform the target operation to the Bluetooth device, so the electronic device can control the Bluetooth device to perform the target operation according to the first result information, so that through the target operation, the user can listen to the outside world ambient sound to avoid missing important audio information from external sound sources.
本申请实施例中的音频播放装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备(例如蓝牙耳机)、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(network attached storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The audio playback device in this embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device may be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a handheld computer, a vehicle electronic device, a wearable device (such as a Bluetooth headset), an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal Digital assistant (personal digital assistant, PDA), etc., non-mobile electronic devices can be server, network attached storage (network attached storage, NAS), personal computer (personal computer, PC), television (television, TV), teller machine or self-service machines, etc., which are not specifically limited in this embodiment of the application.
本申请实施例中的音频播放装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为iOS操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。The audio playback device in the embodiment of the present application may be a device with an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in this embodiment of the present application.
本申请实施例提供的音频播放装置能够实现图1的方法实施例实现的各个过程,为避免重复,这里不再赘述。The audio playback device provided by the embodiment of the present application can realize various processes realized by the method embodiment in FIG. 1 , and details are not repeated here to avoid repetition.
可选的,如图4所示,本申请实施例还提供一种电子设备600,包括处理器601,存储器602,存储在存储器602上并可在处理器601上运行的程序或指令,该程序或指令被处理器601执行时实现上述音频播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG. 4 , the embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and operable on the processor 601. The program Or, when the instructions are executed by the processor 601, the various processes of the above-mentioned audio playback method embodiments can be achieved, and the same technical effect can be achieved. To avoid repetition, details are not repeated here.
需要注意的是,本申请实施例中的电子设备包括上述的移动电子设备和非移动电子设备。It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.
图5为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 5 is a schematic diagram of a hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备700包括但不限于:射频单元701、网络模块702、音频输出单元703、输入单元704、传感器705、显示单元706、用户输入单元707、接口单元708、存储器709、以及处理器710等部件。The electronic device 700 includes, but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710, etc. part.
本领域技术人员可以理解,电子设备700还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器710逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图5中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。Those skilled in the art can understand that the electronic device 700 can also include a power supply (such as a battery) for supplying power to various components, and the power supply can be logically connected to the processor 710 through the power management system, so that the management of charging, discharging, and function can be realized through the power management system. Consumption management and other functions. The structure of the electronic device shown in FIG. 5 does not constitute a limitation to the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange different components, and details will not be repeated here. .
其中,输入单元704,在本申请实施例中为蓝牙设备的麦克风,用于在播放电子设备中的第一音频文件的情况下,蓝牙设备获取外界环境中的音频数据。射频单元701,用于在确定该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配的情况下,蓝牙设备向电子设备发送该音频数据;并用于蓝牙设备接收电子设备发送的第一结果信息。处理器710,用于在射频单元701接收该第一结果信息之后,根据该第一结果信息执行目标操作;其中,该第一结果信息为电子设备在该音频数据包括的音频信息满足第一预设条件的情况下发送的;该目标操作包括以下至少一项:停止播放该第一音频文件,播放该音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放该第一音频文件的音量,蓝牙设备震动预设次数。Wherein, the input unit 704 is the microphone of the Bluetooth device in the embodiment of the present application, and is used for the Bluetooth device to obtain audio data in the external environment when the first audio file in the electronic device is played. The radio frequency unit 701 is configured to send the audio data to the electronic device from the Bluetooth device when it is determined that the audio data does not match at least one preset audio data included in the Bluetooth device; and is used for the Bluetooth device to receive the first result sent by the electronic device information. The processor 710 is configured to perform a target operation according to the first result information after the radio frequency unit 701 receives the first result information; where the first result information is that the audio information included in the audio data of the electronic device satisfies the first predetermined requirement. It is sent under conditions; the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, and reduce the Bluetooth device to play the second audio file. The volume of an audio file, and the Bluetooth device vibrates a preset number of times.
可选的,射频单元701,还用于蓝牙设备接收电子设备发送的第二结果信息。处理器710,用于在射频单元701接收该第二结果信息之后,根据该第二结果信息存储音频数据;其中,该第二结果信息为电子设备在该音频数据包括的音频信息满足第二预设条件的情况下发送的。Optionally, the radio frequency unit 701 is also used for the Bluetooth device to receive the second result information sent by the electronic device. The processor 710 is configured to store the audio data according to the second result information after the radio frequency unit 701 receives the second result information; wherein, the second result information is that the audio information included in the audio data of the electronic device satisfies the second predetermined requirement. Sent under conditions.
可选的,处理器710,还用于蓝牙设备获取音频数据包括的特征信息;并用于若至少一个预设特征信息中不包括该特征信息,则蓝牙设备确定该音频数据与至少一个预设音频数据不匹配,一个预设特征信息用于指示该至少一个预设音频数据中的一个预设音频数据。Optionally, the processor 710 is also used for the Bluetooth device to obtain the feature information included in the audio data; and for the Bluetooth device to determine that the audio data is consistent with at least one preset audio The data do not match, and one piece of preset characteristic information is used to indicate one preset audio data in the at least one preset audio data.
本申请实施例提供一种蓝牙设备,在播放电子设备中的第一音频文件的情况下,在蓝牙设备获取到外界环境中的音频数据之后,由于当该音频数据与蓝牙设备包括的至少一个预设音频数据不匹配时,蓝牙设备可以接收到电子设备发送的该音频数据的第一结果信息,因此蓝牙设备可以根据该第一结果信息执行目标操作,从而通过该目标操作,用户可以收听到外界环境中的声音,以避免错失外界音源中的重要的音频信息。The embodiment of the present application provides a bluetooth device. In the case of playing the first audio file in the electronic device, after the bluetooth device acquires audio data in the external environment, when the audio data is associated with at least one preset When the audio data does not match, the Bluetooth device can receive the first result information of the audio data sent by the electronic device, so the Bluetooth device can perform the target operation according to the first result information, so that through the target operation, the user can listen to the outside world ambient sound to avoid missing important audio information from external sound sources.
射频单元701,用于电子设备接收蓝牙设备发送的音频数据,该音频数据为在蓝牙设备播放第一音频文件的情况下从外界环境中获取的。处理器710,用于电子设备获取射频单元701接收的该音频数据包括的音频信息。射频单元701,还用于在该音频信息满足第一预设条件的情况下,电子设备向蓝牙设备发送第一结果信息;其中,该第一结果信息用于指示蓝牙设备执行目标操作,该目标操作包括以下至少一项:停止播放该第一音频文件,播放该音频数据对应的第二音频文件,关闭蓝牙设备的降噪功能,降低蓝牙设备播放该第一音频文件的音量,蓝牙设备震动预设次数。The radio frequency unit 701 is configured for the electronic device to receive audio data sent by the Bluetooth device, where the audio data is obtained from the external environment when the Bluetooth device plays the first audio file. The processor 710 is configured for the electronic device to acquire audio information included in the audio data received by the radio frequency unit 701 . The radio frequency unit 701 is further configured to send the electronic device to the Bluetooth device first result information when the audio information satisfies the first preset condition; wherein the first result information is used to instruct the Bluetooth device to perform a target operation, and the target The operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, reduce the volume of the first audio file played by the Bluetooth device, and pre-vibrate the Bluetooth device. Set the number of times.
可选的,音频信息包括音频内容信息和音频音色信息。射频单元701,还用于在该音频信息满足第二预设条件的情况下,电子设备向蓝牙设备发送第二结果信息;其中,该第二结果信息用于指示蓝牙设备存储音频数据;该第二预设条件包括:该音频内容信息中不包括预设关键字、且该音频音色信息与预设音色信息不匹配。Optionally, the audio information includes audio content information and audio timbre information. The radio frequency unit 701 is further configured to, when the audio information satisfies a second preset condition, the electronic device send second result information to the Bluetooth device; wherein, the second result information is used to instruct the Bluetooth device to store audio data; the first The second preset condition includes: the audio content information does not include a preset keyword, and the audio timbre information does not match the preset timbre information.
本申请实施例提供一种电子设备,在电子设备接收到蓝牙设备发送的音频数据之后,电子设备可以获取该音频数据包括的音频信息,由于在该音频信息满足第一预设条件的情况下,电子设备可以向蓝牙设备发送用于指示蓝牙设备执行目标操作的第一结果信息,因此电子设备可以控制蓝牙设备根据该第一结果信息执行目标操作,从而通过该目标操作,用户可以收听到外界环境中的声音,以避免错失外界音源中的重要的音频信息。An embodiment of the present application provides an electronic device. After the electronic device receives the audio data sent by the Bluetooth device, the electronic device can obtain the audio information included in the audio data. Since the audio information satisfies the first preset condition, The electronic device can send the first result information for instructing the Bluetooth device to perform the target operation to the Bluetooth device, so the electronic device can control the Bluetooth device to perform the target operation according to the first result information, so that through the target operation, the user can listen to the external environment to avoid missing important audio information from external sources.
应理解的是,本申请实施例中,输入单元704可以包括图形处理器(Graphics Processing Unit,GPU)7041和麦克风7042,图形处理器7041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元706可包括显示面板7061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板7061。用户输入单元707包括触控面板7071以及其他输入设备7072。触控面板7071,也称为触摸屏。触控面板7071可包括触摸检测装置和触摸控制器两个部分。其他输入设备7072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。存储器709可用于存储软件程序以及各种数据,包括但不限于应用程序和操作系统。处理器710可集成应用处理器和调制解调处理器,其中,应用处理器主要处理操作系统、用户界面和应用程序等,调制解调处理器主要处理无线通信。可以理解的是,上述调制解调处理器也可以不集成到处理器710中。It should be understood that, in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 is used for the image capture device ( Such as the image data of the still picture or video obtained by the camera) for processing. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit 707 includes a touch panel 7071 and other input devices 7072 . The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts, a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, switch buttons, etc.), trackballs, mice, and joysticks, which will not be repeated here. Memory 709 may be used to store software programs as well as various data, including but not limited to application programs and operating systems. The processor 710 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, user interface, application program, etc., and the modem processor mainly processes wireless communication. It can be understood that the foregoing modem processor may not be integrated into the processor 710 .
本申请实施例还提供一种可读存储介质,该可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述音频播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, each process of the above-mentioned audio playback method embodiment is realized, and can achieve the same Technical effects, in order to avoid repetition, will not be repeated here.
其中,处理器为上述实施例中电子设备中的处理器。可读存储介质,包括计算机可读存储介质,如计算机只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等。Wherein, the processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (read-only memory, ROM), a random access memory (random access memory, RAM), a magnetic disk or an optical disk, and the like.
本申请实施例另提供了一种芯片,该芯片包括处理器和通信接口,通信接口和处理器耦合,处理器用于运行程序或指令,实现上述音频播放方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。The embodiment of the present application further provides a chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, and the processor is used to run programs or instructions to realize the various processes of the above audio playback method embodiments, and can achieve the same To avoid repetition, the technical effects will not be repeated here.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。It should be understood that the chips mentioned in the embodiments of the present application may also be called system-on-chip, system-on-chip, system-on-a-chip, or system-on-a-chip.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this document, the term "comprising", "comprising" or any other variation thereof is intended to cover a non-exclusive inclusion such that a process, method, article or apparatus comprising a set of elements includes not only those elements, It also includes other elements not expressly listed, or elements inherent in the process, method, article, or device. Without further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, article, or apparatus comprising that element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved. Functions are performed, for example, the described methods may be performed in an order different from that described, and various steps may also be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例中的方法。Through the description of the above embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus a necessary general-purpose hardware platform, and of course also by hardware, but in many cases the former is better implementation. Based on such an understanding, the technical solution of the present application can be embodied in the form of a software product in essence or the part that contributes to the prior art, and the computer software product is stored in a storage medium (such as ROM/RAM, disk, CD) contains several instructions to make a terminal (which may be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) execute the methods in various embodiments of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形 式,均属于本申请的保护之内。The embodiments of the present application have been described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementations. The above-mentioned specific implementations are only illustrative and not restrictive. Those of ordinary skill in the art will Under the inspiration of this application, without departing from the purpose of this application and the scope of protection of the claims, many forms can also be made, all of which belong to the protection of this application.
Claims (19)
- 一种音频播放方法,所述方法包括:An audio playback method, the method comprising:在播放电子设备中的第一音频文件的情况下,蓝牙设备获取外界环境中的音频数据;In the case of playing the first audio file in the electronic device, the Bluetooth device acquires audio data in the external environment;在确定所述音频数据与所述蓝牙设备包括的至少一个预设音频数据不匹配的情况下,所述蓝牙设备向所述电子设备发送所述音频数据;In a case where it is determined that the audio data does not match at least one preset audio data included in the Bluetooth device, the Bluetooth device sends the audio data to the electronic device;所述蓝牙设备接收所述电子设备发送的第一结果信息,并根据所述第一结果信息执行目标操作;The Bluetooth device receives the first result information sent by the electronic device, and performs a target operation according to the first result information;其中,所述第一结果信息为所述电子设备在所述音频数据包括的音频信息满足第一预设条件的情况下发送的;Wherein, the first result information is sent by the electronic device when the audio information included in the audio data satisfies a first preset condition;所述目标操作包括以下至少一项:停止播放所述第一音频文件,播放所述音频数据对应的第二音频文件,关闭所述蓝牙设备的降噪功能,降低所述蓝牙设备播放所述第一音频文件的音量,所述蓝牙设备震动预设次数。The target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the Bluetooth device, and reduce the Bluetooth device's ability to play the second audio file. The volume of an audio file, the Bluetooth device vibrates a preset number of times.
- 根据权利要求1所述的方法,其中,所述蓝牙设备向所述电子设备发送所述音频数据之后,所述方法还包括:The method according to claim 1, wherein, after the Bluetooth device sends the audio data to the electronic device, the method further comprises:所述蓝牙设备接收所述电子设备发送的第二结果信息,并根据所述第二结果信息存储所述音频数据;The Bluetooth device receives the second result information sent by the electronic device, and stores the audio data according to the second result information;其中,所述第二结果信息为所述电子设备在所述音频数据包括的音频信息满足第二预设条件的情况下发送的。Wherein, the second result information is sent by the electronic device when the audio information included in the audio data satisfies a second preset condition.
- 根据权利要求1或2所述的方法,其中,所述蓝牙设备向所述电子设备发送所述音频数据之前,所述方法还包括:The method according to claim 1 or 2, wherein, before the Bluetooth device sends the audio data to the electronic device, the method further comprises:所述蓝牙设备获取所述音频数据包括的特征信息;The Bluetooth device acquires feature information included in the audio data;若至少一个预设特征信息中不包括所述特征信息,则所述蓝牙设备确定所述音频数据与所述至少一个预设音频数据不匹配,一个预设特征信息用于指示所述至少一个预设音频数据中的一个预设音频数据。If the at least one preset feature information does not include the feature information, then the Bluetooth device determines that the audio data does not match the at least one preset audio data, and the piece of preset feature information is used to indicate that the at least one preset Set a preset audio data in the audio data.
- 一种音频播放方法,所述方法包括:An audio playback method, the method comprising:电子设备接收蓝牙设备发送的音频数据,所述音频数据为在所述蓝牙设备播放第一音频文件的情况下从外界环境中获取的;The electronic device receives the audio data sent by the Bluetooth device, and the audio data is obtained from the external environment when the Bluetooth device plays the first audio file;所述电子设备获取所述音频数据包括的音频信息;The electronic device acquires audio information included in the audio data;在所述音频信息满足第一预设条件的情况下,所述电子设备向所述蓝牙设备发送第一结果信息;When the audio information satisfies a first preset condition, the electronic device sends first result information to the Bluetooth device;其中,所述第一结果信息用于指示所述蓝牙设备执行目标操作,所述目标操作包 括以下至少一项:停止播放所述第一音频文件,播放所述音频数据对应的第二音频文件,关闭所述蓝牙设备的降噪功能,降低所述蓝牙设备播放所述第一音频文件的音量,所述蓝牙设备震动预设次数。Wherein, the first result information is used to instruct the Bluetooth device to perform a target operation, and the target operation includes at least one of the following: stop playing the first audio file, play a second audio file corresponding to the audio data, Turn off the noise reduction function of the bluetooth device, reduce the volume of the first audio file played by the bluetooth device, and vibrate the bluetooth device for a preset number of times.
- 根据权利要求4所述的方法,其中,所述音频信息包括以下至少一项:音频内容信息、音频音色信息;The method according to claim 4, wherein the audio information includes at least one of the following: audio content information, audio timbre information;所述第一预设条件包括以下至少一项:所述音频内容信息中包括预设关键字,所述音频音色信息与预设音色信息匹配。The first preset condition includes at least one of the following: the audio content information includes a preset keyword, and the audio timbre information matches the preset timbre information.
- 根据权利要求4所述的方法,其中,所述音频信息包括音频内容信息和音频音色信息;The method according to claim 4, wherein the audio information includes audio content information and audio timbre information;所述电子设备获取所述音频数据包括的音频信息之后,所述方法还包括:After the electronic device acquires the audio information included in the audio data, the method further includes:在所述音频信息满足第二预设条件的情况下,所述电子设备向所述蓝牙设备发送第二结果信息;When the audio information satisfies a second preset condition, the electronic device sends second result information to the Bluetooth device;其中,所述第二结果信息用于指示所述蓝牙设备存储所述音频数据;所述第二预设条件包括:所述音频内容信息中不包括预设关键字、且所述音频音色信息与预设音色信息不匹配。Wherein, the second result information is used to instruct the Bluetooth device to store the audio data; the second preset condition includes: the audio content information does not include a preset keyword, and the audio timbre information is consistent with The preset tone information does not match.
- 一种音频播放装置,所述音频播放装置包括获取模块、发送模块、接收模块和处理模块;An audio playback device, the audio playback device includes an acquisition module, a sending module, a receiving module and a processing module;所述获取模块,用于在播放电子设备中的第一音频文件的情况下,蓝牙设备获取外界环境中的音频数据;The obtaining module is used for the Bluetooth device to obtain audio data in the external environment when playing the first audio file in the electronic device;所述发送模块,用于在确定所述获取模块获取的所述音频数据与所述蓝牙设备包括的至少一个预设音频数据不匹配的情况下,所述蓝牙设备向所述电子设备发送所述音频数据;The sending module is configured to send the Bluetooth device to the electronic device when it is determined that the audio data acquired by the acquiring module does not match at least one preset audio data included in the Bluetooth device. audio data;所述接收模块,用于所述蓝牙设备接收所述电子设备发送的第一结果信息;The receiving module is used for the Bluetooth device to receive the first result information sent by the electronic device;所述处理模块,用于在所述接收模块接收所述第一结果信息之后,根据所述第一结果信息执行目标操作;The processing module is configured to execute a target operation according to the first result information after the receiving module receives the first result information;其中,所述第一结果信息为所述电子设备在所述音频数据包括的音频信息满足第一预设条件的情况下发送的;所述目标操作包括以下至少一项:停止播放所述第一音频文件,播放所述音频数据对应的第二音频文件,关闭所述蓝牙设备的降噪功能,降低所述蓝牙设备播放所述第一音频文件的音量,所述蓝牙设备震动预设次数。Wherein, the first result information is sent by the electronic device when the audio information included in the audio data satisfies a first preset condition; the target operation includes at least one of the following: stop playing the first audio file, play the second audio file corresponding to the audio data, turn off the noise reduction function of the bluetooth device, reduce the volume of the first audio file played by the bluetooth device, and vibrate the bluetooth device for a preset number of times.
- 根据权利要求7所述的装置,其中,所述音频播放装置还包括接收模块和存储模块;The device according to claim 7, wherein the audio playback device further comprises a receiving module and a storage module;所述接收模块,还用于所述蓝牙设备接收所述电子设备发送的第二结果信息;The receiving module is further configured for the Bluetooth device to receive the second result information sent by the electronic device;所述存储模块,用于在所述接收模块接收所述第二结果信息之后,根据所述第二结果信息存储所述音频数据;The storage module is configured to store the audio data according to the second result information after the receiving module receives the second result information;其中,所述第二结果信息为所述电子设备在所述音频数据包括的音频信息满足第二预设条件的情况下发送的。Wherein, the second result information is sent by the electronic device when the audio information included in the audio data satisfies a second preset condition.
- 根据权利要求7或8所述的装置,其中,所述音频播放装置还包括确定模块;The device according to claim 7 or 8, wherein the audio playback device further comprises a determining module;所述获取模块,还用于所述蓝牙设备获取所述音频数据包括的特征信息;The acquisition module is also used for the Bluetooth device to acquire the feature information included in the audio data;所述确定模块,用于若至少一个预设特征信息中不包括所述特征信息,则所述蓝牙设备确定所述音频数据与所述至少一个预设音频数据不匹配,一个预设特征信息用于指示所述至少一个预设音频数据中的一个预设音频数据。The determination module is configured to determine that the audio data does not match the at least one preset audio data, if the at least one preset feature information does not include the feature information, and the preset feature information uses to indicate one preset audio data in the at least one preset audio data.
- 一种音频播放装置,所述音频播放装置包括接收模块、获取模块和发送模块;An audio playback device, the audio playback device includes a receiving module, an acquisition module and a sending module;所述接收模块,用于电子设备接收蓝牙设备发送的音频数据,所述音频数据为在所述蓝牙设备播放第一音频文件的情况下从外界环境中获取的;The receiving module is used for the electronic device to receive the audio data sent by the Bluetooth device, and the audio data is obtained from the external environment when the Bluetooth device plays the first audio file;所述获取模块,用于所述电子设备获取所述接收模块接收的所述音频数据包括的音频信息;The obtaining module is used for the electronic device to obtain audio information included in the audio data received by the receiving module;所述发送模块,用于在所述音频信息满足第一预设条件的情况下,所述电子设备向所述蓝牙设备发送第一结果信息;The sending module is configured to send the first result information to the Bluetooth device by the electronic device when the audio information satisfies a first preset condition;其中,所述第一结果信息用于指示所述蓝牙设备执行目标操作,所述目标操作包括以下至少一项:停止播放所述第一音频文件,播放所述音频数据对应的第二音频文件,关闭所述蓝牙设备的降噪功能,降低所述蓝牙设备播放所述第一音频文件的音量,所述蓝牙设备震动预设次数。Wherein, the first result information is used to instruct the Bluetooth device to perform a target operation, and the target operation includes at least one of the following: stop playing the first audio file, play a second audio file corresponding to the audio data, Turn off the noise reduction function of the bluetooth device, reduce the volume of the first audio file played by the bluetooth device, and vibrate the bluetooth device for a preset number of times.
- 根据权利要求10所述的装置,其中,所述音频信息包括以下至少一项:音频内容信息、音频音色信息;The device according to claim 10, wherein the audio information includes at least one of the following: audio content information, audio timbre information;所述第一预设条件包括以下至少一项:所述音频内容信息中包括预设关键字,所述音频音色信息与预设音色信息匹配。The first preset condition includes at least one of the following: the audio content information includes a preset keyword, and the audio timbre information matches the preset timbre information.
- 根据权利要求10所述的装置,其中,所述音频信息包括音频内容信息和音频音色信息;The device according to claim 10, wherein the audio information includes audio content information and audio timbre information;所述发送模块,还用于在所述音频信息满足第二预设条件的情况下,所述电子设备向所述蓝牙设备发送第二结果信息;The sending module is further configured to send the second result information to the Bluetooth device by the electronic device when the audio information satisfies a second preset condition;其中,所述第二结果信息用于指示所述蓝牙设备存储所述音频数据;所述第二预设条件包括:所述音频内容信息中不包括预设关键字、且所述音频音色信息与预设音色信息不匹配。Wherein, the second result information is used to instruct the Bluetooth device to store the audio data; the second preset condition includes: the audio content information does not include a preset keyword, and the audio timbre information is consistent with The preset tone information does not match.
- 一种蓝牙设备,包括处理器,存储器及存储在所述存储器上并可在所述处理 器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求1至3中任一项所述的音频播放的步骤。A bluetooth device, comprising a processor, a memory and a program or instruction stored on the memory and operable on the processor, when the program or instruction is executed by the processor, claims 1 to 3 are realized The steps of any one of the audio playback.
- 一种蓝牙设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如权利要求4至6中任一项所述的音频播放的步骤。A bluetooth device, comprising a processor, a memory, and a program or instruction stored on the memory and operable on the processor, when the program or instruction is executed by the processor, claims 4 to 6 are realized The steps of any one of the audio playback.
- 一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如权利要求1至3中任一项所述的音频播放方法的步骤,或者实现如权利要求4至6中任一项所述的音频播放方法的步骤。A readable storage medium, storing programs or instructions on the readable storage medium, and implementing the steps of the audio playback method according to any one of claims 1 to 3 when the programs or instructions are executed by a processor, or Realizing the steps of the audio playing method as described in any one of claims 4 to 6.
- 一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如权利要求1至3中任一项所述的音频播放方法,或者实现如权利要求4至6中任一项所述的音频播放方法。A chip, the chip includes a processor and a communication interface, the communication interface is coupled to the processor, the processor is used to run programs or instructions, and realize the audio frequency as described in any one of claims 1 to 3 playing method, or realize the audio playing method as described in any one of claims 4 to 6.
- 一种计算机程序产品,所述程序产品被至少一个处理器执行以实现如权利要求1至3中任一项所述的音频播放方法,或者实现如权利要求4至6中任一项所述的音频播放方法。A computer program product, the program product is executed by at least one processor to realize the audio playback method according to any one of claims 1 to 3, or to realize the audio playback method according to any one of claims 4 to 6 Audio playback method.
- 一种蓝牙设备,包括所述蓝牙设备被配置成用于执行如权利要求1至3中任一项所述的音频播放方法。A bluetooth device, comprising the bluetooth device configured to execute the audio playing method according to any one of claims 1 to 3.
- 一种电子设备,包括所述电子设备被配置成用于执行如权利要求4至6中任一项所述的音频播放方法。An electronic device, comprising the electronic device configured to execute the audio playing method according to any one of claims 4 to 6.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110891461.2 | 2021-08-04 | ||
CN202110891461.2A CN113793625B (en) | 2021-08-04 | 2021-08-04 | Audio playing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023011370A1 true WO2023011370A1 (en) | 2023-02-09 |
Family
ID=79181395
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/109180 WO2023011370A1 (en) | 2021-08-04 | 2022-07-29 | Audio playing method and apparatus |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN113793625B (en) |
WO (1) | WO2023011370A1 (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113793625B (en) * | 2021-08-04 | 2024-06-25 | 维沃移动通信有限公司 | Audio playing method and device |
CN114650496B (en) * | 2022-03-07 | 2024-09-27 | 维沃移动通信有限公司 | Audio playing method and electronic equipment |
Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6782106B1 (en) * | 1999-11-12 | 2004-08-24 | Samsung Electronics Co., Ltd. | Apparatus and method for transmitting sound |
CN101840700A (en) * | 2010-04-28 | 2010-09-22 | 宇龙计算机通信科技(深圳)有限公司 | Voice recognition method based on mobile terminal and mobile terminal |
CN102624980A (en) * | 2012-03-06 | 2012-08-01 | 惠州Tcl移动通信有限公司 | Method for detecting abrupt environment and prompting based on earphone of mobile phone and mobile phone |
CN105205955A (en) * | 2015-09-25 | 2015-12-30 | 小米科技有限责任公司 | Method and device for sending out warning signal |
CN105225662A (en) * | 2015-08-24 | 2016-01-06 | 深圳市冠旭电子有限公司 | Smart bluetooth earphone plays method and the smart bluetooth earphone of external voice automatically |
CN106550294A (en) * | 2015-09-18 | 2017-03-29 | 丰唐物联技术(深圳)有限公司 | Monitor method and device based on earphone |
CN107948801A (en) * | 2017-12-21 | 2018-04-20 | 广东小天才科技有限公司 | Earphone control method and earphone |
CN207531029U (en) * | 2017-11-30 | 2018-06-22 | 歌尔科技有限公司 | A kind of wire-controlled apparatus and earphone |
CN110475170A (en) * | 2019-07-10 | 2019-11-19 | 深圳壹账通智能科技有限公司 | Control method, device, mobile terminal and the storage medium of earphone broadcast state |
CN111787450A (en) * | 2020-07-21 | 2020-10-16 | 乐行装备(深圳)有限公司 | Earphone with voice recognition function |
CN113793625A (en) * | 2021-08-04 | 2021-12-14 | 维沃移动通信有限公司 | Audio playing method and device |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9037458B2 (en) * | 2011-02-23 | 2015-05-19 | Qualcomm Incorporated | Systems, methods, apparatus, and computer-readable media for spatially selective audio augmentation |
CN103825993B (en) * | 2014-03-11 | 2017-05-17 | 宇龙计算机通信科技(深圳)有限公司 | Method and device for treating environment sound during conversation |
CN108521621B (en) * | 2018-03-30 | 2020-01-10 | Oppo广东移动通信有限公司 | Signal processing method, device, terminal, earphone and readable storage medium |
US10679602B2 (en) * | 2018-10-26 | 2020-06-09 | Facebook Technologies, Llc | Adaptive ANC based on environmental triggers |
US11076219B2 (en) * | 2019-04-12 | 2021-07-27 | Bose Corporation | Automated control of noise reduction or noise masking |
CN111583898B (en) * | 2020-05-26 | 2021-06-29 | 苏州双福智能科技有限公司 | Space environment multi-directional selective noise reduction system and method |
-
2021
- 2021-08-04 CN CN202110891461.2A patent/CN113793625B/en active Active
-
2022
- 2022-07-29 WO PCT/CN2022/109180 patent/WO2023011370A1/en active Application Filing
Patent Citations (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US6782106B1 (en) * | 1999-11-12 | 2004-08-24 | Samsung Electronics Co., Ltd. | Apparatus and method for transmitting sound |
CN101840700A (en) * | 2010-04-28 | 2010-09-22 | 宇龙计算机通信科技(深圳)有限公司 | Voice recognition method based on mobile terminal and mobile terminal |
CN102624980A (en) * | 2012-03-06 | 2012-08-01 | 惠州Tcl移动通信有限公司 | Method for detecting abrupt environment and prompting based on earphone of mobile phone and mobile phone |
CN105225662A (en) * | 2015-08-24 | 2016-01-06 | 深圳市冠旭电子有限公司 | Smart bluetooth earphone plays method and the smart bluetooth earphone of external voice automatically |
CN106550294A (en) * | 2015-09-18 | 2017-03-29 | 丰唐物联技术(深圳)有限公司 | Monitor method and device based on earphone |
CN105205955A (en) * | 2015-09-25 | 2015-12-30 | 小米科技有限责任公司 | Method and device for sending out warning signal |
CN207531029U (en) * | 2017-11-30 | 2018-06-22 | 歌尔科技有限公司 | A kind of wire-controlled apparatus and earphone |
CN107948801A (en) * | 2017-12-21 | 2018-04-20 | 广东小天才科技有限公司 | Earphone control method and earphone |
CN110475170A (en) * | 2019-07-10 | 2019-11-19 | 深圳壹账通智能科技有限公司 | Control method, device, mobile terminal and the storage medium of earphone broadcast state |
CN111787450A (en) * | 2020-07-21 | 2020-10-16 | 乐行装备(深圳)有限公司 | Earphone with voice recognition function |
CN113793625A (en) * | 2021-08-04 | 2021-12-14 | 维沃移动通信有限公司 | Audio playing method and device |
Also Published As
Publication number | Publication date |
---|---|
CN113793625A (en) | 2021-12-14 |
CN113793625B (en) | 2024-06-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023011370A1 (en) | Audio playing method and apparatus | |
CN104967900B (en) | A kind of method and apparatus generating video | |
CN107580113B (en) | Reminding method, device, storage medium and terminal | |
CN106210755B (en) | A kind of methods, devices and systems playing live video | |
CN110568926B (en) | Sound signal processing method and terminal equipment | |
WO2020249091A1 (en) | Voice interaction method, apparatus, and system | |
WO2017215512A1 (en) | Audio stream processing method and related devices | |
WO2017215652A1 (en) | Sound effect parameter adjustment method, and mobile terminal | |
US10628119B2 (en) | Sound effect processing method and mobile terminal | |
CN111083289B (en) | Audio playing method and device, storage medium and mobile terminal | |
WO2017215660A1 (en) | Scene sound effect control method, and electronic device | |
KR20110054609A (en) | Method and apparatus for remote controlling of bluetooth device | |
CN111641916B (en) | Audio sharing method and electronic equipment | |
US20220342631A1 (en) | Method and system for playing audios | |
WO2017215661A1 (en) | Scenario-based sound effect control method and electronic device | |
CN109862430B (en) | Multimedia playing method and terminal equipment | |
CN108712566A (en) | A kind of voice assistant awakening method and mobile terminal | |
WO2017215511A1 (en) | Control method of scene sound effect and related products | |
JP2010166324A (en) | Portable terminal, voice synthesizing method, and program for voice synthesis | |
CN107870799A (en) | Utilize the method, apparatus and terminal of widget control audio player | |
CN106792014B (en) | A kind of method, apparatus and system of recommendation of audio | |
WO2017215662A1 (en) | Sound effect adjustment method and terminal | |
CN110851106B (en) | Audio output method and electronic equipment | |
WO2018035873A1 (en) | Audio data processing method, terminal device, and storage medium | |
CN113852944A (en) | Audio output method and device |
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: 22852083 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 22852083 Country of ref document: EP Kind code of ref document: A1 |