Generate and start the VDK Service
Overview
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:
Create a project:
Initiate a new custom project and specify the 'VDK Service' interaction mode during project setup.Integrate technologies:
Integrate the desired technologies into your project and configure them accordingly.Export your project:
Export your project to the designated target folder. This will generate three directories: 'config,' 'data,' and 'vdk-service'.BASH$ tree -d -L 1 . |-- config |-- data `-- vdk-service 3 directories
Starting the VDK Service
The configuration path can be loaded just once either with terminal argument or with REST api route.
Different starting options:
Option | Value range | Default value | Description |
---|---|---|---|
| - | - | Prints usage then exits |
| [1-65535] |
| Port the web server will listen to (HTTP & WebSocket). |
| [0, 2-255] |
| Number of logical cores used (0 means hardware count). |
| [0-65535] |
| Amount of milliseconds spent before closing a websocket. |
| - |
| Path to a VSDK configuration file to starts with. |
| - |
| Path to the dynamic libraries. |
| [off, trace, debug, info, warning, error, critical] |
| Minimum log level that can be printed. |
Stopping the VDK Service (Safely)
Two methods are available for safe termination of the VDK service:
Using quit route
$ curl --header "Content-Type: application/json" \
--request POST \
--data '{}' \
http://localhost:39806/v1/quit
Sending
SIGINT
orSIGTERM
to the application.
This method involves sending the appropriate signal to the application process.