@@ -53,7 +53,7 @@ std::vector<std::string> split(const std::string &s, char delim) {
53
53
bool SpeechRecognizerModule::configure (ResourceFinder &rf )
54
54
{
55
55
setName ( rf.check (" name" ,Value (" speechRecognizer" )).asString ().c_str () );
56
- m_timeout = rf.check (" timeout" ,Value (10000 )).asInt ();
56
+ m_timeout = rf.check (" timeout" ,Value (10000 )).asInt32 ();
57
57
USE_LEGACY = !rf.check (" noLegacy" );
58
58
m_forwardSound = rf.check (" forwardSound" );
59
59
m_tmpFileFolder = rf.getHomeContextPath ();
@@ -265,7 +265,7 @@ bool SpeechRecognizerModule::updateModule()
265
265
// Send over yarp
266
266
Bottle bOut;
267
267
bOut.addString (fullSentence);
268
- bOut.addInt (confidence);
268
+ bOut.addInt32 (confidence);
269
269
m_portContinuousRecognition.write (bOut);
270
270
271
271
// Treat the semantic
@@ -644,7 +644,7 @@ string SpeechRecognizerModule::getFromDictaction(int timeout, LPCWSTR options )
644
644
for (list< pair<string, double > >::iterator it = results.begin (); it != results.end (); it++)
645
645
{
646
646
botTmp.addString (it->first );
647
- // botTmp.addDouble (it->second);
647
+ // botTmp.addFloat64 (it->second);
648
648
}
649
649
}
650
650
yInfo () <<" Dictation is off..." ;
@@ -662,8 +662,8 @@ bool SpeechRecognizerModule::handleRecognitionCmd(const Bottle& cmd, Bottle& rep
662
662
663
663
if (firstVocab == " timeout" )
664
664
{
665
- m_timeout = cmd.get (1 ).asInt ();
666
- // reply.addInt (true);
665
+ m_timeout = cmd.get (1 ).asInt32 ();
666
+ // reply.addInt32 (true);
667
667
return false ;
668
668
}
669
669
@@ -684,7 +684,7 @@ bool SpeechRecognizerModule::handleRecognitionCmd(const Bottle& cmd, Bottle& rep
684
684
for (list< pair<string, double > >::iterator it = results.begin (); it != results.end (); it++)
685
685
{
686
686
reply.addString (it->first );
687
- reply.addDouble (it->second );
687
+ reply.addFloat64 (it->second );
688
688
}
689
689
else
690
690
reply.addString (" -1" );
@@ -694,7 +694,7 @@ bool SpeechRecognizerModule::handleRecognitionCmd(const Bottle& cmd, Bottle& rep
694
694
// Turn off dictation and go back to the file grammar
695
695
everythingIsFine &= SUCCEEDED (m_cpGrammarDictation->SetDictationState ( SPRS_INACTIVE ));
696
696
everythingIsFine &=SUCCEEDED (m_cpGrammarFromFile->SetGrammarState (SPGS_ENABLED));
697
- // reply.addInt (true);
697
+ // reply.addInt32 (true);
698
698
return true ;
699
699
}
700
700
// If we are not in dictation then we set and switch to the runtimeGrammar
@@ -716,7 +716,7 @@ bool SpeechRecognizerModule::handleRecognitionCmd(const Bottle& cmd, Bottle& rep
716
716
717
717
refreshFromVocabulories (m_cpGrammarRuntime);
718
718
719
- // reply.addInt (everythingIsFine);
719
+ // reply.addInt32 (everythingIsFine);
720
720
}
721
721
722
722
else if (firstVocab == " choices" )
@@ -758,7 +758,7 @@ bool SpeechRecognizerModule::handleRecognitionCmd(const Bottle& cmd, Bottle& rep
758
758
for (list< pair<string, double > >::iterator it = results.begin (); it != results.end (); it++)
759
759
{
760
760
reply.addString (it->first );
761
- reply.addDouble (it->second );
761
+ reply.addFloat64 (it->second );
762
762
}
763
763
else
764
764
reply.addString (" -1" );
@@ -882,7 +882,7 @@ void SpeechRecognizerModule::say(string s, bool wait)
882
882
if (wait )
883
883
{
884
884
yarp::os::Bottle cmd,reply;
885
- cmd.addVocab (VOCAB (' s' ,' t' ,' a' ,' t' ));
885
+ cmd.addVocab32 (VOCAB (' s' ,' t' ,' a' ,' t' ));
886
886
std::string status = " speaking" ;
887
887
bool speechStarted = false ;
888
888
while (wait &&(!speechStarted ||status==" speaking" ))
0 commit comments