Exemple #1
0
    def __init__(self, alexa_config):
        """ Initialize the AlexaDevice using the config dictionary. The config dictionary must containing the
            Client_ID, Client_Secret, and refresh_token.

        :param alexa_config: config dictionary specific to the device
        """
        self.alexa_audio_instance = alexa_audio.AlexaAudio()
        self.alarm_manager = AlarmManager()
        self.config = alexa_config
        self.alexa = None
        self.scribe = scribe.Scribe()

        self.device_stop_event = threading.Event()
        self.device_thread = threading.Thread(
            target=self.device_thread_function)
        self.device_thread.start()
Exemple #2
0
import scribe
import net_lingo
scribe = scribe.Scribe()
try:
	net_lingo.NetLingo().run()
except Exception as e:
	scribe.error(e)
import sys
sys.path.append("..")

from utils import slab_print, read_args
import telugu as language
import scribe

args = read_args(sys.argv[1:], default='../configs/default.ast')
scriber = scribe.Scribe(language, **args['scribe_args'])

try:
    while True:
        image, text, labels = scriber.get_text_image()
        slab_print(image)
        print(image.shape)
        print(labels)
        # print("Twist: {:.3f}".format(angle), fp)
        # print(text)
        print(scriber)
        print("Press Enter to continue and Ctrl-D to quit.")
        input()
except (KeyboardInterrupt, EOFError):
    pass