Voice playing method and device of intelligent sound box and storage medium
Technical Field
The embodiment of the invention relates to the technical field of sound box equipment, in particular to a voice playing method and device of an intelligent sound box and a storage medium.
Background
With the continuous development of electronic equipment technology, people's life gradually develops towards intellectuality. Compared with the traditional sound box, the intelligent sound box is additionally provided with the processor and the network interface, and can access media resources in the Internet, so that the intelligent sound box is favored by a large number of users.
The intelligent sound box is composed of a plurality of sound boxes, each sound box is placed in different rooms, and a user can select the sound box closest to the user to play audio and the like according to the current position.
Disclosure of Invention
The embodiment of the invention provides a voice playing method of an intelligent sound box, which is used for playing voice by the intelligent sound box and improving the function diversification of the intelligent sound box.
In a first aspect, an embodiment of the present invention provides a voice playing method for an intelligent sound box, where the method includes:
a main control sound box in an intelligent sound box group receives first voice information sent by a first sub sound box, wherein the intelligent sound box group comprises the main control sound box and a plurality of sub sound boxes matched with the main control sound box;
acquiring position information of the first sub sound box;
controlling a second sub-sound box in an activated state to play the first voice information and the position information; the second sub sound box is a sub sound box except the first sub sound box in the intelligent sound box group.
Further, before the main control audio amplifier in the intelligent audio amplifier group receives the first speech information that first sub-audio amplifier sent, still include:
when the first sub sound box detects first voice information input by a first user, the first voice information is sent to the main control sound box; the first sub sound box is a sound box closest to the first user.
Further, the controlling the second sub-audio box in the activated state to play the first voice message and the position information includes:
acquiring a second sub sound box in an activated state at present, and determining the second sub sound box as a target sound box;
and sending the first voice information and the position information to the target sound box for playing.
Further, acquiring a second sub sound box currently in an activated state, and determining the second sub sound box as a target sound box, including:
and determining a second sub-loudspeaker box activated at the latest time point as the target loudspeaker box, wherein the latest time point is the time point closest to the current moment.
Further, the controlling the activated second sub-audio box to play the first voice message and the position information includes:
and sending the first voice information and the position information to all the second sub sound boxes so that the second sub sound boxes in the activated state play the first voice information and the position information.
Further, still include:
for each sub-loudspeaker box in the intelligent loudspeaker box group, when a user enters an induction area of the current sub-loudspeaker box, the current sub-loudspeaker box is activated, wherein the induction area comprises an infrared induction area, a pressure induction area or a camera induction area.
Further, after controlling the second sub-audio box in the activated state to play the first voice message and the position information, the method further includes:
and the second sub-sound box in the activated state detects second voice information input by a second user and sends the second voice information to the first sub-sound box for playing.
In a second aspect, an embodiment of the present invention further provides a voice playing device for an intelligent speaker, where the device includes:
the first voice information receiving module is used for receiving first voice information sent by the first sub-voice box;
the position information acquisition module is used for acquiring the position information of the first sub sound box;
and the playing module is used for controlling the second sub-sound box in the activated state to play the first voice information and the position information.
Further, still include:
the first voice information monitoring module is used for sending the first voice information to the master control loudspeaker box when the first voice information input by the first user is detected.
In a third aspect, an embodiment of the present invention further provides a storage medium, where an audio playing program of a smart speaker is stored on the storage medium, and when the audio playing program of the smart speaker is executed by a processor, the audio playing method according to the first aspect is implemented.
According to the embodiment of the invention, the main control loudspeaker box in the intelligent loudspeaker box group receives the first voice information sent by the first sub loudspeaker box, then the position information of the first sub loudspeaker box is obtained, and finally the second sub loudspeaker box in the activated state is controlled to play the first voice information and the position information. According to the voice playing method provided by the embodiment of the invention, voice transmission among a plurality of users is realized through the intelligent sound box, the convenience of user communication is improved, and the diversity of functions of the intelligent sound box is improved.
Drawings
Fig. 1 is a flowchart of a voice playing method for an intelligent sound box according to a first embodiment of the present invention;
fig. 2 is a flowchart of a voice playing method for an intelligent sound box according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a voice playing apparatus of an intelligent sound box in a third embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart of a voice playing method for a smart speaker according to an embodiment of the present invention, where this embodiment is applicable to a situation where a smart speaker is used to play voice, and the method may be executed by speakers in a smart speaker group, as shown in fig. 1, where the method specifically includes the following steps.
Step 110, a main control sound box in the intelligent sound box group receives first voice information sent by a first sub sound box.
The intelligent sound box group comprises a main control sound box and a plurality of sub sound boxes matched with the main control sound box. The main control sound box can be a sound box for controlling the main sound box and other sub sound boxes to play audio, in the embodiment, any sound box in the intelligent sound box group can be set as the main control sound box, and the setting mode can comprise factory setting and setting by a user according to self requirements. For example: the user can set the sound box placed in the living room as the master control sound box.
Optionally, before the main control speaker in the intelligent speaker group receives the first voice information sent by the first sub-speaker, the method further includes: when the first sub sound box detects first voice information input by a first user, the first voice information is sent to the main control sound box; the first sub sound box is a sound box closest to the first user.
Specifically, the intelligent sound box performs voice detection, when a first user speaks, the voice of the user is detected by a first sub sound box which is closest to the first user, voice information generated by the first user during speaking is input into the first sub sound box, and the first sub sound box sends the detected first voice information to the main control sound box. The main control sound box receives first voice information sent by the first sub sound box. In this implementation, carry out data transmission through wireless network between intelligent audio amplifier group master control audio amplifier and the sub-audio amplifier.
And step 120, acquiring the position information of the first sub sound box.
The manner of obtaining the position information of the first sub-speaker may be to search for a corresponding relationship between each sub-speaker and the position information in the main control speaker, so as to obtain the position information of the first sub-speaker. In this embodiment, when the intelligent speaker group is installed, a corresponding relationship between the position information of each sub-speaker and the identification code may be established. Illustratively, table 1 shows a correspondence relationship between the sub-speaker position information and the identification code.
TABLE 1
| Location information
|
Sub-sound box identification code
|
| Principal and subordinate bed
|
A
|
| Lying next to bed
|
B
|
| Parlor
|
C |
When the first sub-loudspeaker box and the main control loudspeaker box carry out data interaction, the identification code of the first sub-loudspeaker box is carried in the data, and the main control loudspeaker box can obtain the position information of the first sub-loudspeaker box according to the identification code.
And step 130, controlling the second sub-audio box in the activated state to play the first voice information and the position information.
The second sub sound box is a sub sound box except the first sub sound box in the intelligent sound box group. The state of the loudspeaker box can comprise a dormant state, an activated state, a power-off state and the like. The audio can only be played when the loudspeaker is in the active state.
Optionally, controlling the second sub-audio box in the activated state to play the first voice message and the location message may be implemented by: and acquiring a second sub sound box in an activated state at present, determining the second sub sound box as a target sound box, and sending the first voice information and the position information to the target sound box for playing.
Wherein, the number of the target sound boxes can be 1 or more. In this embodiment, the main control sound box may obtain the current state of each sub sound box in real time, and after the main control sound box receives the first voice information sent by the first sub sound box, obtain the second sub sound box currently in an activated state, determine that the second sub sound box is the target sound box, and finally send the first voice information and the position information to the target sound box for playing. For example, assuming that the first voice message is "i thirst and help me pour juice", and the first sub-speaker is in the main lying position, the voice content played on the target speaker may be "information from main lying position, i thirst and help me pour juice".
Optionally, the second sub sound box currently in the active state is obtained and determined as the target sound box, and the method may be implemented in the following manner: and determining a second sub-loudspeaker box activated at the latest time point as the target loudspeaker box, wherein the latest time point is the time point closest to the current moment.
The second sub sound box is activated at the latest time point, which indicates that the user is closest to the second sub sound box, the second sub sound box activated at the latest time point is determined as the target sound box, and only one activated second sub sound box is controlled to play the audio, so that the power consumption can be reduced.
Optionally, controlling the second sub-audio box in the activated state to play the first voice message and the location message may be implemented by: and sending the first voice information and the position information to all the second sub-sound boxes so that the second sub-sound boxes in the activated state play the first voice information and the position information.
In this embodiment, after the main control speaker receives the first voice message sent by the first sub-speaker, the first voice message and the position message are sent to all the second sub-speakers, and only the second sub-speakers in the activated state play the first voice message and the position message.
Optionally, for each sub-enclosure in the intelligent enclosure group, when the user enters the sensing zone of the current sub-enclosure, the current sub-enclosure is activated. The sensing area comprises an infrared sensing area, a pressure sensing area or a camera sensing area.
In this embodiment, each sub-speaker is installed with an infrared sensor, and when a user enters the infrared sensing area of the current sub-speaker, the current sub-speaker is activated, so that audio can be played.
According to the technical scheme, the main control loudspeaker box in the intelligent loudspeaker box group receives first voice information sent by the first sub loudspeaker box, then position information of the first sub loudspeaker box is obtained, and finally the second sub loudspeaker box in the activated state is controlled to play the first voice information and the position information. According to the voice playing method provided by the embodiment of the invention, voice transmission among a plurality of users is realized through the intelligent sound box, the convenience of user communication is improved, and the diversity of functions of the intelligent sound box is improved.
Example two
Fig. 2 is a flowchart of a voice playing method for an intelligent sound box according to a second embodiment of the present invention. As a further explanation of the above embodiment, as shown in fig. 2, the method comprises the following steps.
Step 210, when the first sub-speaker detects the first voice message input by the first user, sending the first voice message to the main control speaker.
Step 220, the main control sound box in the intelligent sound box group receives the first voice information sent by the first sub sound box.
Step 230, obtaining the position information of the first sub sound box.
And step 240, controlling the second sub-audio box in the activated state to play the first voice information and the position information.
And 250, detecting second voice information input by a second user by the second sub-voice box in the activated state, and sending the second voice information to the first sub-voice box for playing.
In this embodiment, after the second user hears the voice information played by the second sub-speaker, the second user responds to the voice information, inputs the second voice information to the second sub-speaker in the activated state, and the second sub-speaker in the activated state sends the detected second voice information to the first sub-speaker for playing, so that the first user knows that the first voice information input by the first user is known by the second user.
For example, the implementation process of the voice playing method for the smart sound box provided by this embodiment is as follows, the user a in the bedroom speaks the first voice message as "help me fall over water", the first sub-sound box placed in the bedroom detects the first voice message, and sends the first voice message to the main control sound box. The master control loudspeaker box controls the second sub loudspeaker box which is in the activated state at present to play the first voice information and the position information of the first loudspeaker box, and the playing content is 'information from a bedroom, and helps me to pour a cup of water'. After the user B hears the voice content played by the second sub-voice box, it responds that the second voice message is "good, known". And the second sub sound box in the activated state sends the detected second voice information to the first sub sound box in the bedroom for playing, so that the user A knows that the user B has acquired the first voice information.
According to the technical scheme, voice transmission among users is achieved through the intelligent sound box, convenience of communication among the users is improved, and diversity of functions of the intelligent sound box is also improved.
EXAMPLE III
Fig. 3 is a schematic structural diagram of a voice playing apparatus of an intelligent sound box according to a third embodiment of the present invention. As shown in fig. 3, the apparatus includes: a first voice message receiving module 310, a position information obtaining module 320 and a playing module 330.
The first voice information receiving module 310 is configured to receive first voice information sent by a first sub-voice box;
a position information obtaining module 320, configured to obtain position information of the first sub sound box;
the playing module 330 is configured to control the second sub-audio box in the activated state to play the first voice message and the position information.
Optionally, the method further includes:
the first voice information monitoring module is used for sending the first voice information to the master control loudspeaker box when the first voice information input by the first user is detected.
Optionally, the playing module 330 is further configured to:
acquiring a second sub sound box in an activated state at present, and determining the second sub sound box as a target sound box;
and sending the first voice information and the position information to a target sound box for playing.
Optionally, the playing module 330:
and determining a second sub-loudspeaker box activated at the latest time point as the target loudspeaker box, wherein the latest time point is the time point closest to the current moment.
Optionally, the playing module 330:
and sending the first voice information and the position information to all the second sub-sound boxes so that the second sub-sound boxes in the activated state play the first voice information and the position information.
Optionally, the method further includes:
for each sub-loudspeaker box in the intelligent loudspeaker box group, when a user enters an infrared induction area of the current sub-loudspeaker box, the current sub-loudspeaker box is activated.
Optionally, the method further includes:
and the second voice information sending module is used for detecting second voice information input by a second user and sending the second voice information to the first sub-voice box for playing.
The device can execute the methods provided by all the embodiments of the invention, and has corresponding functional modules and beneficial effects for executing the methods. For details not described in detail in this embodiment, reference may be made to the methods provided in all the foregoing embodiments of the present invention.
The embodiment of the invention also provides a storage medium containing the executable instruction of the intelligent sound box, wherein the storage medium is stored with the audio playing program of the intelligent sound box, and the audio playing program of the intelligent sound box is executed by the processor to perform the voice playing method.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present application may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
Of course, the storage medium containing the computer-executable instructions provided in the embodiments of the present application is not limited to the voice playing method of the smart sound box described above, and may also perform related operations in the voice playing method of the smart sound box provided in any embodiments of the present application.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.