banterbot.handlers package
banterbot.handlers.speech_recognition_handler module
- class banterbot.handlers.speech_recognition_handler.SpeechRecognitionHandler(recognizer: SpeechRecognizer, queue: CloseableQueue)[source]
Bases:
object
A single-use class that handles the speech recognition process. It is typically returned by the listen method of the SpeechRecognitionService class. It can be iterated over to yield the sentences as they are recognized. It can also be closed to stop the speech recognition process.
banterbot.handlers.speech_synthesis_handler module
- class banterbot.handlers.speech_synthesis_handler.SpeechSynthesisHandler(phrases: list[Phrase], synthesizer: SpeechSynthesizer, queue: CloseableQueue)[source]
Bases:
object
A single-use class that handles the speech synthesis process. It is typically returned by the speak method of the SpeechSynthesisService class. It can be iterated over to yield the words as they are synthesized. It can also be closed to stop the speech synthesis process.
banterbot.handlers.stream_handler module
- class banterbot.handlers.stream_handler.StreamHandler(interrupt: Number, kill_event: Event, queue: CloseableQueue, processor_thread: Thread, shared_data: dict)[source]
Bases:
object
Handler for managing and interacting with a data stream.