Python#

A Python client API is available on GitHub.

Installation#

pip install nvidia-riva-client

Python Example#

The following steps show how you can integrate Riva Speech AI services into your own application using Python as an example. The complete API documentation for all services and message types can be found in gRPC & Protocol Buffers. You can also try the tutorials on GitHub.

With the Python bindings successfully installed, integrate the Riva Speech AI services into your application. For example, to classify the intent of a query, add:

import riva.client
auth = riva.client.Auth(uri='localhost:50051')
nlp_service = riva.client.NLPService(auth)
response = nlp_service.analyze_intent(
    input_string="How is the weather today in New England",
    options=riva.client.AnalyzeIntentOptions(lang='en-US'),
)
print(response)