CN113194383A - Sound playing method and device, electronic equipment and readable storage medium - Google Patents

Sound playing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN113194383A
CN113194383A CN202110475845.6A CN202110475845A CN113194383A CN 113194383 A CN113194383 A CN 113194383A CN 202110475845 A CN202110475845 A CN 202110475845A CN 113194383 A CN113194383 A CN 113194383A
Authority
CN
China
Prior art keywords
sound
playing
real
time
content
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110475845.6A
Other languages
Chinese (zh)
Inventor
赵祥军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202110475845.6A priority Critical patent/CN113194383A/en
Publication of CN113194383A publication Critical patent/CN113194383A/en
Priority to PCT/CN2021/141559 priority patent/WO2022227655A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R3/00Circuits for transducers, loudspeakers or microphones
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L15/00Speech recognition
    • G10L15/08Speech classification or search
    • G10L15/18Speech classification or search using natural language modelling
    • GPHYSICS
    • G10MUSICAL INSTRUMENTS; ACOUSTICS
    • G10LSPEECH ANALYSIS OR SYNTHESIS; SPEECH RECOGNITION; SPEECH OR VOICE PROCESSING; SPEECH OR AUDIO CODING OR DECODING
    • G10L25/00Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00
    • G10L25/48Speech or voice analysis techniques not restricted to a single one of groups G10L15/00 - G10L21/00 specially adapted for particular use
    • G10L25/51Speech 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1083Reduction of ambient noise
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04RLOUDSPEAKERS, MICROPHONES, GRAMOPHONE PICK-UPS OR LIKE ACOUSTIC ELECTROMECHANICAL TRANSDUCERS; DEAF-AID SETS; PUBLIC ADDRESS SYSTEMS
    • H04R1/00Details of transducers, loudspeakers or microphones
    • H04R1/10Earpieces; Attachments therefor ; Earphones; Monophonic headphones
    • H04R1/1091Details not provided for in groups H04R1/1008 - H04R1/1083

Abstract

The invention discloses a sound playing method, a sound playing device, electronic equipment and a readable storage medium, wherein the earphone comprises the following components: the electronic equipment with the audio playing function collects real-time environmental sounds; detecting the content of the real-time environment sound to obtain sound content; and if the sound content is matched with the playing mark, playing the real-time environment sound or closing the audio playing function. According to the method, the electronic equipment collects and identifies the environmental sound, plays the environmental sound under the condition that a specific condition is met, or closes an audio playing function, so that a user of the electronic equipment can hear the environmental sound corresponding to a playing mark under the condition that the user uses the electronic equipment.

Description

