We already covered the basics of cloud sync in the Getting Started section.
Let’s dig a little deeper into how this works.
Speech to Text Sync
Syncing speech to text is only required when creating a custom language model. When you sync a workspace, Lexicon gathers up the following to train a custom model:
- Every sample phrase used by the intents in the workspace
- Every entity value used by the entities in the workspace
- Every entity value synonym used by the entities in the workspace
Together these form the training data for your custom language model. This model makes it much more likely that your user’s speech input will be correctly understood by the system.
Note that you can turn custom model usage on or off at runtime. Training a custom model does not mean that you always have to use it.
Custom language models are more expensive per minute, see IBM’s pricing guide for details.
Assistant Sync
Syncing Assistant is required to bring the Watson Assistant service in line with your local Unity changes. Note that this sync is one way, from the Unity editor to the IBM Cloud. You cannot make changes to a Assistant workspace in the cloud and download those changes into Unity. Also, Unity will delete any remote intents and entities that do not exist locally, so do not attempt to use Lexicon with an existing Assistant workspace id.
When to Sync
Syncing with the cloud is not automatic. Whenever you make local changes to the workspace, intents, or entities, you need to sync to push those changes to the cloud. You can sync both services simultaneously, and you can even enter or exit playmode while the the sync is taking place. Exiting or restarting Unity will cancel the sync.
We’ve done our best to ensure syncing can survive an assembly reload (e.g. code compilation or entering play mode). That said, it is possible for an assembly reload to interrupt a sync at an inopportune moment. If this happens an error will be logged and the sync will fail. Simply restart the sync, no harm done!