Run SLU operations on audio sources without actively waiting the results.
| name | request | response | description |
|---|---|---|---|
| ProcessAudio | ProcessAudioRequest stream | ProcessAudioResponse | Create a new background SLU operation for a single audio source. An audio source can be - audio chunks sent via repeated ProcessAudioRequests, or - URI of a file, reachable from the API The response includes an id that is used to match the operation to theresults. A reference identifier can also be set.The destination can be a webhook URL, in which case the results are posted there when they are ready. The payload is an instance of Operation. |
| QueryStatus | QueryStatusRequest | QueryStatusResponse | Query the status of a given batch operation. If the ProcessAudioRequest did not define a results_uri as adestination, the results are returned in the QueryStatusResponse. |
- AudioConfiguration
- HttpResource
- HttpResource.Header
- Operation
- Option
- ProcessAudioRequest
- ProcessAudioResponse
- QueryStatusRequest
- QueryStatusResponse
- Transcript
Describes the audio content of the batch operation.
| name | type | description |
|---|---|---|
| encoding | Encoding | The encoding of the audio data sent in the stream. Required. |
| channels | int32 | The number of channels in the input audio data. Required. |
| sample_rate_hertz | int32 | Sample rate in Hertz of the audio data sent in the stream (e.g. 16000). Required. |
| language_codes | string | The language(s) of the audio sent in the stream as a BCP-47 language tag (e.g. "en-US"). Defaults to the target application language. Optional. |
Describes full properties of an HTTP endpoint.
| name | type | description |
|---|---|---|
| url | string | URL of the endpoint (protocol://server/path) Required. |
| method | Method | method to use in connection. Required. |
| headers | Header | Possible additional headers to include in the connection. Optional. |
A single header value.
| name | type | description |
|---|---|---|
| name | string | |
| value | string |
Describes a single batch operation.
| name | type | description |
|---|---|---|
| id | string | The id of the operation. |
| reference | string | The reference id of the operation, if given. |
| status | Status | The current status of the operation. |
| language_code | string | The language code of the detected language. |
| app_id | string | The application context for the operation. |
| device_id | string | The device or microphone id for the audio, if applicable. |
| transcripts | Transcript | If the operation status is STATUS_DONE and the destination is not set, the results of the operation. |
| error | string | Contains a description of the error if the operation status is STATUS_ERROR. |
| duration | Duration | The duration of the audio. |
Option to change the default behaviour of the SLU.
| name | type | description |
|---|---|---|
| key | string | The key of the option to be set. |
| value | string | The values to set the option to. |
If sending a stream of ProcessAudioRequest messages, the first one must
contain the AudioConfiguration for the audio data. The config is ignored
in the following messages.
| name | type | description |
|---|---|---|
| app_id | string | The processing context, Speechly application ID. Required. |
| device_id | string | The device ID of the audio source, for example a microphone identifier as UUID. Optional. |
| config | AudioConfiguration | Audio configuration. Required. |
| audio | bytes | Raw audio data. |
| uri | string | URI of audio data. Can be http or GCS. |
| http_source | HttpResource | Detailed HTTP source data. |
| results_uri | string | Basic HTTP POST destination. The payload will be Operation as JSON. |
| http_result | HttpResource | A more fine-grained result target, supporting HTTP method and HTTP headers. The payload will be Operation as JSON. |
| reference | string | Reference id for the operation. For example an identifier of the source system. Optional. |
| options | Option | Additional operation specific options. Optional. |
| name | type | description |
|---|---|---|
| operation | Operation | The details of the created operation. |
Query the status of an operation. Either id or reference must be given.
| name | type | description |
|---|---|---|
| id | string | ID of an audio processing operation. |
| reference | string | Reference ID of an operation. |
| name | type | description |
|---|---|---|
| operation | Operation | The details of the audio processing operation. |
Describes an SLU transcript. A transcript is a speech-to-text element of the phrase, i.e. a word recognised from the audio.
| name | type | description |
|---|---|---|
| word | string | The word recongised from the audio. |
| index | int32 | The position of the word in the whole phrase, zero-based. |
| start_time | int32 | The end time of the word in the audio, in milliseconds from the beginning of the audio. |
| end_time | int32 | The end time of the word in the audio, in milliseconds from the beginning of the audio. |
The encoding of the audio data sent in the stream.
| name | value | description |
|---|---|---|
| ENCODING_INVALID | 0 | |
| ENCODING_LINEAR16 | 1 | Uncompressed 16-bit signed little-endian samples (Linear PCM). |
The HTTP method to use.
| name | value | description |
|---|---|---|
| METHOD_INVALID | 0 | |
| METHOD_GET | 1 | |
| METHOD_POST | 2 | |
| METHOD_PUT | 3 |
The status of the operation.
| name | value | description |
|---|---|---|
| STATUS_INVALID | 0 | Default status is empty. |
| STATUS_QUEUED | 1 | The operation is queued for processing. |
| STATUS_PROCESSING | 2 | Audio is being decoded. |
| STATUS_DONE | 3 | The operation is ready and transcript is available. |
| STATUS_ERROR | 4 | The processing failed. Error reason is available. |
| STATUS_ANALYSING | 5 | Audio is being analysed, eg. language is detected. |
| STATUS_WAITING_DECODER | 6 | Audio has been analysed, the operation is waiting for a free decoder. |