Sound playing method and device, electronic equipment and readable storage medium
Technical Field
The present invention relates to the field of audio processing technologies, and in particular, to a sound playing method and apparatus, an electronic device, and a readable storage medium.
Background
The electronic equipment with the noise reduction function can eliminate the interference of the environmental sound, but the noise is reduced, and meanwhile, the user cannot hear the environmental sound.
For example, the following steps are carried out: once the user wears the headset, it is difficult for the wearer to hear the ambient sound due to the structural limitation of the headset itself. In particular, some earphones with noise reduction (e.g., active noise reduction earphones) may help the wearer more strictly isolate the ambient sound. This causes a problem that the wearer should hear the environmental sound in the case of, for example, a person calling or talking by speaking, a person whistling alarm on a road, etc., but the wearer cannot hear the environmental sound due to the isolation of the earphone, which may cause missing of important talking contents and important warning information.
In summary, how to solve the problems of isolating environmental sounds and the like while ensuring the normal and reasonable functions of the electronic device with the noise reduction function is a technical problem that those skilled in the art are urgently in need of solving.
Disclosure of Invention
The invention aims to provide a sound playing method, a sound playing device, electronic equipment and a readable storage medium, which can play real-time environment sound or close an audio playing function by collecting the real-time environment sound in the normal use process of the electronic equipment with the audio playing function under the condition that the real-time environment sound is matched with a playing mark, so that a user can not miss important environment sound under the condition of using the electronic equipment.
In order to solve the technical problems, the invention provides the following technical scheme:
a sound playing method is applied to electronic equipment with a playing function, and comprises the following steps:
collecting real-time environment sound;
performing content detection on the real-time environment sound to obtain sound content;
and if the sound content is matched with a playing mark, playing the real-time environment sound or closing an audio playing function.
Preferably, the playing flag is a semantic flag or a scene flag, and the content detection is performed on the real-time environmental sound to obtain sound content, including:
performing semantic recognition on the real-time environmental sound to obtain a semantic recognition result;
or, carrying out scene recognition on the real-time environmental sound to obtain a scene recognition result;
accordingly, the semantic recognition result or the scene recognition result is determined as the sound content.
Preferably, if the sound content is matched with the danger signal in the playing sign, the real-time environmental sound is intensively played.
Preferably, the electronic device includes at least two collecting terminals arranged at intervals, and the collecting real-time environment sound includes:
respectively acquiring the corresponding real-time environment sounds by utilizing at least two acquisition ends;
correspondingly, if the sound content is matched with the playing mark, the audio sizes of the sound content respectively collected by the two collecting ends are compared, and the real-time environment sound collected by the collecting end corresponding to the high audio is played after the comparison is completed.
Preferably, the electronic device includes two playing ends corresponding to the two acquiring ends, and if the sound content is matched with the playing mark, the playing end corresponding to the high-audio-frequency corresponding acquiring end is used to play the real-time environment sound acquired by the high-audio-frequency corresponding acquiring end.
Preferably, after playing the real-time environment sound, the method further includes:
collecting motion data;
identifying a current motion state using the motion data;
and stopping playing the real-time environment sound under the condition that the motion state change between the current motion state and the preset motion state meets the preset external sound playing stopping condition.
Preferably, after playing the real-time environment sound, the method further includes:
performing semantic recognition on the real-time environmental sound to obtain a semantic recognition result;
and if the semantic recognition result comprises a preset conversation ending sign language, stopping playing the real-time environment sound.
A sound playing device is applied to an electronic device with a playing function, and comprises:
the sound acquisition module is used for acquiring real-time environment sound;
the voice recognition module is used for carrying out content detection on the real-time environment sound to obtain sound content;
and the playing control module is used for playing the real-time environment sound or closing the audio playing function if the sound content is matched with the playing mark.
An electronic device, comprising:
the acquisition end is used for acquiring real-time environment sound;
the playing end is used for playing sound, and the sound comprises the real-time environment sound;
a memory for storing a computer program;
a processor for implementing the steps of the sound playing method when executing the computer program.
A readable storage medium having stored thereon a computer program which, when executed by a processor, carries out the steps of the sound playing method described above.
By applying the method provided by the embodiment of the invention, the electronic equipment with the playing function collects real-time environment sound; detecting the content of the real-time environment sound to obtain sound content; and if the sound content is matched with the playing mark, playing the real-time environment sound or closing the audio playing function.
In this method, a play flag may be set in the electronic device in advance. The electronic device collects real-time ambient sounds. And then, carrying out content detection on the real-time environment sound to obtain corresponding sound content. And under the condition that the sound content is matched with the playing mark, the real-time environment sound can be played or the audio playing function can be closed. If the real-time environmental sound is played, a user of the electronic equipment can hear the played real-time environmental sound, so that the important environmental sound is prevented from being mistaken; if the audio playing function is turned off, the user of the electronic device can hear the environmental sound directly without the interference of audio playing. That is to say, in this method, the electronic device collects, recognizes and plays the ambient sound or directly turns off the audio playing function when a specific condition is satisfied, so that the user of the headset can hear the ambient sound corresponding to the playing flag even when the user of the headset normally uses the headset.
Accordingly, embodiments of the present invention further provide a sound playing apparatus, an electronic device, and a readable storage medium corresponding to the sound playing method, which have the above technical effects and are not described herein again.
Drawings
In order to more clearly illustrate the embodiments of the present invention or technical solutions in related arts, the drawings used in the description of the embodiments or related arts will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a flowchart illustrating an implementation of a sound playing method according to an embodiment of the present invention;
fig. 2 is a schematic structural diagram of a sound playing apparatus according to an embodiment of the present invention;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The sound playing method provided by the invention can be applied to electronic equipment with a sound playing function, and the electronic equipment can be wearing equipment or non-wearing equipment. For example, the sound playing method can be applied to earphones, and also can be applied to wearable devices such as VR, AR, bluetooth glasses and the like; in addition, the method can also be applied to non-wearable equipment which needs active noise reduction, such as family theaters, vehicle-mounted sound equipment and other scenes.
The following describes the sound playback method in detail, taking the use in headphones as an example. For application to other types of electronic devices, reference may be made to this, and details are not repeated here.
Referring to fig. 1, fig. 1 is a flowchart illustrating a sound playing method according to an embodiment of the present invention, where the method can be applied to an earphone, and the method includes the following steps:
s101, collecting real-time environment sound.
When the earphone is worn by a user, the wearer of the earphone cannot hear or hear the ambient sound due to the structure of the earphone and the special function of sound insulation and noise reduction. In order to avoid the earphone wearer from mistakenly playing important environmental sounds, in the present embodiment, the earphone can collect and play the environmental sounds on the machine, so that the earphone wearer does not miss the important environmental sounds.
Specifically, in this embodiment, the specific model and type of the earphone are not limited. That is to say, the earphone may be a wired earphone, a wireless earphone (such as a general bluetooth earphone or a TWS earphone), a general earphone without a special noise reduction function, or an earphone with a special noise reduction function (such as an active noise reduction earphone). In consideration of the fact that the better the isolation effect of the earphone, the less easy the wearer can hear the ambient sound, therefore, the better the effect of applying the sound playing method provided by the embodiment of the present invention to the earphone capable of isolating the ambient sound is.
The earphone can detect the working state of the earphone or the state of a sensor on the earphone so as to determine whether the earphone is in a wearing state. For example, if the earphone detects that music or a call is currently played, it is determined that the earphone is currently in a wearing state; or by detecting signals collected by sensors in the headset regarding wearing detection, such as hall sensors, pressure sensors, etc., thereby determining that the headset is in a wearing state.
It should be noted that, in this embodiment, the device for collecting the sound of the implementation link may be a device on the headset, such as a microphone on the headset, or may also be a device on a non-headset, such as a host having a communication connection with the headset or a microphone corresponding to the headset. In particular, when a microphone on the headset is used for real-time ambient sound collection, the microphone in the current headset may be multiplexed, for example, sound collected by an active noise reduction MIC (microphone) in the headset may be directly multiplexed.
When the microphones on the earphone are used for collecting real-time environment sound, only one microphone can be used for collecting the sound, and two microphones can also be used for collecting the sound.
And S102, detecting the content of the real-time environment sound to obtain the sound content.
After the real-time environmental sound is collected, the sound content of the real-time environmental sound can be detected. Generally, the sound content may be embodied as semantic content in the sound, or corresponding scene conditions, or a special sound (e.g. siren). The content detection of the real-time environment sound can be carried out according to the actual application requirements. For example, if semantic content needs to be detected, content detection is performed on the real-time environmental sound, that is, semantic recognition is performed on the real-time environmental sound.
In the following, a distance description will be given of how to perform content detection on real-time environmental sound to obtain sound content, taking a specific embodiment of performing semantic recognition alone and scene recognition alone as an example.
Embodiment mode 1: the playing flag is a semantic flag, and the step S102 performs content detection on the real-time environmental sound to obtain sound content, which may specifically include:
step one, performing semantic recognition on real-time environmental sound to obtain a semantic recognition result;
and step two, determining the semantic recognition result as the sound content.
For convenience of description, the above two steps will be described in combination.
Specifically, the implementation environment sound may be input to a semantic recognition module in the headset for recognition, so as to obtain a speech recognition result in the real-time environment sound, such as recognizing text content corresponding to a conversation sound of a person talking. Of course, the real-time environmental sound can also be transmitted to devices such as a host or a mobile phone connected with the earphone, and then the trained semantic recognition model or recognition algorithm is adopted to perform semantic recognition on the real-time environmental sound on the devices, so as to obtain a semantic recognition result. The speech recognition result is used as the sound content of the real-time environmental sound. In this embodiment, as to which algorithm, model and technology are specifically adopted to perform semantic recognition on the real-time environmental sound, reference may be made to a related scheme of semantic recognition, which is not described herein any more.
Embodiment mode 2: the playing flag is a scene flag, and the step S102 performs content detection on the real-time environmental sound to obtain sound content, which may specifically include:
firstly, carrying out scene recognition on real-time environmental sound to obtain a scene recognition result;
and step two, determining the scene recognition result as sound content.
For convenience of description, the above two steps will be described in combination.
Specifically, the environment sound can be input to a scene recognition module in the headset for recognition, for example, whether the current scene is an indoor scene or an outdoor scene or some special scenes (such as a warning scene with a whistle or an alarm sound) are recognized, and a scene recognition result in the real-time environment sound is obtained. Of course, the real-time environmental sound may also be transmitted to a host or a mobile phone connected to the headset, and then the scene recognition is performed on the real-time environmental sound by using a trained scene recognition model or recognition algorithm on the devices, so as to obtain a scene recognition result. The scene recognition result is taken as the sound content of the real-time environmental sound. In this embodiment, as to which algorithm, model and technology are specifically adopted to perform scene recognition on the real-time environmental sound, reference may be made to a related scheme of scene recognition, which is not described herein any more.
In practical application, the above-mentioned embodiment 1 and embodiment 2 can be combined together for use, so that the problem that when the user wears the earphone, the dangerous signals cannot be distinguished at the first time, which causes harm to personal safety, and the problem that when the user talks with another person and the wearer, the user can not hear and answer at the first time, which causes social misunderstanding can be solved.
It should be noted that, if the real-time environmental sound corresponds to the left real-time environmental sound and the right real-time environmental sound, the content detection performed accordingly may detect the left real-time environmental sound and the right real-time environmental sound respectively to obtain the left sound content and the right sound content respectively. In this way, only the corresponding single-side real-time environmental sound is played under the condition that the sound content corresponding to the left real-time environmental sound or the right real-time environmental sound is matched with the playing flag, so as to continuously keep one earphone to continuously play the original sound content, such as music or conversation sound.
Preferably, if the sound content is matched with the danger signal in the playing mark, the real-time environmental sound is intensively played. The enhanced playing refers to performing an emphasized playing on the real-time environment sound, such as playing the real-time environment sound only after increasing the volume, or playing the real-time environment sound cyclically, or playing the real-time environment sound after shielding the current audio sound (such as the music sound being played). For example, the following steps are carried out: when the collected real-time environmental sounds comprise vehicle sounds, wind waves and vehicle rumbling dangerous signals (corresponding to environmental signs needing to play the real-time environmental sounds), the working state of a certain earphone is suspended, when the intensity of the dangerous sounds of the certain earphone is obviously higher than that of the dangerous sounds of the other earphone, the working state of the earphone can be only suspended, and the environmental sounds are played on the earphone in an enhanced manner, so that a wearer can be consciously and correctly judge the source of the dangerous signals to quickly avoid the dangerous signals; and after no threat signal is found, the original state can be restored.
S103, if the sound content is matched with the playing mark, playing real-time environment sound or closing an audio playing function.
In this embodiment, one or more play flags may be preset, and when there are a plurality of play flags, the types of play flags may be different. Specifically, the play flag that can be set includes a semantic flag and a scene flag. For example, the semantic designation may be a preset name of the wearer, or other designation. The scene mark may be specifically an outdoor scene, a traffic road condition scene, and the like, in which the wearer needs to hear the environmental sound.
After the sound content is detected, the sound content can be compared with the playing marks, and when the sound content comprises any one playing mark, the sound content is determined to be matched with the playing mark, so that the real-time environment sound can be played or the audio playing function can be closed. Specifically, if the electronic device itself does not have the noise reduction function, that is, after the audio playing function is turned off, the user can clearly hear the ambient sound, and the audio playing function can be directly turned off under the condition that the sound content is determined to be matched with the playing flag. If the electronic device has a certain noise reduction function, even if the audio playing function is turned off, the user cannot hear external sound, and the real-time environmental sound can be played in order to ensure that the user does not miss important environmental sound.
When playing the real-time environment sound, the real-time environment sound can be played in only one earphone, or the real-time environment sound can be played in two earphones simultaneously. When the real-time environment sound is played in the two earphones at the same time, the sound content which is played finally at present can be directly interrupted, and then the real-time environment sound is played; the real-time environment sound can be overlapped and played on the basis of the currently played sound content, and the real-time environment sound can be overlapped and played after a section of prompt sound is added on the basis of the currently played sound, so that the attention of a wearer is reminded.
In this embodiment, when the earphone specifically is wireless earphone, still can check the electric quantity of earphone, then adjust the earphone state based on circuit testing result, and then ensure the normal work of earphone. Specifically, when the power of a certain earphone is lower than that of another earphone, for example, the power difference exceeds 10%. The host (mobile phone, tablet computer, computer) sends a request to make two earphones respond to the electric quantity and working state of the earphone (master earphone) respectively, if the earphone with low electric quantity is master, the host rapidly switches the earphone state information stored locally and returns the switched state to the two earphones. So, alright switch principal and subordinate earphone state, can avoid when that master earphone electric quantity that electric quantity is low is not enough, can lead to another earphone to suspend work simultaneously, avoided the pause broadcast of music and HFP (handds-free Profile, bluetooth transmission control, let bluetooth equipment can control the phone promptly, if answer, hang up, refuse to connect, voice dialing etc. refuse to connect, whether voice dialing will look at bluetooth earphone and phone and support, but the pause that lets bluetooth earphone get into high-fidelity conversation). The problem that when the electric quantity of any one earphone of the TWS earphone is insufficient, HFP transmission interruption and music playing pause can be caused, and inconvenience is caused to a user can be avoided.
By applying the method provided by the embodiment of the invention, the electronic equipment with the playing function collects real-time environment sound; detecting the content of the real-time environment sound to obtain sound content; and if the sound content is matched with the playing mark, playing the real-time environment sound or closing the audio playing function.
In this method, a play flag may be set in the electronic device in advance. The electronic device collects real-time ambient sounds. And then, carrying out content detection on the real-time environment sound to obtain corresponding sound content. And under the condition that the sound content is matched with the playing mark, the real-time environment sound can be played or the audio playing function can be closed. If the real-time environmental sound is played, a user of the electronic equipment can hear the played real-time environmental sound, so that the important environmental sound is prevented from being mistaken; if the audio playing function is turned off, the user of the electronic device can hear the environmental sound directly without the interference of audio playing. That is to say, in this method, the electronic device collects, recognizes and plays the ambient sound or directly turns off the audio playing function when a specific condition is satisfied, so that the user of the headset can hear the ambient sound corresponding to the playing flag even when the user of the headset normally uses the headset.
It should be noted that, based on the above embodiments, the embodiments of the present invention also provide corresponding improvements. In the preferred/improved embodiment, the same steps as those in the above embodiment or corresponding steps may be referred to each other, and corresponding advantageous effects may also be referred to each other, which are not described in detail in the preferred/improved embodiment herein.
In an embodiment of the invention, the electronic device may particularly comprise at least two acquisition ends of the spacing device in order to better mimic real-time ambient sound, i.e. in order to present a stereo effect (binaural effect). For example, real-time ambient sound may be collected on both the left and right sides of the wearer so that when real-time ambient sound is played, the corresponding real-time ambient sound may be played in both earphones.
That is to say, the real-time environment sound includes a left real-time environment sound and a right real-time environment sound, and the step S101 may specifically include: respectively acquiring corresponding real-time environment sounds by utilizing at least two acquisition ends; correspondingly, if the sound content is matched with the playing mark, the audio sizes of the sound content respectively collected by the two collecting ends are compared, and the real-time environment sound collected by the collecting end corresponding to the high audio is played after the comparison is completed.
Certainly, in practical application, a sound direction judgment end can be specially set, and then the corresponding direction playing end is started according to the direction. Or when two acquisition ends are provided, the playing end on the other side is adopted to play the sound of the high-frequency acquisition end, and the near end is paused or opened in a transparent mode or played, so that the function of transmitting the far-end environmental sound can be achieved.
Take the earphone application scenario as an example: when the earphone is in a wearing state, the left microphone is used for collecting left real-time environment sound, and the right microphone is used for collecting right real-time environment sound. Thus, the collected left real-time ambient sound and right real-time ambient sound are both real-time ambient sounds. When real-time environment sound needs to be played, the left side earphone plays the left side real-time environment sound, and the right side earphone plays the real-time environment sound, so that the earphone can be close to the situation that the earphone is not worn, the effect of normally listening to the environment sound is beneficial to a wearer to quickly position the sound source direction, and quick response is made.
In a specific embodiment of the present invention, the electronic device includes two playing terminals corresponding to the two capturing terminals, and if the sound content matches the playing flag, the playing terminal corresponding to the high-audio-frequency-corresponding capturing terminal is used to play the real-time environmental sound collected by the high-audio-frequency-corresponding capturing terminal.
Take the earphone application scenario as an example: step S103, if the sound content matches the playing flag, playing the real-time environmental sound, which may specifically include:
step one, if the sound content is matched with the playing mark, comparing the audio frequency of the left real-time environment sound with the audio frequency of the right real-time environment sound, and determining a high audio frequency side from the left side and the right side;
and step two, playing the corresponding real-time environment sound by utilizing the earphone corresponding to the high-audio-frequency side.
For convenience of description, the above two steps will be described in combination.
When the audio content is determined to match the playing flag, the audio sizes of the left real-time environment sound and the right real-time environment sound may be compared, and then the high-pitch audio side is selected. That is, if the audio frequency of the left real-time environmental sound is greater than the audio frequency of the right real-time environmental sound, the left side is determined to be the high audio side; if the audio frequency of the left real-time environment sound is smaller than that of the right real-time environment sound, determining that the right side is a high audio frequency side; if the audio of the left real-time environmental sound is the same as the audio of the right real-time environmental sound, the left or right side may be determined as the high audio side, and of course, both the left and right sides may be determined as the high audio side.
After the high-audio side is determined, the earphone corresponding to the high-audio side can be directly utilized to play real-time environment sound. Specifically, if the left side is the high audio side, the left earphone is used to play the left real-time environment sound, and if the right side is the high audio side, the right earphone is used to play the right real-time environment sound. Therefore, the corresponding real-time environment sound can be played only on the side with larger sound, the binaural effect of the wearer can be basically maintained, and meanwhile, the original sound can be continuously played by using the other earphone.
In an embodiment of the present invention, after the real-time environmental sound is played if the sound content matches the playing flag in step S103, an environmental sound playing exit operation may be further performed. The operation of playing and quitting the environmental sound specifically comprises the following steps:
step one, collecting motion data;
secondly, identifying the current motion state by utilizing the motion data;
and step three, stopping playing the real-time environment sound under the condition that the motion state change between the current motion state and the preset motion state meets the preset external sound playing stopping condition.
For convenience of description, the above three steps will be described in combination.
In particular, motion data may be collected using motion sensors internal or external to the electronic device. The motion sensor may be specifically a motion sensor integrated in the headset, or may be a motion sensor worn by a wearer of the headset alone. The motion sensor may be embodied to be able to collect motion data of subtle movements of the wearer, such as head rotations; the device can also be a household appliance capable of collecting the exercise data of the exercise amplitude of the wearer, such as a treadmill. In the present embodiment, the specific type and type of the motion sensor are not limited.
And acquiring motion data for identification, thereby acquiring the current motion state. Specifically, how to identify the motion data may be identified according to a specific principle and a usage scheme policy of a specific motion sensor, which is not described in detail herein.
The preset motion state may be a motion state acquired last time, or may be a state (such as a standing state) corresponding to a set standard static posture. Of course, the user-defined setting can be performed according to actual requirements, and is not listed here.
And stopping playing the real-time environment sound under the condition that the motion state change between the current motion state and the preset motion state meets the preset external sound playing stopping condition after identification. For example, the preset external sound playing stopping condition may specifically be that the head rotation angle of the user changes at +75 degrees or-75 degrees, the distance of head moving forward is 2 meters, the conversation is considered to be finished, and the real-time environment sound is stopped playing; otherwise, it may be determined that the conversation is continuing and the real-time ambient sound may continue to be played.
As can be seen, in the present embodiment, it is possible to infer whether the conversation state is ended based on the change in the motion state of the user, and automatically quit the state in which the environmental sound is played after the conversation is ended, and the state of the electronic device can be freely switched according to the actual application.
In an embodiment of the present invention, after the step S103 is executed, if the sound content matches the playing flag, and the real-time environmental sound is played, an environmental sound playing exit operation may be further executed, which specifically includes:
step one, performing semantic recognition on real-time environmental sound to obtain a semantic recognition result;
and step two, if the semantic recognition result comprises a preset conversation ending sign language, stopping playing the real-time environment sound.
For convenience of description, the above three steps will be described in combination.
In the process of playing the real-time environmental sound, the semantic recognition can be carried out on the real-time environmental sound to obtain a semantic recognition result. When the semantic recognition result includes the preset conversation ending sign (such as the preset words of Bye, etc.), the real-time environmental sound can be immediately stopped playing, or the real-time environmental sound can be stopped playing after waiting for a period of time (such as 5 seconds), and the normal music playing or conversation sound playing can be resumed. The specific process of performing semantic recognition may refer to the above semantic recognition description, which is not repeated herein.
Therefore, in the present embodiment, the state of playing the environmental sound can be automatically exited based on the dialog content of the user, and the state of the earphone can be freely switched according to the actual application situation.
It should be noted that the above-mentioned embodiments of stopping playing the real-time environmental sound based on the semantic meaning and stopping playing the real-time environmental sound based on the motion can be combined to be applied in practical applications.
In addition, for the processing operation in which the corresponding processing operation is to turn off the audio playing function in the case where the sound content matches the playing flag, the audio playing function may be turned on in the case where the stop of playing the real-time environmental sound based on the semantic meaning and the stop of playing the real-time environmental sound based on the motion are satisfied.
Corresponding to the above method embodiments, the embodiments of the present invention further provide a sound playing apparatus applied to an electronic device with a playing function, and the sound playing apparatus described below and the sound playing method described above may be referred to in correspondence with each other.
Referring to fig. 2, the apparatus includes the following modules:
the sound acquisition module 101 is used for acquiring real-time environment sound;
the voice recognition module 102 is configured to perform content detection on real-time environmental sound to obtain sound content;
and the playing control module 103 is configured to play the real-time environment sound or close the audio playing function if the sound content matches the playing flag.
By applying the device provided by the embodiment of the invention, real-time environment sound is collected; detecting the content of the real-time environment sound to obtain sound content; and if the sound content is matched with the playing mark, playing the real-time environment sound or closing the audio playing function.
In the apparatus, a play flag may be set in the electronic device in advance. The electronic device collects real-time ambient sounds. And then, carrying out content detection on the real-time environment sound to obtain corresponding sound content. And under the condition that the sound content is matched with the playing mark, the real-time environment sound can be played or the audio playing function can be closed. If the real-time environmental sound is played, a user of the electronic equipment can hear the played real-time environmental sound, so that the important environmental sound is prevented from being mistaken; if the audio playing function is turned off, the user of the electronic device can hear the environmental sound directly without the interference of audio playing. That is to say, the device, electronic equipment through the collection of environmental sound, discernment and satisfying the broadcast of environmental sound or directly close audio playback function under the specific condition, can make the earphone wearer can hear the environmental sound that corresponds with the broadcast sign under the condition of normal use earphone also.
In a specific embodiment of the present invention, the playing flag is a semantic flag or a scene flag, and the speech recognition module 102 is specifically configured to perform semantic recognition on real-time environmental sound to obtain a semantic recognition result; or, carrying out scene recognition on the real-time environmental sound to obtain a scene recognition result;
accordingly, the semantic recognition result or the scene recognition result is determined as the sound content.
In an embodiment of the present invention, the playing control module 103 is specifically configured to perform enhanced playing on the real-time environmental sound if the sound content is a dangerous signal match in the playing flag.
In a specific embodiment of the present invention, the electronic device includes at least two acquisition ends arranged at intervals, and the sound acquisition module 101 is specifically configured to respectively acquire corresponding real-time environmental sounds by using the at least two acquisition ends;
correspondingly, the playing control module 103 is specifically configured to compare the audio sizes of the sound contents respectively collected by the two collection ends if the sound contents are matched with the playing flag, and play the real-time environment sound collected by the collection end corresponding to the high audio after the comparison is completed.
In a specific embodiment of the present invention, the electronic device includes two playing terminals corresponding to the two acquiring terminals, and the playing control module 103 is specifically configured to play the real-time environment sound acquired by the high-audio-frequency corresponding acquiring terminal by using the playing terminal corresponding to the high-audio-frequency corresponding acquiring terminal if the sound content matches the playing flag. Further comprising: after the real-time environment sound is played, the state recovery module is used for collecting motion data; identifying a current motion state using the motion data; and stopping playing the real-time environment sound under the condition that the motion state change between the current motion state and the preset motion state meets the preset external sound playing stopping condition.
In one embodiment of the present invention, the method further comprises: the state recovery module is specifically used for performing semantic recognition on the real-time environmental sound after the real-time environmental sound is played to obtain a semantic recognition result; and if the semantic recognition result comprises a preset conversation ending sign language, stopping playing the real-time environment sound.
Corresponding to the above method embodiment, an embodiment of the present invention further provides an electronic device, and the electronic device described below and the sound playing method described above may be referred to in correspondence.
Referring to fig. 3, the electronic device includes:
the acquisition end 301 is used for acquiring real-time environment sound;
a playing end 302, configured to play sound, where the sound includes real-time environmental sound;
a memory 303 for storing a computer program;
a processor 304 for implementing the steps of the sound playing method of the above method embodiments when executing the computer program.
The collecting end may specifically be a device capable of collecting sound, such as a microphone, and the playing end may specifically be a device having a sound playing function, such as a speaker.
The steps in the sound playing method described above may be implemented by the structure of the electronic device.
Corresponding to the above method embodiment, the embodiment of the present invention further provides a readable storage medium, and a readable storage medium described below and a sound playing method described above may be referred to in correspondence with each other.
A readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the steps of the sound playing method of the above-mentioned method embodiments.
The readable storage medium may be a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and various other readable storage media capable of storing program codes.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.

