gRPC setup

Before developing and running client applications, you need to set up the gRPC environment for your programming language.

Basic steps

The basic steps in using the ForgetMe gRPC protocol are:

  1. Install gRPC for the programming language of your choice, including C++, Java, Python, Go, Ruby, C#, Node.js, and others. See gRPC Documentation  for a complete list and instructions on using gRPC with each one.

    For example, for Python:

    python -m pip install --upgrade pip
    python -m pip install grpcio
    python -m pip install grpcio-tools
    
  2. Download the ForgetMe gRPC proto files, which contain a generic version of the functions or classes for creating ASRaaS applications:

    ForgetMe protos: forgetme-protos.zip

  3. Unzip the files in a location that your applications can access, for example, in the directory that contains or will contain your client apps. The files extract to a directory structure starting with nuance.

    These are the files after unzipping:

    unzip forgetme-protos.zip
    
    ├── Your client apps here
    └── nuance                        
        ├── fabric                       
        |   └── forgetme
        |       └── v1   
        |           └── forgetme.proto  
        └── rpc                       
            ├── error_details.proto   
            ├── status_code.proto     
            └── status.proto
    
  4. If your programming language requires client stub files, generate the stubs from the proto files using gRPC protoc, following the Python example as guidance.

    # Generate Python stubs for recognition
    python -m grpc_tools.protoc --proto_path=./ --python_out=./ --grpc_python_out=./ nuance/fabric/forget/v1/forget.proto
    
    # Generate Python stubs for RPC messages
    python -m grpc_tools.protoc --proto_path=./ --python_out=./ nuance/rpc/status.proto
    python -m grpc_tools.protoc --proto_path=./ --python_out=./ nuance/rpc/status_code.proto
    python -m grpc_tools.protoc --proto_path=./ --python_out=./ nuance/rpc/error_details.proto
    

Final structure

The resulting files contain the information in the proto files in your programming language:

├── Your client apps here
└── nuance                        
    ├── fabric                       
    │   └── forgetme  
    │       └── v1
    │           ├── forgetme_pb2_grpc.py
    │           ├── forgetme_pb2.py
    │           └── forgetme.proto
    └── rpc
        ├── error_details_pb2.py
        ├── error_details.proto
        ├── status_code_pb2.py
        ├── status_code.proto
        ├── status_pb2.py
        └── status.proto

What’s next?

Once you have the proto files and optionally the client stubs, you are ready to develop and run client applications with the help of: