Interaction method, device and medium
阅读说明:本技术 交互方法、装置及介质 (Interaction method, device and medium ) 是由 李响 于 2020-06-08 设计创作,主要内容包括:本公开是关于一种交互方法、装置及介质。所述方法包括:接收双语交互指令,进入双语交互模式;接收来自用户的第一语音消息,基于所述第一语音消息确定第一语言;基于所述第一语音消息,生成第二语言回复消息,所述第二语言不同于所述第一语言;将所述第二语言回复消息发送给所述用户。采用这种方法,可在日常生活中和搭载语音助手的手机或音箱等设备进行交互,利用这种双语语音助手,可以为用户营造一个逼真的双语交流场景,从而可以辅助用户进行外语学习。(The present disclosure relates to an interaction method, apparatus, and medium. The method comprises the following steps: receiving a bilingual interaction instruction, and entering a bilingual interaction mode; receiving a first voice message from a user, and determining a first language based on the first voice message; generating a second language reply message based on the first voice message, the second language being different from the first language; and sending the reply message in the second language to the user. By adopting the method, the interaction with the mobile phone or the loudspeaker box and other equipment carrying the voice assistant can be carried out in daily life, and a vivid bilingual communication scene can be created for the user by utilizing the bilingual voice assistant, so that the foreign language learning of the user can be assisted.)
1. An interactive method, characterized in that the method comprises:
receiving a bilingual interaction instruction, and entering a bilingual interaction mode;
receiving a first voice message from a user, and determining a first language based on the first voice message;
generating a second language reply message based on the first voice message, the second language being different from the first language;
and sending the reply message in the second language to the user.
2. The method of claim 1, wherein the method further comprises:
acquiring the setting information of the user about the second language;
determining the second language based on the setting information.
3. The method of claim 2, wherein said obtaining the user's setting information about the second language comprises:
and when the voice setting instruction of the user for the second language is determined to be received, acquiring the setting information of the second language based on the voice setting instruction.
4. The method of claim 1, wherein said generating a second language reply message based on said first voice message comprises:
generating a first language reply message based on the first voice message;
generating the second language reply message based on the first language reply message.
5. The method of claim 1, wherein said generating a second language reply message based on said first voice message comprises:
translating the first voice message to generate a second language message;
generating the second language reply message based on the second language message.
6. The method of claim 1, wherein said sending said second language reply message to said user comprises:
sending the reply message in the second language to the user in a voice form; and/or
And sending the reply message in the second language to the user in a text form.
7. The method of claim 6, wherein said sending said second language reply message to said user in voice form comprises:
generating the second language reply message in a voice form based on the second language reply message in a text form;
and sending the second language reply message in a voice form to the user.
8. An interactive apparatus, characterized in that the apparatus comprises:
the mode setting module is set to enter a bilingual interaction mode after receiving a bilingual interaction instruction;
a receiving module configured to receive a first voice message from a user, determine a first language based on the first voice message;
a generating module configured to generate a reply message in a second language based on the first voice message, the second language being different from the first language;
a sending module configured to send the reply message in the second language to the user.
9. The apparatus of claim 8, wherein the apparatus further comprises a second language determination module configured to:
acquiring the setting information of the user about the second language;
determining the second language based on the setting information.
10. The apparatus of claim 9, wherein the second language determination module is further configured to:
and when the voice setting instruction of the user for the second language is determined to be received, acquiring the setting information of the second language based on the voice setting instruction.
11. The apparatus of claim 8, wherein the generation module is further configured to:
generating a first language reply message based on the first voice message;
generating the second language reply message based on the first language reply message.
12. The apparatus of claim 8, wherein the generation module is further configured to:
translating the first voice message to generate a second language message;
generating the second language reply message based on the second language message.
13. The apparatus of claim 8, wherein the sending module is further configured to:
sending the reply message in the second language to the user in a voice form; and/or
And sending the reply message in the second language to the user in a text form.
14. The apparatus of claim 13, wherein the sending module is further configured to:
generating the second language reply message in a voice form based on the second language reply message in a text form;
and sending the second language reply message in a voice form to the user.
15. An interactive apparatus, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the following steps when executing the executable instructions:
receiving a bilingual interaction instruction, and entering a bilingual interaction mode;
receiving a first voice message from a user, and determining a first language based on the first voice message;
generating a second language reply message based on the first voice message, the second language being different from the first language;
and sending the reply message in the second language to the user.
16. A non-transitory computer readable storage medium in which instructions, when executed by a processor of an apparatus, enable the apparatus to perform a method of interaction, the method comprising:
receiving a bilingual interaction instruction, and entering a bilingual interaction mode;
receiving a first voice message from a user, and determining a first language based on the first voice message;
generating a second language reply message based on the first voice message, the second language being different from the first language;
and sending the reply message in the second language to the user.
Technical Field
The present disclosure relates to the field of electronic devices, and in particular, to an interaction method, apparatus, and medium.
Background
With the increasingly wide application of the intelligent terminal, the user has more and more requirements on the interactive function of the intelligent terminal. To facilitate interaction with the user, most intelligent terminals are provided with an intelligent voice assistant. The intelligent voice assistant has become an important function of the smart phone and the sound box, and almost all major internet companies develop voice assistants oriented to different scenes, so that users can be helped to acquire information through more convenient interaction and execute the operation on home equipment.
Currently, speech assistants are in a monolingual mode, for example, a user invokes the speech assistant in Chinese and makes a request, and the speech assistant returns a Chinese answer in text or speech form through speech recognition and natural language understanding.
Considering that there are a large number of users worldwide who learn foreign languages, the hearing level is an indispensable ability in foreign language learning. However, it is difficult to effectively exercise the hearing ability in daily life of the learner, and a good bilingual communication environment is also lacking, especially in resource-poor regions, which limits the learner to effectively improve the learning ability of english.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides an interaction method, apparatus, and medium.
According to a first aspect of embodiments of the present disclosure, there is provided an interaction method, the method including:
receiving a bilingual interaction instruction, and entering a bilingual interaction mode;
receiving a first voice message from a user, and determining a first language based on the first voice message;
generating a second language reply message based on the first voice message, the second language being different from the first language;
and sending the reply message in the second language to the user.
Wherein the method further comprises:
acquiring the setting information of the user about the second language;
determining the second language based on the setting information.
Wherein the acquiring of the setting information of the user about the second language includes:
and when the voice setting instruction of the user for the second language is determined to be received, acquiring the setting information of the second language based on the voice setting instruction.
Wherein the generating a second language reply message based on the first voice message comprises:
generating a first language reply message based on the first voice message;
generating the second language reply message based on the first language reply message.
Wherein the generating a second language reply message based on the first voice message comprises:
translating the first voice message to generate a second language message;
generating the second language reply message based on the second language message.
Wherein said sending said reply message in said second language to said user comprises:
sending the reply message in the second language to the user in a voice form; and/or
And sending the reply message in the second language to the user in a text form.
Wherein said sending said reply message in said second language to said user in voice form comprises:
generating the second language reply message in a voice form based on the second language reply message in a text form;
and sending the second language reply message in a voice form to the user.
According to a second aspect of embodiments of the present disclosure, there is provided an interaction apparatus, the apparatus comprising:
the mode setting module is set to enter a bilingual interaction mode after receiving a bilingual interaction instruction;
a receiving module configured to receive a first voice message from a user, determine a first language based on the first voice message;
a generating module configured to generate a reply message in a second language based on the first voice message, the second language being different from the first language;
a sending module configured to send the reply message in the second language to the user.
Wherein the apparatus further comprises a second language determination module arranged to:
acquiring the setting information of the user about the second language;
determining the second language based on the setting information.
Wherein the second language determination module is further configured to:
and when the voice setting instruction of the user for the second language is determined to be received, acquiring the setting information of the second language based on the voice setting instruction.
Wherein the generation module is further configured to:
generating a first language reply message based on the first voice message;
generating the second language reply message based on the first language reply message.
Wherein the generation module is further configured to:
translating the first voice message to generate a second language message;
generating the second language reply message based on the second language message.
Wherein the sending module is further configured to:
sending the reply message in the second language to the user in a voice form; and/or
And sending the reply message in the second language to the user in a text form.
Wherein the sending module is further configured to:
generating the second language reply message in a voice form based on the second language reply message in a text form;
and sending the second language reply message in a voice form to the user.
According to a third aspect of the embodiments of the present disclosure, there is provided an interaction apparatus, including:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to implement the following steps when executing the executable instructions:
receiving a bilingual interaction instruction, and entering a bilingual interaction mode;
receiving a first voice message from a user, and determining a first language based on the first voice message;
generating a second language reply message based on the first voice message, the second language being different from the first language;
and sending the reply message in the second language to the user.
According to a fourth aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having instructions which, when executed by a processor of an apparatus, enable the apparatus to perform a method of interaction, the method comprising:
receiving a bilingual interaction instruction, and entering a bilingual interaction mode;
receiving a first voice message from a user, and determining a first language based on the first voice message;
generating a second language reply message based on the first voice message, the second language being different from the first language;
and sending the reply message in the second language to the user.
By adopting the method, the bilingual interaction instruction is received, the bilingual interaction mode is entered, then the first voice message from the user is received, the first language is determined, the second language reply message is generated based on the first voice message, and then the second language reply message is sent to the user. In this method, the second language is different from the first language, i.e., the language of the message received by the voice assistant is different from the language of the reply message sent. This is to enable the user to learn the second language by listening or viewing a response message of the second language even when the user does not have a good idea of the second language, that is, cannot ask a question in the second language. The user with the hearing learning requirement can set the reply language of the bilingual intelligent voice assistant as the target language which the user needs to learn, namely, the user can interact with equipment such as a mobile phone or a sound box carrying the voice assistant in daily life, and a vivid bilingual communication scene can be created for the user by utilizing the bilingual voice assistant, so that the user can be assisted in learning foreign languages.
By adopting the method, the user can learn the foreign language by the electronic equipment conveniently, quickly and at low cost.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
FIG. 1 is a flow chart illustrating an interaction method according to an exemplary embodiment.
FIG. 2 is a flow chart illustrating an interaction method according to an example embodiment.
FIG. 3 is a block diagram illustrating an interaction device, according to an example embodiment.
FIG. 4 is a block diagram illustrating an apparatus in accordance with an example embodiment.
FIG. 5 is a block diagram illustrating an apparatus in accordance with an example embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
Currently, users are increasingly using voice assistants on smart terminals. The speech assistant is typically in a monolingual mode, for example, the user invokes the speech assistant in Chinese and makes a request, and the speech assistant responds in Chinese.
However, worldwide, there are a large number of users who learn foreign languages. Since the foreign language level is limited, the users can only ask questions in the familiar language, and hope the voice assistant to answer in the foreign language, so as to improve the foreign language level. For example, since the hearing level is an indispensable ability in foreign language learning, the user wants to build a bilingual communication environment in daily life to exercise the hearing ability. This requirement is particularly acute for users in resource-poor regions.
The present disclosure provides an interaction method in which a bilingual interaction instruction is received, a bilingual interaction mode is entered, then a first voice message from a user is received and a first language is determined, a second language reply message is generated based on the first voice message, and then the second language reply message is sent to the user. In this method, the second language is different from the first language, i.e., the language of the message received by the voice assistant is different from the language of the reply message sent. This is to enable the user to learn the second language by listening or viewing a response message of the second language even when the user does not have a good idea of the second language, that is, cannot ask a question in the second language. The user with the hearing learning requirement can set the reply language of the bilingual intelligent voice assistant as the target language which the user needs to learn, namely, the user can interact with equipment such as a mobile phone or a sound box carrying the voice assistant in daily life, and a vivid bilingual communication scene can be created for the user by utilizing the bilingual voice assistant, so that the user can be assisted in learning foreign languages.
It should be noted that the above interaction method can be applied to various intelligent terminals, such as mobile phones, PADs, wearable devices; and can also be used for various multimedia devices, such as sound boxes, interactive learning devices and the like. These intelligent terminals or multimedia devices can interact with users through text or voice.
FIG. 1 is a flow chart illustrating an interaction method, as shown in FIG. 1, according to an exemplary embodiment, the method including the steps of:
step 101, receiving a bilingual interaction instruction, and entering a bilingual interaction mode;
step 102, receiving a first voice message from a user, and determining a first language based on the first voice message;
103, generating a reply message in a second language based on the first voice message, wherein the second language is different from the first language;
and 104, sending the reply message in the second language to the user.
The method is implemented on a mobile phone, for example. The user sends a first language message to the mobile phone to interact with the mobile phone.
In step 101, a bilingual interaction instruction from a user is received, and a bilingual interaction mode is entered. It should be noted that if no bilingual interactive instruction is received, the system operates in the bilingual interactive mode.
In step 102, after the user sends out the first voice message, for example, the user asks "how much the weather is today" and the mobile phone receives the first voice message. A first language is determined based on the language used for the first voice message.
In step 103, after receiving the first voice message, a second language reply message, i.e. an answer to the question, for example, "It is close", is generated based on the first voice message. Where the first language is different from the second language. This is because the user may need to learn the second language with the help of the cell phone. The second language level at the user is insufficient to interact with the handset using the second language. Thus, the second language can only be learned by saying or writing first a familiar first language and then by listening or looking at a reply message in the second language. Where the reply message is a dialogue-like reply to the first voice message.
In step 103, after the mobile phone generates the reply message in the second language, the message is sent to the user in a voice or text manner.
By adopting the method, the user can interact with the intelligent terminal or the multimedia equipment carrying the voice assistant in daily life, and can conveniently and quickly learn foreign languages with lower cost.
In an alternative embodiment, the method further comprises:
acquiring the setting information of the user about the second language;
determining the second language based on the setting information.
Here, acquiring the setting information of the user may be achieved in various ways. For example, setting information stored in a mobile phone by a user may be acquired; the method can receive information input by a user through voice or characters, and extract setting information from the information; the setting information can be acquired by sensing the visual content set by the user through the camera; the setting information may be obtained from a connected smart terminal (when the method is implemented on a smart speaker or the like). The setting information here determines the second language set by the user.
In an optional embodiment, the obtaining the setting information of the user about the second language includes:
and when the voice setting instruction of the user for the second language is determined to be received, acquiring the setting information of the second language based on the voice setting instruction.
It should be noted that, when receiving the voice setting instruction of the user for the second language, the user does not acquire the setting information stored in the mobile phone, but preferentially adopts the voice setting instruction sent by the user this time.
In an alternative embodiment, said generating a second language reply message based on said first voice message comprises:
generating a first language reply message based on the first voice message;
generating the second language reply message based on the first language reply message.
Upon generating a second language reply message based on the first voice message,
upon receiving a first voice message, a first language reply message is generated for the first voice message. For example, the first voice message is "how it is today's weather" and the first language reply message is "it is today's rain". The above-mentioned process of generating the first language reply message based on the first voice message may be generated by using a technique known to those skilled in the art, and will not be described herein again.
The first language reply message is then translated into a second language reply message using machine translation techniques. For example, a first language reply message is translated as "It will rain". The machine translation techniques herein employ techniques known to those skilled in the art and will not be described in detail herein.
In an alternative embodiment, said generating a second language reply message based on said first voice message comprises:
translating the first voice message to generate a second language message;
generating the second language reply message based on the second language message.
Upon receiving the first voice message, the first voice message is translated to a second language message using machine translation techniques. For example, the first voice message is "how the weather is today" and the second voice message is "What's the weather likeketoday". The machine translation techniques herein employ techniques known to those skilled in the art and will not be described in detail herein.
A second language reply message is then generated for the second language message based on the second language message. For example, the second language reply message is "It will rain" message. The above process of generating the second language reply message based on the second language message may be generated by using techniques known to those skilled in the art, and will not be described herein again.
As can be seen from the above two embodiments, when generating the reply message in the second language based on the first voice message, the reply message in the same language may be generated first and then translated, or the reply message in another language may be translated first and then generated. In this way, in the case of receiving a message in one language, a reply message in another language can be generated, thereby achieving the purpose of learning a foreign language for the user.
In an alternative embodiment, said sending said second language reply message to said user comprises:
sending the reply message in the second language to the user in a voice form; and/or
And sending the reply message in the second language to the user in a text form.
After the mobile phone generates the reply message in the second language, the reply message can be sent in a text form or a voice form. Of course, the corresponding text reply message may be displayed on the display screen at the same time as the voice reply message is sent. When the method is implemented on a device that is not provided with a display screen, such as a smart speaker, then the second language reply message is sent only in the form of speech.
In an alternative embodiment, said sending said second language reply message to said user in the form of speech comprises:
generating the second language reply message in a voice form based on the second language reply message in a text form;
and sending the second language reply message in a voice form to the user.
When the reply message in the second language in the voice form is sent to the user, the reply message in the voice form needs to be generated based on the reply message in the text form by using a voice synthesis technology. The speech synthesis techniques herein employ techniques known to those skilled in the art and will not be described in detail herein.
Specific embodiments according to the present disclosure are described below in conjunction with specific application scenarios. The method in this embodiment is implemented on a mobile phone, for example, where the first language is chinese and the second language is english. As shown in fig. 2, the method in this embodiment comprises the steps of:
It should be noted that, if the above method is implemented on a smart speaker without a display screen, the smart speaker outputs the response message only in the form of voice.
The present disclosure also provides an interaction apparatus, as shown in fig. 3, the apparatus including:
the mode setting module 301 is configured to enter a bilingual interaction mode after receiving a bilingual interaction instruction;
a receiving module 302 configured to receive a first voice message from a user, determine a first language based on the first voice message;
a generating module 303 configured to generate a reply message in a second language based on the first voice message, the second language being different from the first language;
a sending module 304 configured to send the reply message in the second language to the user.
In an alternative embodiment, the apparatus further comprises a second language determination module configured to:
acquiring the setting information of the user about the second language;
determining the second language based on the setting information.
In an alternative embodiment, the second language determination module is further configured to:
and when the voice setting instruction of the user for the second language is determined to be received, acquiring the setting information of the second language based on the voice setting instruction.
In an alternative embodiment, the generating module 303 is further configured to:
generating a first language reply message based on the first voice message;
generating the second language reply message based on the first language reply message.
In an alternative embodiment, the generating module 303 is further configured to:
translating the first voice message to generate a second language message;
generating the second language reply message based on the second language message.
In an alternative embodiment, the sending module 304 is further configured to:
sending the reply message in the second language to the user in a voice form; and/or
And sending the reply message in the second language to the user in a text form.
In an alternative embodiment, the sending module 304 is further configured to:
generating the second language reply message in a voice form based on the second language reply message in a text form;
and sending the second language reply message in a voice form to the user.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
By adopting the method, the bilingual interaction instruction is received, the bilingual interaction mode is entered, then the first voice message from the user is received, the first language is determined, the second language reply message is generated based on the first voice message, and then the second language reply message is sent to the user. In this method, the second language is different from the first language, i.e., the language of the message received by the voice assistant is different from the language of the reply message sent. This is to enable the user to learn the second language by listening or viewing a response message of the second language even when the user does not have a good idea of the second language, that is, cannot ask a question in the second language. The user with the hearing learning requirement can set the reply language of the bilingual intelligent voice assistant as the target language which the user needs to learn, namely, the user can interact with equipment such as a mobile phone or a sound box carrying the voice assistant in daily life, and a vivid bilingual communication scene can be created for the user by utilizing the bilingual voice assistant, so that the user can be assisted in learning foreign languages.
Fig. 4 is a block diagram illustrating an
Referring to fig. 4, the
The
The
The
The
The I/
The
The
In an exemplary embodiment, the
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the
A non-transitory computer readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of interaction, the method comprising: receiving a bilingual interaction instruction, and entering a bilingual interaction mode; receiving a first voice message from a user, and determining a first language based on the first voice message; generating a second language reply message based on the first voice message, the second language being different from the first language; and sending the reply message in the second language to the user.
Fig. 5 is a block diagram illustrating an
The
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:基于哈希词典的接处警文本物品名称提取方法和装置