Claims (10)

1. A sound playing method is applied to an electronic device with a playing function, and comprises the following steps:
collecting real-time environment sound;
performing content detection on the real-time environment sound to obtain sound content;
and if the sound content is matched with a playing mark, playing the real-time environment sound or closing an audio playing function.
2. The sound playing method according to claim 1, wherein the playing flag is a semantic flag or a scene flag, and performing content detection on the real-time environmental sound to obtain sound content comprises:
performing semantic recognition on the real-time environmental sound to obtain a semantic recognition result;
or, carrying out scene recognition on the real-time environmental sound to obtain a scene recognition result;
accordingly, the semantic recognition result or the scene recognition result is determined as the sound content.
3. The sound playing method according to claim 2, wherein if the sound content matches the danger signal in the playing flag, the real-time environmental sound is played intensively.
4. The sound playing method according to claim 1, wherein the electronic device includes at least two collecting terminals disposed at intervals, and the collecting real-time environmental sound includes:
respectively acquiring the corresponding real-time environment sounds by utilizing at least two acquisition ends;
correspondingly, if the sound content is matched with the playing mark, the audio sizes of the sound content respectively collected by the two collecting ends are compared, and the real-time environment sound collected by the collecting end corresponding to the high audio is played after the comparison is completed.
5. The sound playing method according to claim 4, wherein the electronic device includes two playing terminals corresponding to the two capturing terminals, and if the sound content matches the playing flag, the playing terminal corresponding to the high-audio-frequency-corresponding capturing terminal is used to play the real-time environmental sound collected by the high-audio-frequency-corresponding capturing terminal.
6. The sound playing method according to claim 1, further comprising, after playing the real-time environmental sound:
collecting motion data;
identifying a current motion state using the motion data;
and stopping playing the real-time environment sound under the condition that the motion state change between the current motion state and the preset motion state meets the preset external sound playing stopping condition.
7. The sound playing method according to claim 1, further comprising, after playing the real-time environmental sound:
performing semantic recognition on the real-time environmental sound to obtain a semantic recognition result;
and if the semantic recognition result comprises a preset conversation ending sign language, stopping playing the real-time environment sound.
8. A sound playing device is applied to an electronic device with a playing function, and comprises:
the sound acquisition module is used for acquiring real-time environment sound;
the voice recognition module is used for carrying out content detection on the real-time environment sound to obtain sound content;
and the playing control module is used for playing the real-time environment sound or closing the audio playing function if the sound content is matched with the playing mark.
9. An electronic device, comprising:
the acquisition end is used for acquiring real-time environment sound;
the playing end is used for playing sound, and the sound comprises the real-time environment sound;
a memory for storing a computer program;
a processor for implementing the steps of the sound playing method according to any one of claims 1 to 7 when executing the computer program.
10. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when being executed by a processor, realizes the steps of the sound playing method according to any one of claims 1 to 7.
CN202110475845.6A 2021-04-29 2021-04-29 Sound playing method and device, electronic equipment and readable storage medium Pending CN113194383A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202110475845.6A CN113194383A (en) 2021-04-29 2021-04-29 Sound playing method and device, electronic equipment and readable storage medium
PCT/CN2021/141559 WO2022227655A1 (en) 2021-04-29 2021-12-27 Sound playing method and apparatus, and electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110475845.6A CN113194383A (en) 2021-04-29 2021-04-29 Sound playing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN113194383A true CN113194383A (en) 2021-07-30

