Add fuzzy and text-classification light model #1

Merged
Tjiho merged 18 commits from fuzzy into master 2025-02-01 01:35:11 +01:00
2 changed files with 10 additions and 2 deletions
Showing only changes of commit 86500c3164 - Show all commits

10
main.py
View file

@ -24,6 +24,7 @@ parser = argparse.ArgumentParser(
parser.add_argument('mode') parser.add_argument('mode')
parser.add_argument('-i', '--ip', required=False) parser.add_argument('-i', '--ip', required=False)
parser.add_argument('-p', '--port', required=False, type=int) parser.add_argument('-p', '--port', required=False, type=int)
parser.add_argument('-m', '--mpd', required=False)
args = parser.parse_args() args = parser.parse_args()
@ -47,7 +48,14 @@ logging.info("Loading ratatouilles modules")
walle = Hass(config.hass_url, config.hass_token) walle = Hass(config.hass_url, config.hass_token)
yoda = None # Rhasspy(config.rhasspy_url) yoda = None # Rhasspy(config.rhasspy_url)
mopidy = Mpd('10.10.10.8')
mopidy = None
if args.mpd is not None:
mopidy = Mpd(args.mpd)
else:
logging.warning('Starting without MPD connection')
ratatouille = Ratatouille(yoda, walle, mopidy, None) ratatouille = Ratatouille(yoda, walle, mopidy, None)
# alexa = AlexaIntent() # we are not doing any request to the evil amazon but we are using one of its dataset # alexa = AlexaIntent() # we are not doing any request to the evil amazon but we are using one of its dataset
bert = BertIntent() bert = BertIntent()

View file

@ -23,7 +23,7 @@ class Ratatouille():
# schedule.every().day.at(config.hibernate_time).do(self.hibernate) # schedule.every().day.at(config.hibernate_time).do(self.hibernate)
# schedule.every().day.at(config.wakeup_time).do(self.clear_hibernate) # schedule.every().day.at(config.wakeup_time).do(self.clear_hibernate)
# yoda.say('Ratatouille a bien démmaré') # yoda.say('Ratatouille a bien démmaré')
logging.info('loaded') # logging.info('loaded')
def parse_rhasspy_command(self, payload): def parse_rhasspy_command(self, payload):
command = payload['intent']['intentName'] command = payload['intent']['intentName']