The document discusses implementing Google Assistant on a Raspberry Pi without using the official Google Voice Kit hardware. It describes the necessary software changes to access the microphone and speaker to enable voice interaction. It also explores using the Google Assistant software for other applications and languages like Romanian.
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
137 views
Implementasi Google Assistant With Raspberry Pi 3
The document discusses implementing Google Assistant on a Raspberry Pi without using the official Google Voice Kit hardware. It describes the necessary software changes to access the microphone and speaker to enable voice interaction. It also explores using the Google Assistant software for other applications and languages like Romanian.
observed that there is a very powerful function text, audio = assistant.recognize() that waits for an input speech and then returns the recognized text as the variable text and the answer as the variable audio. This can be played by the function aiy.audio.play_audio(audio) According to [10] this application, assistant_demo_grpc.py, can be used for a dialogue with Fig. 4. A screenshot from the terminal during running of the the assistant while the application cloudspeech_demo.py cloudspeech_demo.py application can be used to implement new commands that do not need answers. However, because the variable text is available, Here we present an experiment that examines the some simplest tests of this variable can be used to generate response time of the implemented Google assistant. The commands. previous application was modified so that it contains a The application assistant_library_demo.py is mainly counter that is incremented for each spoken text and which similar to the previous application. The differences are: the also displays the current time stamp when the string of text trigger of the application is represented by the words “OK is received. In addition, this application no longer requires Google” while the decoded speech is not displayed on the the user to press the button to be able to speak, as of Fig.4. screen. Furthermore, the connected LED becomes ON Instead, the user can speak when the message “Listening…” when the trigger is detected and it blinks during the answer is displayed. While this application is running, the user does of the assistant. the following: As we previously presented the application cloudspeech_demo.py uses Cloud Speech API and is not 1.Says the text ‘albastru aprins’ free. However the cost of using it is negligible. When we 2.Waits until the blue LED becomes ON made the operations to obtain the cloud_speech.json file, we obtained a credit that could be used for 12 months. This 3.Says the text ‘albastru stins’ application does not return any audio answer. It only returns 4.Waits until the blue LED becomes OFF the spoken text, by function text = recognizer.recognize() 5. Goes to step 1. We executed this experiment of few times, until the Also we want to conduct a speech recognizer experiment counter got different values, for instance 21. Fig. 5 presents that does not require internet access. In addition, we would a screenshot from the terminal during this experiment, like to incorporate a text to speech function on Raspberry Pi while Fig. 6 presents the differences between successive that uses Romanian as its default language. time stamps. It can be seen that the minimum value is about 2 sec and the maximum one is 2.6 sec. We computed the ACKNOWLEDGMENT average of these time difference and obtained 2.3 sec. This value represents the period of time necessary to execute The work of the first author was supported by a grant of voice commands. Of course this value contains the time to the Romanian Ministry of Research and Innovation, say the text (about 1 sec), to send the speech samples in CCDIUEFISCDI, project number PN-III-P1-1.2-PCCDI- cloud, to find and receive the spoken text. This also 20170917 / contract number 21PCCDI/2018, within PNCDI depends on the user concentration to observe the changes of III. the LED’s state and to make a correct pronunciation. However this value is acceptable for a practical application. Even if we did not make an intensive test regarding the accuracy of this assistant to recognize the spoken words, we REFERENCES can say that during our tests an accuracy of at least 90 percent has been obtained. [1] P. Milhorat, S. Schogl, G. Chollet et all “Building the Next Generation of Personal Digital Assistants” 1st International Conference on Advanced Technologies for Signal and Image Processing – ATSIP’2014, March 17-19, 2014, Sousse, Tunisia, pp.458–463. [2] V. Kepuska and G. Bohouta, “Next Generation of Virtulal Personal Assistants (Microsoft Cortana, Apple Siri, Amazon Alexa and Google Home)”, 2018 IEEE 8th Annual Computing and Communication Workshop and Conference 8-10 Jan. 2018 Las Vegas, USA, pp.99– 103. [3] P. J. Young, J. H. Jin, S. Woo and D. H. Lee, “Bad Voice: Soundless Voice-control Replay Attack on Modern Smartphones”, 2016 Eigth International Conference on Ubiquitous and Future Networks (ICUFN), Vienna, Austria, pp. 882–887. Fig. 5. A screenshot of the terminal during the experiment for measuring [4] Kaldi Toolkit for Speech Recognition, http://kaldi-asr.org/index.html, the time response accesssed July 7, 2018. [5] Open Source Speech Recognition Toolkit, https://cmusphinx.github.io/, accessed July 7, 2018. [6] M. Ceaparu, S.A. Toma, S. Segrceanu and I. Gavt, “Voice-based User Interaction System for Call-Centers, Using a Small Vocabulary for Romanian”, The 12th International Conference on Communications, COMM 2018, 14-16 June, 2018, Bucharest, Romania. [7] A. Cheng, V. Raghavaraju, J. Janugo et all, “Development and Evaluation of a Healthy Coping Voice Interface Application Using the Google Home for Elderly Patients with Type 2 Diabetes”, 2018 15th IEEE Annual Consumer Communication & Networking Fig. 6. The differences between time stamps as a function of the counter Conference (CCNC), Las Vegas, USA. value [8] Chi Zhao, “Text Labeling Applied in Shopping Assistant Robot using Long Short-Term Memory”, 2018 International Conference on Intelligent Transportation, Big Data & Smart City, Xiamen, China. IV. CONCLUSIONS [9] The MagPi, The official Raspberry Pi magazine, issue 57, May 2017, pp.14-33, raspberrypi.org/magpi, accesse July 7, 2018. This paper introduced the possibility of using the Google assistant on a Raspberry Pi microcomputer. Starting [10] Google official website of artificial intelligence projects, from scratch, all the details, software and hardware are https://aiyprojects.withgoogle.com/voice/, accessed July 7, 2018. presented. Google assistant is available on smartphones, but using it on Raspberry Pi has the advantage that this [11] D. Munteanu and R. Ionel, Voice-Controlled Smart Assitive Device for Visulally Impaired Individuals, 2016 12th International microcomputer can be interfaced with other hardware Symposium on Electronics and Telecommunications, IESTC 2016, devices. We presented a simple example that turns on/off pp. 186-189. some LEDS by voice commands. However, this application [12] Google cloud official site, https://cloud.google.com/speech- can be extended to any smart home or assistive devices for totext/docs/languages, accessed July 7, 2018. impaired individuals. Most importantly, this application can [13] F.Weng, P. Angkititrakul, E. Shirberg et all, Conversational work in practice in any language, however, only one at a InVehicle Dialog Systems: The past, present, and future, IEEE Signal time. We conducted a Processing Magazine, vol. 33, issue 6, pp. 49-60, 2016. large number of tests in Romanian using text strings of several words and the system responded in real time and with a good accuracy. This system requires internet access, however, this is no longer a problem these days. In terms of future work, we would like to implement an application that will use the voice command to interact with a DC motor that can be integrated in a smart home device.
Raspberry Pi For Beginners: How to get the most out of your raspberry pi, including raspberry pi basics, tips and tricks, raspberry pi projects, and more!
(Ebook) Multicultural Education Policies in Canada and the United States by Reva Joshee ISBN 9780774813259, 0774813253 - Discover the ebook with all chapters in just a few seconds