Voice message playing method and device, electronic equipment and storage medium

文档序号:1952065 发布日期:2021-12-10 浏览:23次 中文

阅读说明:本技术 一种语音消息播放方法、装置、电子设备及存储介质 (Voice message playing method and device, electronic equipment and storage medium ) 是由 周鹏程 林正康 于 2021-09-13 设计创作,主要内容包括:本发明公开了一种语音消息播放方法、装置、电子设备及存储介质。该方法包括:在会话框播放语音消息并获取语音消息的当前播放点;根据当前播放点和语音消息的总时长确定语音消息的播放比例;根据播放比例在会话框生成语音消息的播放进度条。本发明实施例解决了用户接收到的语音消息在会话框中显示信息过少的问题,通过当前会话框中的语音消息的播放比例在会话框生成语音消息的播放进度条,增加了会话框中语音消息的显示信息;另外,通过在会话框生成的语音消息的播放进度条,可控制语音消息从任意位置开始播放,方便了播放控制,提升了用户体验度。(The invention discloses a voice message playing method and device, electronic equipment and a storage medium. The method comprises the following steps: playing the voice message in the conversation frame and acquiring the current playing point of the voice message; determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message; and generating a play progress bar of the voice message in the conversation frame according to the play proportion. The embodiment of the invention solves the problem that the display information of the voice message received by the user in the conversation frame is too little, and the playing progress bar of the voice message is generated in the conversation frame according to the playing proportion of the voice message in the current conversation frame, so that the display information of the voice message in the conversation frame is increased; in addition, the voice message can be controlled to start playing from any position through the playing progress bar of the voice message generated in the conversation frame, so that the playing control is facilitated, and the user experience degree is improved.)

1. A method for playing a voice message, comprising:

playing a voice message in a conversation frame and acquiring a current playing point of the voice message;

determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message;

and generating a playing progress bar of the voice message in the conversation frame according to the playing proportion.

2. The method of claim 1, further comprising, before the voice message is played in the conversation box:

acquiring the voice message from a server and storing the voice message into a local database;

and writing the voice message stored in the local database into a cache.

3. The method of claim 2, wherein playing the voice message in the session box comprises:

monitoring whether a play button of the voice message in the conversation frame is triggered;

when the playing button is monitored to be triggered, reading the voice message from the cache;

and playing the voice message in the session box.

4. The method of claim 3, further comprising:

monitoring whether a stop button of the voice message within the conversation box is triggered;

and recording the playing stop point of the voice message when the stop button is monitored to be triggered.

5. The method of claim 4, further comprising:

monitoring whether the play button in the session frame is triggered again;

when the situation that the play button is triggered again is monitored, reading the unplayed content of the voice message from the cache according to the recorded play stop point;

and starting from the playing stop point, playing the unplayed content of the voice message in the conversation frame.

6. The method of claim 1, further comprising:

monitoring operation information of the playing progress bar;

determining a target playing point of the voice message according to the operation information;

and switching to the target playing point to play the voice message.

7. The method of claim 6, wherein the target playback point is before the current playback point or the target playback point is after the current playback point.

8. A voice message playback apparatus, comprising:

the playing point acquisition module is used for playing the voice message in the conversation frame and acquiring the current playing point of the voice message;

the play ratio determining module is used for determining the play ratio of the voice message according to the current play point and the total duration of the voice message;

and the progress bar generating module is used for generating the playing progress bar of the voice message in the conversation frame according to the playing proportion.

9. An electronic device, characterized in that the electronic device comprises:

one or more processors;

a storage device for storing one or more programs,

when executed by the one or more processors, cause the one or more processors to implement a voice message playback method as recited in any one of claims 1 to 7.

10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, implements the voice message playing method according to any one of claims 1 to 7.

Technical Field

The present invention relates to computer technologies, and in particular, to a method and an apparatus for playing a voice message, an electronic device, and a storage medium.

Background

