Skip to main content
Skip table of contents

Natural Language Understanding ‎

Introduction

VSDK includes built-in support for Natural Language Understanding (NLU) through the VNLU engine, developed by Vivoka. Integrated under the module name vsdk-vnlu, it is designed to work alongside an ASR engine to extract meaning and structure from spoken commands.

With VNLU, your application can go beyond recognizing words—it can understand intents (what the user wants to do) and entities (the relevant pieces of information within a sentence). This makes it ideal for building natural and conversational voice interfaces.

Example: Smart Home

User says: "Turn on the kitchen lights"

Extracted Intent:
TurnOnDevice

Extracted Entities:

  • device: "lights"

  • location: "kitchen"

Training model

NLU is domain-specific module, meaning it’s trained on the vocabulary and sentence structures relevant to your use case. We have a guide that could help you build you dataset and train your model.

Languages

  • 🇫🇷 fra-FR – French (France)

  • 🇺🇸 eng-US – English (United States)

  • 🇮🇹 ita-IT – Italian (Italy)

  • 🇪🇸 spa-ES – Spanish (Spain)

  • 🇩🇪 deu-DE – German (Germany)

Examples

This example demonstrates how to:

  1. Send a POST request to the VDK service, including the parser name and the text to be analyzed.

  2. Verify that the response is successful.

  3. Print the response body containing the analysis results.

Python
PY
import asyncio
import json
import requests

async def main():
    request_data = {
        "parser": "myParser",
        "text": "decrease the heat in 2 min"
    }
    parse_uri = "http://localhost:39806/v1/nlu/parse"

    response = requests.post(parse_uri, json=request_data)
    response_body = response.json()
    print(response_body)
    response.raise_for_status()

if __name__ == "__main__":
    asyncio.run(main())
C#
C#
using System.Text.Json;
using System.Net.WebSockets;
using System.Text;

using (var client = new HttpClient())
{
    var request = new { parser = "myParser", text = "decrease the heat in 2 min" };
    const string parseUri = "http://localhost:39806/v1/nlu/parse";
    var content = new StringContent(JsonSerializer.Serialize(request), Encoding.UTF8, "application/json");
    var response = await client.PostAsync(parseUri, content);
    response.EnsureSuccessStatusCode();
    var responseBody = await response.Content.ReadAsStringAsync();
    Console.WriteLine(responseBody);
}
JavaScript errors detected

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

If this problem persists, please contact our support.