Voice processing method and device, equipment and storage medium
By identifying and mentioning the name information in the voice data in the instant communication session, the problem of voice messages being unintuitive is solved, and the efficiency of information acquisition is improved, so that relevant users can pay attention to and view messages in a timely manner.
Patent Information
- Application Number
- CN202411857046.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-03-25
AI Technical Summary
In real-time communication scenarios, the information in the voice message is not intuitive enough, which causes the user to fail to pay attention to or ignore the voice message in time, thereby reducing the efficiency of information acquisition.
By obtaining the voice data sent by the first user in the instant communication session, and in response to the person name information contained in the voice data, the person name is sent in the form of a reference message to intuitively prompt the relevant user to view the message.
This method can improve the efficiency of users obtaining information, so that users corresponding to their names can pay attention to and view the information in voice data in time.
Smart Images

Figure CN119697144A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of speech processing technology, and in particular to a speech processing method, apparatus, device and storage medium. Background Art
[0002] In an instant messaging (IM) scenario, a user can transmit information by sending a voice message, and other users can obtain the information by playing the voice message.
[0003] However, the information included in the voice message is not intuitive enough, and the user related to the voice message may fail to pay attention to the voice message in time or even ignore the voice message, resulting in low efficiency in obtaining information. Summary of the invention
[0004] In view of this, the present application provides a voice processing method, apparatus, device and storage medium, which can prompt the user corresponding to the name contained in the voice data to check the message, thereby improving the efficiency of the user in obtaining information.
[0005] The technical solutions provided by this application are as follows:
[0006] In a first aspect, the present application provides a speech processing method, the method comprising:
[0007] In an instant messaging session, voice data sent by a first user is acquired; in response to information indicating a name contained in the voice data, the name is sent in the form of a mention message.
[0008] In one possible implementation, in response to the voice data containing information indicating a person's name, sending the person's name in the form of a mention message includes: performing voice recognition on the voice data to obtain first text data; in response to determining that the first text data includes a first person's name, determining at least one second person's name matching the first person's name from a set of names; determining a target person's name based on the at least one second person's name; and sending the target person's name in the form of a mention message.
[0009] In a possible implementation, the at least one second name is a plurality of second names, and determining the target name based on the at least one second name includes: determining priorities of the plurality of second names; and selecting the second name with the highest priority as the target name.
[0010] In one possible implementation, determining the priorities of the multiple second names includes: respectively determining user intimacy between the users corresponding to the multiple second names and the first user, the user intimacy being used to measure the degree of intimacy between users; and determining the priorities of the multiple second names based on the user intimacy.
[0011] In one possible implementation, determining the priority of the multiple second names based on the user intimacy includes: determining the user relevance between the user corresponding to the second name and the first user based on the historical interaction behavior between the user corresponding to the second name and the first user; and determining the priority of the multiple second names based on the user relevance and the user intimacy.
[0012] In a possible implementation manner, the method further includes: determining the set of names according to a session type to which the instant messaging session belongs.
[0013] In a possible implementation, determining the set of names according to the session type to which the instant messaging session belongs includes: determining participating users participating in the instant messaging session, the participating users including the first user and a second user other than the first user; and determining the set of names according to the participating users and the session type.
[0014] In a possible implementation, the session type is a one-to-one session, and determining the name set based on the participating users and the session type includes: determining a third user whose user intimacy with the participating users satisfies a first intimacy condition, the user intimacy being used to measure the degree of intimacy between users; and writing the names of the participating users and the third user into the name set.
[0015] In a possible implementation, the session type is a one-to-many session, and the name set is determined based on the participating users and the session type, including: determining a fourth user whose user intimacy with the first user satisfies a second intimacy condition; determining a fifth user who has a contact relationship with the second user; and writing the names of the participating users, the fourth user, and the fifth user into the name set.
[0016] In a possible implementation, the method further includes: determining a sixth user whose popularity value is greater than a popularity threshold; and writing the name of the sixth user into the name set.
[0017] In one possible implementation, determining at least one second name matching the first name from the name set includes: converting the first name into target pronunciation characters, wherein the target pronunciation characters are used to represent the pronunciation of the first name; and in the name set, taking a name having the same pronunciation characters as the target pronunciation characters as the second name.
[0018] In a possible implementation, the method further includes: in response to triggering the mention message, displaying information of the user corresponding to the name.
[0019] In a second aspect, the present application provides a speech processing device, characterized in that the device comprises:
[0020] An acquisition unit, used to acquire voice data sent by the first user in an instant messaging session;
[0021] The processing unit is configured to send the name in the form of a mention message in response to the voice data containing information indicating the name of the person.
[0022] In one possible implementation, the processing unit is specifically used to: perform speech recognition on the speech data to obtain first text data; in response to determining that the first text data includes a first name, determine at least one second name matching the first name from a set of names; determine a target name based on the at least one second name; and send the target name in the form of a mention message.
[0023] In a possible implementation, the at least one second name is multiple second names, and the processing unit is used to determine the target name based on the at least one second name, including: the processing unit is used to determine the priority of the multiple second names; and select the second name with the highest priority as the target name.
[0024] In one possible implementation, the processing unit is used to determine the priority of the multiple second names, including: the processing unit is used to respectively determine the user intimacy between the users corresponding to the multiple second names and the first user, the user intimacy is used to measure the degree of intimacy between users; determine the priority of the multiple second names according to the user intimacy.
[0025] In one possible implementation, the processing unit is used to determine the priority of the multiple second names based on the user intimacy, including: the processing unit is used to determine the user relevance between the user corresponding to the second name and the first user based on the historical interaction behavior between the user corresponding to the second name and the first user; determine the priority of the multiple second names based on the user relevance and the user intimacy.
[0026] In a possible implementation, the processing unit is further configured to determine the set of names according to a session type to which the instant messaging session belongs.
[0027] In a possible implementation, the processing unit is used to determine the set of names according to the session type to which the instant messaging session belongs, including: the processing unit is used to determine participating users participating in the instant messaging session, the participating users including the first user and a second user other than the first user; determining the set of names according to the participating users and the session type.
[0028] In a possible implementation, the conversation type is a one-to-one conversation, and the processing unit is used to determine the name set according to the participating users and the conversation type, including: the processing unit is used to determine a third user whose user intimacy with the participating users satisfies a first intimacy condition, and the user intimacy is used to measure the degree of intimacy between users; and write the name of the participating user and the name of the third user into the name set.
[0029] In a possible implementation, the session type is a one-to-many session, and the processing unit is used to determine the name set according to the participating users and the session type, including: the processing unit is used to determine a fourth user whose user intimacy with the first user meets a second intimacy condition; determine a fifth user who has a contact relationship with the second user; and write the names of the participating users, the fourth user, and the fifth user into the name set.
[0030] In a possible implementation, the processing unit is further used to: determine a sixth user whose popularity value is greater than a popularity threshold; and write the name of the sixth user into the name set.
[0031] In one possible implementation, the processing unit is used to determine at least one second name matching the first name from a set of names, including: the processing unit is used to convert the first name into target pronunciation characters, wherein the target pronunciation characters are used to represent the pronunciation of the first name; and in the set of names, a name whose pronunciation characters are the same as the target pronunciation characters is taken as the second name.
[0032] In a possible implementation, the device further includes: an information display unit, configured to display information of a user corresponding to the name in response to triggering the mention message.
[0033] In a third aspect, the present application provides an electronic device, including:
[0034] one or more processors;
[0035] a storage device having one or more programs stored thereon,
[0036] When the one or more programs are executed by the one or more processors, the one or more processors implement any method described in the first aspect.
[0037] In a fourth aspect, the present application provides a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, any method described in the first aspect is implemented.
[0038] In a fifth aspect, the present application provides a computer program product, which, when executed on a device, enables the device to execute the method described in the first aspect.
[0039] It can be seen that this application has the following beneficial effects:
[0040] The present application provides a voice processing method, apparatus, device and storage medium. In the method, in an instant messaging session, voice data sent by a first user is obtained. If it is determined that the voice data includes information indicating a person's name, the person's name is sent in the form of a mention message. In this way, in an instant messaging session, for voice data related to a person's name, the person's name can be sent in the form of a mention message, which can more intuitively prompt the user corresponding to the name to view the voice data, so that the user corresponding to the name can obtain information in a timely manner. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A page schematic diagram provided for an embodiment of the present application;
[0042] Figure 2A Another page schematic diagram provided for an embodiment of the present application;
[0043] Figure 2B Another page schematic diagram provided for an embodiment of the present application;
[0044] Figure 3 A flowchart of a speech processing method provided in an embodiment of the present application;
[0045] Figure 4 A schematic diagram of another page provided in an embodiment of the present application;
[0046] Figure 5 A schematic diagram of an interaction process provided in an embodiment of the present application;
[0047] Figure 6 Another interactive flow diagram provided for an embodiment of the present application;
[0048] Figure 7 A schematic diagram of the structure of a speech processing device provided in an embodiment of the present application;
[0049] Figure 8A schematic diagram of the basic structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0050] In order to facilitate the understanding and explanation of the technical solutions provided by the embodiments of the present application, the background technology of the present application will be described below.
[0051] In an instant messaging scenario, users can obtain information by sending and viewing messages. Messages can include text data or voice data. For example, in a group chat scenario, users can send messages including voice data. Other users can obtain information by listening to voice data. Compared with text data, the information included in voice data is not intuitive enough, and the operation cost of obtaining information from voice data is slightly higher. Other users need to process the voice data, such as playing or converting the voice data into text data, before they can obtain messages from the voice data. This causes other users to ignore the voice data. The information interaction efficiency between users is low. For example, multiple users communicate in a group chat. User A sends voice data. The voice data includes the name of user B. The voice data needs to be viewed by user B to obtain information. Other users cannot quickly determine that the message including voice data displayed on the group chat page is required for user B to view. User B may ignore the message, resulting in low efficiency for user B to obtain the message in the voice data.
[0052] Based on this, an embodiment of the present application provides a voice processing method. In an instant messaging session, voice data sent by a first user is obtained. If it is determined that the voice data includes information indicating a person's name, the name is sent in the form of a mention message. In this way, in an instant messaging session, for voice data related to a person's name, the name can be sent in the form of a mention message, which can more intuitively prompt the user corresponding to the name to view the voice data, so that the user corresponding to the name can obtain information in a timely manner.
[0053] In order to facilitate understanding of a speech processing method provided in an embodiment of the present application, Figure 1 , Figure 2A and Figure 2B As an example, a speech processing method provided in an embodiment of the present application is applied to a system including a client and a server. Figure 1 , Figure 2A and Figure 2B As shown, the figure is a scene diagram of an exemplary application scenario provided in an embodiment of the present application.
[0054] In an instant messaging application, user A, user B, and user C belong to the same group chat. Figure 1As shown, user A triggers the sending of voice data through the client in the group chat page, and chooses to convert the voice data into text data. The voice data sent by user A contains the name of user B. For example, the content of the voice data sent by user A is: I need to confirm with Xiaoming. Among them, "Xiaoming" is the name of user B. The client sends the voice data to the server. The server processes the voice data and determines that the voice data contains information indicating the name of user B. The server recognizes the name of user B "Xiaoming" and sends the name of user B to the client. The name of user B is displayed in the chat page in the form of a mention message. As an example, see Figure 2A As shown, the text data including the mention message is displayed. The mention message adopts the format of "@+name". The text data is obtained by performing speech recognition conversion on the voice data. As another example, see Figure 2B As shown, the mention message is displayed. In this way, user B can obtain the mention message, which reminds user B to check the voice data so as to obtain the information in time.
[0055] Figure 1 , Figure 2A and Figure 2B The schematic diagram shown is only an example in which the embodiments of the present application can be implemented. The scope of application of the embodiments of the present application is not limited in any aspect of this scenario.
[0056] In order to facilitate understanding of the technical solution provided by the embodiment of the present application, the speech processing method provided by the embodiment of the present application is described below with reference to the accompanying drawings.
[0057] See also Figure 3 As shown in FIG. 1 , the figure is a flow chart of a speech processing method provided in an embodiment of the present application, such as Figure 3 As shown, the method may include S301-S302:
[0058] S301: In an instant messaging session, voice data sent by a first user is obtained.
[0059] An instant messaging session is a conversation mode of online communication. In an instant messaging session, a first user can send voice data in real time via the Internet.
[0060] As an example, take the chat session scenario as an example, see Figure 1 As shown, the voice data is chat voice data generated by the first user through the chat page trigger.
[0061] S302: In response to the voice data containing information indicating a person's name, sending the person's name in the form of a mention message.
[0062] The voice data may include information indicating a person's name. The person's name included in the voice data may be the name of a user who needs to view the voice data.
[0063] If it is determined that the voice data includes information indicating a person's name, the person's name is determined and sent in the instant messaging session in the form of a mention message. In one possible implementation, the mention message and the voice data are sent.
[0064] Mention messages are displayed in the format of "@+name". Figure 2A As shown in FIG. 1 , after the voice data is converted into text, the corresponding name in the text is displayed in the format of a mention message. As another example, Figure 2B As shown, the name of a person recognized from voice data can be displayed in the format of a mention message, and when sending a message, the mention message and the voice message are sent.
[0065] Further, the mention message can be triggered. In response to triggering the mention message, information of the user corresponding to the name is displayed. As an example, the user participating in the conversation can hover the control cursor in the triggerable area of the mention message to trigger the mention message. In the vicinity of the display area of the mention message, introduction information of the user corresponding to the name is displayed. As another example, the user participating in the conversation can click on the mention message to trigger the mention message. Figure 4 As shown, the personal homepage of the user corresponding to the name is displayed. In this way, other users can quickly understand the user included in the voice data, which is convenient for other users to interact with the user.
[0066] In some possible implementations, the information indicating the name of a person contained in the voice data can be recognized by converting the voice data into text data using speech-to-text (STT) technology. The present application embodiment provides a possible implementation method for sending the name of a person in the form of a mention message in response to the information indicating the name of a person contained in the voice data, including the following steps:
[0067] A1: Perform speech recognition on the speech data to obtain first text data.
[0068] The speech data is subjected to speech recognition and converted into first text data. The embodiment of the present application does not limit the speech recognition method.
[0069] A2: In response to determining that the first text data includes a first person's name, determining at least one second person's name matching the first person's name from a set of person's names.
[0070] The first text data is detected to determine whether the first text data includes a person's name. As an example, the first text data is processed using a named entity recognition (NER) technology to identify a first person's name included in the first text data.
[0071] The first name included in the first text data is obtained by converting the voice data. The first name may not be the same as the actual name. From the name set, a second name matching the first name is searched. The name set includes the names of at least some users. As an example, the name set is a pre-set fixed set. As another example, the name set is flexibly adjusted according to matching needs.
[0072] In some possible implementation scenarios, the embodiments of the present application provide a possible implementation method for determining a set of names, including:
[0073] A set of names is determined according to the session type to which the instant messaging session belongs.
[0074] The conversation type affects the range of users that may be involved in the conversation. According to the conversation type, the range of actual names included in the more appropriate name set can be determined, so as to determine a more accurate second conversation based on the conversation set.
[0075] In one possible implementation, participating users participating in an instant communication session are determined.
[0076] As an example, for a conversation belonging to a chat scenario, a user group to which the voice data is sent is determined. The users belonging to the user group are participating users.
[0077] The participating users include a first user who triggers the generation of voice data, and a second user other than the first user.
[0078] Based on the participating users and the types of conversations, determine the range of users that the voice data may involve, and then determine the set of names.
[0079] For example, the name mentioned by the first user in the voice data may be the name of a participating user participating in the conversation. The name set at least includes the name of the participating user.
[0080] Furthermore, in addition to the participating users, in some implementation scenarios, the voice data may also mention other users related to the participating users. The scope of other users is determined based on the session type.
[0081] As an example, the session type is a one-to-one session. A one-to-one session refers to a type of session between two users. That is, the participating users are two users, including a first user and a second user. The one-to-one session type, for example, belongs to a single chat scenario.
[0082] Determine a third user whose user intimacy with the participating user satisfies the first intimacy condition. User intimacy is used to measure the degree of intimacy between users. The embodiment of the present application does not limit the method for determining user intimacy. In one possible implementation, user intimacy is set by the user. In another possible implementation, user intimacy is determined based on the interaction history between two users.
[0083] The first intimacy condition is, for example, that the user intimacy is greater than a threshold value. Alternatively, the first intimacy condition is, for example, that the sequence number of the user intimacy sorted from large to small is less than the sequence number threshold value.
[0084] For example, the first intimacy condition is the top 50 users in the user intimacy ranking with the first user, or the top 30 users in the user intimacy ranking with the second user.
[0085] Based on the first intimacy condition, other users who are relatively close to the participating user can be determined as the third user. The names of the participating users and the third user are written into the name set. In this way, the names that can be matched within the scope of the participating user and other users who are relatively close to the participating user can improve the accuracy of the second name matched within the limited scope of names.
[0086] As another example, the conversation type is a one-to-many conversation. A one-to-many conversation refers to a conversation between two or more users. That is, the participating users are two or more users, including a first user and multiple second users. The one-to-many conversation type, for example, belongs to a group chat scenario.
[0087] For a one-to-many session, a fourth user whose user intimacy with the first user satisfies a second intimacy condition is determined, and a fifth user who has a contact relationship with the second user is determined.
[0088] The second intimacy condition is, for example, that the user intimacy is greater than a threshold. Alternatively, the second intimacy condition is, for example, that the sequence number of the user intimacy sorted from large to small is less than the sequence number threshold. The larger the value of the user intimacy, the closer the relationship between the users. For example, the second intimacy condition is the top 50 users ranked in terms of intimacy with the first user.
[0089] The fifth user is a contact of the second user. The fifth user can be determined by querying the contact information of the second user. As an example, for each second user, M contacts with the most recent contact time are selected as the fifth user. M is a positive integer. The value of M can be set according to the need to construct the name set.
[0090] The names of the participating user, the fourth user, and the fifth user are written into the name set. The names are matched within the scope of the participating users, the users who are relatively close to the first user, and the contacts of the second user. In this way, the scope of relatively effective names can be determined, and the first name is avoided from being matched with names that are not related to the first user, thereby improving the accuracy of the matched second name.
[0091] Furthermore, in addition to the above two methods of determining the name set, in some possible implementations, a sixth user with a higher popularity value can also be determined. The popularity value of the sixth user is greater than a popularity threshold. The popularity value of the sixth user can be determined based on the historical interaction behaviors between other users and the sixth user. The name of the sixth user is written into the name set. In this way, more popular users can be taken into account, further improving the accuracy of the second name obtained by matching.
[0092] The name set includes a plurality of names. At least one second name matching the first name is determined from the name set.
[0093] The embodiments of the present application provide two possible implementation methods for determining at least one second name matching the first name.
[0094] The first one: matching by text.
[0095] In some possible scenarios, the language used by the language data has few homophones. For example, the language data is English. In a set of names, the name that is the same as the first name is used as the second name.
[0096] The second method: matching by pronunciation.
[0097] In some possible scenarios, the language used by the language data has homophonic but different texts. For example, the language data is Chinese.
[0098] During matching, the first person's name is converted into target pronunciation characters. The target pronunciation characters are used to represent the pronunciation of the first person's name. For example, if the first person's name is Chinese text, the target pronunciation characters are pinyin characters.
[0099] In the name set, the names with the same pronunciation characters as the target pronunciation characters are taken as the second names. From the name set, the names with the same pronunciation are taken as the second names to achieve the matching of homophonic names. In this way, the second names with the same pronunciation but different texts can be queried to improve the matching effectiveness.
[0100] A3: Determine a target person name according to at least one second person name.
[0101] The target name is one of the at least one second name. When one second name is matched, the second name is used as the target name. When two or more second names are matched, the target name is selected from the plurality of second names.
[0102] As an example, an embodiment of the present application provides a possible implementation method for selecting a target name from multiple second names.
[0103] Prioritize multiple second person names, and use the second person name with the highest priority as the target person name.
[0104] The priority of the second person's name is used to indicate the relevance of the second person's name to the first user. The larger the value of the priority, the higher the probability that the second person's name is mentioned in the voice data.
[0105] The embodiment of the present application provides a possible implementation method for determining the priority of the second person's name, including:
[0106] The user intimacy between the user corresponding to the second name and the first user is determined, and the priority of the second name is determined according to the user intimacy.
[0107] As an example, user intimacy is used as a priority for the second person's name.
[0108] As another example, the user relevance between the user corresponding to the second name and the first user is also determined based on the historical interaction behavior between the user corresponding to the second name and the first user. User relevance is used to measure the degree of relevance between interactions between users. The embodiments of the present application do not limit the specific types of historical interaction behaviors. For example, historical interaction behaviors include invitations to join a group and reminders to check messages. In the case where voice data is generated in a chat scenario, historical interaction behaviors are interaction behaviors generated in a user group.
[0109] The second person's name is prioritized based on user relevance and user intimacy.
[0110] As an example, a weighted sum of the user relevance and the user intimacy is calculated, and the weighted sum is used as the priority of the second person's name.
[0111] As another example, user relevance is the primary dimension for determining the priority, and user intimacy is the secondary dimension for determining the priority.
[0112] For example, historical interaction behaviors include invitations to join a group and reminders to check messages. Determine the invited users invited by the first user to join the group among the users corresponding to the multiple second names. Determine the user relevance of the second name of the invited user based on the time from the time of the invitation to join the group to the current time. The shorter the time from the time of the invitation to join the group to the current time, the higher the user relevance of the second name. The longer the time from the time of the invitation to join the group to the current time, the lower the user relevance of the second name. Based on the user relevance, determine the priority of the second name of the invited user.
[0113] Determine the user corresponding to the multiple second names, and the user to be reminded by the first user to check the message. Determine the user relevance of the second name of the reminded user according to the time from the moment of reminding to check the message to the current moment. The shorter the time from the moment of reminding to check the message to the current moment, the higher the user relevance of the second name. The longer the time from the moment of reminding to check the message to the current moment, the lower the user relevance of the second name. Based on the user relevance, determine the priority of the second name of the reminded user.
[0114] Determine the user intimacy between the user corresponding to each second name and the first user. Determine the priority of the second name based on the user intimacy.
[0115] The second names of the invited user, the second names of the reminded user, and all the second names are sorted in descending order of priority. From the three priority sorting orders, the second names whose sorting numbers are greater than the number threshold are selected respectively. The number threshold is, for example, 10.
[0116] The selected second names are deduplicated. For the deduplicated second names, the second names of the invited users are first sorted from high to low according to the priority determined by the user relevance, and the second names of the reminded users are sorted from high to low according to the priority determined by the user relevance, to obtain the first sequence. Then, the second names are sorted from high to low according to the priority determined by the user intimacy, to obtain the second sequence. The first sequence and the second sequence are concatenated, and the second sequence is sorted after the first sequence to obtain the second name sequence.
[0117] In addition, it is determined whether the user corresponding to the second name after deduplication is still in the user group. The second name of the user who has left the group is deleted from the second name sequence.
[0118] The second person's name that ranks first in the second person's name sequence is used as the target person's name.
[0119] A4: Send the target person’s name as a mention message.
[0120] As an example, the speech processing method provided in the embodiment of the present application can be applied to a system including a client and a server. Two possible implementation methods are introduced below.
[0121] The first one: the client interacts with the server once.
[0122] See also Figure 5 In the instant messaging session, the client obtains the voice data sent by the first user. The client sends the voice data to the server. The server converts the voice data into the first text data. As an example, the first text data is: need to confirm with Xiao Ming. The server performs name entity recognition on the first text data and determines that the first text data includes a first name, that is, "Xiao Ming". The name set includes the names of application users. The server determines at least one second name matching the first name from the name set. The matching condition is, for example, the same pronunciation. Taking the above example as an example, the server queries the second name "Xiao Ming" matching the first name "Xiao Ming" from the name set. The server uses the second name as the target name, replaces the first name in the first text data with the target name, and obtains the second text data. That is, replace "Xiao Ming" in "need to confirm with Xiao Ming" with "Xiao Ming", and obtain "need to confirm with Xiao Ming". The server sends the second text data to the client. The client displays the second text data in the group chat page. In addition, the client displays the target name in the second text data in the form of a mention message. For example, the target name is rendered in the format of "@". The user corresponding to the target name mentioned in this way, that is, user B, views the second text data. In this way, the names included in the second text data are more accurate. Users in the group chat can obtain more accurate information by viewing the second text data. User B can also determine that the voice data is related to himself through the mention message, so that user B can view the voice data in time.
[0123] The second type: the client interacts with the server multiple times.
[0124] In another possible implementation scenario, the client and server interact in the same way Figure 5 See Figure 6 As shown, the server includes an automatic speech recognition (ASR) module, an entity recognition module and a matching module.
[0125] User A triggers the sending of voice data in the group chat page through the client, and chooses to convert the voice data into text data. The client sends the voice data to the ASR module of the server. The ASR module performs voice recognition on the voice data to generate the first text data. The ASR module of the server sends the first text data to the client. The entity recognition module of the server obtains the first text data. The entity recognition module of the server determines that the first text data includes the first name. The entity recognition module of the server sends the first name to the client. The client sends the first name to the matching module of the server. The matching module of the server determines at least one second name matching the first name from the name set. The matching module of the server determines the target name from the at least one second name. The matching module of the server sends the target name to the client. The client replaces the first name in the first text data with the target name to obtain the second text data. The client renders the second text data and displays the second text data.
[0126] Figure 5 and Figure 6 The interaction diagram shown is only an example in which the implementation method of the present application can be implemented. The scope of application of the implementation method of the present application is not limited by any aspect of the scenario. For example, the automatic speech recognition module, the entity recognition module and the matching module can be deployed on different service terminals.
[0127] Based on a speech processing method provided by the above method embodiment, the embodiment of the present application also provides a speech processing device, which will be described below in conjunction with the accompanying drawings.
[0128] See also Figure 7 As shown in FIG. 1 , this figure is a schematic diagram of the structure of a speech processing device provided in an embodiment of the present application. Figure 7 As shown, the speech processing device comprises:
[0129] The acquisition unit 701 is used to acquire voice data sent by the first user in the instant messaging session;
[0130] The processing unit 702 is configured to send the name in the form of a mention message in response to the voice data containing information indicating the name.
[0131] In a possible implementation, the processing unit 702 is specifically configured to:
[0132] Performing speech recognition on the speech data to obtain first text data;
[0133] In response to determining that the first text data includes a first name, determining at least one second name matching the first name from a set of names;
[0134] determining a target person's name based on the at least one second person's name;
[0135] The target person's name is sent in the form of a mention message.
[0136] In a possible implementation, the at least one second name is a plurality of second names, and the processing unit 702 is configured to determine the target name according to the at least one second name, including:
[0137] The processing unit 702 is used to determine the priorities of the multiple second names; and use the second name with the highest priority as the target name.
[0138] In a possible implementation, the processing unit 702 is configured to determine the priorities of the plurality of second names, including:
[0139] The processing unit 702 is used to respectively determine the user intimacy between the users corresponding to the multiple second names and the first user, where the user intimacy is used to measure the degree of intimacy between the users; and determine the priority of the multiple second names according to the user intimacy.
[0140] In a possible implementation, the processing unit 702 is configured to determine the priorities of the plurality of second names according to the user intimacy, including:
[0141] The processing unit 702 is used to determine the user relevance between the user corresponding to the second name and the first user based on the historical interaction behavior between the user corresponding to the second name and the first user; and determine the priority of the multiple second names based on the user relevance and the user intimacy.
[0142] In a possible implementation, the processing unit 702 is further configured to determine the set of names according to a session type to which the instant messaging session belongs.
[0143] In a possible implementation, the processing unit 702 is configured to determine the set of names according to the session type to which the instant messaging session belongs, including:
[0144] The processing unit 702 is configured to determine participating users participating in the instant messaging session, where the participating users include the first user and a second user other than the first user; and determine the name set according to the participating users and the session type.
[0145] In a possible implementation, the session type is a one-to-one session, and the processing unit 702 is configured to determine the set of names according to the participating users and the session type, including:
[0146] The processing unit 702 is used to determine a third user whose user intimacy with the participating user meets a first intimacy condition, where the user intimacy is used to measure the degree of intimacy between users; and write the name of the participating user and the name of the third user into the name set.
[0147] In a possible implementation, the session type is a one-to-many session, and the processing unit 702 is configured to determine the set of names according to the participating users and the session type, including:
[0148] The processing unit 702 is used to determine a fourth user whose user intimacy with the first user meets a second intimacy condition; determine a fifth user who has a contact relationship with the second user; and write the names of the participating users, the fourth user, and the fifth user into the name set.
[0149] In a possible implementation, the processing unit 702 is further configured to:
[0150] Determine a sixth user whose popularity value is greater than the popularity threshold; and write the name of the sixth user into the name set.
[0151] In a possible implementation, the processing unit 702 is configured to determine at least one second name matching the first name from the name set, including:
[0152] The processing unit 702 is used to convert the first name into target pronunciation characters, where the target pronunciation characters are used to represent the pronunciation of the first name; in the name set, the name with the same pronunciation characters as the target pronunciation characters is used as the second name.
[0153] In a possible implementation manner, the device further includes:
[0154] An information display unit is used to display the information of the user corresponding to the name in response to triggering the mention message.
[0155] Based on a speech processing method provided in the above method embodiment, the present application also provides an electronic device, comprising: one or more processors; a storage device, on which one or more programs are stored, and when the one or more programs are executed by the one or more processors, the one or more processors implement the speech processing method as described in any of the above embodiments.
[0156] Reference below Figure 8, which shows a schematic diagram of the structure of an electronic device 800 suitable for implementing the embodiment of the present application. The terminal device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (portable android devices), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs (televisions), desktop computers, etc. Figure 8 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0157] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0158] Typically, the following devices may be connected to the I / O interface 805: input devices 808 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 800 is shown with various devices, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.
[0159] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 809, or installed from the storage device 808, or installed from the ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present application are executed.
[0160] The electronic device provided in the embodiment of the present application and the voice processing method provided in the above embodiment belong to the same inventive concept. The technical details not fully described in this embodiment can be referred to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.
[0161] Based on a speech processing method provided in the above method embodiment, an embodiment of the present application provides a computer storage medium on which a computer program is stored, wherein when the program is executed by a processor, the speech processing method as described in any of the above embodiments is implemented.
[0162] It should be noted that the computer-readable medium mentioned above in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0163] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0164] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0165] The computer-readable medium carries one or more programs, and when the one or more programs are executed by the electronic device, the electronic device executes the voice processing method.
[0166] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including, but not limited to, object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0167] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0168] The units involved in the embodiments described in this application may be implemented by software or hardware. The name of a unit / module does not limit the unit itself in some cases. For example, a voice data acquisition module may also be described as a "data acquisition module".
[0169] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0170] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
Claims
1. A speech processing method, characterized in that: The method comprises: In the instant messaging session, obtaining voice data sent by the first user; In response to the voice data containing information indicating a person's name, the person's name is sent in the form of a mention message.
2. The method according to claim 1, characterized in that In response to the voice data containing information indicating a person's name, sending the person's name in the form of a mention message includes: Performing speech recognition on the speech data to obtain first text data; In response to determining that the first text data includes a first name, determining at least one second name matching the first name from a set of names; determining a target person's name based on the at least one second person's name; The target person's name is sent in the form of a mention message.
3. The method according to claim 2, characterized in that The at least one second name is a plurality of second names, and determining the target name according to the at least one second name includes: Determining a priority of the plurality of second names; The second person's name with the highest priority is used as the target name.
4. The method according to claim 3, characterized in that The determining the priorities of the plurality of second names comprises: Determine user intimacy between the users corresponding to the plurality of second names and the first user respectively, wherein the user intimacy is used to measure the degree of intimacy between the users; The priorities of the plurality of second names are determined according to the user intimacy.
5. The method according to claim 4, characterized in that The determining the priorities of the plurality of second names according to the user intimacy comprises: determining a user relevance between the user corresponding to the second name and the first user according to historical interaction behaviors between the user corresponding to the second name and the first user; The priorities of the plurality of second names are determined according to the user relevance and the user intimacy.
6. The method according to claim 2, characterized in that The method further comprises: The set of names is determined according to the session type to which the instant messaging session belongs.
7. The method according to claim 6, characterized in that The step of determining the set of names according to the session type to which the instant messaging session belongs includes: Determining participating users participating in the instant communication session, wherein the participating users include the first user and a second user other than the first user; The name set is determined according to the participating users and the session type.
8. The method according to claim 7, characterized in that The session type is a one-to-one session, and determining the set of names according to the participating users and the session type includes: Determine a third user whose user intimacy with the participating user satisfies a first intimacy condition, wherein the user intimacy is used to measure the degree of intimacy between users; The names of the participating users and the name of the third user are written into the name set.
9. The method according to claim 7, characterized in that: The session type is a one-to-many session, and determining the set of names according to the participating users and the session type includes: Determine a fourth user whose user intimacy with the first user satisfies a second intimacy condition; determining a fifth user having a contact relationship with the second user; The name of the participating user, the name of the fourth user, and the name of the fifth user are written into the name set.
10. The method according to claim 2, characterized in that The method further comprises: Determine a sixth user whose popularity value is greater than the popularity threshold; The name of the sixth user is written into the name set.
11. The method according to claim 2, characterized in that The determining at least one second name matching the first name from the name set includes: Converting the first name into target pronunciation characters, where the target pronunciation characters are used to represent the pronunciation of the first name; In the name set, a name having the same pronunciation characters as the target pronunciation characters is taken as the second name.
12. The method according to any one of claims 1 to 11, characterized in that: The method further comprises: In response to triggering the mention message, information of the user corresponding to the name is displayed.
13. A speech processing device, characterized in that: The device comprises: An acquisition unit, used to acquire voice data sent by the first user in an instant messaging session; The processing unit is configured to send the name in the form of a mention message in response to the voice data containing information indicating the name of the person.
14. An electronic device, characterized in that: include: one or more processors; A storage device having one or more programs stored thereon, when the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 12.
15. A computer readable medium, characterized in that A computer program is stored thereon, wherein when the program is executed by a processor, the method according to any one of claims 1 to 12 is implemented.