The user utilizes the application on the electronic equipment to carry out instant messaging, a dialog box of the application can generate various messages such as voice, pictures, videos and the like during instant messaging, and the voice message is taken as the instant message in the dialog, so that the characteristics of convenient input, effective shortening of the input time and the input error probability of the user and the like are achieved, the voice message becomes an important media role in the instant messaging and can be sent to a receiver or a group as a quick interactive message. The information that the voice message received in the existing instant messaging application is displayed in the session frame is too little, the user can not control the starting playing position of the voice message according to the displayed information, and can not determine the playing position of the required information, and the user experience is poor because the user requirements can not be met.

Disclosure of Invention

The embodiment of the invention provides a voice message playing method, a voice message playing device, electronic equipment and a storage medium, solves the problem that the voice message received by a user is less in a conversation frame, and realizes that the voice message can be controlled to start playing from any position by using a playing progress bar.

In a first aspect, an embodiment of the present invention provides a method for playing a voice message, where the method includes:

playing a voice message in a conversation frame and acquiring a current playing point of the voice message;

determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message;

and generating a playing progress bar of the voice message in the conversation frame according to the playing proportion.

Further, before the voice message is played in the dialog box, the method further includes:

acquiring the voice message from a server and storing the voice message into a local database;

and writing the voice message stored in the local database into a cache.

Further, the playing the voice message in the dialog box includes:

monitoring whether a play button of the voice message in the conversation frame is triggered;

when the playing button is monitored to be triggered, reading the voice message from the cache;

and playing the voice message in the session box.

Further, the method further comprises:

monitoring whether a stop button of the voice message within the conversation box is triggered;

and recording the playing stop point of the voice message when the stop button is monitored to be triggered.

Further, the method further comprises:

monitoring whether the play button in the session frame is triggered again;

when the situation that the play button is triggered again is monitored, reading the unplayed content of the voice message from the cache according to the recorded play stop point;

and starting from the playing stop point, playing the unplayed content of the voice message in the conversation frame.

Further, the method further comprises:

monitoring operation information of the playing progress bar;

determining a target playing point of the voice message according to the operation information;

and switching to the target playing point to play the voice message.

Further, the target playing point is before the current playing point, or the target playing point is after the current playing point.

In a second aspect, an embodiment of the present invention provides a voice message playing apparatus, where the apparatus includes:

the playing point acquisition module is used for playing the voice message in the conversation frame and acquiring the current playing point of the voice message;

the play ratio determining module is used for determining the play ratio of the voice message according to the current play point and the total duration of the voice message;

and the progress bar generating module is used for generating the playing progress bar of the voice message in the conversation frame according to the playing proportion.

In a third aspect, an embodiment of the present invention provides an electronic device, including:

one or more processors;

a storage device for storing one or more programs,

when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the voice message playing method.

In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the voice message playing method.

The invention plays the voice message in the conversation frame and obtains the current playing point of the voice message; determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message; and generating a play progress bar of the voice message in the conversation frame according to the play proportion. The embodiment of the invention solves the problem that the display information of the voice message received by the user in the conversation frame is too little, and the playing progress bar of the voice message is generated in the conversation frame according to the playing proportion of the voice message in the current conversation frame, so that the display information of the voice message in the conversation frame is increased; in addition, the voice message can be controlled to start playing from any position through the playing progress bar of the voice message generated in the conversation frame, so that the playing control is facilitated, and the user experience degree is improved.

Drawings

Fig. 1 is a schematic flowchart of a voice message playing method according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of a session block of a prior art voice message playing method;

fig. 2A is a schematic diagram illustrating a display effect of a dialog box in a voice message playing method according to an embodiment of the present invention;

fig. 2B is a schematic diagram illustrating another session box displaying effect of the voice message playing method according to the embodiment of the present invention;

fig. 2C is a schematic diagram illustrating a display effect of another session box of the voice message playing method according to the embodiment of the present invention;

fig. 3 is another schematic flow chart of a voice message playing method according to an embodiment of the present invention;

FIG. 3A is a schematic diagram illustrating a voice playing method according to an embodiment of the present invention;

