Project

General

Profile

Template
plugin.cpp File Reference
#include "pluginSpeechPrerequisites.h"
#include <scolMemoryHelper.hpp>
#include "reco_vosk.h"

Go to the source code of this file.

Functions

int destroySpeechObj (mmachine m, SCOL_PTR_TYPE handsys, int speechTab)
 Utils Conversions.
 
int _CRSpeech (mmachine m)
 _CRSpeech : create speech instance
 
int _DSSpeech (mmachine m)
 _DSSpeech : destroy speech instance
 
int _SetSpeechText (mmachine m)
 _SetSpeechText : Set speech Text
 
int _SetSpeechVolume (mmachine m)
 _SetSpeechVolume : Set speech volume
 
int _GetSpeechVolume (mmachine m)
 _GetSpeechVolume : Get speech volume
 
int _SetSpeechRate (mmachine m)
 _SetSpeechRate : set speech rate
 
int _GetSpeechRate (mmachine m)
 _GetSpeechRate : get speech rate
 
int _PlaySpeech (mmachine m)
 _PlaySpeech : play speech
 
int _PauseSpeech (mmachine m)
 _PauseSpeech : pause speech
 
int _ResumeSpeech (mmachine m)
 _ResumeSpeech : resume speech
 
int _StopSpeech (mmachine m)
 _StopSpeech : Stop speech
 
int _CBSpeechStart (mmachine m)
 n_CBSpeechStart : set callback 'start of speech'
 
int _CBSpeechEnd (mmachine m)
 n_CBSpeechEnd : set callback end of speech
 
int getSpeechStartCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the speech start event callback.
 
int getSpeechEndCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the speech end event callback.
 
int _GetSpeechVoices (mmachine m)
 _GetSpeechVoices : get speech voices
 
int _SetSpeechVoice (mmachine m)
 _SetSpeechVoice : set speech voice
 
int _GetSpeechVoice (mmachine m)
 _GetSpeechVoice : get speech voice
 
int _CBSpeechWord (mmachine m)
 _CBSpeechWord : Set callback on speech word
 
int getSpeechWordCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the speech word event callback.
 
int _CBSpeechText (mmachine m)
 _CBSpeechText : Set callback on speech text
 
int getSpeechTextCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the speech text event callback.
 
int _CBSpeechPhoneme (mmachine m)
 _CBSpeechPhoneme : set callback on speech phoneme
 
int getSpeechPhonemeCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the speech phoneme event callback.
 
int _CBSpeechViseme (mmachine m)
 _CBSpeechViseme : set callback on speech viseme
 
int getSpeechVisemeCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the speech viseme event callback.
 
int _CRRecognition (mmachine m)
 _CRRecognition : create recognition instance
 
int _CRRecognition2 (mmachine m)
 _CRRecognition2 : create recognition instance
 
int _FillRecognitionBuffer (mmachine m)
 _FillRecognitionBuffer : fill recognition audio buffer
 
int destroyRecognitionObj (mmachine m, SCOL_PTR_TYPE handsys, int recognitionTab)
 function to destroy an OBJRECOSCOL in scol
 
int _DSRecognition (mmachine m)
 n_DSRecognition : destroy recognition instance
 
int _CBRecognitionEnd (mmachine m)
 _CBRecognitionEnd : set callback end of recognition
 
int getRecognitionEndCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the recognition end event callback.
 
int _CBRecognitionStart (mmachine m)
 _CBRecognitionStart : set callback start of recognition
 
int getRecognitionStartCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the recognition start event callback.
 
int _CBRecognitionText (mmachine m)
 _CBRecognitionText : Set callback on recognition text
 
int getRecognitionTextCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the recognition text event callback.
 
int _CBRecognitionTextsAlt (mmachine m)
 _CBRecognitionTextsAlt : Set callback on recognition texts alternates
 
int getRecognitionTextsAltCb (mmachine m, SCOL_PTR_TYPE id, SCOL_PTR_TYPE param)
 C function that prepares the VM for the execution of the recognition alternates text event callback.
 
int _SetRecogntionVolume (mmachine m)
 _CBRecognitionWords : Set callback on recognition words
 
int _GetRecogntionVolume (mmachine m)
 _GetRecogntionVolume : Get recognition volume
 
