BACHELOR PAPER Analysis of Mycroft and Rhasspy Open Source
Total Page:16
File Type:pdf, Size:1020Kb
BACHELOR PAPER Term paper submitted in partial fulfillment of the requirements for the degree of Bachelor of Science in Engineering at the University of Applied Sciences Technikum Wien - Degree Program Smart Homes and Assistive Technologies Analysis of Mycroft and Rhasspy Open Source voice assistants By: Carlos Lumbreras Sádaba Supervisor 1: Ing. Martin Deinhofer, M.Sc. Vienna, 2020-22-06 Declaration of Authenticity “As author and creator of this work to hand, I confirm with my signature knowledge of the relevant copyright regulations governed by higher education acts (see Urheberrechtsgesetz/ Austrian copyright law as amended as well as the Statute on Studies Act Provisions / Examination Regulations of the UAS Technikum Wien as amended). I hereby declare that I completed the present work independently and that any ideas, whether written by others or by myself, have been fully sourced and referenced. I am aware of any consequences I may face on the part of the degree program director if there should be evidence of missing autonomy and independence or evidence of any intent to fraudulently achieve a pass mark for this work (see Statute on Studies Act Provisions / Examination Regulations of the UAS Technikum Wien as amended). I further declare that up to this date I have not published the work to hand nor have I presented it to another examination board in the same or similar form. I affirm that the version submitted matches the version in the upload tool.” Sesma, 2020-06-22 Place, Date Signature Kurzfassung Der technologische Fortschritt hat die Sprachsteuerung von Maschinen bzw. intelligenten Geräten für den Durchschnittskonsumenten zugänglich gemacht. Da immer mehr Sprachassistenten auf dem Markt angeboten werden, ist es notwendig, diese zu analysieren, um herauszufinden, welche Vor- und Nachteile sie jeweils haben, und um festzustellen, welcher für den jeweiligen Benutzer am Besten geeignet ist. Die beliebtesten Sprachassistenten folgen den gleichen Prinzipien beim Zugriff auf Benutzerdaten, um einerseits die Produktentwicklung zu erleichtern und zu verbessern und andererseits einen zusätzlichen Nutzen aus dem Umgang mit diesen Daten zu ziehen. Das Aufkommen von Open Source Alternativen mit unterschiedlichen Ansätzen hat gezeigt, dass es möglich ist, qualitativ hochwertige Alternativen mit einem anderen Schwerpunkt zu haben. Bei den Optionen Mycroft und Rhasspy handelt es sich um zwei Open-Source-Alternativen, die eine Reihe von Vorteilen in Bezug auf Datenschutz und Zugänglichkeit bieten, die die bisherigen Alternativen nicht bieten. Während sich Mycroft auf ein System konzentriert, das in der Cloud arbeitet, aber dem Benutzer die Kontrolle über seine Daten erlaubt, schlägt Rhasspy die Verwendung eines Systems vor, das vollständig lokal arbeitet. Die Verwendung dieser Assistenten zusammen mit einem openHAB-Server als Schnittstelle zu den Smart Home-Geräten hat die Entwicklung eines sehr leistungsfährigen Systems ermöglicht, das in der Lage ist, all diese Geräte per Sprache zu steuern. Es hat sich gezeigt, dass diese Systeme eine sehr einfache Konfiguration ermöglichen und gleichzeitig eine sehr optimale Leistung in Bezug auf die Erkennung von Befehlen und deren anschließende Ausführung erzielen. Schlagwörter: Sprachassistent, Heimautomatisierung, Rhasspy, Mycroft, openHAB, Open Source Abstract Technological advances in recent years have made machines and intelligent devices made accessible by voice control to the average user. More and more voice assistants are being offered in the market. It is necessary to analyse them to see what advantages and disadvantages each one has in order to identify which one is more convenient for each specific user. The most popular voice assistants follow the same approach of accessing the users' data to facilitate and improve the product development, and on the other hand, get an additional benefit from the handling of this data. The emergence of alternatives with different approaches has shown that it is possible to have quality alternatives with a different focus. Analysing the different Open Source options in the market, the Mycroft and Rhasspy systems have been selected for further analysis due to the characteristics they present. They are two alternatives that offer a series of advantages related to privacy and accessibility that are not offered by the big players in the market. While Mycroft focuses on a system that works in the cloud but allows the user to have control over their data, Rhasspy proposes the use of a system that works entirely locally. The use of these assistants with an openHAB server has allowed the development of a very interesting system. The openHAB server acts as an intermediate platform between voice assistants and intelligent devices. This makes possible to create a system that allows to control all these devices of the home by voice. It has been seen that these systems allow a very simple configuration. At the same time is obtained a very optimum performance in relation to the detection of commands and their subsequent execution. Keywords: voice assistant, home automation, Rhasspy, Mycroft, openHAB, Open Source 2 Acknowledgements First of all I would like to thank my supervisor Ing. Martin Deinhofer, for his support and orientation to make this bachelor’s thesis possible in a situation as delicate as the one caused by covid-19. I would also like to thank Dr. L. Serrano for the support he has given me in solving all the different problems during the semester and making this experience possible. For my colleagues at UPNA and FH Technikum Wien I would just like to say thank you for the time we have spent together. I especially want to name my friend Edu for all his support and understanding over these years. As it could not be otherwise I wanted to thank my family. To my mother, Valen, my father, Jesús Miguel, and my brother, Óscar, thank you for showing me all that hard hard work, effort and humility means. Finally, I did not want to forget my friends from Sesma, my town. Life goes beyond university and therefore you are indispensable. Thanks. 3 Table of Contents 1 Introduction ............................................................................................................ 5 2 Related Work and State of the Art .......................................................................... 6 2.1 Voice Assistants ..................................................................................................... 6 2.2 Smart Homes ....................................................................................................... 17 2.3 Open Source Alternatives ..................................................................................... 20 3 Method ................................................................................................................. 25 3.1 Interconnection platform ....................................................................................... 25 3.2 Smart Home Appliances ....................................................................................... 27 3.3 Installation and configuration of openHAB ............................................................ 28 3.4 Mycroft ................................................................................................................. 32 3.5 Rhasspy ............................................................................................................... 39 3.6 Testing and calculation of statistics ...................................................................... 45 4 Results ................................................................................................................. 48 5 Discussion ............................................................................................................ 53 6 Conclusion ........................................................................................................... 54 7 Future Work ......................................................................................................... 55 Bibliography ......................................................................................................................... 56 Appendix A: Rhasspy sentence configuration ...................................................................... 64 Appendix B: List of extra commands .................................................................................... 67 Appendix C: Raw evaluation data ........................................................................................ 68 4 1 Introduction Home automation is one of the topics that have generated most interest to me in the technological field. It is an idea based on the user being able to create a technological environment in the home to facilitate the control of different devices. A few years ago I started trying to automate different elements of my house, such as the watering control, using configurations based on the use of an Arduino1. I didn't like it just because I had a more modern house, what especially impressed me was the fact that I could do the whole development process myself so that the whole system would work. In the last few years, when different voice assistants started appearing in the market, I thought that using these tools could be the perfect complement for controlling these home automation devices. Voice control offers many advantages such as hands-free operation, which is interesting for both normal people and people with disabilities in particular. However, after trying to use devices from