Commit Graph

3 Commits (dbf0da6baf4207ef12e01551a361fedb2dcf3ed8)

Author SHA1 Message Date
David Wagner 9d8264b20d
Shorten two lines 2019-06-10 18:04:38 -05:00
Joshua Watt 601eeb6bdc Implement streaming STT framework
The initial framework for live streaming Speech to Text. STT derived
classes now can report that they support live streaming via their
"can_stream" property. If True, the following member functions will be
called on the object:

stream_start() - Called when a stream is starting. Should setup any
persistent state required to process speech to text.

stream_data(chunk) - Called when a chunk of audio data has been
captured.

stream_stop() - Called when a stream should be stopped. Should tear down
any state setup with stream_start(). Note that this may be called at
anytime (even if stream_start() has not been called).

Note that the execute() API is still used to get the text utterance from
the class.

A typical sequence of calls would be:

 stream_start()
 stream_data(...)
 stream_data(...)
 stream_data(...)
 stream_data(...)
 ...
 execute(...)
 stream_stop()
2019-06-09 22:28:09 -05:00
Matthew D. Scholefield e3b87be48e Rename unit tests to test_name.py to be consistent
This also fixes pytest not picking up some tests
2018-05-14 14:27:37 -05:00