Word enhancement in automatic speech recognition
By adjusting the language model scores of specific words in the language model of the ASR system, the problem of excessive enhancement caused by word enhancement is solved, and the accuracy of speech recognition and user experience of the system are improved.
Patent Information
- Application Number
- CN202380053162.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2022-07-14
- Filing Date
- 2023-07-11
- Publication Date
- 2025-02-28
AI Technical Summary
Existing automatic speech recognition (ASR) systems use word enhancement, which can easily lead to excessive enhancement and reduce the transcription accuracy of other discourses.
By selecting the target word in the language model and receiving enhancement factors for the target word, the language model scores of multiple n-tuples are adjusted to improve the recognition accuracy of specific words without affecting the recognition of other words.
Improves overall accuracy of the ASR system when performing voice control operations and audio transcription, providing a more intuitive, robust and engaging user experience.
Smart Images

Figure CN119547137A_ABST
Abstract
Description
[0001] Priority claim
[0002] This application claims the benefit of priority to U.S. patent application Ser. No. 17 / 864,937, filed on July 14, 2022, which is incorporated herein by reference in its entirety. Technical Field
[0003] The present disclosure relates generally to the technical field of automatic speech recognition (ASR). Background Art
[0004] As the popularity of social networks grows, they are expanding their capabilities. To improve ease of use, social networks are integrating more and more features so that users can complete many or even most of their computer-based tasks within the social network itself. Some social networks allow users to control various operations using voice. BRIEF DESCRIPTION OF THE DRAWINGS
[0005] In the accompanying drawings (which are not necessarily drawn to scale), similar reference numerals may describe similar components in different views. To easily identify the discussion of any particular element or action, the most significant digit or digits in a reference numeral refer to the figure number in which the element is first introduced. Some non-limiting examples are shown in the accompanying drawings, in which:
[0006] Figure 1 is a diagrammatic representation of a networking environment in which the present disclosure may be deployed, according to some examples.
[0007] Figure 2 is a diagrammatic representation of a messaging system having both client-side and server-side functionality according to some examples.
[0008] Figure 3 is a diagrammatic representation of data structures as maintained in a database according to some examples.
[0009] Figure 4 is a graphical representation of messages according to some examples.
[0010] Figure 5 A word-enhanced automatic speech recognition (ASR) system according to some examples is shown.
[0011] Figure 6 Example language models according to some examples are shown.
[0012] Figure 7 is an example probability distribution of n-tuple scores according to some examples.
[0013] Figure 8is a flow diagram illustrating example operation of a term-enhanced ASR system according to some examples.
[0014] Fig. 9 is a diagrammatic representation of a machine in the form of a computer system according to some examples within which a set of instructions may be executed for causing the machine to perform any one or more of the methodologies discussed herein.
[0015] Fig.10 is a block diagram illustrating a software architecture in which examples may be implemented. DETAILED DESCRIPTION
[0016] The following description includes systems, methods, techniques, instruction sequences and computing machine program products that implement the illustrative examples of the present disclosure. In the following description, for the purpose of illustration, many specific details are set forth to provide an understanding of various examples. However, it will be apparent to those skilled in the art that examples may be practiced without these specific details. Typically, it is not necessary to show in detail known instruction instances, protocols, structures and techniques.
[0017] Automatic speech recognition (ASR) engines typically consist of an acoustic component and a decoder. The acoustic component converts the user's speech into the logit (logarithmic probability) of the inferred characters of the phonemes, and the decoder applies beam search and language models to determine the best combination / alternative of characters / phonemes as the resulting transcription. In this setting, the role of the decoder is to increase the probability of acoustic options based on their likelihood scores (LM scores) in the language model. The language model is used to determine the likelihood of a sequence of words based on their occurrence in a large language corpus. The language model initially examines the corpus, extracts a distribution model from it, and then uses the distribution model at runtime to determine the likelihood of a given sequence of words. The likelihood of an n-gram can be referred to as an n-gram score or LM score.
[0018] Language models (LMs) typically use a list of n-grams (sequences of n words - unigrams, bigrams, trigrams, etc., usually up to n=6) and their likelihood in the language (as embodied in the training corpus). LMs also implement smoothing, a method of determining the likelihood of n-grams not seen in the corpus by looking at the "fallback" probabilities of the n-1 prefixes of the n-gram, and the likelihood of the n-1 suffixes. For example, if the n-gram I_am_here_already is not in the LM, its likelihood will be calculated by probability of am_here_already * (fallback of I_am_here).
[0019] Some systems provide contextual enhancement operations to allow users to specify a set of predefined words and phrases as commands for activating specific functions. For users who try to perform specific functions, enhancing such words improves ASR accuracy. In order to perform such enhancement operations, LM hacking changes the LM model score as a preprocessing step for a known set of enhanced words that will be used at runtime, or dynamically modifies its results for a temporary set of enhanced words given at runtime. Specifically, when a set of words is expected in a certain discourse, a common method to improve the accuracy of ASR transcription or recognition is to improve the probability scores of these words in the decoder or LM. This method is generally referred to as "enhancement" or applying "word context". Typical systems apply enhancement without considering how such enhancement affects other words or n-grams in the LM. This causes the probability of enhanced words to become too high and cover acoustic details, and causes enhanced words to be returned even when the user does not use them. This "over-enhancement" substantially reduces the accuracy of ASR transcription for such discourse.
[0020] The disclosed techniques improve ASR recognition of certain enhanced words in an intelligent way. The disclosed techniques safely increase the probability of transcribing an expected set of words / utterances while safely maintaining the probability of other alternatives that do not use the words. The disclosed techniques allow improving ASR transcription accuracy without any degradation for other utterances. The disclosed techniques can be implemented as part of a decoder (referred to as online alternatives) or by changing the language model used by the decoder as a pre-processing step (referred to as offline alternatives).
[0021] According to the disclosed technology, a language model including multiple n-grams is accessed, wherein each of the multiple n-grams includes a corresponding sequence of words and a corresponding LM score. The disclosed technology selects a target word to be enhanced in the language model, and receives an enhancement factor for the target word. The enhancement factor can be received from a developer of an experience (e.g., a messaging application feature) such as an augmented reality (AR) experience utilizing LM. The disclosed technology identifies a subset of n-grams including the target word in multiple n-grams, and adjusts the LM score of the first n-gram in the subset of n-grams based on the LM score and the enhancement factor of the subset of n-grams. By considering the LM scores of other n-grams in the LM when modifying the score in the LM (increase or decrease) for a specific word, the LM can enhance the recognition of a specific word without adversely affecting the recognition of other words and phrases in the LM.
[0022] In some examples, the enhancement factor may be applied temporarily based on the context. That is, the enhancement factor is applied while a particular feature (or context) associated with the enhancement factor is being accessed or executed. This causes the LM score of the associated word or phrase to increase / decrease while the particular feature is being accessed or executed. After the context ends or after the particular feature stops being accessed or executed, the LM score of the associated word or phrase returns to its original value.
[0023] In some examples, the enhancement factor is applied in an absolute sense, where a specified percentile input associated with the enhancement factor is used to directly modify and replace the LM score of the target word or phrase. In such a case, a distribution of scores for other words with the same prefix (excluding the same word sequence of the associated word or phrase as a suffix) can be obtained. The percentile that matches the specified percentile of the input is identified and used to retrieve the word corresponding to the matching percentile in the distribution. The LM score of the word is used to replace the LM score of the target word or phrase.
[0024] In other cases, the enhancement factor is applied in a relative sense. In such a case, the enhancement factor can be received as a specified percentile, which is applied relative to the percentile or LM score of other words or phrases. That is, the score distribution of other words with the same prefix (excluding the same word sequence of the associated words or phrases as suffixes) can be obtained. The percentile of the target word or phrase is identified within the score distribution, and a search for all prefixes with a larger percentile is performed. The identified prefix is used to generate a new distribution of the associated LM score. The enhancement factor is used to determine the percentile in the percentile in the new distribution that matches the percentile of the enhancement factor. The LM score of the prefix associated with the matching percentile is used to replace the LM score of the target word or phrase.
[0025] This significantly improves the overall ability of a social networking system to perform ASR to control operations and perform audio transcription. In this way, the disclosed technology provides a more intuitive, robust, and engaging experience. This reduces the amount of resources required to perform conventional social networking tasks and operations.
[0026] Networked computing environment
[0027] Figure 11 is a block diagram illustrating an example messaging system 100 for exchanging data (e.g., messages and associated content) over a network. The messaging system 100 includes multiple instances of a client device 102, each of the multiple instances hosting a number of applications including a messaging client 104 and other external applications 109 (e.g., third-party applications). Each messaging client 104 is communicatively coupled to other instances of the messaging client 104 (e.g., hosted on corresponding other client devices 102), a messaging server system 108, and an external application server 110 via a network 112 (e.g., the Internet). The messaging client 104 may also communicate with locally hosted third-party applications such as the external application 109 using an application program interface (API).
[0028] The client device 102 can operate as a standalone device, or can be coupled (e.g., networked) to other machines. In a networked deployment, the client device 102 can operate in a server-client network environment with the capabilities of a server machine or a client machine, or in a peer-to-peer (or distributed) network environment as a peer machine. The client device 102 may include, but is not limited to, a server computer, a client computer, a personal computer (PC), a tablet computer, a notebook computer, a netbook, a set-top box (STB), a personal digital assistant (PDA), an entertainment media system, a cellular phone, a smart phone, a mobile device, a wearable device (e.g., a smart watch), a smart home device (e.g., a smart appliance), other smart devices, a web device, a network router, a network switch, a network bridge, or any machine capable of performing the disclosed operations. In addition, although only a single client device 102 is shown, the term "client device" should also be considered to include a collection of machines that perform the disclosed operations individually or jointly.
[0029] In some examples, client device 102 may include AR glasses or AR headsets, where virtual content is displayed within the lenses of the glasses while the user views the real world environment through the lenses. For example, an image may be presented on a transparent display, which allows the user to view content presented on the display and real-world objects simultaneously.
[0030] The messaging clients 104 are able to communicate and exchange data with other messaging clients 104 and messaging server systems 108 via the network 112. The data exchanged between the messaging clients 104 and between the messaging clients 104 and messaging server systems 108 include functions (e.g., commands for activating functions) and payload data (e.g., text, audio, video, or other multimedia data).
[0031] The messaging server system 108 provides server-side functionality to certain messaging clients 104 via the network 112. Although certain functionality of the messaging system 100 is described herein as being performed by either the messaging client 104 or the messaging server system 108, it may be a design choice whether certain functionality is located within the messaging client 104 or within the messaging server system 108. For example, it may be technically preferable to initially deploy certain technologies and functionality within the messaging server system 108, but to later migrate the technologies and functionality to the messaging client 104 where the client device 102 has sufficient processing power.
[0032] The messaging server system 108 supports various services and operations provided to the messaging clients 104. Such operations include sending data to the messaging clients 104, receiving data from the messaging clients 104, and processing data generated by the messaging clients 104. As examples, the data may include message content, client device information, geographic location information, media enhancements and overlays, message content persistence conditions, social network information, watermarks (combined indications of messages and responses being read or presented to a user of the client device 102), and live event information. The exchange of data within the messaging system 100 is activated and controlled by functions available via a user interface (UI) of the messaging client 104.
[0033] Turning now specifically to the messaging server system 108, an API server 116 is coupled to and provides a programming interface to the application server 114. The application server 114 is communicatively coupled to a database server 120, which facilitates access to a database 126 that stores data associated with messages and responses processed by the application server 114. Similarly, a web server 128 is coupled to and provides a web-based interface to the application server 114. To this end, the web server 128 processes incoming network requests via the Hypertext Transfer Protocol (HTTP) and several other related protocols.
[0034] The API server 116 receives and sends message data (e.g., watermarks, commands, and message payloads) between the client device 102 and the application server 114. Specifically, the API server 116 provides a set of interfaces (e.g., routines and protocols) that can be called or queried by the messaging client 104 to activate the functionality of the application server 114. The API server 116 exposes various functions supported by the application server 114, including: account registration; login functionality; sending messages from a particular messaging client 104 to another messaging client 104 via the application server 114; sending media files (e.g., images or videos) from the messaging client 104 to the messaging server 118 and for possible access by another messaging client 104; setting up a collection of media data (e.g., a story); retrieving a friend list of the user of the client device 102; retrieving such a collection; retrieving messages and content; adding and removing entities (e.g., friends) from an entity graph (e.g., a social graph); locating friends in a social graph; and opening application events (e.g., related to the messaging client 104).
[0035] The application server 114 hosts several server applications and subsystems, including, for example, a messaging server 118, an image processing server 122, and a social network server 124. The messaging server 118 implements several message processing technologies and functions, particularly those related to aggregation and other processing of content (e.g., text and multimedia content) included in messages received from multiple instances of the messaging client 104. As will be described in further detail, text and media content from multiple sources can be aggregated into collections of content (e.g., called stories or galleries). These collections are then made available to the messaging client 104. In view of the hardware requirements for other processor and memory intensive processing of data, such processing can also be performed on the server side by the messaging server 118.
[0036] The application server 114 also includes an image processing server 122 that is dedicated to performing various image processing operations, typically on images or videos within the payload of messages sent from or received at the messaging server 118 .
[0037] The social network server 124 supports various social networking functions and services and makes them available to the messaging server 118. To this end, the social network server 124 maintains and accesses an entity graph 308 (e.g., Figure 3). Examples of functions and services supported by the social networking server 124 include identifying other users of the messaging system 100 that have a relationship with a particular user or that the particular user is "following," and also include identifying interests and other entities of a particular user.
[0038] Returning to the messaging client 104, the features and functions of the external resource (e.g., external application 109 or applet) are available to the user via the interface of the messaging client 104. The messaging client 104 receives a user selection of an option for launching or accessing features of an external resource (e.g., a third-party resource) such as an external application 109. The external resource can be a third-party application (external application 109) installed on the client device 102 (e.g., a "native application"), or a small-scale version of a third-party application (e.g., a "mini-program") hosted on the client device 102 or located far from the client device 102 (e.g., on an external application server 110). The small-scale version of the third-party application includes a subset of the features and functions of the third-party application (e.g., a full-scale, native version of a third-party standalone application) and is implemented using a markup language document. In one example, the small-scale version of the third-party application (e.g., a "mini-program") is a web-based markup language version of the third-party application and is embedded in the messaging client 104. In addition to using markup language documents (eg, *ml files), applets may include scripting languages (eg, .*js files or .json files) and style sheets (eg, *ss files).
[0039] In response to receiving a user's selection of an option for launching or accessing a feature of an external resource (external application 109), the messaging client 104 determines whether the selected external resource is a web-based external resource or a locally installed external application. In some cases, the external application 109 locally installed on the client device 102 can be independently launched from the messaging client 104 and separately from the messaging client 104, for example, by selecting an icon corresponding to the external application (app) 109 on the home screen of the client device 102. A small-scale version of such an external application can be launched or accessed via the messaging client 104, and in some examples, no part of the small-scale external application can be (or only a limited part can be) accessed outside the messaging client 104. The small-scale external application can be launched by the messaging client 104 receiving a markup language document associated with the small-scale external application from the external application server 110 and processing such a document.
[0040] In response to determining that the external resource is a locally installed external application 109, the messaging client 104 instructs the client device 102 to launch the external application 109 by executing the locally stored code corresponding to the external application 109. In response to determining that the external resource is a web-based resource, the messaging client 104 communicates with the external application server 110 to obtain a markup language document corresponding to the selected resource. The messaging client 104 then processes the obtained markup language document to present the web-based external resource within the user interface of the messaging client 104.
[0041] The messaging client 104 may notify the user of the client device 102 or other users (e.g., "friends") associated with such a user of activities occurring in one or more external resources. For example, the messaging client 104 may provide a notification related to the current or recent use of an external resource by one or more members of a user group to a participant in a conversation (e.g., a chat session) in the messaging client 104. One or more users may be invited to join an active external resource or to start an external resource that was recently used but is currently inactive (in the friend group). The external resource may provide the participants in the conversation who each use the corresponding messaging client 104 with the ability to share items, conditions, states, or locations in the external resource with one or more members of the user group entering the chat session. The shared item may be an interactive chat card, and members of the chat may interact with the interactive chat card to, for example, start the corresponding external resource, view specific information in the external resource, or bring members of the chat to a specific location or state in the external resource. Within a given external resource, a response message may be sent to the user on the messaging client 104. The external resource may selectively include different media items in the response based on the current context of the external resource.
[0042] The messaging client 104 may present a list of available external resources (e.g., third-party or external applications 109 or applets) to the user to launch or access a given external resource. The list may be presented in a context-sensitive menu. For example, icons representing different external applications in the external applications 109 (or applets) may vary based on how the user launches the menu (e.g., from a conversation interface or from a non-conversation interface).
[0043] In some examples, the messaging client 104 may implement the following combination: Figure 5 The terms discussed enhance one or more functions of the ASR system 230 .
[0044] System Architecture
[0045] Figure 21 is a block diagram showing additional details about the messaging system 100 according to some examples. Specifically, the messaging system 100 is shown to include a messaging client 104 and an application server 114. The messaging system 100 contains several subsystems that are supported on the client side by the messaging client 104 and on the server side by the application server 114. These subsystems include, for example, a transient timer system 202, a collection management system 204, an enhancement system 208, a map system 210, a game system 212, an external resource system 220, and a word enhancement ASR system 230.
[0046] The transient timer system 202 is responsible for implementing temporary or time-limited access to content by the messaging client 104 and the messaging server 118. The transient timer system 202 includes several timers that selectively enable access to messages and associated content (e.g., for presentation and display) via the messaging client 104 based on duration and display parameters associated with a message or a collection of messages (e.g., a story). Additional details regarding the operation of the transient timer system 202 are provided below.
[0047] The collection management system 204 is responsible for managing collections or collections of media (e.g., collections of text, image video, and audio data). Collections of content (e.g., messages, including images, videos, text, and audio) can be organized into "event galleries" or "event stories." Such collections can be available for a specified period of time (e.g., the duration of an event related to the content). For example, content related to a concert can be made available as a "story" for the duration of the concert. The collection management system 204 can also be responsible for publishing an icon that provides notification of the existence of a particular collection to the user interface of the messaging client 104.
[0048] In addition, the collection management system 204 also includes a curation interface 206, which allows collection managers to manage and curate specific content collections. For example, the curation interface 206 enables an event organizer to curate a collection of content related to a specific event (e.g., to delete inappropriate content or redundant messages). In addition, the collection management system 204 uses machine vision (or image recognition technology) and content rules to automatically curate content collections. In some examples, compensation can be paid to users for including user-generated content in a collection. In such a case, the collection management system 204 operates to automatically pay such users for use of their content.
[0049] The enhancement system 208 provides various functions that enable users to enhance (e.g., annotate or otherwise modify or edit) media content associated with a message. For example, the enhancement system 208 provides functions related to generating and publishing media overlays for messages processed by the messaging system 100. The enhancement system 208 is operable to provide media overlays or enhancements (e.g., image filters or augmented reality items) to the messaging client 104 based on the geographic location of the client device 102. In another example, the enhancement system 208 is operable to provide media overlays to the messaging client 104 based on other information such as social network information of the user of the client device 102. Media overlays can include audio and visual content and visual effects. Examples of audio and visual content include pictures, text, logos, animations, and sound effects. In some cases, media overlays are referred to as augmented reality items. Examples of visual effects include color overlays. Audio and visual content or visual effects can be applied to media content items (e.g., photos) at the client device 102. For example, media overlays can include text, graphic elements, or images that can be superimposed on photos taken by the client device 102. In another example, the media overlay includes a location identification overlay (e.g., Venice Beach), the name of a live event, or a business name overlay (e.g., Beach Cafe). In another example, the enhancement system 208 uses the geographic location of the client device 102 to identify a media overlay that includes the name of a business at the geographic location of the client device 102. The media overlay may include other tags associated with the business. The media overlay may be stored in the database 126 and accessed by the database server 120.
[0050] In some examples, the enhancement system 208 provides a user-based publishing platform that enables a user to select a geographic location on a map and upload content associated with the selected geographic location. The user can also specify situations in which a particular media overlay should be provided to other users. The enhancement system 208 generates a media overlay that includes the uploaded content and associates the uploaded content with the selected geographic location.
[0051] In other examples, the enhancement system 208 provides a merchant-based publishing platform that enables merchants to select specific media overlays associated with a geographic location via a bidding process. For example, the enhancement system 208 associates the media overlays of the highest bidding merchant with the corresponding geographic location for a predefined amount of time. The enhancement system 208 communicates with the image processing server 122 to automatically select and activate an augmented reality experience associated with an image captured by the client device 102. Once the augmented reality experience is selected, when the user scans the image using a camera in the user's environment, one or more images, videos, or augmented reality graphic elements are retrieved and presented as an overlay on the scanned image. In some cases, the camera is switched to a front view (e.g., the front camera of the client device 102 is activated in response to the activation of a specific augmented reality experience), and an image from the front camera of the client device 102 instead of the rear camera of the client device 102 begins to be displayed on the client device 102. One or more images, videos, or augmented reality graphical elements are retrieved and presented as an overlay on top of the image captured and displayed by the front-facing camera of the client device 102 .
[0052] The enhancement system 208 allows users to create customized media overlays or augmented reality items. Such media overlays may include one or more different feature types. For example, media overlays may include features based on facial tracking, wherein one or more augmented reality items are modified based on the movement of facial features detected in the received or captured image or video. As another example, media overlays may include features based on audio clips, wherein sound clips or audio clips are associated with one or more augmented reality items presented in the received or captured image or video. As another example, media overlays may include features based on gyroscopes or accelerometers, wherein one or more augmented reality items are modified based on the movement of the client device 102 on which the received or captured image or video is displayed. Customized media overlays may be shared with other users of messaging applications. Other users may choose to start or access customized media overlays. In response, the features of customized media overlays are retrieved and used to enhance or modify one or more images or videos presented on the client devices of other users.
[0053] The mapping system 210 provides various geo-location functions and supports presentation of map-based media content and messages by the messaging client 104. For example, the mapping system 210 enables display of (e.g., stored in Figure 3The user icon or avatar (in the profile data 316 shown) may be displayed to indicate the current or past location of the user's "friends", as well as to display media content (e.g., a collection of messages including photos and videos) generated by such friends in the context of a map. For example, messages posted by a user to the messaging system 100 from a particular geographic location may be displayed to the particular user's "friends" in the context of a map on the map interface of the messaging client 104 at that particular location. The user may also share his or her location and status information with other users of the messaging system 100 (e.g., using an appropriate status avatar) via the messaging client 104, where the location and status information is similarly displayed to the selected user in the context of the map interface of the messaging client 104.
[0054] The game system 212 provides various game functions in the context of the messaging client 104. The messaging client 104 provides a game interface that provides a list of available games (e.g., web-based games or web-based applications) that can be started by a user within the context of the messaging client 104 and played with other users of the messaging system 100. The messaging system 100 also enables a specific user to invite such other users to participate in playing a specific game by sending an invitation from the messaging client 104 to other users. The messaging client 104 also supports both voice messaging and text messaging (e.g., chatting) in the context of playing games, provides leaderboards for games, and also supports providing in-game rewards (e.g., game coins and items). Based on the intent classification of the voice input and the accurate transcription of the voice input, the messaging client 104 can perform game-based functions.
[0055] The external resource system 220 provides an interface for communicating with an external application server 110 to start or access external resources to the messaging client 104. Each external resource (application) server 110 hosts, for example, an application based on a markup language (e.g., HTML5) or a small-scale version of an external application (e.g., a game, utility, payment, or ride-sharing application external to the messaging client 104). The messaging client 104 can start the web-based resource (e.g., application) by accessing an HTML5 file from an external resource (application) server 110 associated with a web-based resource. In some examples, the application hosted by the external resource server 110 is programmed in JavaScript using a software development kit (SDK) provided by the messaging server 118. The SDK includes an application programming interface (API) with functions that can be called or activated by a web-based application. In some examples, the messaging server 118 includes a JavaScript library that provides access to certain user data of the messaging client 104 to a given third-party resource. HTML5 is used as an example technology for programming games, but applications and resources programmed based on other technologies can be used. Based on the intent classification of the speech input and the accurate transcription of the speech input, the messaging client 104 can perform external resource-based functions.
[0056] In order to integrate the functionality of the SDK into a web-based resource, the SDK is downloaded from the messaging server 118 by the external resource (application) server 110 or received in other ways by the external resource (application) server 110. Once downloaded or received, the SDK is included as part of the application code of the web-based external resource. The code of the web-based resource can then call or activate certain functions of the SDK to integrate the features of the messaging client 104 into the web-based resource.
[0057] The SDK stored on the messaging server 118 effectively provides a bridge between external resources (e.g., a third party or external application 109 or applet and a messaging client 104). This provides users with a seamless experience of communicating with other users on the messaging client 104 while retaining the look and feel of the messaging client 104. In order to bridge the communication between the external resources and the messaging client 104, in some examples, the SDK facilitates the communication between the external resource server 110 and the messaging client 104. In some examples, the WebViewJavaScriptBridge running on the client device 102 establishes two one-way communication channels between the external resources and the messaging client 104. Messages are sent asynchronously via these communication channels between the external resources and the messaging client 104. Each SDK function activation is sent as a message and a callback. Each SDK function is implemented by constructing a unique callback identifier and sending a message with the callback identifier.
[0058] By using the SDK, not all information from the messaging client 104 is shared with the external resource server 110. The SDK limits which information is shared based on the needs of the external resource. In some examples, each external resource server 110 provides an HTML5 file corresponding to a web-based external resource to the messaging server 118. The messaging server 118 can add a visual representation (e.g., box art or other graphics) of the web-based external resource in the messaging client 104. Once the user selects the visual representation or instructs the messaging client 104 to access the features of the web-based external resource through the GUI of the messaging client 104, the messaging client 104 obtains the HTML5 file and instantiates the resources required to access the features of the web-based external resource.
[0059] The messaging client 104 presents a graphical user interface (e.g., a login page or title screen) for the external resource. During, before, or after presenting the login page or title screen, the messaging client 104 determines whether the launched external resource has been previously authorized to access the user data of the messaging client 104. In response to determining that the launched external resource has been previously authorized to access the user data of the messaging client 104, the messaging client 104 presents another graphical user interface of the external resource, which includes the functions and features of the external resource. In response to determining that the launched external resource has not been previously authorized to access the user data of the messaging client 104, after a threshold time period (e.g., 3 seconds) of displaying the login page or title screen of the external resource, the messaging client 104 slides a menu for authorizing the external resource to access the user data (e.g., animating the menu to emerge from the bottom of the screen to the middle or other portion of the screen). The menu identifies the type of user data that the external resource will be authorized to use. In response to receiving the user selection of the accept option, the messaging client 104 adds the external resource to the list of authorized external resources and enables the external resource to access the user data from the messaging client 104. In some examples, the external resource is authorized to access the user data by the messaging client 104 according to the OAuth 2 framework.
[0060] The messaging client 104 controls the type of user data shared with the external resource based on the type of external resource that is authorized. For example, access to a first type of user data (e.g., only a two-dimensional avatar of a user with or without different avatar characteristics) is provided to an external resource including a full-scale external application (e.g., a third party or external application 109). As another example, access to a second type of user data (e.g., payment information, a two-dimensional avatar of a user, a three-dimensional avatar of a user, and an avatar with various avatar characteristics) is provided to an external resource including a small-scale version of an external application (e.g., a web-based version of a third-party application). Avatar characteristics include different ways to customize the look and feel of an avatar (e.g., different poses, facial features, clothing, etc.).
[0061] The term enhancement ASR system 230 receives input selecting a target term and an enhancement factor associated with the target term. The target term can be a term associated with the functionality and / or a particular AR experience of the messaging client 104. The target term can be enhanced by the term enhancement ASR system 230 to increase the likelihood that the ASR engine recognizes an n-gram that includes the target term (e.g., as a suffix of the n-gram), or to reduce the likelihood that the ASR engine recognizes an n-gram that includes the target term (e.g., as a suffix of the n-gram). In this way, when using the functionality and / or particular AR experience of the messaging client 104, the likelihood of operations based on incorrect transcription and speech recognition is lower.
[0062] Combination Figure 5 Further details of the word-enhanced ASR system 230 are provided.
[0063] Data Architecture
[0064] Figure 3 is a schematic diagram illustrating a data structure 300 that may be stored in a database 126 of a messaging server system 108 according to some examples. Although the contents of the database 126 are illustrated as including several tables, it will be appreciated that data may be stored in other types of data structures (e.g., as an object-oriented database).
[0065] Database 126 includes message data stored in message table 302. For any particular message, the message data includes at least message sender data, message recipient (or receiver) data, and payload. Figure 4 Additional details regarding information that may be included in a message and included within the message data stored in message table 302 are described.
[0066] The entity table 306 stores entity data and is linked (e.g., by reference) to the entity graph 308 and profile data 316. The entities whose records are maintained within the entity table 306 may include individuals, corporate entities, organizations, objects, places, events, etc. Regardless of the entity type, any entity about which the messaging server system 108 stores data may be an identified entity. Each entity is provided with a unique identifier as well as an entity type identifier (not shown).
[0067] The entity graph 308 stores information about relationships and associations between entities. By way of example only, such relationships may be social, professional (e.g., working in a common company or organization), interest-based, or activity-based.
[0068] Profile data 316 stores multiple types of profile data about a particular entity. Based on the privacy settings specified by the particular entity, profile data 316 can be selectively used and presented to other users of the messaging system 100. In the case where the entity is a person, profile data 316 includes, for example, a user name, phone number, address, settings (e.g., notification and privacy settings), and an avatar representation (or a collection of such avatar representations) selected by the user. A particular user can then selectively include one or more of these avatar representations within the content of messages transmitted via the messaging system 100 and on a map interface displayed to other users by the messaging client 104. The collection of avatar representations can include a "status avatar" that presents a graphical representation of a status or activity that a user may choose to convey at a particular time.
[0069] Where the entity is a group, profile data 316 for the group may similarly include one or more avatar representations associated with the group, in addition to the group name, members, and various settings for the relevant group (eg, notifications).
[0070] The database 126 also stores enhancement data, such as overlays or filters, in an enhancement table 310. The enhancement data is associated with and applied to videos (data for videos is stored in the video table 304) and images (data for images is stored in the image table 312).
[0071] In one example, a filter is an overlay displayed as an overlay on an image or video during presentation to a recipient user. The filter can be of various types, including a user-selected filter from a set of filters presented to a sending user by the messaging client 104 when the sending user is composing a message. Other types of filters include geolocation filters (also referred to as geofilters), which can be presented to a sending user based on geographic location. For example, a geolocation filter specific to a nearby or specific location can be presented by the messaging client 104 within a user interface based on geographic location information determined by a global positioning system (GPS) unit of the client device 102.
[0072] Another type of filter is a data filter that can be selectively presented to the sending user by the messaging client 104 based on other input or information collected during the message creation process by the client device 102. Examples of data filters include the current temperature at a particular location, the current speed the sending user is traveling, the battery life of the client device 102, or the current time.
[0073] Other augmented data that may be stored in the image table 312 include augmented reality content items (eg, corresponding to an application lens or augmented reality experience). Augmented reality content items may be real-time special effects and sounds that may be added to an image or video.
[0074] As described above, augmented data includes augmented reality content items, overlays, image transformations, AR images, and similar items involving modifications that can be applied to image data (e.g., videos or images). This includes real-time modifications that modify the image when it is captured using a device sensor (e.g., one or more cameras) of the client device 102 and then display the image with the modifications on the screen of the client device 102. This also includes modifications to stored content (e.g., video clips in a gallery that can be modified). For example, in a client device 102 that can access multiple augmented reality content items, a user can use a single video clip with multiple augmented reality content items to see how different augmented reality content items will modify the stored clips. For example, by selecting different augmented reality content items for the content, multiple augmented reality content items that apply different pseudo-random movement models can be applied to the same content. Similarly, real-time video capture can be used with the modifications shown to show how the video image currently captured by the sensor of the client device 102 will modify the captured data. Such data may be displayed only on the screen and not stored in memory, or the content captured by the device sensors may be recorded and stored in memory with or without modification (or both). In some systems, a preview feature may simultaneously show how different augmented reality content items will look in different windows in the display. This may, for example, enable viewing of multiple windows with different pseudo-random animations on the display at the same time.
[0075] Thus, data and various systems using augmented reality content items or other such transformation systems using the data to modify content may involve: detection of objects (e.g., faces, hands, bodies, cats, dogs, surfaces, objects, etc.) in video frames; tracking such objects as they leave, enter, and move around the field of view; and modifying or transforming such objects as they are tracked. In various examples, different methods for implementing such transformations may be used. Some examples may involve: generating a three-dimensional mesh model of one or more objects, and using transformations and animated textures of the models within a video to implement the transformations. In other examples, tracking of points on an object may be utilized to place an image or texture (which may be two-dimensional or three-dimensional) at the tracked location. In yet another example, a neural network analysis of a video frame may be used to place an image, model, or texture in content (e.g., an image or frame of a video). Thus, augmented reality content items refer both to images, models, and textures used to create transformations in content, and to additional modeling and analysis information required to implement such transformations using object detection, tracking, and placement.
[0076] Real-time video processing can be performed using any type of video data (e.g., video streams, video files, etc.) stored in the memory of any type of computerized system. For example, a user can load a video file and save it in the memory of the device, or a sensor of the device can be used to generate a video stream. In addition, computer animation models can be used to process any object, such as human faces and body parts, animals, or inanimate objects (e.g., chairs, cars, or other objects).
[0077] In some examples, when a specific modification is selected together with the content to be transformed, the elements to be transformed are identified by a computing device, and then if the elements are present in the frame of the video, they are detected and tracked. The elements of the object are modified according to the modification request, thereby transforming the frame of the video stream. For different types of transformations, the transformation of the frame of the video stream can be performed by different methods. For example, for a frame transformation that mainly involves changing the form of the elements of the object, the feature points of each element of the object are calculated (for example, using an active shape model (Active Shape Model, ASM) or other known methods). Then, a grid based on the feature points is generated for each element of at least one element of the object. The grid is used for the subsequent stage of tracking the elements of the object in the video stream. During the tracking process, the grid mentioned for each element is aligned with the positioning of each element. Then, additional points are generated on the grid. A first group of first points is generated for each element based on the modification request, and a group of second points is generated for each element based on the group of first points and the modification request. Then, the frame of the video stream can be transformed by modifying the elements of the object based on the group of first points, the group of second points and the grid. In such an approach, the background of the modified object may also be changed or distorted by tracking and modifying the background.
[0078] In some examples, a transformation that changes some areas of an object using elements of an object can be performed by calculating characteristic points of each element of the object and generating a grid based on the calculated characteristic points. Points are generated on the grid, and then various areas are generated based on the points. The elements of the object are then tracked by aligning the area for each element with the positioning for each element of at least one element, and the properties of the area can be modified based on the modification request, thereby transforming the frame of the video stream. Depending on the specific modification request, the properties of the mentioned area can be transformed in different ways. Such modifications can involve changing the color of the area; removing at least some parts of the area from the frame of the video stream; including one or more new objects into the area based on the modification request; and modifying or distorting the elements of the area or object. In various examples, any combination of such modifications or other similar modifications can be used. For certain models to be animated, some characteristic points can be selected as control points for the entire state space to be used to determine options for model animation.
[0079] In some examples of computer animation models for transforming image data using face detection, faces are detected on an image using a specific face detection algorithm (e.g., Viola-Jones). An active shape model (ASM) algorithm is then applied to the face region of the image to detect facial feature reference points.
[0080] Other methods and algorithms suitable for face detection can be used. For example, in some examples, landmarks are used to locate features, and the landmarks represent distinguishable points that are present in most of the images considered. For example, for facial landmarks, the location of the left pupil can be used. If the initial landmarks are not identifiable (for example, when a person is wearing an eye patch), secondary landmarks can be used. Such a landmark identification process can be used for any such object. In some examples, a set of landmarks forms a shape. The coordinates of the points in the shape can be used to represent the shape as a vector. A similarity transformation (which allows translation, scaling, and rotation) that minimizes the average Euclidean distance between the shape points is used to align one shape with another. The average shape is the average of the aligned training shapes.
[0081] In some examples, the landmark search begins with an average shape that aligns with the location and size of the face as determined by a global face detector. Such a search then repeats the steps of proposing tentative shapes by template matching the image texture around each point to adjust the position of the shape points, and then conforming the tentative shapes to the global shape model until convergence occurs. In some systems, template matching alone is unreliable, and the shape model pools the results of weak template matches to form a stronger overall classifier. The entire search is repeated at each level in the image pyramid from coarse to fine resolution.
[0082] The transformation system can capture an image or video stream on a client device (e.g., client device 102) and perform complex image manipulations locally on the client device 102 while maintaining an appropriate user experience, computation time, and power consumption. Complex image manipulations can include size and shape changes, emotion transitions (e.g., changing a face from a frown to a smile), state transitions (e.g., aging a subject, reducing apparent age, changing gender), style transitions, application of graphical elements, and any other suitable image or video manipulations enabled by a convolutional neural network that has been configured to execute efficiently on the client device 102.
[0083] In some examples, a computer animation model for transforming image data can be used by a system in which a user can capture an image or video stream of the user (e.g., a selfie) using a client device 102 having a neural network, where the neural network operates as part of a messaging client 104 operating on the client device 102. A transformation system operating within the messaging client 104 determines the presence of a face within the image or video stream and provides a modification icon associated with the computer animation model for transforming the image data, or the computer animation model can exist in association with an interface described herein. The modification icon includes the following changes, which can be the basis for modifying the user's face within the image or video stream as part of the modification operation. Once the modification icon is selected, the transformation system initiates a process of transforming the user's image to reflect the selected modification icon (e.g., generating a smiling face for the user). Once the image or video stream is captured and the specified modification is selected, the modified image or video stream can be presented in a graphical user interface displayed on the client device 102. The transformation system can implement a complex convolutional neural network on a portion of the image or video stream to generate and apply the selected modification. That is, a user can capture an image or video stream, and once a modification icon is selected, the modified result can be presented to the user in real time or near real time. In addition, the modification can be persistent while the video stream is being captured and the selected modification icon remains toggled. A machine learning neural network can be used to implement such modification.
[0084] The graphical user interface presenting the modifications performed by the transformation system can provide additional interactive options to the user. Such options can be based on the interface used to initiate the selection of a particular computer animation model and content capture (e.g., initiated from a content creator user interface). In various examples, the modifications can be persistent after the modification icon is initially selected. The user can turn the modification on or off by tapping or otherwise selecting the face being modified by the transformation system, and store it for later viewing or browsing to other areas of the imaging application. In the case where multiple faces are modified by the transformation system, the user can globally switch the modification on or off by tapping or selecting a single face modified and displayed within the graphical user interface. In some examples, each face in a group of multiple faces can be modified individually, or such modifications can be individually switched by tapping or selecting a single face or a series of faces displayed within the graphical user interface.
[0085] The story table 314 stores data related to a collection of messages and associated images, videos, or audio data that are compiled into a collection (e.g., a story or gallery). The creation of a particular collection can be initiated by a particular user (e.g., each user whose record is maintained in the entity table 306). A user can create a "personal story" in the form of a collection of content that has been created and sent / broadcasted by the user. To this end, the user interface of the messaging client 104 may include a user-selectable icon to enable the sending user to add specific content to his or her personal story.
[0086] A collection may also constitute a "live story," which is a collection of content from multiple users created manually, automatically, or using a combination of manual and automatic techniques. For example, a "live story" may constitute a curated stream of user-submitted content from various locations and events. Users whose client devices have location services enabled and who are at a common location event at a particular time may be presented with the option of contributing content to a particular live story, for example, via the user interface of the messaging client 104. Live stories may be identified to the user by the messaging client 104 based on his or her location. The end result is a "live story" told from a community perspective.
[0087] Another type of content collection is called a "location story," which enables users whose client devices 102 are located in a particular geographic location (e.g., on a college or university campus) to contribute to a particular collection. In some examples, contributions to location stories may require secondary authentication to verify that the end user belongs to a particular organization or other entity (e.g., is a student on a university campus).
[0088] As mentioned above, the video table 304 stores video data, which in one example is associated with a message whose record is maintained within the message table 302. Similarly, the image table 312 stores image data associated with a message whose message data is stored in the entity table 306. The entity table 306 can associate various enhancements from the enhancement table 310 with the various images and videos stored in the image table 312 and the video table 304.
[0089] The training data 307 stores a language model including one or more n-grams. Each of the one or more n-grams includes a word or a sequence of words and an associated LM score. The ASR engine uses the language model stored as the training data 307 to process the verbal input received from the user, and performs speech-based operations based on the processed verbal input. In some examples, the ASR engine generates a transcription of the verbal input using the language model. In some examples, one or more words in the language model can be temporarily or permanently enhanced to increase the possibility of matching a specific n-gram characterized by one or more words. In such a case, the LM score associated with the n-gram can be temporarily or permanently increased or decreased relative to the LM score of other n-grams.
[0090] Data communication architecture
[0091] Figure 4 is a schematic diagram illustrating the structure of a message 400 according to some examples, the message 400 being generated by a messaging client 104 for transmission to another messaging client 104 or a messaging server 118. The content of a particular message 400 is used to populate a message table 302 stored in a database 126 accessible by a messaging server 118. Similarly, the content of the message 400 is stored in memory as "in-transit" or "in-flight" data of a client device 102 or application server 114. The message 400 is shown to include the following example components:
[0092] Message identifier 402 : a unique identifier that identifies the message 400 .
[0093] Message text payload 404 : Text to be generated by a user via the user interface of the client device 102 and included in the message 400 .
[0094] Message image payload 406 : Image data captured by a camera component of the client device 102 or retrieved from a memory component of the client device 102 and included in the message 400 . Image data for a sent or received message 400 may be stored in the image table 312 .
[0095] Message video payload 408 : Video data captured by the camera component or retrieved from the memory component of the client device 102 and included in the message 400 . The video data for a message 400 that has been sent or received may be stored in the video table 304 .
[0096] Message audio payload 410 : audio data captured by a microphone or retrieved from a memory component of the client device 102 and included in the message 400 .
[0097] Message enhancement data 412 : enhancement data (eg, filters, stickers, or other annotations or enhancements) representing enhancements to be applied to the message image payload 406 , message video payload 408 , or message audio payload 410 of the message 400 . The enhancement data for a sent or received message 400 may be stored in the enhancement table 310 .
[0098] Message duration parameter 414: A parameter value indicating the amount of time in seconds that the content of a message (eg, message image payload 406, message video payload 408, message audio payload 410) will be presented to or made accessible to a user via messaging client 104.
[0099] Message geolocation parameters 416: Geolocation data (e.g., latitude and longitude coordinates) associated with the content payload of the message. Multiple message geolocation parameter 416 values may be included in the payload, each of which is associated with a content item included in the content (e.g., a specific image within a message image payload 406, or a specific video within a message video payload 408).
[0100] Message story identifier 418: An identifier value that identifies one or more content collections (e.g., a "story" identified in story table 314) associated with a particular content item in message image payload 406 of message 400. For example, an identifier value may be used to associate multiple images within message image payload 406 with each of multiple content collections.
[0101] Message tags 420: Each message 400 may be tagged with a plurality of tags, each of which indicates the subject of the content included in the message payload. For example, where a particular image included in the message image payload 406 depicts an animal (e.g., a lion), a tag value indicating the relevant animal may be included within the message tags 420. The tag values may be manually generated based on user input, or may be automatically generated using, for example, image recognition.
[0102] • Message sender identifier 422: An identifier (eg, a messaging system identifier, an email address, or a device identifier) that indicates the user of the client device 102 on which the message 400 was generated and from which the message 400 was sent.
[0103] • Message recipient identifier 424: An identifier (eg, a messaging system identifier, an email address, or a device identifier) that indicates the user of the client device 102 to which the message 400 is addressed.
[0104] The content (e.g., value) of each component of message 400 may be a pointer to a location in a table in which the content data value is stored. For example, the image value in message image payload 406 may be a pointer to a location in image table 312 (or the address of a location in image table 312). Similarly, the value in message video payload 408 may point to data stored in video table 304, the value stored in message enhancement data 412 may point to data stored in enhancement table 310, the value stored in message story identifier 418 may point to data stored in story table 314, and the values stored in message sender identifier 422 and message recipient identifier 424 may point to user records stored in entity table 306.
[0105] Word-enhanced ASR system
[0106] Figure 5 A word enhancement ASR system 230 is shown according to some examples. The word enhancement ASR system 230 includes a speech module 520, an ASR module 530, and a word enhancement module 510. Although all components are depicted as part of the word enhancement ASR system 230, any or all components may be implemented by separate devices and located in geographically different locations.
[0107] In some examples, the word enhancement ASR system 230 accesses a language model including multiple n-grams, each of which includes a corresponding word sequence and a corresponding LM score. The word enhancement ASR system 230 selects a target word to be enhanced in the language model, and receives an enhancement factor for the target word. The word enhancement ASR system 230 identifies a target n-gram including the target word in the language model, and identifies a subset of n-grams of words in a portion of the target n-gram in the multiple n-grams. The word enhancement ASR system 230 adjusts the LM score of the target n-gram based on the LM score and enhancement factor of the n-gram subset. In some cases, the enhancement factor includes a percentile. In some cases, in response to receiving a user request to access an augmented reality experience associated with the target word, the target word is selected in real time for temporary use. In such a case, after the augmented reality experience is terminated, the LM score of the target n-gram returns to the original value.
[0108] In some examples, the target term is a suffix of a target n-gram, wherein the portion of the target n-gram before the suffix includes a prefix of the target n-gram. The term enhancement ASR system 230 identifies a subset of n-grams by searching a plurality of n-grams to identify an n-gram that includes a prefix of the target n-gram. In some cases, the term enhancement ASR system 230 obtains an LM score for a first n-gram in the subset of n-grams, and generates a set of n-grams in the plurality of n-grams that are each associated with an LM score that is higher than the LM score of the first n-gram. The term enhancement ASR system 230 calculates a distribution of LM scores for the set of n-grams. The term enhancement ASR system 230 selects a target LM score corresponding to a percentile of the enhancement factor within the distribution of LM scores, and replaces the LM score of the target n-gram with the target LM score.
[0109] In some examples, the word-enhanced ASR system 230 computes a distribution of LM scores for a subset of n-grams and selects a target LM score within the distribution of LM scores that corresponds to a percentile of the enhancement factor. The word-enhanced ASR system 230 replaces the LM score of the target n-gram with the target LM score.
[0110] In some cases, the word-enhanced ASR system 230 determines that the target n-gram is associated with a token corresponding to the beginning of a sentence. The word-enhanced ASR system 230 adjusts the LM score of the target n-gram based on determining that the first n-gram is associated with the token corresponding to the beginning of the sentence. In such a case, the word-enhanced ASR system 230 refrains from adjusting the LM score of the target n-gram in response to determining that the target n-gram is not associated with the token corresponding to the beginning of the sentence.
[0111] In some examples, the word enhancement ASR system 230 receives a given word that is excluded from the language model. The word enhancement ASR system 230 calculates a similarity value between the given word and each of the plurality of words in the language model, and selects a target word based on determining that the similarity value of the target word exceeds a similarity threshold. In an example, the target word and the given word are synonyms or antonyms.
[0112] In some examples, the word-enhanced ASR system 230 replaces the target word in the target n-gram with the given word to generate a new n-gram. The word-enhanced ASR system 230 associates the new n-gram with a LM score calculated based on the LM scores of the subset of n-grams and the enhancement factor.
[0113] In some examples, the word enhancement ASR system 230 receives a given word excluded from the language model and identifies a set of unigrams in the language model. The word enhancement ASR system 230 calculates a distribution of LM scores for the set of unigrams and selects a given LM score corresponding to an enhancement factor from the distribution of LM scores. In some cases, the word enhancement ASR system 230 generates a new n-gram including the given word and associates the given LM score with the new n-gram.
[0114] In some examples, the word enhancement ASR system 230 obtains acoustic details of each n-gram in a plurality of n-grams. In such a case, the word enhancement ASR system 230 generates acoustic details of a target word and calculates an acoustic similarity value between the acoustic details of the target word and the acoustic details of each of the plurality of n-grams. The word enhancement ASR system 230 identifies a subset of n-grams that includes a plurality of n-grams having acoustic similarity values exceeding an acoustic similarity threshold. The acoustic similarity values may be calculated based on the phoneme distances between the phonemes of the plurality of n-grams and the phonemes of the target word.
[0115] The voice module 520 is configured to receive an audio stream including one or more words. The audio stream can be received by recording the user who speaks one or more words and generating an audio file. In some examples, the audio stream is received from another user through a messaging system or a chat system. In some examples, the audio stream is downloaded from the Internet and received from one or more websites. In some examples, the audio stream is selected from a pre-recorded audio stream set. In such a case, a user interface is presented to the user, wherein a plurality of audio stream lists are presented and identified by corresponding icons or options. In response to receiving the user's selection of icons or options, the voice module 520 retrieves the corresponding audio stream in a plurality of audio streams. The voice module 520 provides the audio stream including one or more words to the ASR module 530.
[0116] The ASR module 530 processes the audio stream received from the speech module 520. The ASR module 530 is configured to generate a transcription of the audio stream based on a language model including the words or phrases that have been enhanced by the word enhancement module 510.
[0117] The term enhancement module 510 receives a target term and an enhancement factor. In some cases, the target term and the corresponding enhancement factor are received by the term enhancement module 510 in real time, for example based on metadata or configuration information associated with a feature or AR experience of the messaging client 104. In such cases, the term enhancement module 510 temporarily applies enhancement to the target term (to increase or decrease the likelihood of recognizing an n-gram featuring the term) while the feature or AR experience of the messaging client 104 is being used or initiated. In some examples, the term enhancement module 510 receives the target term and the enhancement factor during programming of the ASR module 530, and in such cases, the term enhancement module 510 applies permanent enhancement to the target term.
[0118] In response to receiving the target word, the word enhancement module 510 searches the language model to identify a target n-gram that includes the target word. For example, the word enhancement module 510 accesses Figure 6 The language model 600 shown. The term enhancement module 510 identifies a target n-gram 610 in the language model 600 that includes a target term, for example, including the target term in a suffix of the n-gram 610. The term enhancement module 510 retrieves a prefix portion of the n-gram 610, such as all terms or phrases that precede the target term and exclude the target term. The term enhancement module 510 searches the language model 600 to identify a subset of n-grams that include the prefix portion of the n-gram 610. For example, the term enhancement module 510 determines that the n-gram subset 620 includes a sequence of terms or phrases that match the prefix portion of the n-gram 610 and have a different suffix from the n-gram 610.
[0119] In some examples, the word enhancement module 510 obtains a score for each of the n-grams in the n-gram subset 620. In some examples, the word enhancement module 510 generates Figure 7 7. Probability distribution 700 of all scores of n-grams in n-gram subset 620 shown. The term enhancement module 510 may receive the enhancement factor as a percentile. In such a case, the term enhancement module 510 searches the probability distribution 700 for the percentile 720 corresponding to the enhancement factor 710. Once the percentile 720 corresponding to the enhancement factor 710 has been identified, the term enhancement module 510 identifies the score of the n-gram corresponding to the identified percentile 720, wherein the identified n-gram may be different from the n-gram 610 (e.g., a target n-gram including a target term). The term enhancement module 510 then adjusts the score of the n-gram 610 to match the score of the identified n-gram corresponding to the percentile 720. In this manner, the target n-gram (e.g., n-gram 610) is likely to be identified as the n-gram corresponding to the specified enhancement factor.
[0120] In some examples, the term enhancement module 510 obtains an LM score associated with a target n-gram. The term enhancement module 510 includes or identifies a subset of n-grams associated with an LM score greater than the LM score of the target n-gram. That is, the identified subset may exclude n-grams with lower LM scores than the target n-gram. The term enhancement module 510 generates Figure 7 700 of all scores of n-grams in the subset of n-grams 620 having higher LM scores than the target n-gram is shown. The term enhancement module 510 searches the probability distribution 700 for the percentile 720 corresponding to the enhancement factor 710. Once the percentile 720 corresponding to the enhancement factor 710 has been identified, the term enhancement module 510 identifies the score of the n-gram corresponding to the identified percentile 720, wherein the identified n-gram may be different from the n-gram 610 (e.g., the target n-gram including the target term). The term enhancement module 510 then adjusts the score of the n-gram 610 to match the score of the identified n-gram corresponding to the percentile 720.
[0121] For example, language model 600 may include the following n-grams:
[0122] a_b_c_d
[0123] a_b_c_e
[0124] a_b_c_f
[0125] a_b_c_g
[0126] a_b_c
[0127] b_c_d
[0128] a_b_e
[0129] a_b_f
[0130] a_b_g
[0131] a_b
[0132] b_c
[0133] c_d
[0134] a
[0135] b
[0136] c
[0137] d
[0138] e
[0139] f
[0140] g
[0141] In an example, the term enhancement module 510 receives an input that selects a term "d" in the language model 600 to be enhanced with an 89th percentile enhancement factor. The term enhancement module 510 searches the language model 600 to identify a subset of n-grams in which the term "d" is a suffix, e.g., S = {a_b_c_d, b_c_d, c_d, d}. The term enhancement module 510 selects a first target n-gram, e.g., a_b_c_d. For the first target n-gram, the term enhancement module 510 retrieves a prefix of the first target n-gram that excludes the term "d", e.g., "a_b_c". The term enhancement module 510 identifies all n-grams in the language model 600 that include the same prefix as the first target n-gram, and defines a probability P for all such prefixes. In an example, the term enhancement module 510 finds all prefixes in the language model 600 that have the same suffix "d" that have a higher score than the first target n-gram. The term enhancement module 510 defines the probability P={score(a_b_c_X|a_b_c_X is in P and score(a_b_c_X)>score(a_b_c_d)}.
[0142] The word enhancement module 510 calculates the distribution of P and calculates the 89th percentile in the distribution of P. The word enhancement module 510 obtains the score of the 89th percentile in the distribution of P and rewrites the score of the first target n-gram with the score associated with the n-gram in the 89th percentile. The word enhancement module 510 performs the same process on each n-gram in the set S, such as the second n-gram b_c_d, the third n-gram c_d, and the fourth n-gram d.
[0143] In some examples, the word enhancement module 510 determines that the target word is not included in the language model 600 (excluded from the language model 600). In such a case, the word enhancement module 510 can find an n-gram that includes a synonym or antonym of the target word in the suffix to generate a new n-gram. For example, the word enhancement module 510 can identify a synonym or antonym of the target word. The word enhancement module 510 identifies a target n-gram in which the synonym or antonym is located in the suffix. The word enhancement module 510 then generates a probability distribution of scores of other n-grams that include the same prefix as the target n-gram, and obtains the score of the n-gram with a percentile that matches the enhancement factor. The word enhancement module 510 generates a new n-gram that includes the same prefix and the target word as a suffix, and associates the score of the n-gram with the percentile that matches the enhancement factor with the new n-gram.
[0144] In some examples, the term enhancement module 510 determines that the target term is not included in (excluded from) the language model 600. In such a case, the term enhancement module 510 may look up the unigram in the language model 600. The term enhancement module 510 then generates a probability distribution of the scores for the unigrams and obtains the scores for the unigrams at percentiles that match the enhancement factor. The term enhancement module 510 generates a new n-gram that includes the target term and associates the scores for the unigrams with percentiles that match the enhancement factor with the new n-grams.
[0145] In some examples, the word enhancement module 510 can obtain the acoustic details of the target word. The word enhancement module 510 obtains the acoustic details of each suffix in the language model 600 of the n-gram. The word enhancement module 510 compares the acoustic details of the target word with the acoustic details of each suffix in the language model 600 of the n-gram. For example, the word enhancement module 510 calculates the phoneme distance between the phonemes of the suffixes of multiple n-grams in the language model 600 and the phonemes of the target word. The word enhancement module 510 selects a target n-gram including a suffix having an acoustic detail within a threshold proximity or threshold similarity value (e.g., the similarity value between the target n-gram suffix and the acoustic details of the target word exceeds or exceeds a similarity threshold). The word enhancement module 510 can then generate a probability distribution of the scores of n-grams that include the same prefix as the identified target n-gram. The word enhancement module 510 obtains the scores of the n-grams at percentiles that match the enhancement factor. The term boosting module 510 adjusts the score of the target n-gram to match the score of the n-gram having a percentile matching the boosting factor.
[0146] In some examples, the word enhancement module 510 can impose conditions on the enhancement or modify the score of the target n-gram based on whether the target n-gram is associated with the beginning of the sentence. Specifically, the word enhancement module 510 can access the sentence start indicator associated with the target n-gram after or before calculating the score of the n-gram associated with the probability corresponding to the enhancement factor. The sentence start indicator can indicate whether the n-gram is associated with the beginning of the sentence or in the middle of the sentence. For example, in the n-gram "take_a_snap", such an n-gram is associated with the sentence start indicator because the n-gram usually appears at the beginning of the sentence. In the n-gram "take_a_nap", such an n-gram is not associated with the sentence start indicator because the n-gram is usually preceded by other words, such as "I would like to (I want)". In response to determining that the target n-gram is associated with the sentence start indicator, the word enhancement module 510 can increase / decrease the score of the target n-gram. In response to determining that the target n-gram is not associated with a start-of-sentence indicator, term enhancement module 510 can refrain from increasing / decreasing the score of the target n-gram.
[0147] Figure 8 800 is a flowchart illustrating example operations of the messaging client 104 according to some examples when performing the process 800. The process 800 can be implemented in computer-readable instructions for execution by one or more processors, so that the operations of the process 800 can be performed in part or in whole by the functional components of the messaging server system 108; therefore, the process 800 is described below by way of example with reference thereto. However, in other examples, at least some operations of the process 800 can be deployed on various other hardware configurations. The operations in the process 800 can be performed in parallel in any order, or can be skipped and omitted entirely.
[0148] At operation 801 , the word-augmented ASR system 230 accesses a language model comprising a plurality of n-grams, each of the plurality of n-grams comprising a respective word sequence and a corresponding LM score, as described above.
[0149] At operation 802, the word enhancement ASR system 230 selects a target word to be enhanced in the language model, as described above.
[0150] At operation 803, the word enhancement ASR system 230 receives an enhancement factor for a target word, as described above.
[0151] At operation 804, the term-augmented ASR system 230 identifies a target n-gram in the language model that includes the target term, as described above.
[0152] At operation 805, the term-enhanced ASR system 230 identifies a subset of n-grams in the plurality of n-grams that include terms in the portion of the target n-gram, as described above.
[0153] At operation 806, the term-enhanced ASR system 230 adjusts the LM score of the target n-gram based on the LM scores of the subset of n-grams and the enhancement factor, as described above. In some cases, the LM score is referred to as a recognition score.
[0154] Machine structure
[0155] Fig. 9It is a diagrammatic representation of a machine 900 within which instructions 908 (e.g., software, programs, applications, applet, app, or other executable code) may be executed for causing the machine 900 to perform any one or more of the methods discussed herein. For example, the instructions 908 may cause the machine 900 to perform any one or more of the methods described herein. The instructions 908 transform a general unprogrammed machine 900 into a specific machine 900 that is programmed to perform the functions described and shown in the described manner. The machine 900 may operate as a standalone device or may be coupled (e.g., networked) to other machines. In a networked deployment, the machine 900 may operate as a server machine or a client machine in a server-client network environment, or as a peer machine in a peer-to-peer (or distributed) network environment. The machine 900 may include, but is not limited to, a server computer, a client computer, a personal computer (PC), a tablet computer, a laptop computer, a netbook, a set-top box (STB), a personal digital assistant (PDA), an entertainment media system, a cellular phone, a smart phone, a mobile device, a wearable device (e.g., a smart watch), a smart home device (e.g., a smart appliance), other smart devices, a web appliance, a network router, a network switch, a network bridge, or any machine capable of sequentially or otherwise executing instructions 908 specifying actions to be taken by the machine 900. In addition, although only a single machine 900 is shown, the term "machine" should also be considered to include a collection of machines that individually or jointly execute instructions 908 to perform any one or more of the methods discussed herein. For example, the machine 900 may include any of the client device 102 or a number of server devices that form part of the messaging server system 108. In some examples, the machine 900 may also include both a client system and a server system, wherein certain operations of a particular method or algorithm are performed on the server side and certain operations of the particular method or algorithm are performed on the client side.
[0156] The machine 900 may include a processor 902, a memory 904, and an input / output (I / O) component 938 that may be configured to communicate with each other via a bus 940. In an example, the processor 902 (e.g., a central processing unit (CPU), a reduced instruction set computing (RISC) processor, a complex instruction set computing (CISC) processor, a graphics processing unit (GPU), a digital signal processor (DSP), an application specific integrated circuit (ASIC), a radio frequency integrated circuit (RFIC), another processor, or any suitable combination thereof) may include, for example, a processor 906 and a processor 910 that execute instructions 908. The term "processor" is intended to include multi-core processors, which may include two or more independent processors (sometimes referred to as "cores") that may execute instructions simultaneously. Although Fig. 9 Multiple processors 902 are shown, but the machine 900 may include a single processor with a single core, a single processor with multiple cores (e.g., a multi-core processor), multiple processors with a single core, multiple processors with multiple cores, or any combination thereof.
[0157] The memory 904 includes a main memory 912, a static memory 914, and a storage unit 916, which are all accessible by the processor 902 via the bus 940. The main memory 912, the static memory 914, and the storage unit 916 store instructions 908 that embody any one or more of the methodologies or functions described herein. The instructions 908 may also reside, completely or partially, within the main memory 912, within the static memory 914, within a machine-readable medium within the storage unit 916, within at least one of the processors 902 (e.g., within a cache memory of a processor), or within any suitable combination thereof during execution thereof by the machine 900.
[0158] The I / O components 938 may include various components for receiving input, providing output, generating output, sending information, exchanging information, capturing measurements, etc. The specific I / O components 938 included in a particular machine will depend on the type of machine. For example, a portable machine such as a mobile phone may include a touch input device or other such input mechanism, while a headless server machine will most likely not include such a touch input device. It should be appreciated that the I / O components 938 may include Fig. 9 924 and 926. In various examples, the I / O components 938 may include a user output component 924 and a user input component 926. The user output component 924 may include a visual component (e.g., a display such as a plasma display panel (PDP), a light emitting diode (LED) display, a liquid crystal display (LCD), a projector, or a cathode ray tube (CRT)), an acoustic component (e.g., a speaker), a tactile component (e.g., a vibration motor, a resistance mechanism), other signal generators, etc. The user input component 926 may include an alphanumeric input component (e.g., a keyboard, a touch screen configured to receive alphanumeric input, an optical keyboard, or other alphanumeric input component), a point-based input component (e.g., a mouse, a touch pad, a trackball, a joystick, a motion sensor, or other pointing instrument), a tactile input component (e.g., a physical button, a touch screen or other tactile input component that provides the location and force of a touch or touch gesture), an audio input component (e.g., a microphone), etc.
[0159] In other examples, the I / O component 938 may include a biometric component 928, a motion component 930, an environmental component 932, or a positioning component 934, as well as various other components. For example, the biometric component 928 includes components for detecting expressions (e.g., hand expressions, facial expressions, voice expressions, body postures, or eye tracking), measuring biosignals (e.g., blood pressure, heart rate, body temperature, sweating, or brain waves), identifying people (e.g., voice recognition, retinal recognition, facial recognition, fingerprint recognition, or EEG-based recognition), etc. The motion component 930 includes an acceleration sensor component (e.g., an accelerometer), a gravity sensor component, and a rotation sensor component (e.g., a gyroscope).
[0160] Environmental components 932 include, for example, one or more cameras (with still image / photo and video capabilities), lighting sensor components (e.g., a photometer), temperature sensor components (e.g., one or more thermometers that detect ambient temperature), humidity sensor components, pressure sensor components (e.g., a barometer), acoustic sensor components (e.g., one or more microphones that detect background noise), proximity sensor components (e.g., an infrared sensor that detects nearby objects), gas sensors (e.g., a gas detection sensor that detects concentrations of hazardous gases for safety or measures pollutants in the atmosphere), or other components that can provide indications, measurements, or signals corresponding to the surrounding physical environment.
[0161] With respect to cameras, client device 102 may have a camera system including, for example, a front-facing camera on a front surface of client device 102 and a rear-facing camera on a rear surface of client device 102. The front-facing camera may, for example, be used to capture still images and videos (e.g., “selfies”) of a user of client device 102, which may then be enhanced with the enhancement data (e.g., filters) described above. For example, the rear-facing camera may be used to capture still images and videos in a more conventional camera mode, where the images are similarly enhanced with the enhancement data. In addition to the front-facing camera and the rear-facing camera, client device 102 may also include a 360° camera for capturing 360° photos and videos.
[0162] Additionally, the camera system of the client device 102 may include dual rear cameras (e.g., a main camera and a depth sensing camera), or even triple, quad, or quintuple rear camera configurations on the front and back sides of the client device 102. For example, these multiple camera systems may include a wide-angle camera, an ultra-wide-angle camera, a telephoto camera, a macro camera, and a depth sensor.
[0163] The positioning component 934 includes a position sensor component (for example, a GPS receiver component), an altitude sensor component (for example, an altimeter or barometer that detects air pressure, and the altitude can be obtained based on the air pressure), an orientation sensor component (for example, a magnetometer), etc.
[0164] A variety of technologies can be used to achieve communication. The I / O component 938 also includes a communication component 936 that can operate to couple the machine 900 to the network 920 or device 922 via a corresponding coupling or connection. For example, the communication component 936 may include a network interface component or other suitable device that interfaces with the network 920. In other examples, the communication component 936 may include a wired communication component, a wireless communication component, a cellular communication component, a near field communication (NFC) component, Parts (e.g. Low energy consumption), Device 922 may be another machine or any of a variety of peripheral devices (eg, a peripheral device coupled via USB).
[0165] In addition, the communication component 936 can detect the identifier or include a component that can be operated to detect the identifier. For example, the communication component 936 can include a radio frequency identification (RFID) tag reader component, an NFC smart tag detection component, an optical reader component (e.g., an optical sensor for detecting one-dimensional bar codes such as universal product code (UPC) bar codes, multi-dimensional bar codes such as Quick Response (QR) codes, Aztec codes, Data Matrix, Dataglyph, MaxiCode, PDF417, Ultra Code, UCC RSS-2D bar codes, and other optical codes) or an acoustic detection component (e.g., a microphone for identifying a tagged audio signal). In addition, various information can be obtained via the communication component 936, such as location via Internet Protocol (IP) geolocation, ... Signal triangulation to derive location, location via detection of NFC beacon signals that can indicate a specific location, etc.
[0166] Various memories (e.g., main memory 912, static memory 914, and memory of processor 902) and storage unit 916 may store one or more sets of instructions and data structures (e.g., software) implemented or used by any one or more of the methods or functions described herein. When executed by processor 902, these instructions (e.g., instructions 908) cause various operations to implement the disclosed examples.
[0167] The instructions 908 may be transmitted or received over the network 920 using a transmission medium via a network interface device (e.g., a network interface component included in the communication component 936) and using any of several well-known transfer protocols (e.g., the Hypertext Transfer Protocol (HTTP)). Similarly, the instructions 908 may be sent or received via a coupling (e.g., a peer-to-peer coupling) with the device 922 using a transmission medium.
[0168] Software Architecture
[0169] Fig.10 1000 is a block diagram illustrating a software architecture 1004 that may be installed on any one or more of the devices described herein. The software architecture 1004 is supported by hardware, such as a machine 1002 including a processor 1020, a memory 1026, and an I / O component 1038. In this example, the software architecture 1004 may be conceptualized as a stack of layers, where each layer provides specific functionality. The software architecture 1004 includes layers such as an operating system 1012, a library 1010, a framework 1008, and an application 1006. In operation, the application 1006 invokes an API call 1050 through the software stack and receives a message 1052 in response to the API call 1050.
[0170] The operating system 1012 manages hardware resources and provides public services. The operating system 1012 includes, for example, a core 1014, a service 1016, and a driver 1022. The core 1014 serves as an abstraction layer between the hardware and other software layers. For example, the core 1014 provides functions such as memory management, processor management (e.g., scheduling), component management, networking, and security settings. The service 1016 can provide other public services to other software layers. The driver 1022 is responsible for controlling or interfacing with the underlying hardware. For example, the driver 1022 may include a display driver, a camera driver, or Low-power drivers, Flash drivers, Serial communication drivers (e.g., USB drivers), Drivers, audio drivers, power management drivers, etc.
[0171] The library 1010 provides a common low-level infrastructure used by the application 1006. The library 1010 may include a system library 1018 (e.g., a C standard library) that provides functions such as memory allocation functions, string manipulation functions, mathematical functions, etc. In addition, the library 1010 may include an API library 1024, such as a media library (e.g., a library for supporting the presentation and manipulation of various media formats, such as Moving Picture Experts Group-4 (MPEG4), Advanced Video Coding (H.264 or AVC), Moving Picture Experts Group Layer-3 (MP3), Advanced Audio Coding (AAC), Adaptive Multi-Rate (AMR) audio codec, Joint Photographic Experts Group (JPEG or JPG), or Portable Network Graphics (PNG)), a graphics library (e.g., an OpenGL framework for presenting in two dimensions (2D) and three dimensions (3D) in graphical content on a display), a database library (e.g., SQLite providing various relational database functions), a web library (e.g., WebKit providing web browsing functions), etc. The library 1010 may also include various other libraries 1028 to provide many other APIs to the application 1006 .
[0172] The framework 1008 provides a common high-level infrastructure used by the applications 1006. For example, the framework 1008 provides various graphical user interface (GUI) functions, advanced resource management, and advanced location services. The framework 1008 can provide a wide range of other APIs that can be used by the applications 1006, some of which can be specific to a particular operating system or platform.
[0173] In an example, applications 1006 may include a home application 1036, a contacts application 1030, a browser application 1032, a book reader application 1034, a location application 1042, a media application 1044, a messaging application 1046, a game application 1048, and a variety of other applications such as external applications 1040. Applications 1006 are programs that execute functions defined in the program. Various programming languages may be used to create one or more of the applications 1006 constructed in various ways, such as an object-oriented programming language (e.g., Objective-C, Java, or C++) or a procedural programming language (e.g., C or assembly language). In a specific example, external applications 1040 (e.g., an application created by an entity other than the vendor of a particular platform using ANDROID TM or IOS TM Applications developed using a software development kit (SDK) can be mobile operating systems such as IOS TM ANDROID TM , Phone, or another mobile operating system. In this example, external application 1040 can activate API calls 1050 provided by operating system 1012 to facilitate the functions described herein.
[0174] Glossary
[0175] "Carrier signal" refers to any intangible medium capable of storing, encoding or carrying instructions for execution by a machine and includes digital or analog communications signals or other intangible media to facilitate the transmission of such instructions. Instructions may be sent or received over a network using a transmission medium via a network interface device.
[0176] "Client Device" refers to any machine that interfaces with a communications network to obtain resources from one or more server systems or other client devices. A client device may be, but is not limited to, a mobile phone, a desktop computer, a laptop computer, a portable digital assistant (PDA), a smart phone, a tablet computer, an ultrabook, a netbook, a laptop computer, a multiprocessor system, a microprocessor-based or programmable consumer electronics product, a game console, a set-top box, or any other communications device that a user may use to access a network.
[0177] "Communications Network" means one or more parts of a network, which may be an ad hoc network, an intranet, an extranet, a virtual private network (VPN), a local area network (LAN), a wireless LAN (WLAN), a wide area network (WAN), a wireless WAN (WWAN), a metropolitan area network (MAN), the Internet, a part of the Internet, a part of the Public Switched Telephone Network (PSTN), a Plain Old Telephone Service (POTS) network, a cellular telephone network, a wireless network, A network, other type of network, or a combination of two or more such networks. For example, the network or a portion of the network may include a wireless network or a cellular network, and the coupling may be a code division multiple access (CDMA) connection, a global system for mobile communications (GSM) connection, or other type of cellular or wireless coupling. In this example, the coupling may implement any of various types of data transmission technologies, such as single carrier radio transmission technology (1xRTT), evolution data optimized (EVDO) technology, general packet radio service (GPRS) technology, enhanced data rates for GSM evolution (EDGE) technology, the third generation partnership project (3GPP) including 3G, fourth generation wireless (4G) networks, universal mobile telecommunications system (UMTS), high speed packet access (HSPA), world wide interoperability for microwave access (WiMAX), long term evolution (LTE) standards, other data transmission technologies defined by various standard setting organizations, other long distance protocols, or other data transmission technologies.
[0178] "Component" means a device, physical entity, or logic having boundaries defined by function or subroutine calls, branch points, APIs, or other techniques that provide partitioning or modularization of specific processing or control functions. Components may interface with other components via their interfaces to perform machine processes. A component may be a packaged functional hardware unit designed for use with other components and is part of a program that typically performs a specific one of the related functions.
[0179] Components may constitute software components (e.g., code implemented on a machine-readable medium) or hardware components. A "hardware component" is a tangible unit that is capable of performing certain operations and that can be configured or arranged in some physical manner. In various examples, one or more computer systems (e.g., stand-alone computer systems, client computer systems, or server computer systems) or one or more hardware components of a computer system (e.g., a processor or group of processors) may be configured by software (e.g., an application or application portion) as hardware components that operate to perform certain operations described herein.
[0180] Hardware components can also be implemented mechanically, electronically or in any suitable combination thereof. For example, hardware components can include dedicated circuits or logic that are permanently configured to perform certain operations. Hardware components can be dedicated processors, such as field programmable gate arrays (FPGAs) or application specific integrated circuits (ASICs). Hardware components can also include programmable logic or circuits that are temporarily configured to perform certain operations by software. For example, hardware components can include software executed by general-purpose processors or other programmable processors. Once configured by such software, hardware components become specific machines (or specific components of machines) that are uniquely customized to perform configured functions, and are no longer general-purpose processors. It will be recognized that it can be decided whether to implement hardware components mechanically in a dedicated and permanently configured circuit or in a temporarily configured circuit (e.g., configured by software) for cost and time considerations. Therefore, the phrase "hardware components" (or "hardware-implemented components") should be understood to include tangible entities, i.e., entities that are physically constructed, permanently configured (e.g., hardwired) or temporarily configured (e.g., programmed) to operate in some way or perform certain operations described herein.
[0181] Consider an example where hardware components are temporarily configured (e.g., programmed), without configuring or instantiating each of the hardware components at any one time. For example, where the hardware components include a general-purpose processor that is configured by software to become a special-purpose processor, the general-purpose processor can be configured into different special-purpose processors (e.g., including different hardware components) at different times. The software configures one or more specific processors accordingly, for example, to constitute a specific hardware component at one time and to constitute different hardware components at different times.
[0182] Hardware components can provide information to other hardware components and receive information from other hardware components. Therefore, the described hardware components can be considered to be communicatively coupled. In the case of multiple hardware components simultaneously, communication can be realized by signal transmission (e.g., by appropriate circuits and buses) between or among two or more hardware components in the hardware components. In the example where multiple hardware components are configured or instantiated at different times, communication between such hardware components can be realized, for example, by storing information in a memory structure to which multiple hardware components have access rights and retrieving information in the memory structure. For example, a hardware component can perform an operation and store the output of the operation in a memory device communicatively coupled thereto. Then, other hardware components can access the memory device at a subsequent time to retrieve the stored output and process it. Hardware components can also initiate communication with input devices or output devices, and can operate resources (e.g., a collection of information).
[0183] The various operations of the example methods described herein may be performed at least in part by one or more processors that are temporarily configured (e.g., by software) or permanently configured to perform related operations. Whether temporarily configured or permanently configured, such a processor may constitute a processor-implemented component that operates to perform one or more operations or functions described herein. As used herein, a "processor-implemented component" refers to a hardware component implemented using one or more processors. Similarly, the method described herein may be implemented at least in part by a processor, wherein a specific one or more processors are examples of hardware. For example, at least some operations of the method may be performed by one or more processors 902 or processor-implemented components. In addition, one or more processors may also operate to support the execution of related operations in a "cloud computing" environment or as a "software as a service" (SaaS) operation. For example, at least some of the operations may be performed by a group of computers (as an example of a machine including a processor), wherein these operations may be accessed via a network (e.g., the Internet) and via one or more appropriate interfaces (e.g., API). The execution of certain operations may be distributed between processors, not just residing in a single machine, but deployed across several machines. In some examples, the processor or processor-implemented components may be located in a single geographic location (e.g., in a home environment, an office environment, or a server farm). In other examples, the processor or processor-implemented components may be distributed across several geographic locations.
[0184] "Computer-readable storage media" refers to both machine storage media and transmission media. Thus, the term includes both storage devices / media and carrier / modulated data signals. The terms "machine-readable medium," "computer-readable medium," and "device-readable medium" mean the same thing and may be used interchangeably in this disclosure.
[0185] "Transient message" refers to a message that is accessible for a limited duration. Transient messages can be text, images, videos, etc. The access time of a transient message can be set by the sender of the message. Alternatively, the access time can be a default setting or a setting specified by the recipient. Regardless of the setting technique, the message is transient.
[0186] "Machine storage media" refers to a single or multiple storage devices and media (e.g., centralized or distributed databases, and associated caches and servers) that store executable instructions, routines, and data. Thus, the term should be considered to include, but is not limited to, solid-state memory and optical and magnetic media, including memory internal or external to the processor. Specific examples of machine storage media, computer storage media, and device storage media include: non-volatile memory, including, for example, semiconductor memory devices such as erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), FPGA, and flash memory devices; magnetic disks, such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM disks. The terms "machine storage media," "device storage media," and "computer storage media" mean the same thing and may be used interchangeably in this disclosure. The terms "machine storage media," "computer storage media," and "device storage media" expressly exclude carrier waves, modulated data signals, and other such media, at least some of which are encompassed by the term "signal media."
[0187] “Non-transitory computer-readable storage medium” refers to tangible media capable of storing, encoding, or carrying instructions to be executed by a machine.
[0188] "Signal medium" refers to any intangible medium that is capable of storing, encoding or carrying instructions to be executed by a machine, and includes digital or analog communication signals or other intangible media that facilitate the communication of software or data. The term "signal medium" should be deemed to include any form of modulated data signals, carrier waves, etc. The term "modulated data signal" refers to a signal that has one or more of its characteristics set or changed in such a manner as to encode information in the signal. The terms "transmission medium" and "signal medium" refer to the same thing and may be used interchangeably in this disclosure.
[0189] Changes and modifications may be made to the disclosed examples without departing from the scope of the present disclosure. These and other changes or modifications are intended to be included within the scope of the present disclosure as expressed in the appended claims.
Claims
1. A method comprising: accessing, by one or more processors, a language model (LM) comprising a plurality of n-grams, each of the plurality of n-grams comprising a respective sequence of terms and a corresponding LM score; Selecting a target word to be enhanced in the language model; receiving an enhancement factor for the target word, and temporarily applying the enhancement factor based on context; identifying a target n-gram in the language model that includes the target term; identifying a subset of n-grams of the plurality of n-grams that include terms in a portion of the target n-gram; as well as The LM score of the target n-gram is adjusted based on the LM score of the subset of n-grams and the boosting factor.
2. The method according to claim 1, wherein: The target term is a suffix of the target n-gram, wherein a portion of the target n-gram before the suffix comprises a prefix of the target n-gram, and wherein identifying the n-gram subset comprises searching the plurality of n-grams to identify an n-gram that comprises the prefix of the target n-gram.
3. The method according to any one of claims 1 to 2, wherein: The enhancement factors include percentiles.
4. The method according to claim 3, further comprising: Obtaining a LM score for the target n-gram; as well as Grouped n-grams in the subset of n-grams are generated, each of the grouped n-grams being associated with a LM score greater than the LM score of the target n-gram.
5. The method according to any one of claims 1 to 4, further comprising: Calculating the distribution of LM scores for the grouped n-tuples; selecting a target LM score within the distribution of the LM scores corresponding to a percentile of the enhancement factor; as well as The LM score of the target n-gram is replaced by the target LM score.
6. The method according to any one of claims 1 to 5, further comprising: Calculating the distribution of LM scores for the n-tuple subset; selecting a target LM score within the distribution of the LM scores corresponding to a percentile of the enhancement factor; as well as The LM score of the target n-tuple is replaced by the target LM score.
7. The method according to any one of claims 1 to 6, further comprising: The target n-gram is determined to be associated with a token corresponding to the beginning of a sentence, wherein the LM score of the target n-gram is adjusted based on the determination that the target n-gram is associated with the token corresponding to the beginning of the sentence.
8. The method according to claim 7, further comprising: In response to determining that the target n-gram is not associated with the token corresponding to the beginning of the sentence, refraining from adjusting the LM score of the target n-gram.
9. The method according to any one of claims 1 to 8, further comprising: receiving a given word to be excluded from the language model; Calculating a similarity value between the given word and each of the plurality of words in the language model; as well as Based on determining that the similarity value of the target word exceeds a similarity threshold, the target word is selected.
10. The method according to claim 9, wherein: The target word and the given word are synonyms.
11. The method according to any one of claims 1 to 10, further comprising: replacing the target word in the target n-gram with the given word to generate a new n-gram; as well as The new n-gram is associated with a LM score calculated based on the LM scores of the subset of n-grams and the enhancement factor.
12. The method according to any one of claims 1 to 11, further comprising: receiving a given word to be excluded from the language model; identifying a set of tuples in the language model; computing a distribution of LM scores for the set of tuples; as well as A given LM score corresponding to the enhancement factor is selected from the distribution of LM scores.
13. The method according to claim 12, further comprising: generating a new n-gram including the given word; as well as The given LM score is associated with the new n-gram.
14. The method according to any one of claims 1 to 13, further comprising: obtaining acoustic details for each of the plurality of n-tuples; generating acoustic details of the target word; as well as An acoustic similarity value between the acoustic detail of the target word and the acoustic detail of each of the plurality of n-grams is calculated.
15. The method according to claim 14, further comprising: The target n-gram having an acoustic similarity value exceeding an acoustic similarity threshold is identified from the plurality of n-grams.
16. The method according to any one of claims 1 to 15, wherein: The acoustic similarity value is calculated based on phoneme distances between phonemes of the plurality of n-grams and phonemes of the target word.
17. The method according to any one of claims 1 to 16, wherein: In response to receiving a user request to access an augmented reality experience associated with the target term, the target term is selected in real-time for temporary use.
18. The method according to claim 17, wherein: After the augmented reality experience is terminated, the LM score of the target n-tuple returns to the original value.
19. A system comprising: A processor configured to perform operations comprising: accessing a language model (LM) comprising a plurality of n-grams, each of the plurality of n-grams comprising a respective sequence of terms and a corresponding LM score; Selecting a target word to be enhanced in the language model; receiving an enhancement factor for the target word, and temporarily applying the enhancement factor based on context; identifying a target n-gram in the language model that includes the target term; identifying a subset of n-grams of the plurality of n-grams that include terms in a portion of the target n-gram; and The LM score of the target n-gram is adjusted based on the LM score of the subset of n-grams and the boosting factor.
20. A non-transitory machine-readable storage medium comprising instructions that, when executed by one or more processors, cause the one or more processors to perform operations comprising: accessing a language model (LM) comprising a plurality of n-grams, each of the plurality of n-grams comprising a respective sequence of terms and a corresponding LM score; Selecting a target word to be enhanced in the language model; receiving an enhancement factor for the target word, and temporarily applying the enhancement factor based on context; identifying a target n-gram in the language model that includes the target term; identifying a subset of n-grams of the plurality of n-grams that include terms in a portion of the target n-gram; as well as The LM score of the target n-gram is adjusted based on the LM score of the subset of n-grams and the boosting factor.
Citation Information
Patent Citations
Language model biasing system
US20180233131A1