A machine translator can provide accurate translations of indirect speech to direct speech for use in communications initiated by voice.In one aspect, a method includes receiving a voice input corresponding to an utterance.
A determination is made whether a transcription of the utterance includes a command to initiate a communication to a user and a segment that is classified as indirect speech. In response to determining that the transcription of the utterance includes the command and the segment that is classified as indirect speech, the segment that is classified as indirect speech is provided as input to a machine translator. In response to providing the segment that is classified as indirect speech to the machine translator, a direct speech segment is received from the machine translator. ![]() Two popular communication mechanisms facilitated by smartphones are text messaging and e-mail. Some smartphones include voice to text programs that allow users to send text-based messages by speaking voice commands. However, these programs require users to speak unnatural commands followed by an exact direct speech message that the user wants to send. For example, the user may be required to state the command Send e-mail message to John Smith followed by the intended message, such as Can you meet for lunch. SUMMARY In general, one innovative aspect of the subject matter described in this specification can be embodied in methods that include the actions of receiving a voice input corresponding to an utterance; determining whether a transcription of the utterance includes a command to initiate a communication to a user and a segment that is classified as indirect speech; in response to determining that the transcription of the utterance includes the command and the segment that is classified as indirect speech: providing the segment that is classified as indirect speech as input to a machine translator; in response to providing the segment that is classified as indirect speech to the machine translator, receiving a direct speech segment from the machine translator; and initiating a communication that includes the direct speech segment. Other embodiments of this aspect include corresponding systems, apparatus, and computer programs, configured to perform the actions of the methods, encoded on computer storage devices. These and other embodiments can each optionally include one or more of the following features. Aspects can further include determining that the transcription includes the command to initiate the communication and a segment that is classified as direct speech; and in response to determining that the transcription includes the command to initiate the communication and the segment that is classified as direct speech, initiating a communication that includes the segment that is classified as direct speech. The machine translator can determine a semantic meaning of the segment that is classified as indirect speech. The machine translator can also generate the direct speech segment to include a meaning that matches the semantic meaning of the segment that is classified as indirect speech. The machine translator can apply a set of grammar rules to the segment that is classified as indirect speech to convert the segment that is classified as indirect speech to the direct speech segment. Determining whether the transcription includes a segment that is classified as indirect speech can include identifying a transitional word disposed between the command and a segment of the transcription and determining whether the segment of the transcription includes an indirect speech segment. Aspects can further include identifying a portion of the transcription as a candidate indirect speech segment; determining a confidence score for the candidate indirect speech segment, the confidence score specifying a measure of confidence that the candidate indirect speech segment is an indirect speech segment; determining that the confidence score satisfies a confidence threshold; and classifying the candidate indirect speech segment as indirect speech in response to the confidence score satisfying the confidence threshold. The machine translator can convert the segment that is classified as indirect speech to the direct speech segment by adjusting an order of words in the segment that is classified as indirect speech to generate the direct speech segment. The machine translator can convert the segment that is classified as indirect speech to the direct speech segment by replacing a word of the segment that is classified as indirect speech with another word different than the word to generate the direct speech segment. Aspects can further include providing the communication including the direct speech segment for confirmation prior to sending the communication; receiving confirmation data indicating that the communication has been confirmed; and sending the communication in response to receiving the confirmation data. Particular embodiments of the subject matter described in this specification can be implemented so as to realize one or more of the following advantages. Users can initiate communications to other users using more natural speech, rather than being required to speak particular command phrases and their message in a direct speech format. Users can more quickly provide voice commands as they are not required to provide two distinct phrases, a particular command phrase and a message phrase.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |