API

BenchmarkSTT exposes its functionality through a JSON-RPC api.

Attention

Only supported for Python versions 3.6 and above!

Starting the server

You can launch a server to make the api available via:

Usage

All requests must be HTTP POST requests, with the content containing valid JSON.

Using curl, for example:

curl -X POST \
  http://localhost:8080/api \
  -H 'Content-Type: application/json-rpc' \
  -d '{
    "jsonrpc": "2.0",
    "method": "help",
    "id": null
}'

If you started the service with parameter --with-explorer (see Subcommand api), you can easily test the available JSON-RPC api calls by visiting the api url (eg. http://localhost:8080/api in the above example).

Important

The API explorer is provided as-is, without any tests or code reviews. This is marked as a low-priority feature.