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

vosk Application Push to talk



The "pushToTalk" property of the vosk module specifies if the module will have a "Push to talk" behavior.

Overview

The "pushToTalk" property specifies if the module will have a "Push to talk" behavior:
  • If this property is set to false (the default value), the module will invoke the http://dassault-aviation.com/vosk:sentence as soon as it decodes a sentence
  • If this property is set to true, the module will invoke the http://dassault-aviation.com/vosk:sentence after it has been notified by a http://dassault-aviation.com/vosk:endTalk service, if it decoded something
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

The "pushToTalkWait" property specifies how much time (in milliseconds) will be waited after the http://dassault-aviation.com/vosk:endTalk service has been received. Buy default it is equal to 0 so this property is not used.

If "pushToTalk" is not set, or set to false:
voskdiagram
If "pushToTalk" is set to true, and the "pushToTalkCut" property has its default value:
voskpttdiagram

Detection mechanism of the underlying library

The underlying Vosk library (which is used by the Vosk module) is able to return a JSON result where each word contains:
  • A confidence value
  • A start time for the word (beginning from the starting time of the underlying library)
  • An end time for the word (beginning from the starting time of the underlying library)
For example:
      {
      "result" : [{
      "conf" : 0.944314,
      "end" : 1.020000,
      "start" : 0.660000,
      "word" : "this"
      }, {
      "conf" : 0.944314,
      "end" : 1.200000,
      "start" : 1.020000,
      "word" : "is"
      }, {
      "conf" : 0.944314,
      "end" : 1.290000,
      "start" : 1.200000,
      "word" : "a"
      }, {
      "conf" : 0.367768,
      "end" : 2.070000,
      "start" : 1.290000,
      "word" : "test"
      }],
      "text" : "this is a test"
      }      
The "pushToTalkMode" property specifies under which condition each word will be added to the finale sentence. For example

pushToTalkCut property

The "pushToTalkCut" property specifies how much milliseconds to accept a word after the http://dassault-aviation.com/vosk:endTalk service has been received.

Setting a value different from 0 avoid to forget a word if it is pronounced by the user shortly after the http://dassault-aviation.com/vosk:endTalk service has been notified.

For example, if "pushToTalk" is set to true, and the "pushToTalkCut" property has a value greater than 0:
voskpttdiagramcut

pushToTalkWait property

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.

This value allows to wait for some time after the user has pronounced a sentence, considering that the decoding of the sentence by the underlying library can take some time.

It does not mean that words which were not pronounced between the start and the end will be added in the sentence. The underlying vosk library adds a start and the end tag to each decoded word, meaning that only those which are valid will be added by the module


In the following example, the underlying library takes some time to decode the sentence, but the "pushToTalkWait" property allows to still get the resulting sentence correctly:
voskpttdiagramwait

Example

For example:
      <properties>
         <application name="vosk" >
            <module name="vosk" >
               <moduleProperty key="lib" value="native" />
               <moduleProperty key="model" value="modelfr" />
               <moduleProperty key="encoding" value="UTF-8" />
               <moduleProperty key="pushToTalk" value="true" />         
            </module>      
         </application>  
      </properties>

See also


Categories: builtin-applis

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