Home
Categories
Dictionary
Glossary
Download
Project Details
Changes Log
What Links Here
FAQ
License

vosk Application



vosk
Function wraps the vosk speech recognition library
Distribution voskModule-bin-.zip
Jar files voskModule.jar
Modules vosk
Namespace http://dassault-aviation.com/vosk

Provided services http://dassault-aviation.com/vosk:sentence

Required services http://dassault-aviation.com/vosk:startTalk
http://dassault-aviation.com/vosk:endTalk

Mandatory properties lib
model

Optional properties autoEnabled
pushToTalk
pushToTalkWait
pushToTalkCut
encoding
replaceWithASCII
The built-in vosk application wraps the voskjavafork speech recognition library.

Properties

The vosk Application has several properties.

Mandatory properties

The vosk Application must have:
  • The "lib" property specifying the directory containing for the native vosk library[1]
    the .dll or .so files
  • The "model" properties specifying the model to use. Models can be found at the alphacephei.com/vosk/models web page
Example:
      <properties>
         <application name="vosk" >
            <module name="vosk" >
               <moduleProperty key="lib" value="lib" />            
               <moduleProperty key="model" value="model" />
            </module>      
         </application> 
      </properties>

Optional properties

  • The "autoEnabled" property specifies that the speech recognition is automatically enabled at the start ofd the module (default is false)
  • The "pushToTalk" property specifies if the module will have a "Push to talk" behavior. See Push to talk for more information
  • The "encoding" property specifies the string encoding to use for sentences (the module will use by default the default encoding of the Java platform)
  • The "replaceWithASCII" property specifies that sentences must all be converted to ASCII (default is false)
  • The "confidence" property specifies that the confidence rate of the voice decoding must be sent (default is false)

Confidence property

The "confidence" property specifies that the confidence rate of the voice decoding must be sent (from 0 to 1). Note that the confidence rate will always be sent if the mode is set to "Push to talk".

If the property is set to false and the mode is not set to "Push to talk", then the confidence rate value will be forced to 1.

Specific pushToTalk properties

  • The "pushToTalkMode" property specifies how the push to talk is working. It specifies on which condition a word will be added. The possible values are:
    • "start": a word will be added only if it starts between the http://dassault-aviation.com/vosk:startTalk and the http://dassault-aviation.com/vosk:endTalk
    • "end": a word will be added only if it ends between the http://dassault-aviation.com/vosk:startTalk and the http://dassault-aviation.com/vosk:endTalk
    • "both": a word will be added only if it starts and ends between the http://dassault-aviation.com/vosk:startTalk and the http://dassault-aviation.com/vosk:endTalk
  • The "pushToTalkCut" property specifies how much milliseconds to accept a word after the http://dassault-aviation.com/vosk:endTalk service has been received. By default its value is 0 which means it is not used. See also vosk Application Push to talk
  • The "pushToTalkWait" property specifies how much milliseconds to wait for decoded voice input after the http://dassault-aviation.com/vosk:endTalk service has been received. It is usually necessary because vosk will take some time to decode sentences. By default its value it is 500 milliseconds. . See also vosk Application Push to talk

Services

See the following file for the detailed description of the Services.

Required services

The vosk application requires two event Services, if the "pushToTalk" property is set to true:
  • http://dassault-aviation.com/vosk:startTalk: This service is used to indicate the start of a sentence
  • http://dassault-aviation.com/vosk:endTalk: This service is used to indicate the end of a sentence
There are two additionnal services:
  • http://dassault-aviation.com/vosk:enable: This request/response service is used to start the speech recognition. See Vosk state for more information
  • http://dassault-aviation.com/vosk:disable: This service is used to end the speech recognition. Note that a further http://dassault-aviation.com/vosk:enable invocation will start it again

Provided services

The vosk application provides two event Services:
  • http://dassault-aviation.com/vosk:voskState: This service provides the state of
  • http://dassault-aviation.com/vosk:sentence: This service provides the last decoded sentence. It also provides the mean of confidence rate for the words in the sentence, for the pushToTalk mode

Vosk state

The state of the Vosk library is sent in the two following cases:
  • At the start of the module, if the autoEnabled is set to true. In that case the state is sent through the http://dassault-aviation.com/vosk:voskState service
  • When enabling a previously disabled module (with the http://dassault-aviation.com/vosk:enable request/response service)
The state has the following enumeration:
  • INITIALIZED
  • NOT_INITIALIZED
  • ALREADY_ENABLED
  • NO_MICROPHONE
  • FILE_MISSING
  • INITIALIZE_EXCEPTION

Notes

  1. ^ the .dll or .so files

See also


Categories: builtin-applis

Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence