This application claims priorities of Taiwanese Invention Patent Application No. 108103458 and Taiwanese Utility Model Patent Application No. 108201453, both filed on Jan. 30, 2019.
The disclosure relates to a method of playing a voice message, and more particularly to a method of automatically playing a voice message via an instant communication software program.
Nowadays, people may operate smartphones that execute an instant communication software program to create a chat window (also called a virtual chat room) to communicate with other users by instant communication. The chat window usually allows users to transmit text messages, sticker images, files, photos, hyperlinks, etc., to each other, and further allows users to record voice messages for other users in the chat window. When a user receives a voice message recorded by another user using a conventional instant communication software program, the smartphone of the user who received the voice message would show an icon representing the voice message and a playing option for playing the voice message. The user may tap the playing option on a touch screen of the smartphone to play the voice message via a receiver or a loudspeaker of the smartphone.
When there are multiple voice messages not having been played before, the user may need to tap the playing options respectively corresponding to the voice messages one by one so that the smartphone plays the voice messages accordingly. If there are a large number of voice messages to be played, it may be inconvenient and time-consuming for the user to manually operate playback of the voice messages in this manner.
Therefore, an object of the disclosure is to provide a method of automatically playing a voice message via a smartphone that executes an instant communication software program. The method may enable a user of the smartphone to listen to the voice message without additional manual operations.
The method includes: opening, by the smartphone, a chat window for communication between a user of the smartphone and a chatting target; and upon determining that there is at least one voice message not having been played before in the chat window and, based on a signal provided by a proximity sensor near a receiver of the smartphone, that there is an object close to the receiver, automatically and audibly outputting, by the smartphone, the at least one voice message using the receiver.
Another object of this disclosure is to provide a smartphone that implements the method of this disclosure. The smartphone is installed with an instant communication software program, and includes a receiver, a proximity sensor disposed near the receiver and configured to generate a signal in response to detection thereof, and a processing unit electrically coupled to the receiver and the proximity sensor. The processing unit is configured to, when executing the instant communication software program: open a chat window for communication between a user of the smartphone and a chatting target in response to user operation on the smartphone; and upon determining that there is at least one voice message not having been played before in the chat window and, based on the signal provided by the proximity sensor, that there is an object close to the receiver, automatically and audibly output the at least one voice message using the receiver.
Yet another object of this disclosure is to provide a computer program product that includes a non-volatile and tangible computer-accessible medium. The non-volatile and tangible computer-accessible medium includes an instant communication software program that, when loaded and executed by a smartphone including a receiver and a proximity sensor near the receiver, causes the smartphone to perform the method of this disclosure.
Other features and advantages of the disclosure will become apparent in the following detailed description of the embodiment(s) with reference to the accompanying drawings, of which:
Before the disclosure is described in greater detail, it should be noted that where considered appropriate, reference numerals or terminal portions of reference numerals have been repeated among the figures to indicate corresponding or analogous elements, which may optionally have similar characteristics.
Referring to
In step S1, the processing unit 22 executes the instant communication software program in response to user operation on the smartphone 2 to open a chat window 31 (also called a virtual chat room), which may be newly created or previously created by the instant communication software program, for communication with a chatting target (X), as shown in
In step S2, the processing unit 22 determines whether there is, in the chat window 31, at least one voice message (provided by the chatting target (X)) not having been played before (a voice message that has not been played before may be referred to as an unplayed voice message hereinafter). In this embodiment, solid dots are used to indicate unplayed voice messages. As exemplified in
The flow goes to step S3 when the processing unit 22 determines that there is at least one voice message that has not been played before in the chat window 31, and repeats step S2 when otherwise.
In step S3, the processing unit 22 controls the proximity sensor 25 to proceed with detection of presence of nearby objects, and receives the signal generated and provided by the proximity sensor 25 in response to the detection of the proximity sensor 25.
In step S4, the processing unit 22 determines, based on the signal received from the proximity sensor 25, whether there is an object close to the receiver 23. The flow goes to step S5 when the processing unit 22 determines that there is an object close to the receiver 23 (although what is represented by the signal provided by the proximity sensor 25 is that the object is close to the proximity sensor 25). For example, when the user picks up the smartphone 2 and puts the receiver 23 by an ear, the processing unit 22 will determine that there is an object (i.e., the user's ear in this case) close to the receiver 23. Step S4 would be repeated when the processing unit 22 determines that there is no object close to the receiver 23. The repetition of step S4 continues until it is determined that there is an object close to the receiver 23 and the flow goes to step S5, or until the chat window 31 is closed by the user.
In step S5, the processing unit 22 causes the receiver 23 to automatically and audibly output the voice message(s) not having been played before. In the cases that there are multiple unplayed voice messages, these voice messages may be outputted in time sequence, a.k.a, the temporal order in which they were received (i.e., according to the time points to which the voice messages correspond) in some implementations. Hence, the user does not need to tap the unplayed voice messages on the smartphone 2, and theses voice messages would be automatically played and audibly outputted through the receiver 23 when the user puts the smartphone 2 near his/her ear. In the above-described situation, only the user can hear the voice message(s) being played.
In step S6, during the automatic audible output of the unplayed voice message(s) by the receiver 23, the processing unit 22 controls the proximity sensor 25 to continuously perform detection, and determines whether there is an object close to the receiver 23 based on the signal continuously provided by the proximity sensor 25. Upon determining that there is (still) an object close to the receiver 23, the flow goes back to step S5, where the processing unit 22 keeps on causing the receiver 23 to audibly output the unplayed voice message(s). Upon determining that there is no (longer an) object close to the receiver 23, the flow goes to step S7, where the processing unit 22 automatically causes the loudspeaker 24, instead of causing the receiver 23, to audibly output the unplayed voice message(s). That is, the component used to audibly output the unplayed voice message(s) is switched from the receiver 23 to the loudspeaker 24. For example, when the user intends to make others listen to the voice message that is currently being played, he or she only needs to bring the smartphone 2 away from his or her ear in order for the audible output of said voice message to switch from coming out of the receiver 23 to coming out of the loudspeaker 24 under control of the processing unit 22, so other people can hear.
During the automatic audible output of the unplayed voice message(s) by the loudspeaker 24, the processing unit 22 continuously performs step S6, i.e., controlling the proximity sensor 25 to continuously perform detection, and determining whether there is an object close to the receiver 23 based on the signal continuously provided by the proximity sensor 25. Upon determining that there is an object close to the receiver 23, the flow goes back to step S5, i.e., the voice message that is being played will be switched by the processing unit 22 from being outputted by the loudspeaker 24 back to being outputted by the receiver 23. Otherwise, the flow stays in step S7, where the processing unit 22 continues to cause the loudspeaker 24 to audibly output the unplayed message(s). Steps S5 to S7 are continuously repeated until all the unplayed voice message(s) is(are) played, or until the processing unit 22 receives an instruction to stop or pause playing.
In the case that the playing of the second voice message is terminated or paused when the second voice message has not been played in its full, the processing unit 22 would still treat the second voice message as an unplayed voice message, and the flow goes to step S2 if the chat window 31 is still opened. Accordingly, when the user puts the smartphone 2 by the ear again so that the processing unit 22 determines that there is an object close to the receiver 23 based on the signal provided by the proximity sensor 25, the processing unit 22 will automatically cause the receiver 23 to audibly output the second voice message and all subsequent unplayed message(s) (if any) from the beginning of the second voice message (in the case that the playing of the second voice message was terminated) or from the beginning of the unplayed part (in the case that the playing of the second voice message was paused). In some implementations, even if the playing of the second voice message is paused, the second voice message may be replayed from the beginning, and this disclosure is not limited in this respect.
It is noted that, although the multiple unplayed voice messages are exemplified to follow one after the other in
In addition, the smartphone 2 can still be manually operated to play the voice messages. Referring to
In summary, the embodiments of this disclosure use the signal generated by the proximity sensor 25 to determine whether there is an object close to the receiver 23 of the smartphone 2, so as to determine whether to automatically and audibly output the unplayed voice message(s) in the chat window 31 through the receiver 23. During the automatic audible output of the unplayed voice message(s), the processing unit 22 continues to determine whether there is an object close to the receiver 23, so as to determine whether to use the loudspeaker 24 to play the unplayed voice message(s) instead or to stop output of the unplayed voice message (s). Accordingly, the user is not required to use an additional manual operation (such as tapping) in order to listen to the unplayed voice message(s), and can listen to the unplayed message(s) by simply putting the smartphone 2 by the ear or moving the smartphone 2 away from the ear to activate automatic output of the unplayed voice message (s) by the receiver 23 or the loudspeaker 24 (the first embodiment), achieving a convenient and time-saving operation for the user to listen to the unplayed voice message(s).
In the description above, for the purposes of explanation, numerous specific details have been set forth in order to provide a thorough understanding of the embodiment(s). It will be apparent, however, to one skilled in the art, that one or more other embodiments may be practiced without some of these specific details. It should also be appreciated that reference throughout this specification to “one embodiment,” “an embodiment,” an embodiment with an indication of an ordinal number and so forth means that a particular feature, structure, or characteristic may be included in the practice of the disclosure. It should be further appreciated that in the description, various features are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of various inventive aspects, and that one or more features or specific details from one embodiment may be practiced together with one or more features or specific details from another embodiment, where appropriate, in the practice of the disclosure.
While the disclosure has been described in connection with what is (are) considered the exemplary embodiment(s), it is understood that this disclosure is not limited to the disclosed embodiment(s) but is intended to cover various arrangements included within the spirit and scope of the broadest interpretation so as to encompass all such modifications and equivalent arrangements.
Number | Date | Country | Kind |
---|---|---|---|
108103458 | Jan 2019 | TW | national |
108201453 | Jan 2019 | TW | national |