module mokadi.gui_mokadi

Inheritance diagram of botadi.mokadi.gui_mokadi

Short summary

module botadi.mokadi.gui_mokadi

Tkinter application for Mokadi

source on GitHub

Classes

class

truncated documentation

ThreadListen

ThreadListenProcess

ThreadSpeech

TkinterMokadi

Defines a frame.

Functions

function

truncated documentation

gui_mokadi

Launches the application. There is a bug somewhere. Taking a picture fails if the vocal synthesis runs first. We …

Properties

property

truncated documentation

_windowingsystem

Internal function.

daemon

A boolean value indicating whether this thread is a daemon thread. This must be set before start() is called, otherwise …

daemon

A boolean value indicating whether this thread is a daemon thread. This must be set before start() is called, otherwise …

daemon

A boolean value indicating whether this thread is a daemon thread. This must be set before start() is called, otherwise …

ident

Thread identifier of this thread or None if it has not been started. This is a nonzero integer. See the get_ident() …

ident

Thread identifier of this thread or None if it has not been started. This is a nonzero integer. See the get_ident() …

ident

Thread identifier of this thread or None if it has not been started. This is a nonzero integer. See the get_ident() …

name

A string used for identification purposes only. It has no semantics. Multiple threads may be given the same name. …

name

A string used for identification purposes only. It has no semantics. Multiple threads may be given the same name. …

name

A string used for identification purposes only. It has no semantics. Multiple threads may be given the same name. …

native_id

Native integral thread ID of this thread, or None if it has not been started. This is a non-negative integer. …

native_id

Native integral thread ID of this thread, or None if it has not been started. This is a non-negative integer. …

native_id

Native integral thread ID of this thread, or None if it has not been started. This is a non-negative integer. …

Methods

method

truncated documentation

__init__

__init__

__init__

__init__

bound_enter

Returned was pressed.

from_listener

Listener tells to start.

get_response

Get the text in the message box. Retrieve the answer.

initialize

Initialisation.

process

Process an input.

receive_speech

Reveices the recognized speech.

run

run

run

start_speech_listening

Launches a thread which record the speech.

start_speech_recording

Launches a thread which record the speech.

stop_listening

stop_listening

Documentation

Tkinter application for Mokadi

source on GitHub

class botadi.mokadi.gui_mokadi.ThreadListen(win, fLOG, folder)

Bases: threading.Thread

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

__init__(win, fLOG, folder)

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class botadi.mokadi.gui_mokadi.ThreadListenProcess(win, fLOG)

Bases: threading.Thread

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

__init__(win, fLOG)

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class botadi.mokadi.gui_mokadi.ThreadSpeech(win, subkey, fLOG)

Bases: threading.Thread

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

__init__(win, subkey, fLOG)

This constructor should always be called with keyword arguments. Arguments are:

group should be None; reserved for future extension when a ThreadGroup class is implemented.

target is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called.

name is the thread name. By default, a unique name is constructed of the form “Thread-N” where N is a small decimal number.

args is the argument tuple for the target invocation. Defaults to ().

kwargs is a dictionary of keyword arguments for the target invocation. Defaults to {}.

If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread.

run()

Method representing the thread’s activity.

You may override this method in a subclass. The standard run() method invokes the callable object passed to the object’s constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively.

class botadi.mokadi.gui_mokadi.TkinterMokadi(parent, mokadi, vocal=False, subkey_speech=None, fLOG=<function fLOG>, folder='.')

Bases: tkinter.Frame

Defines a frame.

source on GitHub

Parameters
  • parent – a frame

  • mokadi – the bot MokadiEngine

  • vocal – speak the answer and not just display it

  • subkey_speech – key for the speech

  • folder – temporary folder

  • fLOG – logging function

source on GitHub

__init__(parent, mokadi, vocal=False, subkey_speech=None, fLOG=<function fLOG>, folder='.')
Parameters
  • parent – a frame

  • mokadi – the bot MokadiEngine

  • vocal – speak the answer and not just display it

  • subkey_speech – key for the speech

  • folder – temporary folder

  • fLOG – logging function

source on GitHub

bound_enter(*args)

Returned was pressed.

source on GitHub

from_listener(*args)

Listener tells to start.

source on GitHub

get_response()

Get the text in the message box. Retrieve the answer.

source on GitHub

initialize()

Initialisation.

source on GitHub

process(user_input)

Process an input.

Parameters

user_input – user input

source on GitHub

receive_speech(*args)

Reveices the recognized speech.

source on GitHub

start_speech_listening()

Launches a thread which record the speech.

source on GitHub

start_speech_recording()

Launches a thread which record the speech.

source on GitHub

botadi.mokadi.gui_mokadi.gui_mokadi(fLOG=None, folder_slides=None)

Launches the application.

There is a bug somewhere. Taking a picture fails if the vocal synthesis runs first. We need to take a picture first.

source on GitHub