NRaaS proto files

Nuance Recognizer provides the following protocol buffer (.proto) files to define its gRPC protocol:

  • nrc.proto defines the main methods for requesting speech recognition.
  • nrctools.proto defines the methods that affect grammars and dictionaries.

Once you have transformed the proto files into functions and classes in your programming language using gRPC tools, you can call these functions from your client application to start a conversation with a user, collect the user’s input, obtain the action to perform, and so on.

See Client app development for a scenario using Python that provides an overview of the different methods and messages used in a sample application.

For other languages, consult the gRPC  and protocol buffer  documentation.

Field names in proto and stub files

In this section, the names of the fields are shown as they appear in the proto files. To see how they are generated in your programming language, consult your generated files. For example:

Field names in proto and stub files table
Proto file Python Go Java
audio_format audio_format AudioFormat audioFormat or getAudioFormat
selector selector Selector selector or setSelector

For details, see the Protocol Buffers documentation for:

Proto file structure

The proto files define an RPC service with a Recognize method that streams a RecognitionRequest and RecognitionResponse. Details about each component are referenced by name within the proto file.

This image shows the structure of the principal request fields:

Proto request fields

This image shows the main response fields:

Proto response fields