Requesting emotional intelligence data

The Voci speech translation servers normally do not compute emotion and sentiment from the audio data. To access this feature, you must request it when you submit the audio data. Contact your Voci sales agent to have this feature added to your license.

The method used to request emotion processing depends on the interface you are using to submit your audio data.

V‑Blaze REST API and V‑Cloud

To obtain emotional intelligence data using the V‑Blaze REST API or the V‑Cloud API, add a new form field to your POST using the name “emotion” with the value “true”.

Using the curl command-line tool, include the emotion parameter with the value set to true to submit test.wav for translation with emotion results, as shown in the following example:

curl -F "emotion=true" -F "file=@test.wav" -XPOST http://server:17171/STREAM

where server should be replaced by the name or IP address of the translation server.

The command above prints a JSON data structure to your terminal. To include the results in a JSON file, append >test.json to the end of your request to redirect the results to a JSON file, as shown in the following example:

curl -F "emotion=true" ... > test.json

These commands apply to all common operating systems, including Windows, Mac, and various forms of Linux. They are intended to be entered in a terminal or command window.

If you know ahead of time that emotional intelligence will always be required, you can request that Voci supports the configuration of your Web API or cloud interface with emotion enabled by default. You can also send a message to support@vocitec.com to have the default changed. In this case, you would not need to add -F “emotion=true” to your commands.

Refer to Emotion, sentiment, and gender for more details on parameters and how they are used.

V‑Blaze Python API

When using the V‑Blaze WebAPI with Python, one of the first steps in submitting audio for translation is to create a Stream object. To request emotion information, include emotion=True when creating the stream, as shown in the following example:

s = Stream("test.wav", emotion=True)

When the transcript is returned in JSON format, the emotion information will be present.

V‑Spark

V‑Spark will always include emotional intelligence data, which is included in all JSON files.

Voci Job Manager

The job manager is used by V‑Spark to shuttle audio data between V‑Spark and various transcription servers. The job manager always requests the inclusion of emotional intelligence data. The job manager can be used without V‑Spark, and in these cases, nothing further is required in order to request emotion information.