Included in this documentation is a working example that incorporates streaming audio, SRGS grammars, and Semantic Interpretation. It is written in C++, is based on examples throughout this documentation, and compiles under Visual Studio 2013, although should run on most recent versions. Note that this sample is very simplistic, and does not include the required amount of error-detection reporting functionality would be for a production application.
It consists of six files:
- main.cpp -- The entry point into the application.
- SimpleRecognizer.h -- Definition of a recognizer, backed by LVSpeechPort.
- SimpleRecognizer.cpp -- Implementation file.
- AudioStreamer.h -- Definition of an object that mimics streaming by reading an audio file.
- AudioStreamer.cpp -- Implementation file.
- HeaderClasses.h -- Thread code to help implement AudioStreamer.