fig. 4 is a schematic structural diagram of a voice message playing apparatus according to an embodiment of the present invention;

fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.

Detailed Description

The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.

Fig. 1 is a schematic flowchart of a voice message playing method provided in an embodiment of the present disclosure, where the method may be executed by a voice message playing apparatus provided in an embodiment of the present disclosure, and the apparatus may be implemented in a software and/or hardware manner. In a specific embodiment, the apparatus may be integrated in a terminal, in which a preset application is installed, the terminal may be a mobile terminal, such as a mobile phone, or a PC terminal, such as a notebook computer, a desktop computer, or the like. The following embodiments will be described taking as an example that the apparatus is integrated in a terminal. Referring to fig. 1, the method may specifically include the following steps:

step 110, playing the voice message in the conversation frame and acquiring the current playing point of the voice message;

for example, the dialog box may be understood as a visual dialog window in the user-side interface that can present interaction information between multiple terminals, and is used for displaying text, pictures, voice messages, video messages, and the like in communication. The dialog box of the user side can be a dialog box corresponding to an APP installed on the user side, and can also be a dialog box corresponding to a webpage address. The dialog box can be displayed on a dialog page corresponding to the APP, and can also be displayed on other human-computer interaction interfaces capable of human-computer interaction. The voice message can be understood as a voice bar which is displayed in the conversation box and is associated with the audio data, the audio data corresponding to the voice message is played by clicking the voice message, the voice message can display the total playing duration of the audio data and the playing state of the audio data, and the interactive information between the terminals is transmitted in an audio mode. The current playing point of the voice message can be understood as a playing time point for starting playing the voice message corresponding to the current playing content, and is used for determining the time length for starting playing the voice message.

In the specific implementation, the voice message in the session frame can be presented through a display interface of the user side, the user side can lock the voice message in the session frame through the display interface, and can trigger the voice message in the session frame to be played in a man-machine interaction manner according to user requirements, play the voice message in the session frame and acquire a current playing point of the voice message, and determine a playing time point, corresponding to the currently played content, at which the voice message starts to be played, for determining the playing start duration of the voice message.

Step 120, determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message;

by way of example, the total duration of a voice message may be understood as the total length of time required to play the voice message in its entirety. The playing proportion of the voice message can be understood as a proportion value of the played voice message in the whole voice message, and is used for indicating the playing progress of the voice message, so that the playing progress of the voice message corresponding to the playing content in the voice message is determined.

In the specific implementation, the voice message is played in the meeting frame, the current playing point of the voice message is obtained, and the playing time point of starting playing the voice message corresponding to the current playing content is determined and used for determining the starting playing time length of the voice message. The playing time corresponding to the current playing point is obtained according to the current playing point of the voice message, the playing proportion of the voice message is calculated by utilizing the playing time corresponding to the current playing point and the total time of the voice message, and the playing proportion of the current playing point of the voice message at each moment is played when the voice message is played, so that the playing progress bar of the voice message is generated.

And step 130, generating a playing progress bar of the voice message in the conversation frame according to the playing proportion.

For example, the play progress bar of the voice message may be understood as a bar-shaped area that displays the play progress of the voice message in the conversation frame, and the play progress bar of the voice message is located in the conversation frame and corresponds to the position of the voice message in the conversation frame, and may be located within the voice message, or may be located above or below the voice message. The played content and the unplayed content of the playing progress bar of the voice message are displayed in different colors, or the played content and the unplayed part of the playing progress bar of the voice message are displayed in different shapes or widths to distinguish the played content from the unplayed content.

Specifically, the playing duration corresponding to the current playing point of the voice message is obtained according to the current playing point of the voice message, the playing proportion of the voice message is calculated by utilizing the playing duration corresponding to the current playing point and the total duration of the voice message, the playing progress bar of the voice message is generated according to the playing proportion of the current playing point of the voice message playing at each moment when the voice message is played, the proportion of the position point on the playing progress bar is associated with the playing proportion of the current playing point of the voice message playing at each moment, the playing progress bar of the voice message is generated, and when the current playing point of the voice message is changed during playing of the voice message, the playing progress bar of the voice message is changed accordingly.

