Skip to main content
Skip table of contents

Generate and start the VDK Service


This guide empowers you to create and manage voice applications using VDK Service, an extension of the Voice Development Kit (VDK). VDK Service simplifies the development and deployment process for voice-driven experiences.

Create and export a project with the VDK Service interaction mode

To generate the vdk-service we need to follow these steps:

  1. Create a project:
    Initiate a new custom project and specify the 'VDK Service' interaction mode during project setup.

  2. Integrate technologies:
    Integrate the desired technologies into your project and configure them accordingly.

  3. Export your project:
    Export your project to the designated target folder. This will generate three directories: 'config,' 'data,' and 'vdk-service'.

    $ tree -d -L 1
    |-- config
    |-- data
    `-- vdk-service
    3 directories

Starting the VDK Service


Use the command below to start the service:

$ ./vdk-service/bin/vdk-service.exe -f config/vsdk.json

Where the parameter -f is used to specify the configuration file location. If you want to load the configuration file later, start by launching the service without specifying the configuration file and later use the route localhost:39806/v1/configuration-path to load the configuration file.

$ ./vdk-service/bin/vdk-service.exe &
$ curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"path":"config/vsdk.json"}' \

First of all, move the data exported from the VDK Studio into your Android project:

  • assets to app/src/main/assets

  • lib.jar to app/libs

Then, you will need to configure the network access into your Android Manifest.

First, add the permission below to AndroidManifest.xml:

<uses-permission android:name="android.permission.INTERNET" />

Then, we will need to configure the network security. Create a file into res/xml named network_security_config.xml and paste the content below in it:

<?xml version="1.0" encoding="utf-8"?>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true"></domain>

Finally, add to tag <application> into the Manifest: `


It will allow the vdk-service to use spawn a HTTP webserver.

Now that everything is configured, you can start the vdk-service using, for example, a Runtime:

    private void readLogs(BufferedReader reader) {
        new Thread(() -> {
            try {
                String tmp;
                while ((tmp = reader.readLine()) != null) {
                    Log.e(getLocalClassName(), tmp);
            } catch (IOException e) {
    private void exec(String command) {
        try {
            // Retrieve bin dir
            final String dir = getApplicationInfo().nativeLibraryDir;
            final String app = dir + "/vdk-service";
            // Retrieve `vsdk.json` configuration path from assets
            final String configPath = getFilesDir().getAbsolutePath() + "/vsdk/config/vsdk.json";
            // Start process specifying config path AND port so we can communicate with it later
            process = Runtime.getRuntime()
                        .exec(new String[]{app, "-p", "39666", "-f", configPath},
                                new String[]{"LD_LIBRARY_PATH=" + dir});
            // Read logs from binary. Not mandatory
            BufferedReader reader = new BufferedReader(
                    new InputStreamReader(process.getInputStream())
            BufferedReader errorReader = new BufferedReader(
                    new InputStreamReader(process.getErrorStream())
        } catch (Exception e) {

The vdk-service should now run and start a webserver listening on

The configuration path can be loaded just once either with terminal argument or with REST api route.

Different starting options:


Value range

Default value


-p, --port



Port the web server will listen to (HTTP & WebSocket).

-f, --config-path



Path to a VSDK configuration file to starts with.

-L, --plugin-path



Path to the dynamic libraries.

-c, --cpu-count

[0, 2-255]


Number of logical cores used (0 means hardware count).

-d, --websocket-close-delay



Amount of milliseconds spent before closing a websocket.

-h, --help



Prints usage then exits

Stopping the VDK Service (Safely)

Two methods are available for safe termination of the VDK service:

  1. Using quit route

$ curl --header "Content-Type: application/json" \
  --request POST \
  --data '{}' \
  1. Sending SIGINT or SIGTERM to the application.
    This method involves sending the appropriate signal to the application process.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.