Giter Site home page Giter Site logo

davquar / voicecrm Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 4.74 MB

Project for the Human Computer Interaction on the Web 2021 course at Sapienza University of Rome

Python 85.87% Gherkin 14.13%
crm experiment hci mycroft mycroft-skill mycroft-skills vocal-assistant voice-assistant multimodal-interaction

voicecrm's Introduction

voicecrm's People

Contributors

davquar avatar eatinglupini avatar fedecerno avatar gerlock93 avatar pietroliberati98 avatar

Stargazers

 avatar

Watchers

 avatar

voicecrm's Issues

Minor dialog/intent fixes

  • When more actions are done (like new activity --> new contact) we can remove "finishing.dialog/end-new-contact.dialog" at the end of the first action and substitute it with an intermediate intent

  • When more contacts are found, "self.speak_dialog("generic-data-done-repeat", {"data": utt_name})" is useless

  • Maybe we can add a dialog in "last-activities", before reading the activities list

Test the "new reminder" compact intents

The compact intent set for "new reminder" may skip our skill and directly call the reminder-skill of mycroft, therefore we should fine tune our intent files to prevent it.

E.g. this should be avoided: "remind me to call michael jordan tomorrow morning โ†’ Sure, saving a reminder for tomorrow at eight o'clock"

Depends on #30

Sometimes the date parser fails

Normally extract_datetime should return None if there is no datetime in the utterance, but sometimes it fails.

Example saying "nevermind":

Traceback (most recent call last):
  File "/opt/mycroft/mycroft/skills/mycroft_skill/event_container.py", line 73, in wrapper
    handler(message)
  File "/opt/mycroft/skills/crm-skill/__init__.py", line 267, in handle_new_activity
    parsed_datetime = parse.extract_datetime(utt)
  File "/opt/mycroft/mycroft/util/parse.py", line 122, in extract_datetime
    default_time)
  File "/opt/mycroft/.venv/lib/python3.6/site-packages/lingua_franca/internal.py", line 597, in call_localized_function
    return _call_localized_function(func, *args, **kwargs)
  File "/opt/mycroft/.venv/lib/python3.6/site-packages/lingua_franca/internal.py", line 575, in _call_localized_function
    in kwargs.items()
  File "/opt/mycroft/.venv/lib/python3.6/site-packages/lingua_franca/lang/parse_en.py", line 707, in extract_datetime_en
    words = clean_string(text)
  File "/opt/mycroft/.venv/lib/python3.6/site-packages/lingua_franca/lang/parse_en.py", line 641, in clean_string
    s = _convert_words_to_numbers_en(s, ordinals=None)
  File "/opt/mycroft/.venv/lib/python3.6/site-packages/lingua_franca/lang/parse_en.py", line 48, in _convert_words_to_numbers_en
    tokens = tokenize(text)
  File "/opt/mycroft/.venv/lib/python3.6/site-packages/lingua_franca/lang/parse_common.py", line 255, in tokenize
    for index, word in enumerate(Normalizer.tokenize(text))]
  File "/opt/mycroft/.venv/lib/python3.6/site-packages/lingua_franca/lang/parse_common.py", line 34, in tokenize
    utterance = re.sub(r"([0-9]+)([\%])", r"\1 \2", utterance)
  File "/usr/lib/python3.6/re.py", line 191, in sub
    return _compile(pattern, flags).sub(repl, string, count)
TypeError: expected string or bytes-like object

Add contact disambiguation

  • Support having multiple contacts with the same name+surname.
  • Implement a "nickname" field, and support it for searches.

Migrate to Adapt

The Adapt intent parser is more powerful and flexible; it also doesn't have the infamous bugs of Padatious.

To migrate it should be sufficient to:

  • convert the intent strings into regexes.
  • appropriately tune the intent builder with require and optionally to allow both long and compact intents.

As an alternative to the last point, it is also possible to use both parsers: Adapt for compact intents and Padatious for simple ones.

Add "compact" intents

  • New contact
  • New activity
  • Add reminder
  • List activities

3 possible ways:

  1. Define "natural" intents with fields --> nice but with possible errors
  2. Define "robotic" intents with fields --> ugly but with less errors
  3. Use the Adapt intent parser to validate fields and pass results to the already defined functions --> cool but ?

Support relationships

Contacts can have relationships between them, e.g. son, father, friend, spouse, etc...

"relationships": [
            "<contact_id>": {"<relationship>", ...}
            ....
]

Relationships:

  • friend
  • spouse
  • partner
  • colleague
  • collaborator
  • son-daugther/parent
  • sibling
  • cousin

Improve vocal interaction - usability tests

Improve user experience with a better and satisfying vocal interaction:

  • Check dialog in speak instructions

  • Complete intent files

  • Optimize, if possible, Mycroft vocal comprehension and adjust the speak interval time

Remove stopwords from contact searches

Right now if you say something like "with elon musk", it does not match "elon musk". The contact search function should remove stopwords from the utterance.

Handle alternative task flows

Allow the user to stop the interaction, to go back, rephrase or repeat something, etc.

  • New contact
  • Add reminder
  • New activity
  • Latest activities

Extend intent phrases

Intents

  • add N S to my contact list
  • can you add someone to my contacts
  • an you add N S
  • can you add a contact
  • another activity
  • can you tell me the last activities

Action words

  • i don't know X --> skip
  • #40

General code cleanup

  • Enforce Python code style
  • Move utility code outside of the main file, if possible
  • Add comments when needed; remove unnecessary comments

Support birthday reminders

  • If the birth date is set, the skill should remind you about the birthday by itself.
  • The user should be able to ask "what are the upcoming birthdays", and the skill tells the birthdays of the next 7 days.

Add diagrams

UML diagrams to describe the interaction flow.

Add validation

The user should not be able to insert invalid things.

Dates/times

  • New reminder --> future
  • New activity --> past
  • Birth date --> past

Genre

Male, female, other

General data

Ignore:

  • Yes ==> ~treat as "repeat"
  • No ==> ~treat as "skip"

Also, validation code should be put - if possible - inside the validator field of mycroft methods, like get_response.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.