Family

ID=76980813

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110475845.6A Pending CN113194383A (en) 2021-04-29 2021-04-29 Sound playing method and device, electronic equipment and readable storage medium

Country Status (2)

Country Link
CN (1) CN113194383A (en)
WO (1) WO2022227655A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113766383A (en) * 2021-09-08 2021-12-07 度小满科技(北京)有限公司 Method and device for controlling earphone to mute
WO2022227655A1 (en) * 2021-04-29 2022-11-03 歌尔股份有限公司 Sound playing method and apparatus, and electronic device and readable storage medium
CN116055932A (en) * 2022-08-12 2023-05-02 荣耀终端有限公司 Earphone main and auxiliary ear switching method

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103796125A (en) * 2013-11-21 2014-05-14 广州视源电子科技股份有限公司 Earphone playing-based sound adjustment method
CN106162413A (en) * 2016-09-07 2016-11-23 合肥中感微电子有限公司 The Headphone device of specific environment sound prompting pattern
CN107799117A (en) * 2017-10-18 2018-03-13 倬韵科技(深圳)有限公司 Key message is identified to control the method, apparatus of audio output and audio frequency apparatus
WO2018095035A1 (en) * 2016-11-24 2018-05-31 歌尔股份有限公司 Earphone and speech recognition method therefor
CN108391206A (en) * 2018-03-30 2018-08-10 广东欧珀移动通信有限公司 Signal processing method, device, terminal, earphone and readable storage medium storing program for executing
CN110691300A (en) * 2019-09-12 2020-01-14 连尚(新昌)网络科技有限公司 Audio playing device and method for providing information
CN110719545A (en) * 2019-09-12 2020-01-21 连尚(新昌)网络科技有限公司 Audio playing device and method for playing audio
CN111491236A (en) * 2020-04-23 2020-08-04 歌尔科技有限公司 Active noise reduction earphone, awakening method and device thereof and readable storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090138507A1 (en) * 2007-11-27 2009-05-28 International Business Machines Corporation Automated playback control for audio devices using environmental cues as indicators for automatically pausing audio playback
CN101840700B (en) * 2010-04-28 2012-05-23 宇龙计算机通信科技(深圳)有限公司 Voice recognition method based on mobile terminal and mobile terminal
KR101756674B1 (en) * 2016-05-27 2017-07-25 주식회사 이엠텍 Active noise reduction headset device with hearing aid features
CN110689882A (en) * 2018-07-04 2020-01-14 上海博泰悦臻网络技术服务有限公司 Vehicle, playing equipment thereof and multimedia playing automatic control method
CN113194383A (en) * 2021-04-29 2021-07-30 歌尔科技有限公司 Sound playing method and device, electronic equipment and readable storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103796125A (en) * 2013-11-21 2014-05-14 广州视源电子科技股份有限公司 Earphone playing-based sound adjustment method
CN106162413A (en) * 2016-09-07 2016-11-23 合肥中感微电子有限公司 The Headphone device of specific environment sound prompting pattern
WO2018095035A1 (en) * 2016-11-24 2018-05-31 歌尔股份有限公司 Earphone and speech recognition method therefor
CN107799117A (en) * 2017-10-18 2018-03-13 倬韵科技(深圳)有限公司 Key message is identified to control the method, apparatus of audio output and audio frequency apparatus
CN108391206A (en) * 2018-03-30 2018-08-10 广东欧珀移动通信有限公司 Signal processing method, device, terminal, earphone and readable storage medium storing program for executing
EP3547710A1 (en) * 2018-03-30 2019-10-02 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method for processing signals, terminal device, and non-transitory computer-readable storage medium
CN110691300A (en) * 2019-09-12 2020-01-14 连尚(新昌)网络科技有限公司 Audio playing device and method for providing information
CN110719545A (en) * 2019-09-12 2020-01-21 连尚(新昌)网络科技有限公司 Audio playing device and method for playing audio
CN111491236A (en) * 2020-04-23 2020-08-04 歌尔科技有限公司 Active noise reduction earphone, awakening method and device thereof and readable storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022227655A1 (en) * 2021-04-29 2022-11-03 歌尔股份有限公司 Sound playing method and apparatus, and electronic device and readable storage medium
CN113766383A (en) * 2021-09-08 2021-12-07 度小满科技(北京)有限公司 Method and device for controlling earphone to mute
CN116055932A (en) * 2022-08-12 2023-05-02 荣耀终端有限公司 Earphone main and auxiliary ear switching method
CN116055932B (en) * 2022-08-12 2023-09-15 荣耀终端有限公司 Earphone main and auxiliary ear switching method

