Start a new processing task

The client initiates the processing by sending a JSON text message with the following parameters:

	‘control’: required [‘start’, send start to a new request]
	‘pid’: required [the process id given by REST API]
	‘format’: optional [the audio data format raw, wav, mp3 etc. - defaults to raw]
	‘channels’: optional [the number of channels in audio 1 or 2: defaults to 2]

The control parameter is required in the client message and directs the service to either start or end a processing request. At this point it is assumed that the client sends a start control command.

Before starting a new processing task, you must post to the REST API endpoint /client/{cid}/process/stream (for details, please refer to Initiate streaming job. You must do so in order to input additional metadata for the request, for example agent id, campaign id, tagging etc. Also by calling the REST API, you are provided with a time estimate of the initial setup delay of the real-time session (if any) that is dependent on the current load of the service.

The pid parameter is the process id that was assigned to your request, when you called the REST API and must be used in the websocket session to start a new task.

The format parameter is for specifying the format that the client is going to use to transmit the audio data. Raw format is the default and narrowband (8Khz) sampling rate is expected. Other options are wav and mp3 formats.

The number of channels in the audio can be optionally provided by the client, and if not it will fall back to 2 channels.

These are the possible outputs that the client should be accepting after trying to start a new processing task:

Success{‘status’ : ‘accepting’}
Failure{‘status’: ‘ready’, ‘error’: ‘client provided faulty parameters’}