requestid for WebAPI
The unique identifier for the request for tracing purposes. This can be specified as a parameter or in the X-Request-Id HTTP header. If a requestid
is provided in one of these ways, the specified requestid
is included in JSON output and in the WebAPI access log.
The requestid
is included in the final transcript and also in utterance callbacks as a top-level field.
The requestid
can be anything. For example, you could pass an id to fetch metadata from a table or you could pass all the metadata in the requestid
as a CSV string or any format you prefer, such as JSON. The following example shows a requestid
:
$ curl -F "requestid=john,1234,567-uuid" -F "output=jsontop" -F "file=@/opt/voci/server/examples/sample1.wav" localhost:17171/transcribe; echo {"source":"sample1.wav","confidence":0.89,"donedate":"2020-01-23 13:03:02.881927","requestid":"john,1234,567-uuid","recvtz":["EST",-18000],"text":"And that it was resolved in a very professional manner. Your employees a very good.","model":"devel:callcenter","recvdate":"2020-01-23 13:03:02.276387"}
The following is an example of the utterance callback JSON with requestid
included:
{"source":"sample1.wav","utterance":{"confidence":0.89,"end":6.17,"recvtz":["EST",-18000],"text":"And that it was resolved in a very professional manner. Your employees a very good.","start":0.55,"donedate":"2020-01-23 13:04:47.875351","recvdate":"2020-01-23 13:04:47.274705","metadata":{"source":"sample1.wav","model":"devel:callcenter","uttid":0,"channel":0}},"requestid":"john,1234,567-uuid"}