This disclosure relates to the field of computer technologies, including an interaction method and apparatus based on a voice message, a computer device, a storage medium, and a computer program product.
With the development of computer technologies, there are increasingly more types of instant messaging applications whose functions are also diversified. An instant messaging application running on a client has a function of sending messages via voice.
In the related art, when a voice interaction recipient receives a voice message, a message icon of the voice message is displayed in the instant messaging application. The voice interaction recipient can use a finger to tap the message icon to listen. If the message icon is tapped again in a playback process, the voice message stops playing. If the message icon is tapped again, the voice message starts playing from the beginning.
However, with the traditional method, in the process of the voice interaction recipient listening to the voice message, the voice interaction recipient can only estimate the playback progress, and the voice message may be listened to repeatedly, resulting in continuous occupation of resources, leading to a problem of low resource utilization.
According to various aspects of this disclosure, an interaction method and apparatus based on a voice message, a computer device, a computer-readable storage medium, and a computer program product are provided.
In an aspect, an interaction method based on a voice message includes displaying a voice message icon and a corresponding identity icon of a sender of the voice message, and, in response to a playback trigger event for the voice message, displaying a first tape reel at the voice message icon, displaying that a tape segment moves toward the identity icon from the first tape reel, and triggering a playback of the voice message. The method further includes, in response to a playback trigger event for the voice message, displaying a first tape reel at the voice message icon, displaying that a tape segment moves toward the identity icon from the first tape reel, and triggering a playback of the voice message. The method further includes, in response to a playback end event for the voice message, stopping display of the first tape reel, displaying that an end of the tape segment moves from the first tape reel toward the identity icon, and stopping display of the tape segment when the end of the tape segment reaches the identity icon.
In an aspect, an interaction apparatus based on a voice message, the apparatus including processing circuitry configured to display a voice message icon and a corresponding identity icon of a sender of the voice message, and, in response to a playback trigger event for the voice message, display a first tape reel at the voice message icon, display that a tape segment moves toward the identity icon from the first tape reel, and trigger a playback of the voice message. The processing circuitry is further configured to, in a playback process of the voice message, display that at least one of the first tape reel or the identity icon rotates, and a thickness of the first tape reel gradually decreases with a playback progress of the voice message, and display the tape segment connecting the identity icon and the first tape reel within at least part of the playback process. The processing circuitry is further configured to, in response to a playback end event for the voice message, stop display of the first tape reel, display that an end of the tape segment moves from the first tape reel toward the identity icon, and stop display of the tape segment when the end of the tape segment reaches the identity icon.
In an aspect, a non-transitory computer-readable storage medium stores computer-readable instructions thereon, which, when executed by processing circuitry, cause the processing circuitry to perform an interaction method including displaying a voice message icon and a corresponding identity icon of a sender of the voice message, and, in response to a playback trigger event for the voice message, displaying a first tape reel at the voice message icon, displaying that a tape segment moves toward the identity icon from the first tape reel, and triggering a playback of the voice message. The method further includes, in response to a playback trigger event for the voice message, displaying a first tape reel at the voice message icon, displaying that a tape segment moves toward the identity icon from the first tape reel, and triggering a playback of the voice message. The method further includes, in response to a playback end event for the voice message, stopping display of the first tape reel, displaying that an end of the tape segment moves from the first tape reel toward the identity icon, and stopping display of the tape segment when the end of the tape segment reaches the identity icon.
To describe the technical solutions in the aspects of this disclosure, the following briefly describes the accompanying drawings describing the aspects. The accompanying drawings in the following description show merely the aspects of this disclosure, and a person of ordinary skill in the art may derive other drawings from these accompanying drawings.
The technical solutions in the embodiments of this disclosure are described below with reference to the accompanying drawings in the embodiments of this disclosure. The described embodiments are merely some rather than all of the embodiments of this disclosure. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments of this disclosure shall fall within the protection scope of this disclosure.
An interaction method based on a voice message provided in the aspects of this disclosure may be applied to an application environment shown in
In an aspect, as shown in
The message bubble is used for presenting the voice message, which is a special effect for displaying the voice message and is displayed after recording of the voice message ends. The message bubble includes a bubble color and a bubble shape. The bubble color may be configured according to an actual application scenario. In this aspect, the bubble color is not specifically limited. For example, the bubble color may be white or green. Further, an object using the terminal may also pre-configure the bubble color according to its own preference. The bubble shape may be configured according to an actual application scenario. In this aspect, the bubble shape is not specifically limited. For example, the bubble shape may be circular, rectangular, or square. Further, an object using the terminal may also pre-configure the bubble shape according to its own preference. The identity icon refers to an icon of a publishing object of the voice message. For example, the identity icon may specifically refer to a profile photo of the publishing object of the voice message, and the profile photo of the publishing object may be pre-configured by the publishing object according to its own preference.
Specifically, in a process of interaction with a voice interaction object, the terminal displays the message bubble of the voice message and the corresponding identity icon. In a specific application, in the process of interaction with the voice interaction object, to display the voice message, the terminal obtains the pre-configured bubble color and bubble shape, displays the message bubble of the voice message based on the bubble color and the bubble shape, and displays the corresponding identity icon of the voice message.
In a specific application, for a publishing object and a receiving object of the voice message in the voice interaction object, relative positions of the message bubble and the corresponding identity icon of the voice messages displayed by the terminals used may be different. In a specific application, as shown in
The playback trigger event refers to an event that triggers the playback of the voice message. For example, the playback trigger event may specifically refer to a selection operation for the message bubble. For example, the selection operation for the message bubble may specifically refer to one of a tap operation, a tap and hold operation, and a double tap operation. In another example, the playback trigger event may specifically refer to that, when at least two voice messages can be played continuously, a playback of a previous voice message corresponding to the voice message has ended. The first tape reel refers to a virtual animation representing a shape of a tape reel for the playback of the voice message. The shape of the tape reel refers to a shape of a tape winding around a reel similar to a physical tape reel, that is, the tape winds around the reel to form the tape reel.
Specifically, the terminal monitors the playback trigger event for the voice message in real time. When detecting the playback trigger event for the voice message, the terminal displays the first tape reel at the message bubble in response to the playback trigger event for the voice message, displays that the second end of the first tape segment is connected to the first tape reel, and displays that the first end of the first tape segment moves toward the identity icon, and triggers the playback of the voice message. In a specific application, in the playback process of the voice message, the first end of the first tape segment continues to move toward the identity icon as the playback progress, and the terminal displays the first tape segment connecting the identity icon and the first tape reel when the first end of the first tape segment moves to the identity icon.
In a specific application, the terminal displays the first tape reel at the message bubble in response to the playback trigger event for the voice message, displays that the second end of the first tape segment is connected to the first tape reel, displays that the first end of the first tape segment moves toward the identity icon, and triggers the playback of the voice message. In the playback process of the voice message, the first end of the first tape segment continues to move toward the identity icon with the playback progress, and the terminal displays the first tape segment connecting the identity icon and the first tape reel when the first end of the first tape segment moves to the identity icon.
In a specific application, as shown in
The thickness of the first tape reel refers to the thickness of the tape wound on the reel, and is related to a message duration of the voice message. A longer message duration indicates a thicker tape. That the thickness of the first tape reel gradually decreases with the playback progress of the voice message refers to that the thickness of the first tape reel changes with the playback progress of the voice message. As the playback progress increases, the thickness of the first tape reel gradually decreases, that is, as the playback progress increases, the tape wound on the reel of the first tape reel gradually decreases. The first tape segment refers to a tape segment for connecting the identity icon and the first tape reel in the playback process of the voice message. The first tape segment includes a first end and a second end. The first end of the first tape segment is used for connecting to the identity icon, and the second end of the first tape segment is used for connecting to the first tape reel.
Specifically, in the playback process of the voice message, the terminal displays that at least one of the first tape reel or the identity icon rotates, and the thickness of the first tape reel gradually decreases with the playback progress of the voice message, and displays the first tape segment connecting the identity icon and the first tape reel within at least part of the time period of the playback process.
In a specific application, the terminal displays that the identity icon rotates, and the first tape reel does not rotate. A rotation direction of the identity icon may be pre-configured according to an actual application scenario. For example, the rotation direction may be clockwise or counterclockwise. In a specific application, as shown in
In a specific application, the terminal displays that the identity icon does not rotate, and the first tape reel rotates. A rotation direction of the first tape reel may be pre-configured according to an actual application scenario. For example, the rotation direction may be clockwise or counterclockwise. In a specific application, as shown in
In a specific application, the terminal displays that the identity icon and the first tape reel rotate at the same time. The rotation directions of the identity icon and the first tape reel may be pre-configured according to an actual application scenario, and may be the same or different. For example, when the identity icon and the first tape reel rotate at the same time, a rotation mode may be that the identity icon rotates clockwise and the first tape reel rotates counterclockwise, or may be that the identity icon rotates counterclockwise and the first tape reel rotates clockwise.
In a specific application, displaying the first tape segment connecting the identity icon and the first tape reel within at least part of the time period of the playback process refers to displaying the first tape segment connecting the identity icon and the first tape reel in the playback process when the first end of the first tape segment moves to the identity icon and the second end of the first tape segment is connected to the first tape reel, and no longer displaying the first tape segment connecting the identity icon and the first tape reel when the second end of the first tape segment moves from the first tape reel toward the identity icon.
In a specific application, as shown in
The playback end event refers to an event that the playback of the voice message has ended. For example, the playback end event may specifically refer to that the voice message has been played completely.
Specifically, in the playback process of the voice message, the thickness of the first tape reel gradually decreases with the playback progress of the voice message. With the playback progress of the voice message, the first tape reel becomes thinner. When the playback of the voice message ends, it represents that the playback progress of the voice message is 100%, and the thickness of the first tape reel also becomes 0. The terminal cancels the display of the first tape reel in response to the playback end event for the voice message.
In a specific application, as shown in
Specifically, the terminal responds to the playback end event for the voice message. As the display of the first tape reel is canceled, the terminal displays that the second end of the first tape segment moves from the first tape reel toward the identity icon, and cancels the display of the first tape segment when the second end of the first tape segment moves to the identity icon. In a specific application, as shown in
In the interaction method based on a voice message, the message bubble of the voice message and the corresponding identity icon are displayed, the first tape reel is displayed at the message bubble in response to the playback trigger event for the voice message, that the second end of the first tape segment is connected to the first tape reel is displayed, that the first end of the first tape segment moves toward the identity icon is displayed, and the playback of the voice message is triggered. In this way, the display form when the playback of the voice message starts can be enriched, so that the voice interaction object can intuitively perceive that the playback of the voice message starts. In the playback process of the voice message, by using the first tape segment to display that the first tape reel rotates together with the identity icon, and by using that the thickness of the first tape reel gradually decreases with the playback progress of the voice message, the change of the playback progress of the voice message can be simulated by using the thickness change during the tape reel rotation, so that the voice interaction object can intuitively perceive the playback progress, and there is no need to listen to the voice message repeatedly. This can reduce a quantity of times of repeated listening to the voice message, avoid continuous occupation of resources, and improve resource utilization. The display of the first tape reel is canceled in response to the playback end event for the voice message, and as the display of the first tape reel is canceled, that the second end of the first tape segment moves from the first tape reel toward the identity icon is displayed, and the display of the first tape segment is canceled when the second end of the first tape segment moves to the identity icon. As the display of the first tape reel is canceled, a playback end state of the voice message can be simulated by using the movement of the second end of the first tape segment, so that the voice interaction object can intuitively perceive the end of the playback of the voice message.
In an aspect, the displaying a message bubble of a voice message and a corresponding identity icon includes:
The voice message recording event refers to an event that triggers the recording of the voice message. For example, the voice message recording event may specifically refer to a selection operation for a recording control. For example, the selection operation for the recording control may specifically refer to one of a tap operation, a tap and hold operation, and a double tap operation.
The second tape reel refers to a virtual animation representing a shape of a tape reel for the recording of the voice message. The shape of the tape reel refers to a shape of a tape winding around a reel similar to a physical tape reel, that is, the tape winds around the reel to form the tape reel. The thickness of the second tape reel refers to the thickness of the tape wound on the reel, and is related to a message duration of the voice message. A longer message duration indicates a thicker tape. That the thickness of the second tape reel gradually increases with the recording progress of the voice message refers to that the thickness of the second tape reel changes with the recording progress of the voice message. As the recording progress increases, the thickness of the second tape reel gradually increases, that is, as the recording progress increases, the tape wound on the reel of the second tape reel gradually increases.
The second tape segment refers to a tape segment for connecting the identity icon and the second tape reel in the recording process of the voice message. The second tape segment includes a first end and a second end. The first end of the second tape segment is used for connecting to the identity icon, and the second end of the second tape segment is used for connecting to the first tape reel.
Specifically, the terminal monitors the voice message recording event in real time. When detecting the voice message recording event, the terminal displays the identity icon and the second tape reel in response to the voice message recording event, and triggers the recording of the voice message. In the recording process of the voice message, the terminal displays that at least one of the second tape reel or the identity icon rotates, and the thickness of the second tape reel gradually increases with the recording progress of the voice message, and displays the second tape segment connecting the identity icon and the second tape reel within at least part of the time period of the recording process. In the recording process of the voice message, the terminal monitors the voice message recording end event in real time. When detecting the voice message recording end event, the terminal cancels the display of the second tape reel in response to the voice message recording end event, and displays the message bubble of the voice message.
In a specific application, in the recording process of the voice message, the terminal displays that the identity icon rotates, and the second tape reel does not rotate. A rotation direction of the identity icon may be pre-configured according to an actual application scenario. For example, the rotation direction may be clockwise or counterclockwise. In a specific application, in the recording process of the voice message, the terminal displays that the identity icon does not rotate, and the second tape reel rotates. A rotation direction of the second tape reel may be pre-configured according to an actual application scenario. For example, the rotation direction may be clockwise or counterclockwise. In a specific application, the terminal displays that the identity icon and the second tape reel rotate at the same time. The rotation directions of the identity icon and the second tape reel may be pre-configured according to an actual application scenario, and may be the same or different. For example, when the identity icon and the second tape reel rotate at the same time, a rotation mode may be that the identity icon rotates clockwise and the second tape reel rotates counterclockwise, or may be that the identity icon rotates counterclockwise and the second tape reel rotates clockwise.
In a specific application, displaying the second tape segment connecting the identity icon and the second tape reel within at least part of the time period of the recording process refers to displaying the second tape segment connecting the identity icon and the second tape reel in the recording process when the second end of the second tape segment moves to the second tape reel and the first end of the second tape segment is connected to the identity icon, and no longer displaying the second tape segment connecting the identity icon and the second tape reel when the first end of the second tape segment moves from the identity icon toward the second tape reel.
In this aspect, the identity icon and the second tape reel are displayed in response to a voice recording event, and the recording of the voice message is triggered, which can enrich the form of voice message recording. In the recording process of the voice message, by using the second tape segment to display that the second tape reel rotates together with the identity icon, and by using that the thickness of the second tape reel gradually increases with the recording progress of the voice message, a recording party of the voice message can be displayed, and the change of the recording progress of the voice message can be simulated by using the thickness change in during the tape reel rotation, so that the voice interaction object can intuitively perceive the recording progress. The recording of the voice message can be completed by canceling the display of the second tape reel in response to the voice message recording end event, thereby displaying the message bubble of the voice message.
In an aspect, the displaying the identity icon and a second tape reel in response to a voice message recording event, and triggering recording of the voice message includes:
The recording bubble is used for presenting that the recording of the voice message starts, which is a special effect for starting the recording of the voice message and is displayed before the recording of the voice message starts. The recording bubble includes a bubble color and a bubble shape. The bubble color may be configured according to an actual application scenario. In this aspect, the bubble color is not specifically limited. For example, the bubble color may be white or green. Further, an object using the terminal may also pre-configure the bubble color according to its own preference. The bubble shape may be configured according to an actual application scenario. In this aspect, the bubble shape is not specifically limited. For example, the bubble shape may be circular, rectangular, or square. Further, an object using the terminal may also pre-configure the bubble shape according to its own preference.
Specifically, the terminal displays the identity icon and the recording bubble in response to the voice message recording event, displays that the first end of the second tape segment is connected to the identity icon, displays that the second end of the second tape segment moves from the identity icon toward the recording bubble, and triggers the recording of the voice message. After the recording of the voice message starts, the second end of the second tape segment continues to move toward the recording bubble. The terminal displays the second tape reel at the recording bubble when the second end of the second tape segment is connected to the recording bubble.
In a specific application, as shown in
In this aspect, displaying the identity icon and the recording bubble in response to the voice message recording event, displaying that the first end of the second tape segment is connected to the identity icon, displaying that the second end of the second tape segment moves from the identity icon toward the recording bubble, and triggering the recording of the voice message can enrich a display form of the voice message when the recording of the voice message starts. Displaying the second tape reel at the recording bubble when the second end of the second tape segment is connected to the recording bubble can simulate a recording start state of the voice message by using the movement of the second end of the second tape segment, so that the voice interaction object can intuitively perceive the start of the recording of the voice message.
In an aspect, the canceling the display of the second tape reel in response to a voice message recording end event, and displaying the message bubble of the voice message includes:
The voice message recording end event refers to an event that triggers the end of the recording of the voice message. For example, the voice message recording end event may be specifically implemented by performing an operation on a recording control. For example, the voice message recording end event may specifically refer to stopping tapping the recording control. In another example, the voice message recording end event may specifically refer to a re-selection operation for the recording control. Further, the re-selection operation for the recording control may specifically refer to one of a tap operation, a tap and hold operation, and a double tap operation.
Specifically, the terminal displays that the first end of the second tape segment moves from the identity icon toward the second tape reel in response to the voice message recording end event, and cancels the display of the second tape reel and displays the message bubble of the voice message when the first end of the second tape segment moves to the second tape reel. In a specific application, as shown in
In this aspect, a recording end state of the voice message can be simulated by using the movement of the first end of the second tape segment, so that the voice interaction object can intuitively perceive the end of the recording of the voice message.
In an aspect, in the recording process of the voice message, an outer contour of the second tape reel is consistent with (i.e., coincides with) an outer contour of the recording bubble, a part of the recording bubble is displayed inside the second tape reel, and the part of the displayed recording bubble gradually decreases with the recording progress.
Specifically, as shown in
In this aspect, in the recording process of the voice message, a part of the recording bubble is displayed inside the second tape reel, and the part of the displayed recording bubble gradually decreases with the recording progress. The recording process of the voice message can be simulated by using that the part of the recording bubble gradually decreases with the recording progress, so that the voice interaction object can intuitively perceive that the voice message is being recorded.
In an aspect, both the second tape reel and the recording bubble are in circular shapes, and a center of the second tape reel is consistent with a center of the recording bubble. Before the recording of the voice message starts, the second tape reel is covered by the recording bubble, and the second tape reel is in an invisible state; and in a case that the second end of the second tape segment is connected to the recording bubble, a radius of the recording bubble gradually decreases with the recording progress of the voice message, and the second tape reel is in a visible state.
Specifically, both the second tape reel and the recording bubble are in circular shapes, and the center of the second tape reel is consistent with the center of the recording bubble. Before the recording of the voice message starts, the second tape reel is covered by the recording bubble, and the second tape reel is in the invisible state. That is, in this case, the radius of the second tape reel is equal to the radius of the recording bubble. When the second end of the second tape segment is connected to the recording bubble, it represents that the voice message is being recorded, the radius of the recording bubble gradually decreases with the recording progress of the voice message, and the second tape reel is in the visible state.
In a specific application, both the second tape reel and the recording bubble are in circular shapes, and the center of the second tape reel is consistent with the center of the recording bubble. Before the recording of the voice message starts, the second tape reel is covered by the recording bubble, and a reference circle is also covered under the second tape reel. That is, as shown in
In a specific application, before the recording of the voice message starts, the radii of the three circular elements (the recording bubble, the second tape reel, and the reference circle) are R1, R2, and R3 respectively, and R1=R2=R3. In this case, the second tape reel is covered by the recording bubble and is in the invisible state. When the recording of the voice message starts, that the first end of the second tape segment is connected to the identity icon is displayed, that the second end of the second tape segment moves from the identity icon toward the recording bubble is displayed, and the recording of the voice message is triggered. After the recording of the voice message starts, the second end of the second tape segment continues to move toward the recording bubble. When the second end of the second tape segment is connected to the recording bubble, that is, the second end of the second tape segment reaches the icon representing the voice message, the terminal starts to display an animation in which the radius of the recording bubble gradually decreases with the recording progress of the voice message, and the second tape reel is in the visible state.
In a specific application, that the radius R1 of the recording bubble gradually decreases with the recording progress of the voice message may be quantized by using the reference circle (with the radius R3). Specifically, a recording time may be divided into several intervals in advance, and lengths of R1 in different time intervals are in different ranges. For example, when the recording time is less than 10 seconds, it may correspond to R1>=⅔×R3; when the recording time is greater than or equal to 10 seconds and less than 20 seconds, it may correspond to ⅓×R3<=R1<⅔×R3; when the recording time is greater than or equal to 20 seconds and less than or equal to 60 seconds, it may correspond to 0<R1<⅓×R3; and when the recording time is greater than 60 seconds, it may correspond to R1=0.
In this aspect, when the recording of the voice message can be implemented, the thickness of the second tape reel gradually increases with the recording progress of the voice message, so that the voice interaction object can intuitively perceive the recording progress.
In an aspect, in the recording process of the voice message, the center of the second tape reel is consistent with the center of the recording bubble, and the outer contour of the second tape reel gradually expands toward the outer contour of the recording bubble as the recording progress.
Specifically, as shown in
In this aspect, the recording process of the voice message can be simulated by using that the thickness of the second tape reel gradually increases with the recording progress, so that the voice interaction object can intuitively perceive that the voice message is being recorded.
In an aspect, the interaction method based on a voice message further includes:
The voice recording icon refers to an icon representing that the voice message is being recorded. For example, the voice recording icon may be a lip icon, which represents that the voice interaction object is inputting the voice message.
Specifically, as shown in
In this aspect, in the recording process of the voice message, adding the voice recording icon covering the part of the identity icon on the identity icon and displaying the voice recording icon can intuitively display that the voice message is being recorded, and canceling the display of the voice recording icon in response to the voice message recording end event can intuitively display that the recording of the voice message has ended.
In an aspect, the interaction method based on a voice message further includes:
Specifically, the terminal counts duration of the recording of the voice message in real time. When the recording of the voice message reaches the upper limit of the message duration, the terminal displays that the second tape reel completely covers the recording bubble, and triggers the voice message recording end event. The upper limit of the message duration may be configured according to an actual application scenario. For example, the upper limit of the message duration may be one minute. That is, when the recording of the voice message reaches one minute, the terminal displays that the second tape reel completely covers the recording bubble, and triggers the voice message recording end event.
In this aspect, when the recording of the voice message reaches the upper limit of the message duration, the second tape reel completely covers the recording bubble, and the voice message recording end event is triggered, which can effectively control the message duration of the voice message and avoid repeated listening to the voice message due to an excessive message duration. In this way, a quantity of times of repeated listening to the voice message can be reduced, continuous occupation of resources can be avoided, and resource utilization can be improved.
In an aspect, in the playback process of the voice message, an outer contour of the first tape reel is consistent with an outer contour of the message bubble, a part of the message bubble is displayed inside the first tape reel, and the part of the displayed message bubble gradually increases with the playback progress.
Specifically, as shown in
In this aspect, in the recording process of the voice message, a part of the message bubble is displayed inside the first tape reel, and the part of the displayed message bubble gradually increases with the playback progress. The playback process of the voice message can be simulated by using that the part of the message bubble gradually increases with the playback progress, so that the voice interaction object can intuitively perceive that the voice message is being played back.
In an aspect, both the first tape reel and the message bubble are in circular shapes, and a center of the first tape reel is consistent with a center of the message bubble. When the first tape reel is displayed at the message bubble, a radius of the message bubble gradually decreases, and a degree of decrease in the radius of the message bubble is positively correlated with a message duration of the voice message; and when the first end of the first tape segment is connected to the identity icon, the radius of the message bubble gradually increases with the playback progress of the voice message.
Specifically, both the first tape reel and the message bubble are in circular shapes, and the center of the first tape reel is consistent with the center of the message bubble. Before the first tape reel is displayed at the message bubble, the first tape reel is covered by the message bubble and the first tape reel is the invisible state. That is, in this case, the radius of the first tape reel is equal to the radius of the message bubble. When the first tape reel is displayed at the message bubble, the radius of the message bubble gradually decreases, and the degree of decrease in the radius of the message bubble is positively correlated with the message duration of the voice message. In this case, the first tape reel is in the visible state, and the thickness of the first tape reel is positively correlated with the message duration of the voice message. When the first end of the first tape segment is connected to the identity icon, the radius of the message bubble gradually increases with the playback progress of the voice message. That is, in the playback process of the voice message, the radius of the message bubble gradually increases with the playback progress of the voice message, and the thickness of the first tape reel gradually decreases as the radius of the message bubble gradually increases.
In a specific application, both the first tape reel and the message bubble are in circular shapes, and the center of the first tape reel is consistent with the center of the message bubble. Before the first tape reel is displayed at the message bubble, the first tape reel is covered by the message bubble, and a reference circle is also covered under the first tape reel. That is, as shown in
In a specific application, before the first tape reel is displayed at the message bubble, the radii of the three circular elements (the message bubble, the first tape reel, and the reference circle) are R1, R2, and R3 respectively, and R1=R2=R3. In this case, the first tape reel is covered by the message bubble and is in the invisible state. When the first tape reel is displayed at the message bubble, the radius of the message bubble gradually decreases, and the degree of decrease in the radius of the message bubble is positively correlated with the message duration of the voice message. In this case, the first tape reel is in the visible state, and the thickness of the first tape reel is positively correlated with the message duration of the voice message (when the message duration of the voice message reaches the upper limit of the message duration, R1=0). When the first end of the first tape segment is connected to the identity icon, that is, the first end of the first tape segment reaches the icon representing the voice message, the terminal starts to display an animation in which the radius of the message bubble gradually increases with the playback progress of the voice message. That is, in the playback process of the voice message, the radius of the message bubble gradually increases with the playback progress of the voice message, and the thickness of the first tape reel gradually decreases as the radius of the message bubble gradually increases.
In a specific application, the positive correlation between the degree of decrease in the radius R1 of the message bubble and the message duration of the voice message may be quantized by using the reference circle (with the radius R3). Specifically, the message duration may be divided into several intervals in advance, and lengths of R1 in different time intervals are in different ranges. For example, when the message duration is less than 10 seconds, it may correspond to R1>=⅔×R3; when the message duration is greater than or equal to 10 seconds and less than 20 seconds, it may correspond to ⅓×R3<=R1<⅔×R3; when the message duration is greater than or equal to 20 seconds and less than or equal to 60 seconds, it may correspond to 0<R1<⅓×R3; and when the message duration is greater than 60 seconds, it may correspond to R1=0.
In a specific application, that the radius R1 of the message bubble gradually increases with the playback progress of the voice message may be quantized by using the reference circle (with the radius R3). Specifically, the remaining playback duration may be divided into several intervals in advance, and lengths of R1 in different time intervals are in different ranges. For example, when the remaining playback duration is less than 10 seconds, it may correspond to R1>=⅔×R3; when the remaining playback duration is greater than or equal to 10 seconds and less than 20 seconds, it may correspond to ⅓×R3<=R1<⅔×R3; when the remaining playback duration is greater than or equal to 20 seconds and less than or equal to 60 seconds, it may correspond to 0<R1<⅓×R3; and when the remaining playback duration is greater than 60 seconds, it may correspond to R1=0.
In this aspect, when the playback of the voice message can be implemented, the thickness of the first tape reel gradually decreases with the playback progress of the voice message, so that the voice interaction object can intuitively perceive the playback progress.
In an aspect, in the playback process of the voice message, the center of the first tape reel is consistent with the center of the message bubble, and the outer contour of the first tape reel gradually shrinks toward the center of the message bubble with the playback progress.
Specifically, as shown in
In this aspect, the playback process of the voice message can be simulated by using that the thickness of the first tape reel gradually decreases with the playback progress, so that the voice interaction object can intuitively perceive that the voice message is being played back.
In an aspect, when the playback of the voice message is triggered, the thickness of the first tape reel is linearly positively correlated with the message duration of the voice message.
Specifically, when the playback of the voice message is triggered, the thickness of the first tape reel is linearly positively correlated with the message duration of the voice message. That is, a longer message duration of the voice message indicates a thicker first tape reel, and a shorter message duration of the voice message indicates a thinner first tape reel. In a specific application, since the thickness of the first tape reel is linearly positively correlated with the message duration of the voice message, the thickness of the first tape reel may be determined based on a proportional relationship between the message duration of the voice message and the upper limit of the message duration.
In this aspect, the thickness of the first tape reel is linearly positively correlated with the message duration of the voice message, and the thickness of the first tape reel may be determined by using the message duration of the voice message.
In an aspect, when the message duration of the voice message is the upper limit of the message duration, and the playback of the voice message is triggered, the first tape reel completely covers the message bubble.
Specifically, when the message duration of the voice message is the upper limit of the message duration, and the playback of the voice message is triggered, the first tape reel completely covers the message bubble, that is, the message bubble is in the invisible state. In a specific application, when the message duration of the voice message is the upper limit of the message duration, and the playback of the voice message is triggered, the radius of the message bubble gradually decreases to zero, so that the first tape reel is fully displayed to cover the message bubble. The upper limit of the message duration may be configured according to an actual application scenario. For example, the upper limit of the message duration may be one minute.
In this aspect, when the message duration of the voice message is the upper limit of the message duration, and the playback of the voice message is triggered, the first tape reel completely covers the message bubble, and the corresponding first tape reel can be displayed when the message duration is the upper limit of the message duration.
In an aspect, the interaction method based on a voice message further includes:
The voice playback icon refers to an icon representing that the voice message is being played back. For example, the voice playback icon may be an car icon, which represents that the voice interaction object is listening to the voice message.
Specifically, as shown in
In this aspect, in the playback process of the voice message, adding the voice playback icon covering the part of the identity icon on the identity icon and displaying the voice playback icon can intuitively display that the voice message is being played back, and canceling the display of the voice playback icon in response to the voice message playback end event can intuitively display that the playback of the voice message has ended.
In an aspect, the interaction method based on a voice message further includes:
Specifically, before the voice message is played back, the terminal displays the digital icon corresponding to the message duration of the voice message at the message bubble of the voice message, and the number in the digital icon is positively correlated with the message duration. In the playback process of the voice message, the terminal displays the digital icon with a changing number, and the number in the digital icon with a changing number gradually decreases with the playback progress of the voice message. In a specific application, when the message duration does not reach the upper limit of the message duration, the number in the corresponding digital icon of the displayed message duration is the same as the message duration, and when the message duration reaches the upper limit of the message duration, the number in the corresponding digital icon of the displayed message duration is the same as the upper limit of the message duration.
In a specific application, as shown in
In this aspect, by displaying the digital icon with a changing number, and by using that the number in the digital icon gradually decreases with the playback progress of the voice message, the voice playback countdown can be implemented through the number in the digital icon with a changing number, so that the voice interaction object can intuitively perceive the playback progress of the voice message.
In an aspect, the playback trigger event includes a multi-speed playback (i.e., adaptive speed playback) event; and the displaying a first tape reel at the message bubble in response to a playback trigger event for the voice message, displaying that a second end of a first tape segment is connected to the first tape reel, displaying that a first end of the first tape segment moves toward the identity icon, and triggering a playback of the voice message includes:
The multi-speed playback event refers to an event that triggers a multi-speed playback of the voice message, which can be implemented by operating the message bubble. For example, the multi-speed playback event can be implemented through one of a tap operation, a tap and hold operation, and a double tap operation on the message bubble.
Specifically, the terminal monitors the multi-speed playback event for the voice message in real time. When detecting the multi-speed playback event for the voice message, the terminal displays the first tape reel at the message bubble in response to the multi-speed playback event for the voice message, displays that the second end of the first tape segment is connected to the first tape reel, displays that the first end of the first tape segment moves toward the identity icon, and plays back the voice message at the multi-speed corresponding to the multi-speed playback event. In a specific application, when the playback trigger event is the multi-speed playback event, in the multi-speed playback process of the voice message, the first end of the first tape segment continues to move toward the identity icon with playback progress, and the terminal displays the first tape segment connecting the identity icon and the first tape reel when the first end of the first tape segment moves to the identity icon.
In this aspect, the multi-speed playback of the voice message can be implemented in response to the multi-speed playback event.
In an aspect, the interaction method based on a voice message further includes:
Specifically, in the playback process of the voice message, the terminal also monitors the multi-speed playback event for the voice message in real time. When detecting the multi-speed playback event for the voice message, the terminal displays the first tape reel at the message bubble in response to the multi-speed playback event for the voice message, and plays back the voice message at the multi-speed corresponding to the multi-speed playback event.
In this aspect, in the playback process of the voice message, the multi-speed playback of the voice message can be implemented in response to the multi-speed playback event.
In an aspect, the playing back the voice message based on a multi-speed corresponding to the multi-speed playback event includes:
The callback function refers to a function that is passed as a parameter, and the callback function is usually implemented by using a function pointer. The callback function allows a pointer of a to-be-called function to be passed to a function as a parameter, so that the function can flexibly use different methods when handling similar events. That is, a party that provides the function implementation registers the function pointer of the callback function to a caller during initialization. When a specific event or condition occurs, the caller uses the function pointer to call the callback function to process the event. In this aspect, the function pointer of the callback function is registered to the terminal. When a multi-speed playback event occurs, the terminal uses the function pointer to call the callback function to process the multi-speed playback event.
Specifically, the terminal calls the callback function of the multi-speed playback event, modifies a voice playback speed attribute through the callback function to adjust a playback speed, and plays back the voice message at the playback speed corresponding to the modified voice playback speed attribute. In a specific application, the multi-speed playback event may be a 2×-speed playback event, a 3×-speed playback event, a 0.5×-speed playback event, or the like. The multi-speed of the multi-speed playback event is not specifically limited in this aspect.
In a specific application, the multi-speed playback event may specifically be the 2×-speed playback event. The terminal displays the first tape reel at the message bubble in response to the 2×-speed playback event for the voice message, calls the callback function of the 2×-speed playback event, and modifies the voice playback speed attribute playbackRate to 2 through the callback function, so that the voice message is played back at the 2×-speed.
In this aspect, the callback function of the 2×-speed playback event is called, and the voice playback speed attribute is modified through the callback function, so that the voice message can be played at the playback speed corresponding to the modified voice playback speed attribute.
In an aspect, the playback trigger event includes a voice positioning (or playback positioning) event, and the displaying a first tape reel at the message bubble in response to a playback trigger event for the voice message, displaying that a second end of a first tape segment is connected to the first tape reel, displaying that a first end of the first tape segment moves toward the identity icon, and triggering a playback of the voice message includes:
The voice positioning event refers to an event that positions the playback of the voice message, which can be triggered by an operation for the message bubble. For example, the operation for the message bubble may specifically refer to one of a tap operation, a tap and hold operation, and a double tap operation. The playback progress adjustment event refers to an event that adjusts the playback progress of the voice message. For example, the playback progress adjustment event may specifically be an event for adjusting the playback progress forward, that is, playing back a part that has not been played yet. In another example, the playback progress adjustment event may specifically be an event for adjusting the playback progress backward, that is, playing back a part that has already been played. For example, when the current playback progress is 0″, the playback progress adjustment event can only be an event that adjusts the playback progress forward, and when the current playback progress is not 0″, the playback progress adjustment event may be an event that adjusts the playback progress forward or an event that adjusts the playback progress backward.
Specifically, the terminal monitors the voice positioning event for the voice message in real time. When detecting the voice positioning event for the voice message, the terminal displays the first tape reel and the current playback progress at the message bubble in response to the voice positioning event for the voice message. The terminal displays a positioning playback progress indicated by the playback progress adjustment event at the message bubble in response to the playback progress adjustment event for the voice message, displays that the second end of the first tape segment is connected to the first tape reel, displays that the first end of the first tape segment moves toward the identity icon, and triggers the playback of the voice message starting from the positioning playback progress of the voice message. In a specific application, when the playback trigger event is the voice positioning event, in the playback process of the voice message starting from the positioning playback progress of the voice message, the first end of the first tape segment continues to move toward the identity icon with the playback progress. The first tape segment connecting the identity icon and the first tape reel is displayed when the first end of the first tape segment moves toward the identity icon.
In a specific application, as shown in
In this aspect, by displaying the first tape reel and the current playback progress at the message bubble in response to the voice positioning event for the voice message, the voice interaction object can intuitively perceive the current playback progress, so that the voice interaction object can perform adjustment from the current playback progress. By displaying the positioning playback progress indicated by the playback progress adjustment event at the message bubble in response to the playback progress adjustment event for the voice message, the voice interaction object can intuitively perceive the positioning playback progress, and by triggering the playback of the voice message starting from the positioning playback progress of the voice message, the positioning playback of the voice message can be implemented.
In an aspect, the interaction method based on a voice message further includes:
Specifically, in the playback progress of the voice message, the terminal monitors the voice positioning event for the voice message in real time. When detecting the voice positioning event for the voice message, the terminal displays the first tape reel and the current playback progress at the message bubble in response to the voice positioning event for the voice message, and displays the positioning playback progress indicated by the playback progress adjustment event at the message bubble in response to the playback progress adjustment event for the voice message, and triggers the playback of the voice message starting from the positioning playback progress of the voice message.
In an aspect, the interaction method based on a voice message further includes:
Specifically, the terminal monitors the tap event for the message bubble in real time. When detecting the tap event for the message bubble, the terminal starts to record the trigger duration of the tap point corresponding to the tap event in response to the tap event for the message bubble, and triggers the voice positioning event for the voice message when the trigger duration reaches the duration threshold and the tap point is in the static state within the trigger duration, that is, the tap point is not moved. The duration threshold may be configured according to an actual application scenario.
In a specific application, the terminal marks a tap start state as true and records a first current timestamp startTime in response to the tap event for the message bubble, that is, starts to record the trigger duration of the tap point corresponding to the tap event, and triggers the voice positioning event for the voice message when the trigger duration reaches the duration threshold (that is, a duration difference between a second current timestamp nowTime and the first current timestamp startTime reaches the duration threshold), and the tap point is in the static state within the trigger duration. In a specific application, the terminal is pre-configured with a callback function corresponding to the voice positioning event. The terminal can trigger the voice positioning event for the voice message by calling the callback function corresponding to the voice positioning event.
In this aspect, by recording the trigger duration of the tap point corresponding to the tap event in response to the tap event for the message bubble, when the trigger duration reaches the duration threshold and the tap point is in the static state within the trigger duration, accurate trigger of the voice positioning event for the voice message can be implemented.
In an aspect, the displaying a positioning playback progress indicated by the playback progress adjustment event at the message bubble in response to the playback progress adjustment event for the voice message includes:
The progress adjustment position refers to a position of a progress adjustment point, the initial position refers to a position of the current playback progress, and the center point position refers to a position of a center of the message bubble. The positions herein are all relative to a position of a pre-configured origin. The pre-configured origin may be configured according to an actual application scenario. For example, the pre-configured origin may be an upper left corner vertex of a display interface of the terminal. The movement angle refers to an actual adjustment angle of the progress adjustment position relative to the initial position when the center point position is centered, and corresponds to the playback progress adjustment event.
Specifically, the terminal obtains the position of the progress adjustment tap point, that is, the progress adjustment position, based on the pre-configured origin in response to the playback progress adjustment event for the voice message, and obtains the initial position corresponding to the current playback progress and the center point position of the message bubble based on the pre-configured origin. The terminal calculates a movement angle of the progress adjustment position relative to the initial position based on the initial position corresponding to the current playback progress, the center point position of the message bubble, and the progress adjustment position, determines the positioning playback progress indicated by the playback progress adjustment event based on the movement angle and the message duration of the voice message, and displays the positioning playback progress indicated by the playback progress adjustment event at the message bubble.
In a specific application, as shown in
In this aspect, by obtaining the progress adjustment position in response to the playback progress adjustment event for the voice message, the movement angle of the progress adjustment position relative to the initial position can be obtained based on the initial position corresponding to the current playback progress, the center point position of the message bubble, and the progress adjustment position. Moreover, the positioning playback progress indicated by the playback progress adjustment event can be determined based on the movement angle and the message duration of the voice message, so that the positioning playback progress indicated by the playback progress adjustment event can be displayed at the message bubble.
In an aspect, the obtaining a progress adjustment position in response to the playback progress adjustment event for the voice message includes:
Specifically, the terminal starts to record the tap point movement trajectory corresponding to the playback progress adjustment event in response to the playback progress adjustment event for the voice message, and uses a last tap point in the tap point movement trajectory as the progress adjustment position in response to the progress adjustment end event for the voice message. In a specific application, during the adjustment of the playback progress, the voice interaction object drags the message bubble on the terminal, and the terminal starts to record the corresponding tap point movement trajectory, and uses the last tap point in the tap point movement trajectory as the progress adjustment position. In a specific application, when the current playback progress is 0″, the voice interaction object may drag the message bubble clockwise, that is, the playback progress adjustment event can only be an event that adjusts the playback progress forward. When the current playback progress is not 0″, the voice interaction object may drag the message bubble clockwise or counterclockwise, that is, the playback progress adjustment event may be an event that adjusts the playback progress forward or backward.
In this aspect, by recording the tap point movement trajectory corresponding to the playback progress adjustment event in response to the playback progress adjustment event for the voice message, when the progress adjustment ends, the last tap point in the tap point movement trajectory can be used as the progress adjustment position to determine the progress adjustment position.
In an aspect, the obtaining, based on an initial position corresponding to the current playback progress, a center point position of the message bubble, and the progress adjustment position, a movement angle of the progress adjustment position relative to the initial position includes:
The relative angle refers to a position angle difference between the progress adjustment position and the initial position when the center point position is centered, that is, an angle difference between a first connecting line between the initial position and the center point position, and a second connecting line between the center point position and the progress adjustment position. The first coordinates of the center point position refer to coordinates of the center point position determined based on the pre-configured origin, including coordinates in two axes (a horizontal axis and a vertical axis). The second coordinates of the progress adjustment position refer to coordinates of the progress adjustment position determined based on the pre-configured origin, including coordinates in two axes (a horizontal axis and a vertical axis).
The quadrants are four regions divided by the horizontal axis and the vertical axis in a rectangular plane coordinate system (Cartesian coordinate system). Each region is referred to as a quadrant. The quadrant is centered on the origin, and the x and y axes are dividing lines. The one on the upper right is referred to as the first quadrant, the one on the upper left is referred to as the second quadrant, the one on the lower left is referred to as the third quadrant, and the one on the lower right is referred to as the fourth quadrant. In this aspect, the quadrant is centered on the center point position, that is, the x and y axes extend from the center point position as dividing lines to determine the quadrant in which the progress adjustment position is located.
Specifically, the terminal calculates the relative angle of the progress adjustment position relative to the initial position by using a cosine theorem based on the initial position corresponding to the current playback progress, the center point position of the message bubble, and the progress adjustment position, then compares the same axial coordinates in the first coordinates of the center point position and the second coordinates of the progress adjustment position to obtain a comparison result, determines the quadrant in which the progress adjustment position is located based on the comparison result, and finally obtains the movement angle of the progress adjustment position relative to the initial position based on the quadrant in which the progress adjustment position is located and the relative angle.
In a specific application, the first coordinates include a first horizontal coordinate and a first vertical coordinate, and the second coordinates include a second horizontal coordinate and a second vertical coordinate. The terminal may compare the first horizontal coordinate with the second horizontal coordinate, and the first vertical coordinate with the second vertical coordinate respectively to obtain the comparison result. The quadrant in which the progress adjustment position is located may be determined based on the comparison result.
In a specific application, as shown in
In this aspect, the relative angle of the progress adjustment position relative to the initial position may be obtained based on the initial position corresponding to the current playback progress, the center point position of the message bubble, and the progress adjustment position, the quadrant in which the progress adjustment position is located may be determined by comparing the first coordinates of the center point position with the second coordinates of the progress adjustment position, so that the quadrant in which the progress adjustment position is located and the relative angle may be combined to implement accurate determination of the movement angle of the progress adjustment position relative to the initial position.
In an aspect, the obtaining a relative angle of the progress adjustment position relative to the initial position based on the initial position corresponding to the current playback progress, the center point position of the message bubble, and the progress adjustment position includes:
Specifically, the terminal obtains the first distance between the initial position corresponding to the current playback progress and the center point position of the message bubble, the second distance between the progress adjustment position and the center point position, and the third distance between the progress adjustment position and the initial position, and obtains the relative angle of the progress adjustment position relative to the initial position based on the first distance, the second distance, the third distance, and the cosine theorem. The cosine theorem is a mathematical theorem that describes a relationship between lengths of three sides of a triangle and a cosine of an angle. That is, for any triangle, a square of any side is equal to twice a sum of the squares of the other two sides minus twice the product of the two sides and the cosine of an angle of the two sides.
In a specific application, the terminal obtains the first distance between the initial position corresponding to the current playback progress and the center point position of the message bubble, the second distance between the progress adjustment position and the center point position, and the third distance between the progress adjustment position and the initial position based on the first coordinates of the center point position, the second coordinates of the progress adjustment position, and the third coordinates of the initial position. In a specific application, as shown in
In a specific application, the relative angle is a cosine angle that needs to be calculated, and is an angle difference between a first connecting line between the initial position and the center point position and a second connecting line between the center point position and the progress adjustment position. The terminal determines a calculation formula of the relative angle based on the cosine theorem, and then substitutes the first distance, the second distance, and the third distance into the calculation formula of the relative angle to obtain the relative angle. In a specific application, as shown in
By substituting the calculation formulas of the first distance, the second distance, and the third distance for simplification, the calculation formula of the relative angle may be obtained as θ=Math.acos((f_c_x*s_c_x+f_c_y*s_c_y)/d), where d=Math.sqrt(f_c_x*f_c_x+f_c_y*f_c_y)*Math.sqrt(s_c_x*s_c_x+s_c_y*s_c_y), Math.acos( ) represents an inverse cosine function, Math.sqrt( ) represents a square root calculation, f_c_x*s_c_x represents a product of f_c_x and s_c_x, f_c_y*s_c_y represents a product of f_c_y and s_c_y, f_c_x*f_c_x represents a square of f_c_x, f_c_y*f_c_y represents a square of f_c_y, s_c_x*s_c_x represents a square of s_c_x, and s_c_y*s_c_y represents a square of s_c_y.
In this aspect, by obtaining the first distance, the second distance, and the third distance, the relative angle of the progress adjustment position relative to the initial position may be calculated based on the first distance, the second distance, and the third distance.
In an aspect, the obtaining the movement angle of the progress adjustment position relative to the initial position based on the quadrant in which the progress adjustment position is located and the relative angle includes:
Specifically, when the quadrant in which the progress adjustment position is located is the first quadrant or the fourth quadrant, the terminal directly uses the relative angle as the movement angle of the progress adjustment position relative to the initial position.
In an aspect, the obtaining the movement angle of the progress adjustment position relative to the initial position based on the quadrant in which the progress adjustment position is located and the relative angle includes:
Specifically, when the quadrant in which the progress adjustment position is located is the second quadrant or the third quadrant, the terminal uses the angle difference between the pre-configured angle and the relative angle as the movement angle of the progress adjustment position relative to the initial position. The pre-configured angle is 2π.
In an aspect, the interaction method based on a voice message further includes:
The playback interruption event refers to an event that the terminal plays back the voice message, which can be triggered by an operation for the message bubble. For example, the operation for the message bubble may specifically refer to one of a tap operation, a tap and hold operation, and a double tap operation.
Specifically, in the playback process of the voice message, the terminal monitors the playback interruption event for the voice message in real time. When detecting the playback interruption event for the voice message, the terminal displays the identity icon and the first tape reel in response to the playback interruption event for the voice message, and that the thickness of the first tape reel is positively correlated with the message duration of the voice message, and triggers to stop the playback of the voice message. In a specific application, the thickness of the first tape reel is linearly positively correlated with the message duration of the voice message.
In this aspect, in the playback process of the voice message, by displaying the identity icon and the first tape reel in response to the playback interruption event for the voice message, and that the thickness of the first tape reel is positively correlated with the message duration of the voice message, an initial state of the playback of the voice message can be simulated, so that the voice interaction object can intuitively perceive that the playback of the voice message is interrupted and the reel has returned to the initial state of the playback of the voice message.
In an aspect, the displaying the identity icon and the first tape reel in response to a playback interruption event for the voice message, and that the thickness of the first tape reel is positively correlated with a message duration of the voice message, and triggering to stop the playback of the voice message includes:
Specifically, the terminal displays, in response to the playback interruption event for the voice message, that at least one of the identity icon or the first tape reel rotates, the thickness of the first tape reel gradually increases, and a degree of increase in the thickness of the first tape reel is positively correlated with the playback progress of the voice message, that is, a longer playback progress of the voice message indicates that a thicker first tape reel, and triggers to stop the playback of the voice message. The terminal displays, in response to the interruption end event for the voice message, that the first end of the first tape segment moves from the identity icon toward the first tape reel, and displays the first tape reel when the first end of the first tape segment moves toward the first tape reel, and that the thickness of the first tape reel is positively correlated with the message duration of the voice message.
In a specific application, the terminal displays that the identity icon rotates, and the first tape reel does not rotate. A rotation direction of the identity icon may be pre-configured according to an actual application scenario. For example, the rotation direction may be clockwise or counterclockwise. In a specific application, the terminal displays that the identity icon does not rotate, and the first tape reel rotates. A rotation direction of the first tape reel may be pre-configured according to an actual application scenario. For example, the rotation direction may be clockwise or counterclockwise.
In a specific application, the terminal displays that the identity icon and the first tape reel rotate at the same time. The rotation directions of the identity icon and the first tape reel may be pre-configured according to an actual application scenario, and may be the same or different. For example, when the identity icon and the first tape reel rotate at the same time, a rotation mode may be that the identity icon rotates clockwise and the first tape reel rotates counterclockwise, or may be that the identity icon rotates counterclockwise and the first tape reel rotates clockwise.
In a specific application, as shown in
In this aspect, by using that at least one of the identity icon or the first tape reel rotates, the thickness of the first tape reel gradually increases, and the degree of increase in the thickness of the first tape reel is positively correlated with the playback progress of the voice message, and by displaying, in response to the interruption end event for the voice message, that the first end of the first tape segment moves from the identity icon toward the first tape reel, and displaying the first tape reel when the first end of the first tape reel moves toward the first tape reel, and that the thickness of the first tape reel is positively correlated with the message duration of the voice message, a reverse playback of the first tape reel can be simulated, and the reel gradually returns to the initial state of the playback of the voice message, so that the voice interaction object can intuitively perceive that the playback of the voice message is interrupted and the reel gradually returns to the initial state of the playback of the voice message.
In an aspect, the interaction method based on a voice message of this disclosure is described by being applied to a communication application, and an example in which the method is applied to a terminal is used for description.
In a recording stage of the voice message, as shown in
In a specific application, as shown in
In a specific application, as shown in
In a specific application, the playback trigger event includes the multi-speed playback event. Before the voice message is played back and in the playback process, the terminal displays the first tape reel at the message bubble in response to the multi-speed playback event for the voice message, calls the callback function of the multi-speed playback event, modifies the voice playback speed attribute through the callback function, and plays back the voice message at the corresponding playback speed of the modified voice playback speed attribute. In a specific application, as shown in
In a specific application, the playback trigger event includes a voice positioning event. The terminal can respond to the voice positioning event for the voice message before the voice message is played back and in the playback process. In a specific application, the terminal records, in response to the tap event for the message bubble, the trigger duration of the tap point corresponding to the tap event, and triggers the voice positioning event for the voice message when the trigger duration reaches the duration threshold and the tap point is in the static state within the trigger duration. In a specific application, the terminal displays the first tape reel and the current playback progress at the message bubble in response to the voice positioning event for the voice message, displays the positioning playback progress indicated by the playback progress adjustment event at the message bubble in response to the playback progress adjustment event for the voice message, and triggers the playback of the voice message starting from the positioning playback progress of the voice message.
In a specific application, the terminal records a tap point movement trajectory corresponding to the playback progress adjustment event in response to the playback progress adjustment event for the voice message, uses the last tap point in the tap point movement trajectory as the progress adjustment position in response to the progress adjustment end event for the voice message, obtains the first distance between the initial position corresponding to the current playback progress and the center point position of the message bubble, the second distance between the progress adjustment position and the center point position, and the third distance between the progress adjustment position and the initial position, obtains the relative angle of the progress adjustment position relative to the initial position based on the first distance, the second distance, and the third distance, compares the first coordinates of the center point position with the second coordinates of the progress adjustment position to determine a quadrant in which the progress adjustment position is located, the quadrant being centered on the center point position, obtains the movement angle of the progress adjustment position relative to the initial position based on the quadrant in which the progress adjustment position is located and the relative angle, determines the positioning playback progress indicated by the playback progress adjustment event based on the movement angle and the message duration of the voice message, and displays the positioning playback progress indicated by the playback progress adjustment event at the message bubble. When the quadrant in which the progress adjustment position is located is the first quadrant or the fourth quadrant, the terminal uses the relative angle as the movement angle of the progress adjustment position relative to the initial position. When the quadrant in which the progress adjustment position is located is the second quadrant or the third quadrant, the terminal uses the angle difference between the pre-configured angle and the relative angle as the movement angle of the progress adjustment position relative to the initial position.
In a specific application, as shown in
In a specific application, as shown in
It is to be understood that, steps in flowcharts of the foregoing aspects are displayed in sequence based on indication of arrows, but the steps are not necessarily performed in sequence based on a sequence indicated by the arrows. Unless otherwise explicitly specified in this specification, the steps are performed without any strict sequence limit, and may be performed in other sequences. In addition, at least some steps in the foregoing aspects may include a plurality of steps or a plurality of stages, and these steps or stages are not necessarily performed at a same time instant, but may be performed at different time instants. The steps or stages are not necessarily performed in sequence, but may be performed by turn or alternately with other steps or at least part of steps or stages in other steps.
During the playback of a traditional voice message, bubbles with different lengths are used, which is inefficient in screen drawing. This disclosure unifies the style and can only use numbers to indicate the voice length, and there is no need to draw bubbles with a plurality of lengths. In addition, this disclosure introduces effect simulation of the tape, and the effect simulation during listening is more consistent with the intuitive perception of the voice interaction object. During recording, the voice interaction object can intuitively perceive where the recording of the voice message is going through the thickness of the tape and the state of the object. That is, this disclosure simulates the recording and playback of the voice message by introducing the increase and decrease effects of the tape in real time, and through a plurality of levels of overlay rendering, which is more consistent with the intuitive perception of the voice interaction object and the voice interaction object can intuitively perceive where the playback or recording is going.
An aspect of this disclosure further provides an interaction apparatus based on a voice message for implementing the foregoing interaction method based on a voice message. The implementation solution for resolving the problem provided by this apparatus is similar to the implementation solution recorded in the foregoing method. Therefore, for the specific limitations in one or more aspects of the interaction apparatus based on a voice message provided below, reference may be made to the foregoing limitations for the interaction method based on a voice message, and the description is not repeated herein again.
In an aspect, as shown in
The voice message display module 3302, configured to display a message bubble of a voice message and a corresponding identity icon;
In the interaction apparatus based on a voice message, the message bubble of the voice message and the corresponding identity icon are displayed, the first tape reel is displayed at the message bubble in response to the playback trigger event for the voice message, that the second end of the first tape segment is connected to the first tape reel is displayed, that the first end of the first tape segment moves toward the identity icon is displayed, and the playback of the voice message is triggered. In this way, the display form when the playback of the voice message starts can be enriched, so that the voice interaction object can intuitively perceive that the playback of the voice message starts. In the playback process of the voice message, by using the first tape segment to display that the first tape reel rotates together with the identity icon, and by using that the thickness of the first tape reel gradually decreases with the playback progress of the voice message, a publishing party of the voice message can be displayed, and the change of the playback progress of the voice message can be simulated by using the thickness change during the tape reel rotation, so that the voice interaction object can intuitively perceive the playback progress, and there is no need to listen to the voice message repeatedly. This can reduce a quantity of times of repeated listening to the voice message, avoid continuous occupation of resources, and improve resource utilization. In response to the playback end event for the voice message, the display of the first tape reel is canceled, and as the display of the first tape reel is canceled, that the second end of the first tape segment moves from the first tape reel toward the identity icon is displayed, and the display of the first tape segment is canceled when the second end of the first tape segment moves to the identity icon. As the display of the first tape reel is canceled, a playback end state of the voice message can be simulated by using the movement of the second end of the first tape segment, so that the voice interaction object can intuitively perceive the end of the playback of the voice message.
In an aspect, the voice message display module is further configured to display the identity icon and the second tape reel in response to the voice message recording event, and trigger the recording of the voice message; in the recording process of the voice message, display that at least one of the second tape reel or the identity icon rotates, and a thickness of the second tape reel gradually increases with the recording progress of the voice message, and display the second tape segment connecting the identity icon and the second tape reel within at least part of the time period of the recording process; and cancel the display of the second tape reel in response to the voice message recording end event, and display the message bubble of the voice message.
In an aspect, the voice message display module is further configured to display the identity icon and the recording bubble in response to the voice message recording event; display that the first end of the second tape segment is connected to the identity icon, display that the second end of the second tape segment moves from the identity icon toward the recording bubble, and trigger the recording of the voice message; and display the second tape reel at the recording bubble when the second end of the second tape segment is connected to the recording bubble.
In an aspect, the voice message display module is further configured to display that the first end of the second tape segment moves from the identity icon toward the second tape reel in response to the voice message recording end event; and cancel the display of the second tape reel and display the message bubble of the voice message when the first end of the second tape segment moves to the second tape reel.
In an aspect, in the recording process of the voice message, an outer contour of the second tape reel is consistent with an outer contour of the recording bubble, a part of the recording bubble is displayed inside the second tape reel, and the part of the displayed recording bubble gradually decreases with the recording progress.
In an aspect, both the second tape reel and the recording bubble are in circular shapes, and a center of the second tape reel is consistent with a center of the recording bubble. Before the recording of the voice message starts, the second tape reel is covered by the recording bubble, and the second tape reel is in an invisible state; and in a case that the second end of the second tape segment is connected to the recording bubble, a radius of the recording bubble gradually decreases with the recording progress of the voice message, and the second tape reel is in a visible state.
In an aspect, in the recording process of the voice message, the center of the second tape reel is consistent with the center of the recording bubble, and the outer contour of the second tape reel gradually expands toward the outer contour of the recording bubble as the recording progress.
In an aspect, the voice message display module is further configured to: in the recording process of the voice message, add a voice recording icon covering a part of the identity icon on the identity icon, display the voice recording icon, and cancel the display of the voice recording icon in response to a voice message recording end event.
In an aspect, the voice message display module is further configured to trigger the voice message recording end event when the recording of the voice message reaches an upper limit of the message duration, and the second tape reel completely covers the recording bubble.
In an aspect, in the playback process of the voice message, an outer contour of the first tape reel is consistent with an outer contour of the message bubble, a part of the message bubble is displayed inside the first tape reel, and the part of the displayed message bubble gradually increases with the playback progress.
In an aspect, both the first tape reel and the message bubble are in circular shapes, and a center of the first tape reel is consistent with a center of the message bubble. When the first tape reel is displayed at the message bubble, a radius of the message bubble gradually decreases, and a degree of decrease in the radius of the message bubble is positively correlated with a message duration of the voice message; and when the first end of the first tape segment is connected to the identity icon, the radius of the message bubble gradually increases with the playback progress of the voice message.
In an aspect, in the playback process of the voice message, the center of the first tape reel is consistent with the center of the message bubble, and the outer contour of the first tape reel gradually shrinks toward the center of the message bubble with the playback progress.
In an aspect, when the playback of the voice message is triggered, the thickness of the first tape reel is linearly positively correlated with the message duration of the voice message.
In an aspect, when the message duration of the voice message is the upper limit of the message duration, and the playback of the voice message is triggered, the first tape reel completely covers the message bubble.
In an aspect, the voice message display module is further configured to: in the playback process of the voice message, add a voice playback icon covering a part of the identity icon on the identity icon, display the voice playback icon, and cancel the display of the voice playback icon in response to a voice message playback end event.
In an aspect, the interaction apparatus based on a voice message further includes a digital icon display module. The digital icon display module is configured to: display the digital icon corresponding to the message duration of the voice message at the message bubble of the voice message, and display the digital icon with a changing number in the playback process of the voice message, and that the number in the digital icon with a changing number gradually decreases with the playback progress of the voice message.
In an aspect, the playback trigger event includes a multi-speed playback event, and the tape reel display module includes a multi-speed playback unit. The multi-speed playback unit is configured to display the first tape reel at the message bubble in response to the multi-speed playback event for the voice message, display that the second end of the first tape segment is connected to the first tape reel, display that the first end of the first tape segment moves toward the identity icon, and play back the voice message at a multi-speed corresponding to the multi-speed playback event.
In an aspect, the multi-speed playback unit is further configured to: in the playback process of the voice message, display the first tape reel at the message bubble in response to a multi-speed playback event for the voice message, and play back the voice message at a multi-speed corresponding to the multi-speed playback event.
In an aspect, the multi-speed playback unit is further configured to: call the callback function of the multi-speed playback event, modify a voice playback speed attribute through the callback function, and play back the voice message at the playback speed corresponding to the modified voice playback speed attribute.
In an aspect, the playback trigger event includes a voice positioning event, and the tape reel display module includes a voice positioning unit. The voice positioning unit is configured to: display the first tape reel and the current playback progress at the message bubble in response to the voice positioning event for the voice message, display a positioning playback progress indicated by the playback progress adjustment event at the message bubble in response to the playback progress adjustment event for the voice message, display that the second end of the first tape segment is connected to the first tape reel, display that the first end of the first tape segment moves toward the identity icon, and trigger the playback of the voice message starting from the positioning playback progress of the voice message.
In an aspect, the voice positioning unit is further configured to: in the playback process of the voice message, display the first tape reel and the current playback progress at the message bubble in response to the voice positioning event for the voice message, display the positioning playback progress indicated by the playback progress adjustment event at the message bubble in response to the playback progress adjustment event for the voice message, and trigger the playback of the voice message starting from the positioning playback progress of the voice message.
In an aspect, the voice positioning unit is further configured to: record the trigger duration of the tap point corresponding to the tap event in response to the tap event of the message bubble, and trigger the voice positioning event for the voice message when the trigger duration reaches the duration threshold and the tap point is in the static state within the trigger duration.
In an aspect, the voice positioning unit is further configured to: obtain the progress adjustment position in response to the playback progress adjustment event for the voice message, obtain the movement angle of the progress adjustment position relative to the initial position based on the initial position corresponding to the current playback progress, the center point position of the message bubble, and the progress adjustment position, determine the positioning playback progress indicated by the playback progress adjustment event based on the movement angle and the message duration of the voice message, and display the positioning playback progress indicated by the playback progress adjustment event at the message bubble.
In an aspect, the voice positioning unit is further configured to: record the tap point movement trajectory corresponding to the playback progress adjustment event in response to the playback progress adjustment event for the voice message, and use a last tap point in the tap point movement trajectory as the progress adjustment position in response to the progress adjustment end event for the voice message.
In an aspect, the voice positioning unit is further configured to: obtain the relative angle of the progress adjustment position relative to the initial position based on the initial position corresponding to the current playback progress, the center point position of the message bubble, and the progress adjustment position, compare the first coordinates of the center point position with the second coordinates of the progress adjustment position to determine the quadrant in which the progress adjustment position is located, the quadrant being centered on the center point position, and obtain the movement angle of the progress adjustment position relative to the initial position based on the quadrant in which the progress adjustment position is located and the relative angle.
In an aspect, the voice positioning unit is further configured to: obtain the first distance between the initial position corresponding to the current playback progress and the center point position of the message bubble, the second distance between the progress adjustment position and the center point position, and the third distance between the progress adjustment position and the initial position, and obtain the relative angle of the progress adjustment position relative to the initial position based on the first distance, the second distance, and the third distance.
In an aspect, the voice positioning unit is further configured to: when the quadrant in which the progress adjustment position is located is the first quadrant or the fourth quadrant, use the relative angle as the movement angle of the progress adjustment position relative to the initial position.
In an aspect, the voice positioning unit is further configured to: when the quadrant in which the progress adjustment position is located is the second quadrant or the third quadrant, an angle difference between a pre-configured angle and the relative angle as the movement angle of the progress adjustment position relative to the initial position.
In an aspect, the interaction apparatus based on a voice message further includes a playback interruption processing module. The playback interruption processing module is configured to: in the playback process of the voice message, display the identity icon and the first tape reel in response to a playback interruption event for the voice message, and that the thickness of the first tape reel is positively correlated with a message duration of the voice message, and trigger to stop the playback of the voice message.
In an aspect, the playback interruption processing module is further configured to display, in response to the playback interruption event for the voice message, that at least one of the identity icon or the first tape reel rotates, the thickness of the first tape reel gradually increases, and a degree of increase in the thickness of the first tape reel is positively correlated with the playback progress of the voice message, and triggers to stop the playback of the voice message; and display, in response to the interruption end event for the voice message, that the first end of the first tape segment moves from the identity icon toward the first tape reel; and display the first tape reel when the first end of the first tape segment moves to the first tape reel, and that the thickness of the first tape reel is positively correlated with the message duration of the voice message.
The modules in the foregoing interaction apparatus based on a voice message may be implemented entirely or partially by software, hardware, or a combination thereof. The foregoing modules may be built in or independent of a processor of a computer device in a hardware form, or may be stored in a memory of the computer device in a software form, so that the processor invokes and performs an operation corresponding to each of the foregoing modules.
In an aspect, a computer device is provided. The computer device may be a terminal, and an internal structure diagram thereof may be shown in
A person skilled in the art may understand that, the structure shown in
In an aspect, a computer device is provided, including a memory and a processor, the memory having computer-readable instructions stored therein, the processor, when executing the computer-readable instructions, implementing the steps in the foregoing method aspects.
In an aspect, a computer-readable storage medium is provided, having computer-readable instructions stored therein, the computer-readable instructions, when executed by a processor, implementing the steps in the foregoing method aspects.
In an aspect, a computer program product is provided, having computer-readable instructions stored therein, the computer-readable instructions, when executed by a processor, implementing the steps in the foregoing method aspects.
A person of ordinary skill in the art may understand that all or some of the procedures of the methods of the foregoing aspects may be implemented by computer-readable instructions instructing relevant hardware. The computer-readable instructions may be stored in a non-volatile computer-readable storage medium. When the computer-readable instructions are executed, the procedures of the aspects of the foregoing methods may be included. Any reference to a memory, a database, or another medium used in the aspects provided in this disclosure may include at least one of a non-volatile memory and a volatile memory. The non-volatile memory may include a read-only memory (ROM), a magnetic tape, a floppy disk, a flash memory, an optical memory, a high-density embedded non-volatile memory, a resistive random access memory (ReRAM), a magnetoresistive random access memory (MRAM), a ferroelectric random access memory (FRAM), a phase change memory (PCM), a graphene memory, and the like. The volatile memory may include a random access memory (RAM) or an external cache. For the purpose of description instead of limitation, the RAM is available in a plurality of forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM). The database involved in the aspects provided in this disclosure may include at least one of a relational database and a non-relational database. The non-relational database may include a blockchain-based distributed database, but is not limited thereto. The processor involved in the aspects provided in this disclosure may be a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic device, a quantum computing-based data processing logic device, and are not limited thereto.
The technical features in the foregoing aspects may be randomly combined. For concise description, not all possible combinations of the technical features in the aspect are described. However, provided that combinations of the technical features do not conflict with each other, the combinations of the technical features are considered as falling within the scope recorded in this specification.
The foregoing disclosure includes some exemplary embodiments of this disclosure which are not intended to limit the scope of this disclosure. Other embodiments shall also fall within the scope of this disclosure.
Number | Date | Country | Kind |
---|---|---|---|
202211070736.7 | Sep 2022 | CN | national |
This application is a continuation of International Application No. PCT/CN2023/088259, filed on Apr. 14, 2023, which claims priority to Chinese Patent Application No. 202211070736.7, filed on Sep. 2, 2022, and entitled “INTERACTION METHOD AND APPARATUS BASED ON VOICE MESSAGE, COMPUTER DEVICE, AND STORAGE MEDIUM.” The entire disclosures of the prior applications are hereby incorporated by reference in their entirety.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/CN2023/088259 | Apr 2023 | WO |
Child | 18434768 | US |