Voice response method, device, readable storage medium and chip
By matching tone words in the voice automatic response system to generate a higher natural response voice, the problem of stiff response voice in the prior art is solved and the user experience is improved.
Patent Information
- Application Number
- CN202210709534.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2025-04-15
- Estimated Expiration
- 2042-06-21
AI Technical Summary
In the prior art, the replies of voice automatic responses are usually stiff and difficult to fit the actual emotional communication, resulting in poor user experience.
By receiving interactive voice information, the corresponding UGC text is determined. If the UGC text does not contain modal words, multiple high-frequency response texts are obtained, matched modal words to generate the target response text, and finally generate the response voice.
It realizes automatic response of interactive voice, improves the naturalness of the response voice, makes voice interaction more in line with actual emotional communication, and improves user experience.
Smart Images

Figure CN115273852B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a voice response method, device, readable storage medium and chip. Background Art
[0002] With the rapid development of communication technology, various mobile terminals (such as smart phones) have become the main communication tools for users to communicate with each other. However, when a user cannot answer a call for some reason (such as being in a meeting), the outside world loses information contact with the user, so voice automatic response is born.
[0003] In the related art, when a call comes in and the user is not convenient to answer, the answer text corresponding to the caller's interactive voice is obtained, and then the obtained answer text is converted into an answer voice through speech synthesis technology, and finally, the caller is automatically answered using the answer voice. However, the answers obtained through speech synthesis technology are usually stiff and deviate from people's actual emotional communication, resulting in poor user experience. Summary of the invention
[0004] In order to overcome the problems existing in the related art, the present disclosure provides a voice response method, device, readable storage medium and chip.
[0005] According to a first aspect of an embodiment of the present disclosure, there is provided a voice answering method, including:
[0006] In response to receiving the interactive voice information, determining a UGC text corresponding to the interactive voice information;
[0007] If the UGC text does not contain modal particles, a plurality of high-frequency response texts are obtained, wherein the high-frequency response texts contain modal particles;
[0008] According to the multiple high-frequency response texts, matching modal particles for the UGC text to obtain a target response text corresponding to the interactive voice information;
[0009] A response voice corresponding to the interactive voice information is generated according to the target response text.
[0010] Optionally, matching modal particles for the UGC text according to the multiple high-frequency response texts to obtain a target response text corresponding to the interactive voice information includes:
[0011] If there is a high-frequency response text among the multiple high-frequency response texts, the similarity between which and the UGC text is greater than the preset similarity threshold, then according to the target high-frequency response text, the modal particle is matched for the UGC text to obtain a target response text corresponding to the interactive voice information; wherein the target high-frequency response text is a high-frequency response text among the multiple high-frequency response texts, the similarity between which and the UGC text is greater than the preset similarity threshold.
[0012] Optionally, matching the UGC text with modal particles according to the target high-frequency response text to obtain a target response text corresponding to the interactive voice information includes:
[0013] Acquire the modal particle slot of the target high-frequency response text, wherein the modal particle slot includes words adjacent to the modal particle in the target high-frequency response text;
[0014] Extracting a target slot at a position corresponding to a target position from the UGC text, wherein the target position is the position of the modal particle slot in the target high-frequency response text;
[0015] According to the modal particle slot and the target slot, the modal particle is matched for the UGC text to obtain a target response text corresponding to the interactive voice information.
[0016] Optionally, the modal particle slot includes a sentence-initial modal particle slot and / or a sentence-final modal particle slot, wherein the sentence-initial modal particle slot is a word adjacent to the sentence-initial modal particle in the target high-frequency response text, and the sentence-final modal particle slot is a word adjacent to the sentence-final modal particle in the target high-frequency response text;
[0017] The target slot includes a target sentence-start slot and / or a target sentence-end slot, wherein the target sentence-start slot is the sentence-start word of the UGC text, and the target sentence-end slot is the sentence-end word of the UGC text. The position of the sentence-start word in the UGC text corresponds to the position of the sentence-start modal particle slot in the target high-frequency response text, and the position of the sentence-end word in the UGC text corresponds to the position of the sentence-end modal particle slot in the target high-frequency response text.
[0018] Optionally, the modal particle slots include a sentence-initial modal particle slot and a sentence-final modal particle slot, and the target slots include a target sentence-initial slot and a target sentence-final slot;
[0019] The matching of the modal particle for the UGC text according to the modal particle slot and the target slot to obtain a target response text corresponding to the interactive voice information includes:
[0020] If the sentence-initial modal particle slot is the same as the target sentence-initial slot, then the modal particle adjacent to the sentence-initial modal particle slot in the target high-frequency response text is added before the target sentence-initial slot; if the sentence-final modal particle slot is the same as the target sentence-final slot, then the modal particle adjacent to the sentence-final modal particle slot in the target high-frequency response text is added after the target sentence-final slot to obtain the target response text;
[0021] If the sentence-initial modal particle slot is different from the target sentence-initial slot, and the sentence-final modal particle slot is different from the target sentence-final slot, the UGC text is determined as the target response text.
[0022] Optionally, the matching modal particles for the UGC text according to the multiple high-frequency response texts to obtain a target response text corresponding to the interactive voice information further includes:
[0023] If there is no high-frequency response text among the multiple high-frequency response texts whose similarity with the UGC text is greater than the preset similarity threshold, determining the target sentence pattern of the UGC text;
[0024] Determining a target modal particle matching rule corresponding to the target sentence pattern according to a pre-established correspondence relationship between the sentence pattern and the modal particle matching rule;
[0025] According to the target modal particle matching rule, the modal particles are matched for the UGC text to obtain a target response text corresponding to the interactive voice information.
[0026] Optionally, the target modal particle matching rule includes: a plurality of first preset sentence-initial modal particles corresponding to the target sentence pattern, punctuation marks matching each of the first preset sentence-initial modal particles, a second preset sentence-initial modal particle, a preset sentence-final modal particle and a preset sentence-final punctuation marks corresponding to the target sentence pattern;
[0027] The step of matching the modal particles for the UGC text according to the target modal particle matching rule to obtain a target response text corresponding to the interactive voice information includes:
[0028] If the plurality of first preset sentence-initial modal particles include the sentence-initial word of the UGC text, then adding a punctuation mark matching the sentence-initial word after the sentence-initial word in the UGC text to obtain an intermediate response text;
[0029] If the plurality of first preset sentence-initial modal particles do not include the sentence-initial word of the UGC text, then adding the second preset sentence-initial modal particle before the sentence-initial word in the UGC text to obtain an intermediate response text;
[0030] The preset sentence-ending modal particle and the preset sentence-ending punctuation mark are sequentially added to the end of the intermediate response text to obtain a target response text corresponding to the interactive voice information.
[0031] Optionally, generating a response voice corresponding to the interactive voice information according to the target response text includes:
[0032] Performing erhua sound processing on the target response text;
[0033] The target response text obtained after the erhua sound processing is subjected to speech synthesis to obtain a response speech corresponding to the interactive voice information.
[0034] Optionally, the method further comprises:
[0035] If the UGC text contains modal particles, a response voice corresponding to the interactive voice information is generated according to the UGC text.
[0036] According to a second aspect of an embodiment of the present disclosure, there is provided a voice response device, including:
[0037] A determination module, configured to determine, in response to receiving the interactive voice information, a UGC text corresponding to the interactive voice information;
[0038] an acquisition module, configured to acquire a plurality of high-frequency response texts if the UGC text does not contain modal particles, wherein the high-frequency response texts contain modal particles;
[0039] An interjection matching module is configured to match interjections for the UGC text according to the multiple high-frequency response texts to obtain a target response text corresponding to the interactive voice information;
[0040] The first generating module is used to generate a response voice corresponding to the interactive voice information according to the target response text.
[0041] According to a third aspect of an embodiment of the present disclosure, there is provided a voice response device, including:
[0042] processor;
[0043] a memory for storing processor-executable instructions;
[0044] Wherein, the processor is configured to:
[0045] Execute the steps of the voice response method provided in the first aspect of the present disclosure.
[0046] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the voice response method provided in the first aspect of the present disclosure are implemented.
[0047] According to a fifth aspect of an embodiment of the present disclosure, a chip is provided, comprising a processor and an interface; the processor is used to read instructions to execute the voice response method provided in the first aspect of the present disclosure.
[0048] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when receiving interactive voice information, first determine the UGC text corresponding to the interactive voice information; if the UGC text does not contain modal particles, then match the modal particles for the UGC text based on multiple high-frequency response texts containing modal particles to obtain a target response text corresponding to the interactive voice information; then, generate a response voice corresponding to the interactive voice information based on the target response text. In this way, automatic response to interactive voice can be achieved, without the need for the user to record the response voice to automatically respond to the caller, thus avoiding many inconveniences caused by recording the response voice. In addition, when the UGC text does not contain modal particles, modal particles are automatically matched for it to improve the naturalness of the response voice, so that the emotional factors carried by the UGC text can be output through the response voice, thereby making the voice interaction more natural, being able to fit the actual emotional communication to the greatest extent, and improving the user experience.
[0049] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0051] Figure 1 The figure is a flow chart of a voice response method according to an exemplary embodiment.
[0052] Figure 2 It is a flowchart showing a method for matching modal particles for UGC text according to multiple high-frequency response texts according to an exemplary embodiment.
[0053] Figure 3 The present invention is a flow chart of a voice answering method according to another exemplary embodiment.
[0054] Figure 4 The figure is a block diagram of a voice response device according to an exemplary embodiment.
[0055] Figure 5The figure is a block diagram of a voice response device according to an exemplary embodiment. DETAILED DESCRIPTION
[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same 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 disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0057] It should be noted that all actions of acquiring signals, information or data in this application are carried out in compliance with the relevant data protection laws and policies of the country where they are located, and with the authorization given by the owner of the corresponding device.
[0058] Figure 1 is a flow chart of a voice response method according to an exemplary embodiment, wherein the method can be applied in a terminal, such as Figure 1 As shown, the method may include the following S101 to S104.
[0059] In S101, in response to receiving interactive voice information, a UGC text corresponding to the interactive voice information is determined.
[0060] In the present disclosure, user generated content (UGC) text refers to text customized by a user for responding to corresponding interactive voice information.
[0061] After receiving the interactive voice information from the caller, the terminal can perform voice recognition on the interactive voice information; then, based on the pre-established correspondence between the interactive text and the UGC text, determine the UGC text corresponding to the voice recognition result of the received interactive voice information, that is, the UGC text corresponding to the interactive voice information.
[0062] In S102, if the UGC text does not contain modal particles, a plurality of high-frequency response texts are obtained.
[0063] In the present disclosure, the high-frequency response texts include modal particles, wherein the above-mentioned multiple high-frequency response texts may be pre-acquired and stored in a corresponding storage module, so that the above-mentioned multiple high-frequency response texts may be acquired by accessing the storage module.
[0064] Among them, the above-mentioned multiple high-frequency response texts can be obtained in the following ways: First, collect UGC response texts, and then, through data analysis, count multiple high-frequency candidate texts; finally, reasonably add modal particles to each high-frequency candidate text manually to obtain the above-mentioned multiple high-frequency response texts. In addition, in addition to adding modal particles, punctuation marks matching the modal particles can also be added after the modal particles (for example, "……" indicates a pause, and "?" indicates a question). Usually, modal particles are added at the beginning and end of the high-frequency candidate text.
[0065] Exemplarily, the high-frequency candidate text is "It's not convenient now. You can put the express delivery in the receiving and sending room". Modal particles "that" and "please" are added at the beginning and end respectively, and the punctuation mark "……" matching the modal particle "that" is added to obtain the high-frequency response text "That……It's not convenient now. You can put the express delivery in the receiving and sending room, please".
[0066] Another exemplarily, the high-frequency candidate text is: "It's not convenient now. You can put the express delivery in the receiving and sending room". Modal particles "um" and "right" are added at the beginning and end respectively, and the punctuation mark "……" matching the modal particle "um" and the punctuation mark "?" matching the modal particle "right" are added to obtain the high-frequency response text "{Um……Do you have something to do?".
[0067] In S103, according to the multiple high-frequency response texts, match modal particles for the UGC text to obtain the target response text corresponding to the interactive voice information.
[0068] In S104, according to the target response text, generate the response voice corresponding to the interactive voice information.
[0069] The technical solution provided by the embodiment of the present disclosure may include the following beneficial effects: When receiving the interactive voice information, first determine the UGC text corresponding to the interactive voice information; if the UGC text does not contain modal particles, then according to multiple high-frequency response texts containing modal particles, match modal particles for the UGC text to obtain the target response text corresponding to the interactive voice information; then, according to the target response text, generate the response voice corresponding to the interactive voice information. In this way, automatic response of interactive voice can be realized, without the need for the user to record the response voice by himself to automatically respond to the caller, avoiding many inconveniences brought by recording the response voice. In addition, when the UGC text does not contain modal particles, match modal particles for it automatically to improve the naturalness of the response voice, so that the emotional factors carried by the UGC text can be output through the response voice. Therefore, the voice interaction can be made more natural, can fit the actual emotional communication to the greatest extent, and improves the user experience.
[0070] The following is a detailed description of the specific implementation method of matching modal particles for UGC texts according to multiple high-frequency response texts in S103 to obtain a target response text corresponding to the interactive voice information. Figure 2 It is implemented by S1031 to S1035 shown in FIG.
[0071] In S1031, it is determined whether there is a high-frequency response text among the multiple high-frequency response texts whose similarity with the UGC text is greater than a preset similarity threshold.
[0072] In the present disclosure, if there is a high-frequency response text among multiple high-frequency response texts whose similarity with the UGC text is greater than a preset similarity threshold (for example, 90%), the following S1032 is executed; if there is no high-frequency response text among multiple high-frequency response texts whose similarity with the UGC text is greater than the preset similarity threshold, the following S1033 to S1035 are executed.
[0073] In S1032, according to the target high-frequency response text, the modal particles are matched for the UGC text to obtain the target response text corresponding to the interactive voice information.
[0074] In the present disclosure, the target high-frequency response text is a high-frequency response text among multiple high-frequency response texts, the similarity between which and the UGC text is greater than the preset similarity threshold. In addition, the text similarity between the above multiple high-frequency response texts is less than the above preset similarity threshold. Therefore, if there is a high-frequency response text among the multiple high-frequency response texts whose similarity with the UGC text is greater than the preset similarity threshold, then there is a high-frequency response text among the multiple high-frequency response texts whose similarity with the UGC text is greater than the preset similarity threshold, that is, the number of target high-frequency response texts is one.
[0075] In S1033, the target sentence pattern of the UGC text is determined.
[0076] Specifically, the UGC text can be input into the sentence pattern recognition model to obtain the target sentence pattern of the UGC text.
[0077] In S1034, a target modal particle matching rule corresponding to the target sentence pattern is determined according to the pre-established correspondence between the sentence pattern and the modal particle matching rule.
[0078] In the present disclosure, the target modal particle matching rules may include: multiple first preset sentence-initial modal particles corresponding to the target sentence pattern, punctuation matching each first preset sentence-initial modal particle, second preset sentence-initial modal particles, preset sentence-ending modal particles and preset sentence-ending punctuation corresponding to the target sentence pattern.
[0079] In S1035, according to the target modal particle matching rule, the modal particles are matched for the UGC text to obtain the target response text corresponding to the interactive voice information.
[0080] The following is a detailed description of the specific implementation method of matching modal particles for UGC text according to the target high-frequency response text in the above S1032 to obtain the target response text corresponding to the interactive voice information. Specifically, it can be achieved by the following steps (1) to (3):
[0081] (1) Obtain the modal particle slots of the target high-frequency response text.
[0082] In the present disclosure, the modal particle slot includes words adjacent to the modal particle in the target high-frequency response text, wherein the modal particle in the target high-frequency response text is usually located at the beginning and end of a sentence. In addition, the modal particle slots of the above-mentioned multiple high-frequency response texts can be marked in advance, so that the modal particle slots of the target high-frequency response text can be obtained according to the modal particle slot marking information corresponding to the target high-frequency response text.
[0083] In one embodiment, the target high-frequency response text includes sentence-initial modal particles but does not include sentence-final modal particles. In this case, the modal particle slot includes a sentence-initial modal particle slot, wherein the sentence-initial modal particle slot is a word adjacent to the sentence-initial modal particle in the target high-frequency response text.
[0084] In another embodiment, the target high-frequency response text includes sentence-end modal particles but does not include sentence-initial modal particles. In this case, the modal particle slot includes a sentence-end modal particle slot, wherein the sentence-end modal particle slot is a word adjacent to the sentence-end modal particle in the target high-frequency response text.
[0085] In another embodiment, the target high-frequency response text includes both sentence-initial modal particles and sentence-final modal particles. In this case, the modal particle slots include sentence-initial modal particle slots and sentence-final modal particle slots.
[0086] For example, the modal particle slots of the target high-frequency response text "Well... it's not very convenient now, you can put the express in the mail room" include: the sentence-initial modal particle slot "now" and the sentence-final modal particle slot "mail room".
[0087] (2) Extract the target slot corresponding to the target position from the UGC text.
[0088] In the present disclosure, the target position is the position of the modal particle slot in the target high-frequency response text.
[0089] In one embodiment, the modal particle slot includes a sentence-initial modal particle slot. In this case, the target position is the beginning of the sentence, and the target slot at the position corresponding to the target position in the UGC text is the sentence-initial word of the UGC text, that is, the target sentence-initial slot, wherein the position of the sentence-initial word in the UGC text corresponds to the position of the above-mentioned sentence-initial modal particle slot in the target high-frequency response text.
[0090] In another embodiment, the modal particle slot includes a sentence-end modal particle slot. In this case, the target position is the end of the sentence, and the target slot at the position corresponding to the target position in the UGC text is the sentence-end word of the UGC text, that is, the target sentence-end slot, wherein the position of the sentence-end word in the UGC text corresponds to the position of the sentence-end modal particle slot in the target high-frequency response text.
[0091] In another embodiment, the modal particle slot includes a sentence-initial modal particle slot and a sentence-final modal particle slot. In this case, the target position includes the sentence-initial and sentence-final. The target slot at the position corresponding to the target position in the UGC text includes the sentence-initial word of the UGC text (i.e., the target sentence-initial slot) and the sentence-final word of the UGC text (i.e., the target sentence-final slot).
[0092] For example, the modal particle slots of the target high-frequency response text "Well... it's not very convenient now, please put the express in the mail room" include: the sentence-initial modal particle slot "now" and the sentence-final modal particle slot "mail room", and the target position includes the sentence-initial and sentence-final. The target slots corresponding to the target position extracted from the UGC text "It's not very convenient now, please put the express in the mail room" include: the target sentence-initial slot "now" and the target sentence-final slot "mail room".
[0093] (3) According to the modal particle slot and the target slot, the modal particle is matched for the UGC text to obtain the target response text corresponding to the interactive voice information.
[0094] In one embodiment, the modal particle slot includes a sentence-initial modal particle slot, and the target slot includes a target sentence-initial slot. At this time, the modal particles can be matched for the UGC text in the following manner to obtain a target response text corresponding to the interactive voice information: if the sentence-initial modal particle slot is the same as the target sentence-initial slot, the modal particles in the target high-frequency response text that are adjacent to the sentence-initial modal particle slot are added before the target sentence-initial slot to obtain the target response text; if the sentence-initial modal particle slot is different from the target sentence-initial slot, the UGC text is determined as the target response text.
[0095] In another embodiment, the modal particle slot includes a sentence-end modal particle slot, and the target slot includes a target sentence-end slot. At this time, the modal particles can be matched for the UGC text in the following manner to obtain a target response text corresponding to the interactive voice information: if the sentence-end modal particle slot is the same as the target sentence-end slot, the modal particles in the target high-frequency response text that are adjacent to the sentence-end modal particle slot are added after the target sentence-end slot to obtain the target response text; if the sentence-end modal particle slot is different from the target sentence-end slot, the UGC text is determined as the target response text.
[0096] In another embodiment, the modal particle slots include a sentence-initial modal particle slot and a sentence-final modal particle slot, and the target slots include a target sentence-initial slot and a target sentence-final slot. At this time, the modal particles can be matched for the UGC text in the following manner to obtain a target response text corresponding to the interactive voice information: if the sentence-initial modal particle slot is the same as the target sentence-initial slot, then the modal particles adjacent to the sentence-initial modal particle slot in the target high-frequency response text are added before the target sentence-initial slot; if the sentence-final modal particle slot is the same as the target sentence-final slot, then the modal particles adjacent to the sentence-final modal particle slot in the target high-frequency response text are added after the target sentence-final slot to obtain the target response text; if the sentence-initial modal particle slot is different from the target sentence-initial slot, and the sentence-final modal particle slot is different from the target sentence-final slot, then the UGC text is determined as the target response text.
[0097] The following describes in detail the specific implementation method of matching modal particles for UGC text according to the target modal particle matching rule in the above S1035 to obtain the target response text corresponding to the interactive voice information.
[0098] Specifically, this can be achieved by following the steps 1) to 4):
[0099] 1) Determine whether the first plurality of preset sentence-initial modal particles include the sentence-initial word of the UGC text.
[0100] In the present disclosure, if the multiple first preset sentence-initial modal particles include the sentence-initial word of the UGC text, the following steps 2) and 4) are executed; if the multiple first preset sentence-initial modal particles do not include the sentence-initial word of the UGC text, the following steps 3) and 4) are executed.
[0101] 2) Add punctuation matching the first word of the sentence after the first word of the sentence in the UGC text to obtain the intermediate response text.
[0102] 3) Add a second preset sentence-initial modal particle before the sentence-initial word in the UGC text to obtain an intermediate response text;
[0103] 4) Adding a preset sentence-ending modal particle and a preset sentence-ending punctuation mark to the end of the intermediate response text in sequence to obtain a target response text corresponding to the interactive voice information.
[0104] Exemplarily, the multiple first preset sentence-initial tone words include: "this", "that", "um", "ah". Among them, the punctuation marks matching "this", "that", and "um" are all "……", and the punctuation marks matching "ah" are all "!"; the second preset sentence-initial tone word corresponding to an interrogative sentence is "um", the preset sentence-final tone word corresponding to an interrogative sentence is "ma", and the preset sentence-final punctuation mark corresponding to an interrogative sentence is "?"; the second preset sentence-initial tone word corresponding to an exclamatory sentence is "ah", the preset sentence-final tone word corresponding to an exclamatory sentence is "la", and the preset sentence-final punctuation mark corresponding to an exclamatory sentence is "!".
[0105] For example, for the UGC text "um, may I ask if you are Xiaoai", which is an interrogative sentence. It can be seen that the sentence-initial word "um" of the UGC text is included in the multiple first preset sentence-initial tone words mentioned above. Therefore, the punctuation mark "……" matching the sentence-initial word "um" is added after the sentence-initial word "um" in the UGC text "um, may I ask if you are Xiaoai" to obtain the intermediate response text "um……, may I ask if you are Xiaoai". Then, the preset sentence-final tone word "ma" and the preset sentence-final punctuation mark "?" corresponding to the interrogative sentence are sequentially added to the end of the intermediate response text "um……, may I ask if you are Xiaoai" to obtain the target response text corresponding to the interactive voice message "um……, may I ask if you are Xiaoai?".
[0106] For example, for the UGC text "scared me to death", which is an exclamatory sentence. It can be seen that the sentence-initial word "scared" of the UGC text is not included in the multiple first preset sentence-initial tone words mentioned above. Therefore, the second preset sentence-initial tone word "ah" corresponding to the exclamatory sentence is added before the sentence-initial word "scared" in the UGC text "scared me to death" to obtain the intermediate response text "ah scared me to death". Then, the preset sentence-final tone word "la" and the preset sentence-final punctuation mark "!" corresponding to the exclamatory sentence are sequentially added to the end of the intermediate response text "ah scared me to death" to obtain the target response text corresponding to the interactive voice message "ah scared me to death!".
[0107] Next, a detailed description will be given of the specific implementation manner of generating a response voice corresponding to the interactive voice message according to the target response text in the above S103. Specifically, it can be implemented through multiple implementation manners.
[0108] In one implementation manner, voice synthesis is performed on the target response text to obtain a response voice corresponding to the interactive voice message.
[0109] In another implementation manner, in order to further improve the naturalness of the response voice and make the voice interaction more natural, the target response text can be processed for rhotacization first; then, voice synthesis is performed on the target response text obtained after rhotacization processing to obtain a response voice corresponding to the interactive voice message.
[0110] Figure 3 FIG. 1 is a flow chart of a voice response method according to another exemplary embodiment. Figure 3 As shown, the above method may further include the following S105.
[0111] In S105, if the UGC text contains modal particles, a response voice corresponding to the interactive voice information is generated according to the UGC text.
[0112] In one implementation, speech synthesis is performed on the UGC text to obtain a response speech corresponding to the interactive voice information.
[0113] In another embodiment, in order to further improve the naturalness of the response voice and make the voice interaction more natural, the UGC text can be first processed with erhua sounds; then, the UGC text obtained after the erhua sound processing is subjected to speech synthesis to obtain a response voice corresponding to the interactive voice information.
[0114] Figure 4 FIG. 1 is a block diagram of a voice response device according to an exemplary embodiment. Figure 4 As shown, the device 400 includes:
[0115] The determination module 401 is configured to determine the UGC text corresponding to the interactive voice information in response to receiving the interactive voice information;
[0116] The acquisition module 402 is configured to acquire a plurality of high-frequency response texts if the UGC text does not contain modal particles, wherein the high-frequency response texts contain modal particles;
[0117] The modal particle matching module 403 is configured to match modal particles for the UGC text according to the multiple high-frequency response texts to obtain a target response text corresponding to the interactive voice information;
[0118] The first generating module 404 is used to generate a response voice corresponding to the interactive voice information according to the target response text.
[0119] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when receiving interactive voice information, first determine the UGC text corresponding to the interactive voice information; if the UGC text does not contain modal particles, then match the modal particles for the UGC text based on multiple high-frequency response texts containing modal particles to obtain a target response text corresponding to the interactive voice information; then, generate a response voice corresponding to the interactive voice information based on the target response text. In this way, automatic response to interactive voice can be achieved, without the need for the user to record the response voice to automatically respond to the caller, thus avoiding many inconveniences caused by recording the response voice. In addition, when the UGC text does not contain modal particles, modal particles are automatically matched for it to improve the naturalness of the response voice, so that the emotional factors carried by the UGC text can be output through the response voice, thereby making the voice interaction more natural, being able to fit the actual emotional communication to the greatest extent, and improving the user experience.
[0120] Optionally, the modal particle matching module 403 includes:
[0121] The first matching submodule is configured to match modal particles for the UGC text according to a target high-frequency response text to obtain a target response text corresponding to the interactive voice information if there is a high-frequency response text among the multiple high-frequency response texts and the similarity between the text and the UGC text is greater than a preset similarity threshold; wherein the target high-frequency response text is a high-frequency response text among the multiple high-frequency response texts and the similarity between the text and the UGC text is greater than the preset similarity threshold.
[0122] Optionally, the first matching submodule includes:
[0123] An acquisition submodule is configured to acquire a modal particle slot of a target high-frequency response text, wherein the modal particle slot includes words adjacent to the modal particle in the target high-frequency response text;
[0124] An extraction submodule is configured to extract a target slot at a position corresponding to a target position from the UGC text, wherein the target position is a position of the modal particle slot in the target high-frequency response text;
[0125] The second matching submodule is configured to match the modal particle for the UGC text according to the modal particle slot and the target slot to obtain a target response text corresponding to the interactive voice information.
[0126] Optionally, the modal particle slot includes a sentence-initial modal particle slot and / or a sentence-final modal particle slot, wherein the sentence-initial modal particle slot is a word adjacent to the sentence-initial modal particle in the target high-frequency response text, and the sentence-final modal particle slot is a word adjacent to the sentence-final modal particle in the target high-frequency response text;
[0127] The target slot includes a target sentence-start slot and / or a target sentence-end slot, wherein the target sentence-start slot is the sentence-start word of the UGC text, and the target sentence-end slot is the sentence-end word of the UGC text. The position of the sentence-start word in the UGC text corresponds to the position of the sentence-start modal particle slot in the target high-frequency response text, and the position of the sentence-end word in the UGC text corresponds to the position of the sentence-end modal particle slot in the target high-frequency response text.
[0128] Optionally, the modal particle slots include a sentence-initial modal particle slot and a sentence-final modal particle slot, and the target slots include a target sentence-initial slot and a target sentence-final slot;
[0129] The second matching submodule is configured as follows:
[0130] If the sentence-initial modal particle slot is the same as the target sentence-initial modal particle slot, then the modal particle adjacent to the sentence-initial modal particle slot in the target high-frequency response text is added before the target sentence-initial slot; if the sentence-final modal particle slot is the same as the target sentence-final slot, then the modal particle adjacent to the sentence-final modal particle slot in the target high-frequency response text is added after the target sentence-final slot to obtain the target response text;
[0131] If the sentence-initial modal particle slot is different from the target sentence-initial slot, and the sentence-final modal particle slot is different from the target sentence-final slot, the UGC text is determined as the target response text.
[0132] Optionally, the modal particle matching module 403 further includes:
[0133] A first determination submodule is configured to determine a target sentence pattern of the UGC text if there is no high-frequency response text among the plurality of high-frequency response texts whose similarity with the UGC text is greater than the preset similarity threshold;
[0134] A second determination submodule is configured to determine a target modal particle matching rule corresponding to the target sentence pattern according to a pre-established correspondence relationship between the sentence pattern and the modal particle matching rule;
[0135] The third matching submodule is configured to match modal particles for the UGC text according to the target modal particle matching rule to obtain a target response text corresponding to the interactive voice information.
[0136] Optionally, the target modal particle matching rule includes: a plurality of first preset sentence-initial modal particles corresponding to the target sentence pattern, punctuation marks matching each of the first preset sentence-initial modal particles, a second preset sentence-initial modal particle, a preset sentence-final modal particle and a preset sentence-final punctuation marks corresponding to the target sentence pattern;
[0137] The third matching submodule comprises:
[0138] A first adding submodule is configured to add a punctuation matching the sentence-starting word after the sentence-starting word in the UGC text if the plurality of first preset sentence-starting modal particles include the sentence-starting word of the UGC text, so as to obtain an intermediate response text;
[0139] A second adding submodule is configured to add the second preset sentence-initial modal particle before the sentence-initial word in the UGC text to obtain an intermediate response text if the plurality of first preset sentence-initial modal particles do not include the sentence-initial word of the UGC text;
[0140] The third adding submodule is configured to add the preset sentence-ending modal particle and the preset sentence-ending punctuation mark in sequence to the end of the intermediate response text to obtain a target response text corresponding to the interactive voice information.
[0141] Optionally, the first generating module 404 includes:
[0142] An erhua tone processing submodule is configured to perform erhua tone processing on the target response text;
[0143] The speech synthesis submodule is configured to perform speech synthesis on the target response text obtained after the erhua sound processing to obtain a response speech corresponding to the interactive voice information.
[0144] Optionally, the device 400 further includes:
[0145] The second generating module is configured to generate a response voice corresponding to the interactive voice information according to the UGC text if the UGC text contains an interjection.
[0146] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0147] The present disclosure also provides a computer-readable storage medium having computer program instructions stored thereon, which implement the steps of the voice response method provided by the present disclosure when the program instructions are executed by a processor.
[0148] Figure 5 8 is a block diagram of a voice response device 800 according to an exemplary embodiment. For example, the device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0149] Reference Figure 5, the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .
[0150] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned voice response method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0151] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0152] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0153] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0154] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0155] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0156] The sensor assembly 814 includes one or more sensors for providing various aspects of the status assessment of the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0157] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0158] In an exemplary embodiment, the device 800 can be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above-mentioned voice response method.
[0159] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above-mentioned voice response method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0160] In addition to being an independent electronic device, the above-mentioned device can also be a part of an independent electronic device. For example, in one embodiment, the device can be an integrated circuit (IC) or a chip, wherein the integrated circuit can be an IC or a collection of multiple ICs; the chip can include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC, system on chip or system-level chip), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned voice response method. The executable instructions can be stored in the integrated circuit or chip, or can be obtained from other devices or equipment, such as the integrated circuit or chip includes a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned voice response method is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned voice response method.
[0161] In another exemplary embodiment, a computer program product is also provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned voice response method when executed by the programmable device.
[0162] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary technical means in the art that are not disclosed in the present disclosure. The specification and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0163] It should be understood that the present disclosure is not limited to the exact structures that have been 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 present disclosure is limited only by the appended claims.
Claims
1. A voice response method, characterized in that: include: In response to receiving interactive voice information from a caller, determining a UGC text corresponding to the interactive voice information; If the UGC text does not contain modal particles, a plurality of high-frequency response texts are obtained, wherein the high-frequency response texts contain modal particles; According to the multiple high-frequency response texts, matching modal particles for the UGC text to obtain a target response text corresponding to the interactive voice information; Generate a response voice corresponding to the interactive voice information according to the target response text, wherein the response voice is used to answer the caller; The step of matching modal particles for the UGC text according to the multiple high-frequency response texts to obtain a target response text corresponding to the interactive voice information includes: If there is a high-frequency response text among the multiple high-frequency response texts whose similarity with the UGC text is greater than a preset similarity threshold, then the modal particle slot of the target high-frequency response text is obtained, wherein the modal particle slot includes words adjacent to the modal particle in the target high-frequency response text; wherein the target high-frequency response text is a high-frequency response text among the multiple high-frequency response texts whose similarity with the UGC text is greater than the preset similarity threshold; Extracting a target slot at a position corresponding to a target position from the UGC text, wherein the target position is the position of the modal particle slot in the target high-frequency response text; According to the modal particle slot and the target slot, the modal particle is matched for the UGC text to obtain a target response text corresponding to the interactive voice information.
2. The method according to claim 1, characterized in that The modal particle slot includes a sentence-initial modal particle slot and / or a sentence-final modal particle slot, wherein the sentence-initial modal particle slot is a word adjacent to the sentence-initial modal particle in the target high-frequency response text, and the sentence-final modal particle slot is a word adjacent to the sentence-final modal particle in the target high-frequency response text; The target slot includes a target sentence-start slot and / or a target sentence-end slot, wherein the target sentence-start slot is the sentence-start word of the UGC text, and the target sentence-end slot is the sentence-end word of the UGC text. The position of the sentence-start word in the UGC text corresponds to the position of the sentence-start modal particle slot in the target high-frequency response text, and the position of the sentence-end word in the UGC text corresponds to the position of the sentence-end modal particle slot in the target high-frequency response text.
3. The method according to claim 2, characterized in that The modal particle slots include a sentence-initial modal particle slot and a sentence-final modal particle slot, and the target slots include a target sentence-initial slot and a target sentence-final slot; The matching of the modal particle for the UGC text according to the modal particle slot and the target slot to obtain a target response text corresponding to the interactive voice information includes: If the sentence-initial modal particle slot is the same as the target sentence-initial modal particle slot, then the modal particle adjacent to the sentence-initial modal particle slot in the target high-frequency response text is added before the target sentence-initial slot; if the sentence-final modal particle slot is the same as the target sentence-final slot, then the modal particle adjacent to the sentence-final modal particle slot in the target high-frequency response text is added after the target sentence-final slot to obtain the target response text; If the sentence-initial modal particle slot is different from the target sentence-initial slot, and the sentence-final modal particle slot is different from the target sentence-final slot, the UGC text is determined as the target response text.
4. The method according to claim 1, characterized in that: The step of matching modal particles for the UGC text according to the plurality of high-frequency response texts to obtain a target response text corresponding to the interactive voice information further includes: If there is no high-frequency response text among the multiple high-frequency response texts whose similarity with the UGC text is greater than the preset similarity threshold, determining the target sentence pattern of the UGC text; Determining a target modal particle matching rule corresponding to the target sentence pattern according to a pre-established correspondence relationship between the sentence pattern and the modal particle matching rule; According to the target modal particle matching rule, the modal particles are matched for the UGC text to obtain a target response text corresponding to the interactive voice information.
5. The method according to claim 4, characterized in that The target modal particle matching rule includes: a plurality of first preset sentence-initial modal particles corresponding to the target sentence pattern, punctuation marks matching each of the first preset sentence-initial modal particles, a second preset sentence-initial modal particle, a preset sentence-final modal particle and a preset sentence-final punctuation marks corresponding to the target sentence pattern; The step of matching the modal particles for the UGC text according to the target modal particle matching rule to obtain a target response text corresponding to the interactive voice information includes: If the plurality of first preset sentence-initial modal particles include the sentence-initial word of the UGC text, then adding a punctuation mark matching the sentence-initial word after the sentence-initial word in the UGC text to obtain an intermediate response text; If the plurality of first preset sentence-initial modal particles do not include the sentence-initial word of the UGC text, then adding the second preset sentence-initial modal particle before the sentence-initial word in the UGC text to obtain an intermediate response text; The preset sentence-ending modal particle and the preset sentence-ending punctuation mark are sequentially added to the end of the intermediate response text to obtain a target response text corresponding to the interactive voice information.
6. The method according to any one of claims 1 to 5, characterized in that The step of generating a response voice corresponding to the interactive voice information according to the target response text includes: Performing erhua sound processing on the target response text; The target response text obtained after the erhua sound processing is subjected to speech synthesis to obtain a response speech corresponding to the interactive voice information.
7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: If the UGC text contains modal particles, a response voice corresponding to the interactive voice information is generated according to the UGC text.
8. A voice response device, characterized in that: include: A determination module, configured to determine, in response to receiving the interactive voice information of the caller, the UGC text corresponding to the interactive voice information; an acquisition module, configured to acquire a plurality of high-frequency response texts if the UGC text does not contain modal particles, wherein the high-frequency response texts contain modal particles; An interjection matching module is configured to match interjections for the UGC text according to the multiple high-frequency response texts to obtain a target response text corresponding to the interactive voice information; A first generating module, configured to generate a response voice corresponding to the interactive voice information according to the target response text, wherein the response voice is used to respond to the caller; Wherein, the modal particle matching module includes: The first matching submodule is configured to, if there is a high-frequency response text among the multiple high-frequency response texts whose similarity with the UGC text is greater than a preset similarity threshold, match the modal particle for the UGC text according to the target high-frequency response text to obtain a target response text corresponding to the interactive voice information; wherein the target high-frequency response text is a high-frequency response text among the multiple high-frequency response texts whose similarity with the UGC text is greater than the preset similarity threshold; Wherein, the first matching submodule includes: An acquisition submodule is configured to acquire a modal particle slot of a target high-frequency response text, wherein the modal particle slot includes words adjacent to the modal particle in the target high-frequency response text; An extraction submodule is configured to extract a target slot at a position corresponding to a target position from the UGC text, wherein the target position is a position of the modal particle slot in the target high-frequency response text; The second matching submodule is configured to match the modal particle for the UGC text according to the modal particle slot and the target slot to obtain a target response text corresponding to the interactive voice information.
9. A voice response device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to: Execute the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.
11. A chip, characterized in that: The method comprises a processor and an interface; the processor is used to read instructions to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Answer generation method and device for question-answering system
CN110516043A