STTQueue

Inherits: Reference < Object

Category: Core

Brief Description

Stores keywords obtained through speech recognition.

Member Functions

void clear ( )
bool empty ( )
String get ( )
int get_capacity ( )
void set_capacity ( int capacity )
int size ( )

Numeric Constants

  • DEFAULT_KWS_CAPACITY = 100 — Default capacity for the keywords queue.

Description

Wrapper for a queue datatype. Typically stores keywords from speech recognition.

Member Function Description

  • void clear ( )

Clears all keywords in the queue, leaving it with a size of 0.

Returns true if the keywords queue is empty, or false otherwise.

Removes and returns the first element in the keywords queue. If the queue is empty, returns an empty String ("").

  • int get_capacity ( )

Returns the current queue capacity.

  • void set_capacity ( int capacity )

Sets the queue capacity as the specified value. Must be >= 0. If the new capacity exceeds the current number of elements in the queue, a warning message is printed, but no further actions are made.

Returns how many keywords are in the queue.