A method comprising: detecting , by a user device, an utterance at a first time when the user device is connected to a server by a network, wherein the utterance includes one or more terms; providing , by the user device, the utterance to the server using the network; receiving , by the user device and from the server, an update to the grammar of the user device based on the one or more terms, the update including the one or more terms and wherein the one or more terms in the update are associated with a threshold amount of time that indicates a maximum period of time the one or more terms will be included in the grammar absent the user device detecting a subsequent utterance of the one or more terms by a user; in response to detecting , by the user device, a subsequent utterance at a second time when the user device is not connected to the server by a network, wherein the subsequent utterance includes the one or more terms: determining , by the user device, that the subsequent utterance is associated with an offline operation that can be performed when the user device is not connected to the server; identifying, by the user device, an offline operation to perform based on (i) the one or more terms of the subsequent utterance, and (ii) the updated grammar of the user device; and initiating , by the user device, performance of the offline operation using the updated grammar of the user device; and further comprising: in response to determining, by the user device, that the threshold period of time has been exceeded without the user device detecting a subsequent utterance of the one or more terms by the user: removing, by the user device, the one or more terms from the grammar of the user device. detecting , by a user device, an utterance at a first time when the user device is connected to a server by a network, wherein the utterance includes one or more terms; providing , by the user device, the utterance to the server using the network; receiving , by the user device and from the server, an update to the grammar of the user device based on the one or more terms, the update including the one or more terms and wherein the one or more terms in the update are associated with a threshold amount of time that indicates a maximum period of time the one or more terms will be included in the grammar absent the user device detecting a subsequent utterance of the one or more terms by a user; in response to detecting , by the user device, a subsequent utterance at a second time when the user device is not connected to the server by a network, wherein the subsequent utterance includes the one or more terms: determining , by the user device, that the subsequent utterance is associated with an offline operation that can be performed when the user device is not connected to the server; identifying, by the user device, an offline operation to perform based on (i) the one or more terms of the subsequent utterance, and (ii) the updated grammar of the user device; and initiating , by the user device, performance of the offline operation using the updated grammar of the user device; determining , by the user device, that the subsequent utterance is associated with an offline operation that can be performed when the user device is not connected to the server; identifying, by the user device, an offline operation to perform based on (i) the one or more terms of the subsequent utterance, and (ii) the updated grammar of the user device; and initiating , by the user device, performance of the offline operation using the updated grammar of the user device; in response to determining, by the user device, that the threshold period of time has been exceeded without the user device detecting a subsequent utterance of the one or more terms by the user: removing, by the user device, the one or more terms from the grammar of the user device. <EOS>