The invention plays the voice message in the conversation frame and obtains the current playing point of the voice message; determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message; and generating a play progress bar of the voice message in the conversation frame according to the play proportion. The embodiment of the invention solves the problem that the display information of the voice message received by the user in the conversation frame is too little, and the playing progress bar of the voice message is generated in the conversation frame according to the playing proportion of the voice message in the current conversation frame, so that the display information of the voice message in the conversation frame is increased; in addition, the playing progress bar of the voice message generated in the session frame can control the playing point of the voice message to be located at any position of the playing progress bar of the voice message and start playing, so that the playing efficiency is improved, and the user experience is improved.

In a specific embodiment, before the voice message is played in the dialog box, the method further includes: acquiring the voice message from a server and storing the voice message into a local database; and writing the voice message stored in the local database into a cache.

In some application scenarios, a server may be understood as a computer in a network that provides computing or application services for a plurality of terminals, for transmitting and computing voice messages sent by other terminals. The local database may be understood as a database residing in the electronic device corresponding to the user terminal running the application program, and is used for storing data information received and acquired by the user terminal. The cache can be understood as a temporary storage of partial data in the local database, the reading rate is high, and the priority level of the search is high.

In the specific implementation, the server receives voice messages sent by other terminals, the user acquires the voice messages from the server and stores the voice messages into a local database of the user side, the voice messages are displayed in a conversation frame in a conversation page through a display interface of the user side to serve as the latest voice messages, and the voice messages stored in the local database can be written into the cache through unread marks.

Fig. 2 is a schematic diagram of a session frame of a voice message playing method in the prior art, and as shown in fig. 2, a voice message in the session frame in the prior art only includes total duration of audio data and a voice message, and does not have a play progress bar of the voice message, and only can display user account information of an instant messaging session frame, audio data corresponding to the voice message, and the total duration of the voice message, which cannot meet the requirements of a client.

In other application scenarios, the server receives the voice message sent by other terminals, the user terminal obtains the voice message from the server, stores the voice message in a local database of the user terminal, and displays the voice message in a dialog box in a dialog page through a display interface of the user terminal. When the voice message in the conversation frame is not the latest voice message, the current display content in the conversation frame is moved by the user operation, so that the current display content in the conversation frame is changed, and the voice message corresponding to the current display content stored in the local database is written into the cache, so that the reading and writing speed of the voice message is increased, and the reading pressure in the local database is reduced.

Further, playing the voice message in the dialog box includes: monitoring whether a play button of the voice message in the conversation frame is triggered; when the playing button is monitored to be triggered, reading the voice message from the cache; and playing the voice message in the session box.

In some application scenarios, the session frame includes a play button, and the play button of the voice message can be understood as a start control before the voice message starts to be played, is located in the session frame, and is placed in a static suspension manner, and can be correspondingly set according to the placement position of the play progress bar of the voice message, so that the play button is prevented from blocking the play progress bar of the voice message.

In a specific implementation, the play button for monitoring the voice message may be a trigger action that the display interface acts on the play button to trigger the voice message play button to indicate that the voice message starts to be played. And reading the voice message from the cache and playing the voice message in a conversation box. Before the triggering action is carried out on the play button through the display interface, the voice message needs to be found in the conversation box, and the triggering action is carried out on the play button of the voice message. The triggering action can be single click, sliding, double click, zooming, lighting and the like of an interface where the play button is located, and the triggering action is used for enabling the play button to be in a play state and indicating that the voice message starts to be played.

Fig. 2A is a schematic view of a session box display effect of a voice message playing method according to an embodiment of the present invention, as shown in fig. 2A, a voice message includes a playing progress bar, a current playing point, a total playing duration, and a playing button, and a triggering action on the playing button through a display interface triggers the playing button to be in a playing state, so as to enable the voice message to start playing.

