30 #include <ArduinoJson.h>
47 int listen(
char* openTextBuffer,
int* length,
bool useUI =
true,
long timeout = 0);
55 bool heard(String text);
56 bool heard(
int spokenNumber);
int stop() override
Stops this sensor.
Definition: Recognition.cpp:60
int listenFor(String constraint, bool useUI=true, int expectedConfidence=Confidence_Medium, long timeout=0)
Recognizes the specified constricted recognition text without a UI.
Definition: Recognition.cpp:70
Definition: VirtualShield.h:50
Definition: Recognition.h:40
VirtualShield & shield
Definition: Sensor.h:55
bool heard(String text)
Verifies if the recognized spoken text matches the text parameter.
Definition: Recognition.cpp:104
int recognizedIndex
Definition: Recognition.h:42
const int Confidence_Error
Definition: Recognition.h:38
int confidence
Definition: Recognition.h:43
const int Confidence_Rejected
Definition: Recognition.h:37
void onJsonReceived(JsonObject &root, ShieldEvent *shieldEvent) override
Event called when a valid json message was received. Consumes the proper values for this sensor...
Definition: Recognition.cpp:133
Definition: SensorModels.h:101
const int Confidence_Low
Definition: Recognition.h:36
Definition: ShieldEvent.h:35
int listen(char *openTextBuffer, int *length, bool useUI=true, long timeout=0)
Recognizes open text / not constricted without a UI.
Definition: Recognition.cpp:49
const int Confidence_High
Definition: Recognition.h:34
const int Confidence_Medium
Definition: Recognition.h:35
Recognition(const VirtualShield &shield)
Initializes a new instance of the Speech class.
Definition: Recognition.cpp:41