speechmatics / speechmatics-python

Python library and CLI for Speechmatics
https://speechmatics.github.io/speechmatics-python/
MIT License
59 stars 15 forks source link

Allow user to raise ForceEndSession to end session early #49

Closed benjamingorman closed 2 years ago

benjamingorman commented 2 years ago

This MR adds a new exception type ForceEndSession which the user may raise from an event handler or middleware in order to prematurely end the transcription session. Although there is currently no customer ask for this it is a helpful thing for us to have for internal testing. I've added a few new unit tests which test the behavior.