Also Published As

Publication number Publication date
WO2022227655A1 (en) 2022-11-03

Similar Documents

Publication Publication Date Title
CN101840700B (en) Voice recognition method based on mobile terminal and mobile terminal
CN105814913B (en) Name sensitive listening device
CN113194383A (en) Sound playing method and device, electronic equipment and readable storage medium
CN109451390B (en) TWS earphone and control method, device and equipment thereof
KR102513461B1 (en) Headphone system
US9299348B2 (en) Method and apparatus for obtaining information from the web
WO2018095035A1 (en) Earphone and speech recognition method therefor
CN106162413A (en) The Headphone device of specific environment sound prompting pattern
CN109104684B (en) Microphone hole blockage detection method and related product
CN106572411A (en) Noise cancelling control method and relevant device
CN112822585B (en) Audio playing method, device and system of in-ear earphone
US20120189129A1 (en) Apparatus for Aiding and Informing a User
CN106210960A (en) There is the Headphone device of local call situation affirmation mode
CN106170108A (en) There is the Headphone device of decibel indicating mode
CN109348334A (en) A kind of wireless headset and its ambience listening method and apparatus
US20120189155A1 (en) Apparatus for Electrically Coupling Contacts by Magnetic Forces
CN108683790B (en) Voice processing method and related product
CN111491236A (en) Active noise reduction earphone, awakening method and device thereof and readable storage medium
CN116324969A (en) Hearing enhancement and wearable system with positioning feedback
JP6404709B2 (en) Sound output device and sound reproduction method in sound output device
CN105812585A (en) Method for switching conversation modes and mobile terminal
KR101693483B1 (en) Method and computer program for cancelling howling and echo in a headset
CN109039355B (en) Voice prompt method and related product
CN108307048A (en) A kind of message output method and device and mobile terminal
CN109361987B (en) Sports earphone and control method, device and equipment thereof

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210730