int _AddRecognitionWord (mmachine m)
 _AddRecognitionWord : add recogntion word to dictionary
 
int LoadSpeech (mmachine m)
 Load the packages in Scol virtual machine.
 
SCOL_EXPORT int ScolLoadPlugin (mmachine m, cbmachine w)
 Starting point of the DLL.
 
SCOL_EXPORT int ScolUnloadPlugin ()
 Ending point of the DLL.
 

Variables

cbmachine ww
 Main include.
 
mmachine mm
 
int OBJSPEECHSCOL
 global object declaration
 
int OBJRECOSCOL
 
int SCOL_SPEECH_START_CB = 0
 global Callback declaration for text to speech
 
int SPEECH_START_CB
 
int SCOL_SPEECH_END_CB = 1
 
int SPEECH_END_CB
 
int SCOL_SPEECH_WORD_CB = 2
 
int SPEECH_WORD_CB
 
int SCOL_SPEECH_TEXT_CB = 3
 
int SPEECH_TEXT_CB
 
int SCOL_SPEECH_PHONEME_CB = 4
 
int SPEECH_PHONEME_CB
 
int SCOL_SPEECH_VISEME_CB = 5
 
int SPEECH_VISEME_CB
 
int SCOL_RECO_END_CB = 0
 global Callback declaration for recognition
 
int RECOGNITION_END_CB
 
int SCOL_RECO_TEXT_CB = 1
 
int RECOGNITION_TEXT_CB
 
int SCOL_RECO_START_CB = 2
 
int RECOGNITION_START_CB
 
int SCOL_RECO_TEXTS_ALT_CB = 3
 
int RECOGNITION_TEXTS_ALT_CB
 
int SCOL_RECO_WORDS_CB = 4
 
int RECOGNITION_WORDS_CB
 
NativeDefinition natSpeech []
 

Function Documentation

◆ destroyRecognitionObj()

int destroyRecognitionObj ( mmachine  m,
SCOL_PTR_TYPE  handsys,
int  recognitionTab 
)

function to destroy an OBJRECOSCOL in scol

Parameters
m: current machine
handle: given handle
obj: given OBJRECOSCOL
Returns
0 if success

Definition at line 1405 of file plugin.cpp.

◆ destroySpeechObj()

int destroySpeechObj ( mmachine  m,
SCOL_PTR_TYPE  handsys,
int  speechTab 
)

Utils Conversions.

function to destroy an OBJSPEECHSCOL in scol

Parameters
m: current machine
handle: given handle
obj: given OBJSPEECHSCOL
Returns
0 if success

Definition at line 144 of file plugin.cpp.

◆ getRecognitionEndCb()

int getRecognitionEndCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the recognition end event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 1482 of file plugin.cpp.

◆ getRecognitionStartCb()

int getRecognitionStartCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the recognition start event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 1529 of file plugin.cpp.

◆ getRecognitionTextCb()

int getRecognitionTextCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the recognition text event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 1577 of file plugin.cpp.

◆ getRecognitionTextsAltCb()

int getRecognitionTextsAltCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the recognition alternates text event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 1632 of file plugin.cpp.

◆ getSpeechEndCb()

int getSpeechEndCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the speech end event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 752 of file plugin.cpp.

◆ getSpeechPhonemeCb()

int getSpeechPhonemeCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the speech phoneme event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 1146 of file plugin.cpp.

◆ getSpeechStartCb()

int getSpeechStartCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the speech start event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 722 of file plugin.cpp.

◆ getSpeechTextCb()

int getSpeechTextCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the speech text event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 1089 of file plugin.cpp.

◆ getSpeechVisemeCb()

int getSpeechVisemeCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the speech viseme event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 1197 of file plugin.cpp.

◆ getSpeechWordCb()

int getSpeechWordCb ( mmachine  m,
SCOL_PTR_TYPE  id,
SCOL_PTR_TYPE  param 
)

C function that prepares the VM for the execution of the speech word event callback.

Parameters
m: current machine
h: main scol window
msg: message
id: pointer of the obj
param: data pointer
ret: user parameter
Returns
res : 0 if success

Definition at line 1031 of file plugin.cpp.

◆ LoadSpeech()

int LoadSpeech ( mmachine  m)

Load the packages in Scol virtual machine.