Further, the method further comprises:

monitoring whether a stop button of the voice message within the conversation box is triggered;

and recording the playing stop point of the voice message when the stop button is monitored to be triggered.

In some application scenes, the session frame comprises a stop button, the stop button of the voice message can be understood as a stop control during the playing of the voice message, is positioned in the session frame and is placed in a static suspension mode, the stop button can be correspondingly arranged according to the placing position of the playing progress bar of the voice message, and the situation that the stop button shields the playing progress bar of the voice message is avoided. The stop button can be a stop button arranged in the session frame according to the actual requirements of the user, the stop button can be an independent functional button, or a trigger stop action of the play button in the play state, or a trigger action of the integrated button arranged in different play states, so as to achieve the purpose of controlling the voice message play or stopping the play by using the trigger action in different play states. The playing stop point can be understood as the playing position of the voice message when the voice message stops playing, and is used for distinguishing the played content and the non-played content played this time.

In a specific implementation, the stop button for monitoring the voice message may be a stop button for triggering an action to stop the voice message when the display interface acts on the stop button, so as to instruct the voice message to stop playing. And reading the voice message from the cache after stopping, and recording the playing stopping point of the voice message to obtain the played content and the unplayed content played by the voice message, so that the user can only play the unplayed content when playing next time according to the requirement, the playing efficiency is improved, and the time of the user is saved.

Fig. 2B is a schematic view of a session box display effect of a voice message playing method according to an embodiment of the present invention, and as shown in fig. 2B, a stop button for monitoring a voice message may be a stop button for triggering a voice message to stop when a display interface acts on the stop button, where the stop button is in a stop-playing state, and determines an unplayed content and a played content according to a stop-playing point.

Further, the method further comprises:

monitoring whether the play button in the session frame is triggered again;

when the situation that the play button is triggered again is monitored, reading the unplayed content of the voice message from the cache according to the recorded play stop point;

and starting from the playing stop point, playing the unplayed content of the voice message in the conversation frame.

In some application scenarios, when the voice message is played last time, the stop button is used to stop the playing of the voice message when the voice message is not played completely, so that a playing stop point is recorded in the voice message. The unplayed content can be understood as unplayed voice message content distinguished by the playing stop point, so that a user can play the unplayed content only according to requirements when playing next time, the playing efficiency is improved, and the time of the user is saved.

In specific implementation, when the voice message is played last time, the stop button is used to stop the playing of the voice message when the voice message is not played, so that a playing stop point is recorded in the voice message. The playing button of the current voice message is in an unplayed state, whether the playing button in the session frame is triggered again needs to be monitored, if the playing button is monitored to be triggered again to be in a playing state, unplayed content of the voice message needs to be read from the cache according to the recorded playing stop point, and the voice message is played from the playing stop point, so that the unplayed content of the voice message is played in the session frame, only the unplayed content is played, the playing efficiency is improved, and the time of a user is saved.

Fig. 2C is a schematic diagram of a session box display effect of the voice message playing method according to the embodiment of the present invention, and as shown in fig. 2C, it is monitored whether the play button in the session box is triggered again, and when the play button of the session box is triggered again, the unplayed content of the voice message is read from the buffer according to the recorded play stop point, and the unplayed content of the voice message is played from the play stop point of the voice message.

The invention plays the voice message in the conversation frame and obtains the current playing point of the voice message; determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message; and generating a play progress bar of the voice message in the conversation frame according to the play proportion. The embodiment of the invention solves the problem that the display information of the voice message received by the user in the conversation frame is too little, and the playing progress bar of the voice message is generated in the conversation frame according to the playing proportion of the voice message in the current conversation frame, so that the display information of the voice message in the conversation frame is increased; in addition, the setting of the stop button and the play button can control the voice message to start playing from any position, the voice message can be controlled to stop playing through the stop button, and the play stop point of the voice message is recorded to distinguish the played content and the unplayed content of the current playing, so that the next playing can be started from the play stop point, the playing control is facilitated, and the user experience degree is improved.

The following further describes the voice message playing method provided in the embodiment of the present invention, as shown in fig. 3, the method may specifically include the following steps:

step 310, playing the voice message in the conversation frame and acquiring the current playing point of the voice message;

step 320, determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message;

step 330, generating a play progress bar of the voice message in the conversation frame according to the play proportion;

step 340, monitoring operation information of the playing progress bar;

for example, the operation information may be understood as action information that changes a playing position of the playing progress bar through the display interface, and the action information may be action information performed by an operation pointer corresponding to the display interface, or action information performed at a touch position of the playing progress bar on the display interface. The touch position may be a related operation area of the non-play progress bar, or an operation area corresponding to the play progress bar on the display interface.

In the specific implementation, the voice message is played in the conversation frame, the current playing point of the voice message is obtained, and the playing proportion of the voice message is determined according to the current playing point and the total duration of the voice message. Generating a playing progress bar of the voice message in the session frame according to the playing proportion, monitoring the operation information of the playing progress bar, and substantially determining a current playing point corresponding to the current playing requirement of the user terminal according to the operation information so as to play the voice message according to the user requirement.

Step 350, determining a target playing point of the voice message according to the operation information;

for example, the target playing point may be understood as a playing point of the voice message set correspondingly according to the user requirement, and is used to quickly locate the content in the voice message that needs to be played by the user, improve the playing efficiency, and shorten the playing time. The operation information of the playing progress bar is monitored, the current playing point corresponding to the current playing requirement of the user side is used as the target playing point according to the operation information, and the content of the voice message which needs to be played by the user can be played according to the position of the target playing point in the voice message.

And step 360, switching to a target playing point to play the voice message.

In the specific implementation, the operation information of the playing progress bar is monitored, the current playing point corresponding to the current playing requirement of the user side is used as the target playing point according to the operation information, and the voice message content corresponding to the playing point before the voice message operation information can be switched to the voice message content corresponding to the target playing point according to the position of the target playing point in the voice message.

Further, the target playing point is before the current playing point, or the target playing point is after the current playing point.

In a specific implementation, the target play point may be a play point located before or after the current play point of the voice message according to a user requirement, and the current play point of the voice message may be changed to the target play point through the operation information. In essence, the current playing point of the voice message is stroked on the playing progress bar of the voice message, so that the current playing point is at the target playing point, so as to play the content of the voice message corresponding to the target playing point.

Fig. 3A is a schematic diagram illustrating a voice playing method according to an embodiment of the present invention, as shown in fig. 3A, other terminals send a voice message to a server, and a user side obtains the voice message from the server and stores the voice message in a local database; and writing the voice message stored in the local database into a cache. And displaying the voice message in the user side display interface conversation frame, and triggering a play button in the conversation frame by sending a trigger action when the user. And playing the voice message in the conversation frame, acquiring the current playing point of the voice message, and determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message. And generating a play progress bar of the voice message in the conversation frame according to the play proportion. The user can control the position of the current playing point of the voice message in the progress bar according to the operation information, and the voice message is played.

In the embodiment of the invention, the voice message is played in the conversation frame and the current playing point of the voice message is obtained; determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message; and generating a play progress bar of the voice message in the conversation frame according to the play proportion. The embodiment of the invention solves the problem that the display information of the voice message received by the user in the conversation frame is too little, and the playing progress bar of the voice message is generated in the conversation frame according to the playing proportion of the voice message in the current conversation frame, so that the display information of the voice message in the conversation frame is increased; in addition, the voice message can be controlled to start playing from any position, so that playing control is facilitated, and user experience is improved.

Fig. 4 is a schematic structural diagram of a voice message playing apparatus according to an embodiment of the present invention, and as shown in fig. 4, the voice message playing apparatus includes:

a play point obtaining module 410, configured to play a voice message in a session box and obtain a current play point of the voice message;

a play ratio determining module 420, configured to determine a play ratio of the voice message according to the current play point and the total duration of the voice message;

and a progress bar generating module 430, configured to generate a play progress bar of the voice message in the session frame according to the play proportion.

In an embodiment, before the playing point obtaining module 410 plays the voice message in the dialog box, the method further includes:

acquiring the voice message from a server and storing the voice message into a local database;

and writing the voice message stored in the local database into a cache.

In one embodiment, the playing point obtaining module 410 plays the voice message in the session box, including:

monitoring whether a play button of the voice message in the conversation frame is triggered;

when the playing button is monitored to be triggered, reading the voice message from the cache;

and playing the voice message in the session box.

In an embodiment, the play point obtaining module 410 further includes:

monitoring whether a stop button of the voice message within the conversation box is triggered;

and recording the playing stop point of the voice message when the stop button is monitored to be triggered.

In an embodiment, the play point obtaining module 410 further includes:

monitoring whether the play button in the session frame is triggered again;

when the situation that the play button is triggered again is monitored, reading the unplayed content of the voice message from the cache according to the recorded play stop point;

and starting from the playing stop point, playing the unplayed content of the voice message in the conversation frame.

In one embodiment, the progress bar generating module 430 further includes:

monitoring operation information of the playing progress bar;

determining a target playing point of the voice message according to the operation information;

and switching to the target playing point to play the voice message.

In an embodiment, the progress bar generating module 430 is configured to determine that the target playing point is before the current playing point, or that the target playing point is after the current playing point.

The device of the embodiment of the invention plays the voice message in the conversation frame and acquires the current playing point of the voice message; determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message; and generating a play progress bar of the voice message in the conversation frame according to the play proportion. The embodiment of the invention solves the problem that the display information of the voice message received by the user in the conversation frame is too little, and the playing progress bar of the voice message is generated in the conversation frame according to the playing proportion of the voice message in the current conversation frame, so that the display information of the voice message in the conversation frame is increased; in addition, the voice message can be controlled to start playing from any position through the playing progress bar of the voice message generated in the conversation frame, so that the playing control is facilitated, and the user experience degree is improved.

Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention. FIG. 5 illustrates a block diagram of an exemplary electronic device 12 suitable for use in implementing embodiments of the present invention. The electronic device 12 shown in fig. 5 is only an example and should not bring any limitation to the function and the scope of use of the embodiment of the present invention.

As shown in FIG. 5, electronic device 12 is embodied in the form of a general purpose computing device. The components of electronic device 12 may include, but are not limited to: one or more processors or processing units 16, a system memory 28, and a bus 18 that couples various system components including the system memory 28 and the processing unit 16.

Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.

Electronic device 12 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 12 and includes both volatile and nonvolatile media, removable and non-removable media.

The system memory 28 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The electronic device 12 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 5, and commonly referred to as a "hard drive"). Although not shown in FIG. 5, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.

A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.

Electronic device 12 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with electronic device 12, and/or with any devices (e.g., network card, modem, etc.) that enable electronic device 12 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Also, the electronic device 12 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the Internet) via the network adapter 20. As shown, the network adapter 20 communicates with other modules of the electronic device 12 via the bus 18. It should be understood that although not shown in the figures, other hardware and/or software modules may be used in conjunction with electronic device 12, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.

The processing unit 16 executes various functional applications and data processing by executing programs stored in the system memory 28, for example, implementing a voice message playing method provided by an embodiment of the present invention, the method including:

playing a voice message in a conversation frame and acquiring a current playing point of the voice message;

determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message;

and generating a playing progress bar of the voice message in the conversation frame according to the playing proportion.

An embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program, when executed by a processor, implements the method for playing a voice message, and the method includes:

playing a voice message in a conversation frame and acquiring a current playing point of the voice message;

determining the playing proportion of the voice message according to the current playing point and the total duration of the voice message;

and generating a playing progress bar of the voice message in the conversation frame according to the playing proportion.

Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, or the like, as well as conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).

It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

16页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:针对车机系统实现多模块声音管理控制的系统、方法、装置、处理器及其计算机存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类