mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 19:10:56 +02:00
Tidying
This commit is contained in:
parent
69b1c4273f
commit
375c71d2ef
1 changed files with 6 additions and 5 deletions
|
@ -139,12 +139,14 @@ void SpeechRecognizer::reloadCommands() {
|
||||||
ruleID += 1;
|
ruleID += 1;
|
||||||
|
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
hr = _speechRecognizerGrammar->GetRule(NULL, ruleID, SPRAF_TopLevel | SPRAF_Active | SPRAF_Dynamic, TRUE, &initialState);
|
hr = _speechRecognizerGrammar->
|
||||||
|
GetRule(NULL, ruleID, SPRAF_TopLevel | SPRAF_Active | SPRAF_Dynamic, TRUE, &initialState);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SUCCEEDED(hr)) {
|
if (SUCCEEDED(hr)) {
|
||||||
const std::wstring command = (*iter).toStdWString(); // DJRTODO: Better, shorter name
|
const std::wstring command = (*iter).toStdWString();
|
||||||
hr = _speechRecognizerGrammar->AddWordTransition(initialState, NULL, command.c_str(), L" ", SPWT_LEXICAL, 1.0, NULL);
|
hr = _speechRecognizerGrammar->
|
||||||
|
AddWordTransition(initialState, NULL, command.c_str(), L" ", SPWT_LEXICAL, 1.0, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,12 +163,11 @@ void SpeechRecognizer::reloadCommands() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (FAILED(hr)) {
|
if (FAILED(hr)) {
|
||||||
qDebug() << "ERROR: Didn't successfully reload commands";
|
qDebug() << "ERROR: Didn't successfully reload speech commands";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SpeechRecognizer::notifyCommandRecognized(HANDLE handle) {
|
void SpeechRecognizer::notifyCommandRecognized(HANDLE handle) {
|
||||||
|
|
||||||
SPEVENT eventItem;
|
SPEVENT eventItem;
|
||||||
memset(&eventItem, 0, sizeof(SPEVENT));
|
memset(&eventItem, 0, sizeof(SPEVENT));
|
||||||
HRESULT hr = _speechRecognizerContext->GetEvents(1, &eventItem, NULL);
|
HRESULT hr = _speechRecognizerContext->GetEvents(1, &eventItem, NULL);
|
||||||
|
|
Loading…
Reference in a new issue