Parameters
mmachine: the scol machine

Definition at line 1947 of file plugin.cpp.

◆ ScolLoadPlugin()

SCOL_EXPORT int ScolLoadPlugin ( mmachine  m,
cbmachine  w 
)

Starting point of the DLL.

Definition at line 2005 of file plugin.cpp.

◆ ScolUnloadPlugin()

SCOL_EXPORT int ScolUnloadPlugin ( )

Ending point of the DLL.

Definition at line 2021 of file plugin.cpp.

Variable Documentation

◆ mm

mmachine mm

Definition at line 69 of file plugin.cpp.

◆ natSpeech

NativeDefinition natSpeech[]

Scol function names

Definition at line 1905 of file plugin.cpp.

◆ OBJRECOSCOL

int OBJRECOSCOL

Definition at line 74 of file plugin.cpp.

◆ OBJSPEECHSCOL

int OBJSPEECHSCOL

global object declaration

Definition at line 73 of file plugin.cpp.

◆ RECOGNITION_END_CB

int RECOGNITION_END_CB

Definition at line 99 of file plugin.cpp.

◆ RECOGNITION_START_CB

int RECOGNITION_START_CB

Definition at line 105 of file plugin.cpp.

◆ RECOGNITION_TEXT_CB

int RECOGNITION_TEXT_CB

Definition at line 102 of file plugin.cpp.

◆ RECOGNITION_TEXTS_ALT_CB

int RECOGNITION_TEXTS_ALT_CB

Definition at line 108 of file plugin.cpp.

◆ RECOGNITION_WORDS_CB

int RECOGNITION_WORDS_CB

Definition at line 111 of file plugin.cpp.

◆ SCOL_RECO_END_CB

int SCOL_RECO_END_CB = 0

global Callback declaration for recognition

Definition at line 98 of file plugin.cpp.

◆ SCOL_RECO_START_CB

int SCOL_RECO_START_CB = 2

Definition at line 104 of file plugin.cpp.

◆ SCOL_RECO_TEXT_CB

int SCOL_RECO_TEXT_CB = 1

Definition at line 101 of file plugin.cpp.

◆ SCOL_RECO_TEXTS_ALT_CB

int SCOL_RECO_TEXTS_ALT_CB = 3

Definition at line 107 of file plugin.cpp.

◆ SCOL_RECO_WORDS_CB

int SCOL_RECO_WORDS_CB = 4

Definition at line 110 of file plugin.cpp.

◆ SCOL_SPEECH_END_CB

int SCOL_SPEECH_END_CB = 1

Definition at line 81 of file plugin.cpp.

◆ SCOL_SPEECH_PHONEME_CB

int SCOL_SPEECH_PHONEME_CB = 4

Definition at line 90 of file plugin.cpp.

◆ SCOL_SPEECH_START_CB

int SCOL_SPEECH_START_CB = 0

global Callback declaration for text to speech

Definition at line 78 of file plugin.cpp.

◆ SCOL_SPEECH_TEXT_CB

int SCOL_SPEECH_TEXT_CB = 3

Definition at line 87 of file plugin.cpp.

◆ SCOL_SPEECH_VISEME_CB

int SCOL_SPEECH_VISEME_CB = 5

Definition at line 93 of file plugin.cpp.

◆ SCOL_SPEECH_WORD_CB

int SCOL_SPEECH_WORD_CB = 2

Definition at line 84 of file plugin.cpp.

◆ SPEECH_END_CB

int SPEECH_END_CB

Definition at line 82 of file plugin.cpp.

◆ SPEECH_PHONEME_CB

int SPEECH_PHONEME_CB

Definition at line 91 of file plugin.cpp.

◆ SPEECH_START_CB

int SPEECH_START_CB

Definition at line 79 of file plugin.cpp.

◆ SPEECH_TEXT_CB

int SPEECH_TEXT_CB

Definition at line 88 of file plugin.cpp.

◆ SPEECH_VISEME_CB

int SPEECH_VISEME_CB

Definition at line 94 of file plugin.cpp.

◆ SPEECH_WORD_CB

int SPEECH_WORD_CB

Definition at line 85 of file plugin.cpp.

◆ ww

cbmachine ww

Main include.

utils libraries for Speech

global scol declaration

Definition at line 68 of file plugin.cpp.