<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Snips Blog - Medium]]></title>
        <description><![CDATA[This publication features the articles written by the Snips team, fellows, and friends. Snips started as an AI lab in 2013, and now builds Private-by-Design, decentralized, open source voice assistants. - Medium]]></description>
        <link>https://medium.com/snips-ai?source=rss----16de5c9bea5a---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Snips Blog - Medium</title>
            <link>https://medium.com/snips-ai?source=rss----16de5c9bea5a---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 14 Nov 2026 01:33:28 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/snips-ai" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Snips is joining Sonos!]]></title>
            <link>https://medium.com/snips-ai/snips-is-joining-sonos-289396546d01?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/289396546d01</guid>
            <category><![CDATA[music]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[voices]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Rand Hindi]]></dc:creator>
            <pubDate>Wed, 20 Nov 2019 21:20:47 GMT</pubDate>
            <atom:updated>2019-11-20T21:20:47.256Z</atom:updated>
            <content:encoded><![CDATA[<p>Today, we are announcing that Snips will become part of Sonos! We are tremendously excited about this opportunity to bring a more immersive and differentiated voice experience for Sonos customers around the world.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wizN4cEDR9cz-oGBCQKeJA.jpeg" /></figure><p>Snips was founded with a simple vision: that artificial intelligence could change the way humans and machines interact, without compromising privacy. Indeed, the more we become connected, the more we feel oppressed by technology, as each new device requires effort to learn and operate. But if we could interact with devices like we do with people –using our voice– then perhaps we could have all the benefits while we make technology disappear into the background.</p><p>But who says voice says microphone, so evidently privacy was going to be a major issue. Back when we first talked about it in 2013, few paid attention. Privacy was considered a nice-to-have at best, and a hindrance for many. Fortunately, this has changed over the last few years, with the multiplication of privacy scandals and data breaches. Privacy is now a must-have, and technology must be built following Privacy-by-Design principles.</p><p>This strong focus on privacy has led us to build our entire voice technology to run on-device, so that we could avoid sending voice recordings to the cloud. Running deep learning on the Edge however is no easy task, in particular when the goal is to have it run on devices that have limited computing power. But thanks to an incredible team, we were able to achieve our ambitions, and create the first on-device voice assistant that can handle complex use-cases.</p><p>And of all the use-cases, none is harder and more interesting than music. Given the almost infinite amount of artist and song names, it was clear that a generic “let’s build a huge model for everything” approach was not going to work, especially not on the Edge. This is where our secret sauce made a huge difference: by contextualizing the language understanding to a given domain and user, we were able to dramatically reduce the performance footprints of the models, while improving the user experience.</p><p>When it came to testing Snips, we didn’t think long about which speaker to use. As long-time Sonos fans, we had been using their products everywhere: in our first tutorial on music, in our homepage video, in our test units at home. So naturally, we were tremendously excited when the Sonos team offered to join forces to make the voice experience on Sonos even better!</p><p>This acquisition is an important validation that privacy and voice are here to stay. But it also shows that the impact of the French Tech ecosystem isn’t limited to France alone. By keeping the Snips team in Paris and integrating the technology into their products, Sonos proves that French technology can be scaled globally. To help drive this effort, our CTO Joseph and CPO Sébastien will be leading the team going forward, while I step down to focus on <a href="https://zama.ai/">new privacy-related projects</a>.</p><p>None of what we have done so far –and will do next– would be possible without our incredible team. I would like to deeply thank our engineers, researchers, product managers, business and operations people who had many opportunities to go elsewhere but decided to join our vision. In particular my co-founders Michael and Mael who took a leap of faith to start Snips, Joseph our CTO for his incredible leadership and execution skills, Yann our COO for running the company smoothly and constantly finding new business and financing opportunities and Sébastien our CPO for his foresight and good spirit. Finally, I would like to thank our clients and partners who trusted us, our investors The Hive, Eniac, MAIF, Korelya and BPI for backing us all the way, and our 38,000 developers who build amazing things with Snips!</p><p>To voice and privacy!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=289396546d01" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/snips-is-joining-sonos-289396546d01">Snips is joining Sonos!</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Controlling a sonoff light switch with the snips.ai voice assistant]]></title>
            <link>https://medium.com/snips-ai/controlling-a-sonoff-light-switch-with-the-snips-ai-voice-assistant-dad124a076a2?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/dad124a076a2</guid>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <category><![CDATA[snips-ai]]></category>
            <category><![CDATA[sonoff]]></category>
            <category><![CDATA[raspberry-pi]]></category>
            <dc:creator><![CDATA[Brad Roodt]]></dc:creator>
            <pubDate>Wed, 12 Jun 2019 00:36:19 GMT</pubDate>
            <atom:updated>2019-06-12T00:36:19.130Z</atom:updated>
            <content:encoded><![CDATA[<h3>Controlling a sonoff light switch with the Snips voice assistant</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9l1NFr52Q6fo37QPdnWfZQ.png" /></figure><p>I recently discovered Snips, an amazing privacy-preserving voice assistant that runs entirely on device!! It’s also simple to set up and use.</p><p>Let’s install Snips on a raspberry pi &amp; use it to turn on/off a light fitted with a <a href="https://sonoff.itead.cc/en/products/sonoff/sonoff-basic">sonoff switch</a>.</p><blockquote>The sonoff will be flashed with custom firmware so everything runs locally over MQTT , the same transport layer used by Snips. No cloud required, no cloud desired.</blockquote><h3>Install Snips</h3><p>The Snips documentation is good with easy to follow guides at <a href="https://docs.snips.ai/getting-started">https://docs.snips.ai/getting-started</a> but we’ll run through the install process.</p><p>The easiest way to get started with Snips is by using <strong>sam,</strong> a helper that simplifies the Snips installation. Install sam on the computer you’ll be using to connect to your pi.</p><pre>sudo npm install -g snips-sam</pre><p>Once sam is installed you can connect to your pi using your pi’s IP:</p><pre>sam connect 192.XXX.X.XXX</pre><p>This will generate a key pair, copy the public key to key to your pi, &amp; then ssh into the pi. Now you can install Snips on your pi using:</p><pre>sam init</pre><blockquote>This will also install the <a href="https://mosquitto.org/">mosquitto</a> MQTT broker , which will be automatically started &amp; run as a service alongside Snips.</blockquote><h3>Install a microphone</h3><p>In order to interact with Snips you need a microphone &amp; optionally a speaker if you want to use text to speech (TTS).</p><p>I used the <a href="http://wiki.seeedstudio.com/ReSpeaker_2_Mics_Pi_HAT">ReSpeaker 2 Microphone Pi HAT</a> &amp; I’ve been impressed with the sensitivity of this device. It’s been able to detect voice commands from up to 4 metres away, in a quiet room.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pTQRvKX_tubqdm0g8qL20A.jpeg" /></figure><p>Installation is a breeze.</p><pre>sudo apt-get update<br>sudo apt-get upgrade<br>git clone https://github.com/respeaker/seeed-voicecard.git<br>cd seeed-voicecard<br>sudo ./install.sh</pre><p>Reboot when you’re done. After that you can setup audio for Snips with sam:</p><pre>sam setup audio</pre><p>Make sure you see the Seeed soundcard in the list (rebooting should take care of this, but on one occasion I needed to restart more than once in order to see the card in the list of available devices).</p><h3>Test microphone &amp; speaker</h3><p>Select the Seed card for both recording &amp; playback and then test microphone and speaker with sam test microphoneand same test speaker respectively. I found there was slight distortion with the audio at full volume so opted to reduce the volume slightly. You can do this via alsamixer command line utility. 80% volume worked well for me.</p><h3>Create a voice assistant</h3><p>In order to respond to voice commands you need to create &amp; install an assistant in the <a href="https://console.snips.ai/">Snips console</a>. Detailed instructions can be found <a href="https://docs.snips.ai/getting-started/quick-start-console">here</a>.</p><p>I found the assistant naming convention &amp; structure a little confusing at first:</p><p>An <strong>assistant </strong>is, as you’d expect,<strong> </strong>able to respond to a variety of instructions and act on them. In Snips world, a single instruction is called an <strong>intent, </strong>which is then handled by an<strong> action</strong>. You might have multiple intents that are linked to a single task, for example controlling a light might have one intent to turn the light on, and another to turn the light off. These intents and their associated actions are grouped into what’s called an<strong> app, </strong>so the hierarchy is:</p><p><strong>assistant &gt; app &gt; intents &amp; actions</strong></p><p>We’ll create 2 intents, one for turning the lights on, and the other to turn the light off.</p><blockquote>While you can attach python action code to your app in the console, we’re going to handle intents in a node.js application instead.</blockquote><ol><li>Create an <strong>assistant</strong> called <strong>‘Home’</strong> and click on it</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*32pOe2skk6mGz3lAO8KQ_A.png" /></figure><p>2. Inside the home assistant, click ‘<strong>Add an app’, </strong>followed by<strong> ‘Create a new app’, </strong>naming it,<strong> ‘lightControl’</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*NuNjw25WhupSd72OkeuCnA.png" /></figure><p>3. Click on lightControl and then ‘<strong>Edit app’. </strong>Click on<strong> ‘Add intent’ </strong>and call it ‘<strong>turnLightOn’</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*COmuetTgqWpg1BX1IcqW5Q.png" /></figure><p>4. Enter text ‘<strong>Turn on light 1’</strong> in the textbox under training examples.</p><p>5. Create additional variations for the voice command, eg. <strong>‘Switch light 1 on’</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nHlVj-GCR8gJKjTc6zxGew.png" /></figure><p>5. Click on ‘<strong>C<em>reate a new slot’</em></strong> and call it ‘<strong>lightID’. </strong>Select<strong> </strong>Snips/number as the slot type, from the dropdown. A slot represents a variable in your voice command so you could issue commands like, ‘Turn on light 1’, or ‘Switch light 2 on’.</p><p>6. Select the number 1 in your intent text and choose <strong>lightID </strong>from the slot list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V0sxOfNKuHtMrIItLIVfRw.png" /></figure><p>7. Create another intent to turn off the light- it’s identical to the first one except the voice commands will pertain to switching off the device.</p><p>When you’re done, hit save. This will begin training your model! Done.</p><h3>Install Assistant</h3><p>Back on the command line, login into the snips console in order to install an assistant on your pi.</p><pre>sam login</pre><p>Login using your console email &amp; password. Now you can install an assistant with:</p><pre>sam install assistant</pre><p>This will bring up a list of assistants available for installation. Choose the <strong>Home</strong> assistant we just created.</p><p>Now, if you run sam status you should see a list of services, all of which should be running (except for possibly the analytics service).</p><p>You can test the applicaton with sam watch.</p><p>Try, <em>‘Hey Snips, turn on light 1’</em>.</p><p>You should hear the wakeword detection sounds and then see some info about the intent in the console.</p><p><strong>Troubleshooting</strong></p><p>If you don’t hear any sound, and you have a speaker attached, make sure the soundcard is configured properly, and that you’re using the correct wake word.</p><p>If you hear the wakeword detection sounds, but your intent isn’t being handled (displayed to console), make sure the Snips skill server is running:</p><pre>sam status</pre><p>This was one of the few problematic areas I encountered while using Snips. Sometimes manually starting the service worked, but I did resort to an entirely fresh raspbian and Snips install on 2 occasions too.</p><p>Another issue I’ve yet to resolve, is that after rebooting the pi, the skills server doesn’t restart . The only way I’ve found to remedy this is by reinstalling the assistant with Sam.</p><h3>Handling voice commands with javascript.</h3><p>We’ll create a simple node.js app for handling the intent and then publish an mqtt message to turn on/off a light when an intent is inferred. This will be handled by our sonoff switch after we flash and configure it.</p><p><strong>Update node</strong></p><ol><li>SSH into your pi and check your arm version in the terminal</li></ol><pre>uname -m</pre><p>2. Check the node.js download page for the correct install associated with the arm version you have. It you have pi zero it should be ARMv6 and a pi 3B+, ARMv7.</p><pre>wget <a href="https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-armv7l.tar.xz">https://nodejs.org/dist/v10.16.0/node-v10.16.0-linux-armv7l.tar.xz</a><br>tar -xvf node-v10.16.0-linux-armv7l.tar.xz<br>cd node-v10.16.0-linux-armv7l<br>sudo cp -R * /usr/local/</pre><p>Create a folder on your pi for your Snips action app. A great way of working with remote files is to mount the remote folder on your local machine so that you can edit and work with the files as though they were on your local machine — check out <a href="https://osxfuse.github.io/">SSHFS</a>.</p><p><strong>Install the mqtt package</strong></p><pre>npm install mqtt</pre><p>Then create a new javascript file and add the following. This connects to the mqtt broker, subscribes to relevant topics, and publishes messages for the lights in the home to respond too when our intents are observed.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ab5c848583c57817ecea2c941cb02ba8/href">https://medium.com/media/ab5c848583c57817ecea2c941cb02ba8/href</a></iframe><h3><strong>The light switch</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*ApZ3CSyHYGsEB5T6KCMDaA.jpeg" /></figure><p>Sonoff switches allow us to control an appliance but they require an internet connection &amp; connection to a cloud server. We want to keep our data local &amp; be able to control the switch offline with mqtt, so we’ll flash the switch with the awesome tasmota firmware that enables us to do just that.</p><p>Below are a condensed set of instructions based on a fantastic SuperhouseTV <a href="https://www.youtube.com/watch?v=IcOFeIcLFFo">video</a> on how to flash sonoffs. Refer to the video if you’re confused about anything- you’re working with something that will be ultimately be connected to a high voltage power supply. I am not an electrical expert. Exercise caution.</p><ol><li>Make sure your sonoff is not connected to mains, and remove it from it’s housing.</li><li>You need a USB TTL adapter to flash the device. The adapter also needs to have an output voltage of 3.3V. Mine has a jumper for toggling between 3.3V and 5V.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tAUXdiYjdCN6xTVOHI6Keg.jpeg" /></figure><blockquote>The EIE adapter I used has the following pins (DTR, RX, TX, VCC, CTS, &amp; GND). The pins that we’re interested in are the RX, TX, VCC &amp; GND.</blockquote><p>2. Before plugging the usb into your machine, connect some female to male prototyping cables to the adapter. Flip the sonoff over to see where the male pins need to be inserted.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k_y4fww5RIZh6w1zqo_DsA.jpeg" /></figure><p>— Connect RX on adapter to TX on sonoff</p><p>— Connect TX on adapter to RX on sonoff</p><p>— Connect VCC on adapter to 3V3 on sonoff</p><p>— Connect GND to GND</p><p>3. Press and hold the power button on the sonoff and then insert the USB cable into your machine.</p><p>4. We’ll use esptool to flash the sonoff. Install it with pip (so you’ll need python)</p><pre>pip install esptool.py</pre><p>5. <a href="https://github.com/arendst/Sonoff-Tasmota/releases">Download</a> the tasmota firmware — grab sonoff.bin file.</p><p>6. Find the port of the usb adapter:</p><pre>ls -l /dev/tty.usb*</pre><blockquote>This returned <strong>/dev/tty.usbserial-A5XK3RJT </strong>for me so this is the port I’ll use for flashing the device.</blockquote><p>7. Navigate to the folder that you downloaded the sonoff.bin file to, and flash the sonoff with the instruction:</p><pre>esptool.py -p /dev/tty.usbserial-A5XK3RJT write_flash -fs 1MB -fm dout 0x0 sonoff.bin</pre><p>8. When it’s done, unplug the usb and plug it back in- the green LED will blink. The sonoff is advertising a wifi network that you can connect to, to configure the device. You should see it under your wifi network list. Select it and a configuration window will open.</p><p>9. Change the SSID and password to those of your local network, clear the AP2 password, and give the device a meaningul hostname. It’ll restart and join your network.</p><p>10. Find the ip of the device from your router so that you can connect to it.</p><p>11. Enter the ip address in your browser address bar, and you should be greeted with a page that looks like this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/820/1*mZb5ACRbAdrygVdSHOvOYQ.png" /></figure><p>12. We’re interested in the MQTT menu. Enter <strong>host address </strong>(this is the IP address of the pi that has the mosquitto broker installed on it, the one we installed snips on. Again, you can get this from your router’s connection list). Also enter <strong>client</strong> and <strong>topic</strong> as below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*TKgoTiV1HHnsgN9evOojBg.png" /></figure><p>13. Save and the device will restart.</p><p>If you have the mosquitto_pub client installed on your machine, you can quickly test that the device is working in the terminal, where -h XXX.XXX.X.XXX is the IP address of the pi that has the mosquitto broker installed:</p><pre>mosquitto_pub -h XXX.XXX.X.XXX -t ‘cmnd/living-room-lamp-small/POWER’ -m ‘ON’ </pre><pre>mosquitto_pub -h XXX.XXX.X.XXX -t ‘cmnd/living-room-lamp-small/POWER’ -m ‘OFF’</pre><p>The green LED should turn on and off. And that’s it. You’re all done.</p><p>The only thing left to do, is to carefully wire up your sonoff to a light and then fire up the node app we created earlier.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dad124a076a2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/controlling-a-sonoff-light-switch-with-the-snips-ai-voice-assistant-dad124a076a2">Controlling a sonoff light switch with the snips.ai voice assistant</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snips Open Sources Tract]]></title>
            <link>https://medium.com/snips-ai/snips-open-sources-tract-cdc50f437ef2?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/cdc50f437ef2</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[rust]]></category>
            <dc:creator><![CDATA[Mathieu Poumeyrol]]></dc:creator>
            <pubDate>Fri, 10 May 2019 13:59:02 GMT</pubDate>
            <atom:updated>2019-05-10T13:59:02.567Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hfuFMjb9a-c9j2Urvd4iIw.jpeg" /></figure><h4>A Rust Neural Network library for the Edge</h4><p><em>By </em><a href="https://twitter.com/kalizoy"><em>Mathieu Poumeyrol</em></a><em> and </em><a href="https://twitter.com/JoDureau"><em>Joseph Dureau</em></a></p><p>After open sourcing <a href="https://github.com/snipsco/snips-nlu">Snips-NLU</a> a year ago, <a href="https://snips.ai/">Snips</a> now shares <a href="https://github.com/snipsco/tract">Tract</a>, a new piece of its embedded voice platform. Tract is Snips’ neural network inference engine.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*c6hMz6yoTGBVVWdngIhiaA.png" /></figure><p>While TensorFlow and, to a lesser extent, PyTorch dominate the ecosystem of neural network training solutions, the landscape for inference engines on tiny devices, such as mobile and IoT, is still pretty much open. TensorFlow teams are pushing <a href="https://www.tensorflow.org/lite">TensorFlow Lite</a>, and <a href="https://github.com/Microsoft/onnxruntime">Microsoft ONNX runtime</a> seems like the perfect complement to PyTorch. Hardware vendors are pushing their own solutions, be it <a href="https://developer.android.com/ndk/guides/neuralnetworks">Android NN API</a>, <a href="https://developer.arm.com/ip-products/processors/machine-learning/arm-nn">ARM NN SDK</a> or <a href="https://developer.apple.com/documentation/accelerate/bnns">Apple BNNS</a>.</p><p>These libraries are not really interoperable, and have limited scopes: most of them, TensorFlow Lite included, only support a small subset of TensorFlow’s operator set. This means there is no clear go-to solution for an engineering team when their machine learning colleagues hand them a neural network to run on-device. On the other hand, machine learning teams will often have to pick a network architecture to satisfy the available runtime of a given target. Mimicking the interoperability efforts done by the software industry over the past decades, we think it is time to aim for a “train once, infer anywhere” approach.</p><p>This ambition led us, nearly two years ago, to develop our own solution for embedded inference. It has been used in production for over a year as part of our Wake word engine, and it enables our machine learning team to freely explore new families of networks with the confidence that we would be able to bring these networks to production.</p><p>Even in today’s context, reverting to an off-the-shelf inference library would mean sacrificing either modelling creativity, performance, or portability. We believe the embedded neural network inference landscape still needs to progress and converge, which is why we decided to contribute to the collective effort by open sourcing our solution. In this post, we describe the library, its performance, and provide high-level motivation for the implementation choices we did to optimize an application field that is close to our hearts: voice processing.</p><h3>Cross-compilation</h3><p>One of the major hurdles we encounter at Snips is cross compiling our solution for all of our targets. This includes small single-board computers designed for hobbyists like the Raspberry Pi Zero, 2 and 3, as well as industrial ones like NXP’s i.MX7 and i.MX8, Samsung’s Artik platforms, NVIDIA’s Jetson TX2, etc. The two main mobile platforms, iOS and Android, are also natural targets. This means we support ARMv6, ARMv7 and ARMv8 hardware platforms, on three major operating systems: GNU/Linux, iOS, and Android. We also support the regular non-IoT Intel systems, so that developers can work comfortably.</p><p><a href="https://snips.ai/enterprise/snips-flow">Snips Flow</a>, our voice platform, includes a Wake word engine. This engine listens continuously, and triggers the speech recognition component when it hears the user say the Wake word (“Hey Snips”, “Alexa”, etc). The Wake word detector relies on a neural network that our machine learning team trains using TensorFlow. Two years ago, before TensorFlow Lite came to existence, the natural approach we tried was to embed TensorFlow as a library to execute our models on device.</p><p>However, TensorFlow is a big, complex framework, and, nearly two years ago, cross-compiling it as a library — to Android specifically — <a href="https://medium.com/snips-ai/how-we-made-tensorflow-run-on-a-raspberry-pi-using-rust-7478f7a31329">gave us a lot of pain</a>. So much that we realized we needed a <em>plan B</em>.</p><p>At Snips, we chose Rust as the main language to develop the Snips Flow platform. Our team got used to the comfort brought by working with a modern software environment where cross-compiling is not an obscure afterthought but a solid design principle. So we gave it a try. We used the <a href="https://github.com/stepancheg/rust-protobuf/">protobuf</a> library to parse the TensorFlow format, <a href="https://github.com/rust-ndarray/ndarray">ndarray</a> to operate on tensors, and implemented a handful of operators that were part of our first Wake word models. This was the birth of Tract.</p><p>While we finally managed to get TensorFlow working on all our target platforms, the sheer size of it motivated us to actually switch to shipping Tract instead of TensorFlow a few months later.</p><p>If the origin story can sound anecdotal, the reasons behind it are not. As of today, the continuous integration infrastructure of the Snips platform targets dozens of operating systems and hardware combinations, with more added every month. This leads to some strong guiding principles in the evolution of Tract:</p><ul><li>it is written In Rust</li><li>it is trivial to cross compile</li><li>it is free of external dependencies: instead of linking computing libraries, like BLAS, we integrated the small bits that we actually use (which in turn gave us a few opportunities for optimizing even more)</li><li>at runtime, Tract detects the device it is running on in order to adapt and optimize its performance appropriately. This allow us to ship the same binary for ARMv6 and ARMv7 devices without sacrificing performance on the smarter chips.</li></ul><p>Today, some of these principles are actually vindicated by TensorFlow Lite. The latter is much easier to cross-compile than TensorFlow, and also takes the form of a static library free of external dependencies.</p><h3>Streaming aware</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*M6FjdkZrbGHeHa-q.jpg" /><figcaption><a href="https://commons.wikimedia.org/wiki/File:His_Master%27s_Voice.jpg">His Master Voice</a></figcaption></figure><p>Snips is focused on voice assistant technology. Neural networks are the natural solution for several tasks involved: Wake word detection, recognition of voice commands, speaker identification (finding out who is speaking) and acoustic modelling (translating sounds to phones or words, as part of a speech-to-text engine).</p><p>All of these tasks have to be performed in the context of interactive sessions with a human user: time is a central element of the problem description, and minimizing latency is key in making the interaction comfortable.</p><p>Wake word detection, for instance, has to happen “live”. Such a detector is always-on: there is no natural end to the input signal that it should wait for before processing the entire signal. In other words, the detection needs to happen in a streaming fashion, which means the engine needs to make a decision at every step in time based on the signal captured in the immediate past. This puts hard constraints on the neural network architecture, forbidding, for instance, reductions over the entire time axis.</p><p>This streaming constraint pushes the inference frameworks to their limits: most of the popular frameworks are designed with image classification in mind. They only work naturally over the entire signal, and become very awkward to work with when streaming is required, if they work at all. <a href="http://kaldi-asr.org/">Kaldi</a> — probably the most popular open-source speech-to-text framework — is a notable exception: its neural network inference engine is designed around streaming.</p><p>In TensorFlow, network graphs are “frozen” at train time, and contain a series of training-related idiosyncrasies. They must be optimized to run inference efficiently. Tract transforms networks after loading them, first by decluttering the network of those idiosyncrasies, then by adapting the network to the runtime environment. While TensorFlow Lite does this during a network translation stage, we chose to do it just before runtime, to be able to perform machine-dependent tweaks.</p><p>One of the critical transformations Tract performs is translating convolutional models to a streaming form. Indeed, our preferred architecture for Wake word detection and user identification consists of <a href="https://arxiv.org/abs/1811.07684">stacks of convolutional layers</a>, in the same fashion as ResNet and WaveNet. While recurring networks are relatively natural to run in a streaming fashion, convolutional networks need a bit more work: a lot of operations can be skipped by implementing caching around each convolution operator.</p><p>Convolutional networks transformed naively to frame-by-frame streaming stateful networks would suffer from operation and data dispersion: a lot of flow control logic and data access work would have to happen for each incoming audio frame while performing a relatively modest number of useful computing operations. To run efficiently, it is necessary to re-introduce a grouping of frames, that we nicknamed <em>pulses</em>. By processing a reasonable number of frames together, in the order of 8 or 16, we amortize the flow control overhead. Additionally, this provides vectorization opportunities to optimize the execution even further.</p><p>Once networks run through these transformations, they can be fed in a streaming fashion and output decisions in real time. While we still consider it experimental, this “streaming and pulsing” transformation is applicable to all convolutional networks. We have successfully used it to run our WaveNet Wake word networks and ResNet speaker identification ones. Acoustic models will be next.</p><h3>Beyond voice</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CTKRb2m50KGsRa84yqF8Yg.png" /><figcaption>Typical image classification example.</figcaption></figure><p>With the necessity of reusing efficiently cached data from previous iterations, our main use cases does not fit well in regular frameworks. But rather than solely working on voice-related applications, we felt like we could learn a lot from experimenting with more common use cases, in order to get a complimentary assessment of the performance of Tract itself. We chose to implement enough operators to make a few popular models run, in order to get a fair comparison of the intrinsic performance of Tract against TensorFlow Lite. Obviously, supporting these operators also widens the field for possible third-party use cases of the library. Today, for instance, Tract can run unmodified pretrained Inception v3, MobileNet, and the acoustic model from DeepSpeech.</p><p>We also implemented about 85% of ONNX, initially to take advantage of its extensive test-suite that helps us cover the internal operations it shares with TensorFlow. But now, as a “free” side effect, our machine learning teams can choose to work with TensorFlow or PyTorch on a per-project basis.</p><p>On top of ONNX and TensorFlow, we are also considering new importers: we are specifically interested in importing the Kaldi format, as our speech-to-text engine uses it. We are also paying close attention to the <a href="https://www.khronos.org/nnef">NNEF</a> format: despite a large support from hardware and software vendors and a very elegant specification, it has received very little attention from the machine learning community.</p><h3>How good is Tract ?</h3><p>There are several answers to this question.</p><p>The first angle is “will Tract run this network”? Supporting TensorFlow’s immense operator set is not, and will probably never be a goal for Tract. On the TensorFlow front, we implement missing operators on a per-application basis. As of today, <a href="https://arxiv.org/abs/1512.00567">Inception v3</a>, several <a href="https://arxiv.org/abs/1711.07128">ARM Keyword</a> <a href="https://github.com/ARM-software/ML-KWS-for-MCU">spotting networks</a>, <a href="https://github.com/mozilla/DeepSpeech">Mozilla’s DeepSpeech</a>, <a href="https://arxiv.org/abs/1704.04861">MobileNet</a> <a href="https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md">networks</a> and others run. Adding operations is not difficult. Or at least, not much more so than implementing the computation itself.</p><p>On the <a href="https://github.com/onnx/onnx/">ONNX</a> <a href="http://onnx.ai/">front</a>, things are a bit simpler: the operator set has a reasonable size, and comes with a test-suite. We cover about 85% of version 9 of the operator set. Recurring operators are coming soon, and the last remaining flow control features are also on the roadmap. 100% coverage of ONNX is an objective for Tract.</p><p>Beyond the perimeter of supported operators, comes the question of performance. Tract does not try to compete on the big-hardware side of things: Snips’ main interest lies in running neural networks on small devices. For instance, we have no support for GPU acceleration but we want to be as efficient as we can on ARM CPUs. We pay attention to devices ranging from ARMv5 or v6 with VFP (like a Raspberry Pi Zero) to the bigger ARMv8 with Extended SIMD instruction sets that can be found in most modern smart phones and may become the workhorse of the IoT industry. We also keep an eye on Intel’s CPUs as it is the native environment for most developers.</p><p>On the chart below, we compare Tract and TensorFlow Lite’s performance on two neural network architectures that are supported by both libraries. The first one is an early version of the Snips Wake word detector, which we’ll call v1 for the sake of clarity. We then switched to the very convolutional networks that we prefer today, but which aren’t supported by TensorFlow Lite. Snips Wake word v1 relies on a 1D CNN architecture. The second architecture we consider here is a 2D <a href="https://github.com/ARM-software/ML-KWS-for-MCU">CNN network</a> from the “<a href="https://arxiv.org/abs/1711.07128">Hello Edge</a>” paper by ARM.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vnfVZoMdcxFt00vkBtKPVA.png" /><figcaption><strong>Each blue bar shows how much faster it is to use Tract instead of TensorFlow Lite on two typical voice processing tasks. The higher, the better.</strong></figcaption></figure><p>On these two examples, Tract outperforms TensorFlow Lite on all devices considered. There is a bigger bonus on the two before-NEON ARM devices: we have found that TensorFlow Lite, as many other players, is neglecting these older and smaller chip variants.</p><p>As a matter of fact, Tract also outperforms TensorFlow Lite on these pre-NEON targets for other challenging tasks like image classification. For example, Tract brings a 2.5x speedup on the Inception network on Raspberry Pi Zero. TensorFlow Lite’s performance on this network is harder to match on bigger devices.</p><p>In the figure below, we show the performance of Tract on all kinds of voice processing applications (user identification, Wake word, voice commands), including neural network architectures not supported by TensorFlow Lite. This figure shows that a lot can be done on the edge, on tiny devices, with CPU to spare. Gaining in efficiency is like a double-edged sword with only good sides: between the two iterations of our Wake word model, we took advantage of the extra efficiency gained in Tract to run a significantly bigger and more accurate neural network architecture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PofOtrxw4IjVzXmnK7oSlA.png" /><figcaption><strong>Each blue bar shows how much faster than real time each voice processing task can be executed with Tract. The higher the bar, the more computing resources are left on the device for other tasks.</strong></figcaption></figure><h3>Yet another library?</h3><p>Today, there are comparatively more libraries available off-the-shelf than when we started working on Tract two years ago. Google, ARM, Apple and Microsoft are actively developing their own offerings. While there is overlap between them, each one has its own angle, or operator subset covered, and it does not look like any will be an obvious go-to solution anytime soon. Each one has a bias towards the type of applications and the network architectures each institution is primarily exploring.</p><p>Tract brings specific attention to voice processing applications like Wake word detection, voice commands, speaker identification, and soon acoustic modelling, on low- to mid-end CPUs. Anyone working in these areas or other streaming-based applications may be interested in looking at Tract.</p><p>As an Artificial Intelligence company, we made the choice to be in control of the software we are deploying in our users’ environment, be it a home, office or factory. Concretely, instead of developing and maintaining Tract, we could have hard-coded every new architecture we adopted, which would probably have refrained us from exploring new architectures. We could also have made massive contributions to TensorFlow Lite to extend its perimeter. For such a critical piece of the stack, our engineering team feels better owning the neural network engine, controlling how it is built, and keeping its performance and size in check.</p><p>In future posts, we’ll be diving deeper into some experiments and optimizations we explored with Tract, what worked, and what didn’t. Follow us to keep informed.</p><p>The point of Tract is not to directly challenge TensorFlow or PyTorch as a generic go-to solution, but we did learn a lot in the process. Moreover, Tract’s performance is significantly better than that of TensorFlow Lite for the networks we deploy in production. We now have an angle on the problem of running deep models on device, we have built a tremendous amount of experience, we have found a few issues and a few original solutions. We are also open sourcing Tract to support the global effort of moving inference and in particular voice processing on device. We are hoping that sharing code, experience and thoughts will contribute to the landscape converging to more compatibility, and more consistent choices. Only then will we be able to “train once, run anywhere”.</p><p>Lastly, we are now making use of this experience to prepare for the next big wave that is coming to the IoT landscape: Neural Processing Units. Semiconductor manufacturers are now bringing dedicated chips that are specialized to run deep learning operations. These chips will literally unleash the potential of what computations can be run on the edge. They will significantly contribute to edge computing becoming even more of a reality. They will naturally bring their share of new questions on what paradigms to follow, what operators and architectures to prioritize, how to serve efficiently all application fields, from vision to voice, etc. This is only the beginning.</p><h4>Interested in learning more?</h4><p>Check out our <a href="https://snips.welcomekit.co/">open roles</a> and <a href="https://snips.ai/enterprise/">explore our solutions</a>. Or clone <a href="https://github.com/snipsco/tract">tract on GitHub</a>!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*qlDaZoPwp8ZhLpX17o_A8A.png" /></figure><p><em>If you liked this article and want to support Snips, </em><strong><em>please share it</em></strong><em>!</em></p><p><em>Follow us on Twitter: </em><strong><em>@</em></strong><a href="https://twitter.com/snips"><strong><em>Snips</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdc50f437ef2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/snips-open-sources-tract-cdc50f437ef2">Snips Open Sources Tract</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Infrared Voice Controlled With Snips]]></title>
            <link>https://medium.com/snips-ai/infrared-voice-controlled-with-snips-613fde67e40d?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/613fde67e40d</guid>
            <category><![CDATA[raspberry-pi]]></category>
            <category><![CDATA[home-automation]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <dc:creator><![CDATA[Greg]]></dc:creator>
            <pubDate>Thu, 09 May 2019 12:16:48 GMT</pubDate>
            <atom:updated>2019-05-09T23:28:04.763Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A guest blog post by </em><a href="https://medium.com/@oziee"><em>Greg</em></a><em>.</em></p><p>Too many remotes? Simplify! Use your voice to control infrared devices around your home using Snips voice platform. A completely on-device assistant that does not share anything it hears, or what it is you do. Privacy by design.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*L0n3OqUAEgOPtFRbjRNMwQ.jpeg" /></figure><h3>Background</h3><p>My young 3-year-old likes to hide my TV remote and I can never find it when I need to use it. I already use <a href="https://docs.snips.ai/">Snips voice platform</a> in my home, so I started thinking about how I could remove the remotes completely and just ask my home assistant, with my voice, to control my devices. Turns out it was very easy, and this project is so simple, easy to setup, and manage, that you can too.</p><p>This project not only benefits me, it also fills a requirement for other users out there. My elderly parents, for example, can never find the right button to press on the TV remote. This also benefits people with disabilities who are not able to manipulate a remote physically, but are able to say to an assistant what they want to do.</p><p>Once upon a time… I had 4 remotes, just for the devices in the lounge room alone. A remote each for the TV, amplifier, DVD, and aircon. They are now in the bottom draw, and I just speak aloud what I want to control.</p><h3>Some basics</h3><p>This project uses <a href="https://snips.ai/">Snips</a>. So a very quick run down of “what is Snips?”. Snips is natural language understanding and speech recognition software. Your interaction with Snips as a developer is as a set of applications that together create an AI assistant and is able to run on a tiny Raspberry Pi 3B or a range of <a href="https://docs.snips.ai/#what-is-the-snips-platform">other devices</a>. Snips listens for the wake word to be spoken for the assistant to know you want it to listen to you. It then converts what you say into text (TTS and ASR), then parses the text into meaningful intents (NLU). Applications, such as this project, listen for a specific intent notification from Snips. When they receive an intent, they go to work and “do something”, whatever it is they are programmed to do.</p><p>“<em>Hey Snips, turn my Samsung TV on</em>”<br>’hey snips’ = wake word — start listening to my command<br>’turn my Samsung TV on’ = Intent — IR Control<br>Specific things about the intent that are important. (1) ‘Samsung TV’ and (2)‘on’. The IR Control application (this project) sees that you want to use the Samsung TV remote and press the power ON button, so that’s what it does.</p><p>There are two parts to this project. The <a href="https://bitbucket.org/oziee/ircontrol/src/master/README.md">IR Control</a> and the <a href="https://bitbucket.org/oziee/irclient/src/master/README.md">IR Client</a>.</p><p>The IR Control is part of a <a href="https://console.snips.ai/store/en/skill_EVp72n4aKe">Snips assistant application</a>.</p><p>The IR Client uses a RPi Zero with an IR receiver and emitter connected to GPIO pins. This project shows you how build and interface the RPi with an IR receiver and emitter, configure the remotes you use in your home, and then apply this information to your own Snips assistant.</p><p>If you don’t yet have a Snips setup, <a href="https://snips.ai/">Snips</a> with <a href="https://www.seeedstudio.com/">Seeed</a> provide a <a href="https://www.seeedstudio.com/snips.html">Maker Kit</a> to get you up and running with Snips.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u0v6jZYvxRSaxLoDmisTgA.png" /><figcaption>Snips &amp; Seeed -Makers Kit</figcaption></figure><p>For more information and an in-depth look into Snips, check out the <a href="https://docs.snips.ai/">Snips Docs</a>.</p><h3>Building the IR Client</h3><p>The IR Client uses a small, inexpensive Raspberry Pi Zero W (to use wifi to communicate with the IR Control in the Snips assistant). You can however use any RPi you wish.</p><p>Items you will require to build the IR Client:<br>- Raspberry Pi Zero (W version for wifi connection)<br>- Infrared Receiver Module — Generic 38kHz<br>- Breadboard (generic)<br>- 2x 940nm Infrared Emitters<br>- General Purpose Transistor NPN (PN2222A will do)<br>- 10k ohm Resistor<br>- Jumper wires (3x female-female, 3x female- male, 2x male-male)</p><p>Lay them out on a breadboard, as shown in the below images and circuit diagrams.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*0-Y-eqlzUv3YRt8XWY6l1w.jpeg" /><figcaption>fritzing diagram of component layout</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/1*FaoD3Te1hRmykHDBju_guA.jpeg" /><figcaption>circuit diagram for emitters</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*lgACzBOqvSniLztQYFKx7A.jpeg" /><figcaption>Breadboard showing emitters</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*edM4C1MbAgHKMicLjUfBgg.jpeg" /><figcaption>generic receiver</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*VONpZ8nsnlpX2dyO6HnwWw.jpeg" /><figcaption><a href="https://pinout.xyz/">https://pinout.xyz</a> pin assignment</figcaption></figure><p>Follow the layout, paying attention to the Tx and Rx signal pins. 3.3v is used by the IR receiver, and the IR emitters use 5v.</p><h3>Installing the IR Client software</h3><p>The IR Client runs a small python application, which auto starts at boot. It listens for instructions from the IR Control in the assistant, and then transmits IR codes via the infrared emitters.</p><p>To install the IR Client on the RPi Zero, ssh into the device and run these commands:</p><pre>git clone https://oziee@bitbucket.org/oziee/irclient.git<br>cd irclient<br>sudo bash install.sh</pre><p>The install.sh script: <br>- creates a venv environment<br>- installs the python library requirements<br>- installs LIRC<br>- sets up the IR Tx/Rx pin assignment <br>- creates the service to start the app on boot</p><p>Once the install completes, it will prompt you to edit the settings.ini file in the current directory.</p><pre>nano settings.ini</pre><p>Enter in your Snips connected MQTT broker address and port, and a unique name for the IR Client device.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ukuviwGiwBBqFvXyS-CFbA.png" /></figure><h4>Testing the LIRC</h4><p>You can now test the LIRC install on the IR Client RPi. Use the commands below and a remote control.</p><pre>sudo /etc/init.d/lircd stop<br>mode2 --driver default --device /dev/lirc0</pre><p>Press some buttons on the remote control while it is pointed at the receiver and you should see the RPi console outputting multiple lines like the below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HX55x6x9qb6S4T_cqa5V1g.png" /><figcaption>console output from the mode2 when the receiver receives IR signals from a remote</figcaption></figure><h4>Adding remote codes to LIRC</h4><p>Adding your own remote controls yourself is simple.</p><pre>sudo /etc/init.d/lircd stop<br>sudo irrecord -d /dev/lirc0 ~/lircd.conf</pre><p>Follow the on screen instructions. The gist of it is, you enter in a name for the remote you are recording, press random buttons on the remote over and over a few times while LIRC learns and detects pulses, signals, pause timing etc.</p><p>You will be prompted to enter in names of the function button to record such as KEY_POWER, KEY_VOLUMEDOWN. LIRC uses capitals and a list of valid values can be found <a href="https://bitbucket.org/oziee/ircontrol/src/master/data/buttonlist.txt">here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MUvBQUVESPT57zaxkGHX5g.jpeg" /></figure><p>Once you have completed recording your remote, you need to copy the created file to the lirc directory which contains all the conf files. You can do a `ls` to check for the name of the file that was created. It will be something like &lt;what you named the remote&gt;.lirc.conf</p><pre>sudo cp ~/&lt;name of remote&gt;.lirc.conf /etc/lirc/lircd.conf.d<br>sudo /etc/init.d/lircd start</pre><p>Create as many remote conf as you like, making sure they are all uniquely named, and are all copied over to the “/etc/lirc/lircd.conf.d” directory.</p><p>LIRC has a repo of remote configurations created by others that can be downloaded and used. Of course, not every remote on earth has been documented and available for download. Check out the <a href="http://lirc.sourceforge.net/remotes/">repo</a> for a list of remotes that can be downloaded for your use.</p><p>LIRC also includes command line tools to search this repo and install them, you can read how to <a href="http://www.lirc.org/html/irdb-get.html">here</a>.</p><h3>Setting up the IR Control in the Snips assistant</h3><p>In your Snips assistant console <a href="https://console.snips.ai/">https://console.snips.ai</a>, click “add an app”.</p><p>Use the search field to look for “ir control” and then add this app to your assistant:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LaTzwOnTq-yna48YvuQPJw.png" /><figcaption>adding the IR Control to your Snips assistant</figcaption></figure><p>Once the app is installed, and the Snips skill server has taken control of running the Snips apps, you can log into the IR Control web management page from your browser by going to &lt;url of snips server&gt;:7777 (the default port is 7777, but you can change this to anything from inside the Snips config.ini for the app.</p><p>The management page will communicate with all the IR Clients you have built on the network, and gather a list of all the known remotes for each device and their function button mappings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1TPn91WMk5ujwLA0PpCFSg.jpeg" /><figcaption>main page of the IR Control web interface management portal</figcaption></figure><p>Here you are able to add common word and names to remotes and buttons which you say out loud to your assistant. Snips will then do its magic to understand what you ask and, in turn, inform the IR Controller of which device, or remote and which button IR code you want transmitted.</p><p>In the web page enter in synonyms, or words that describe or name something. In the image example above, it would be hard to ask your assistant in a sentence that you want to use the N2QAYB000352 remote, so entering in a common word or name that you would say in conversation with the assistant makes sense. You can then say “TV” or “Samsung TV” and Snips and the IR Control app will know you mean the N2QAYB000352 remote. Same goes for the function buttons. Saying “on” or “off it knows to use the KEY_POWER button that is mapped.</p><p>“Turn the TV on” = N2QAYB000352 | KEY_POWER</p><h3>Creating Your Own Actions</h3><p>Actions are a group of remote commands to run in series, but instead of saying each item to preform one at a time to the assistant with your voice, you can say one command to the assistant and all the grouped function buttons of each remote in the action will be performed in sequence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*imu5aXOj8lAhPs4Nm-YCUQ.jpeg" /><figcaption>view of the Actions page</figcaption></figure><p>Asking your assistant, “let’s watch a movie”, the TV will turn on, the amplifier turns on. Yet the amp takes 8 seconds to start before it will react to any other remote commands, so a pause value is set, as in the example image above. A 10-second pause occurs before the next function is performed, which is to set the amp to the TV input.</p><p>Check the bitbucket repo <a href="https://bitbucket.org/oziee/ircontrol/src/master/README.md">README</a> for extra information on the web interface.</p><h3>Telling Snips assistant your setup</h3><p>Over in the Intent Builder (selected in the menu) all the properties for all the IR Client devices, each remote, each button, and all the synonyms are displayed in such a way so you can easily copy them over to the Snips Console assistant to fill the slot values for the training data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VWGP8p0beNcT9mN-CcFlew.jpeg" /></figure><p>One at a time, you’ll copy the items between the *****’s and import it into the corresponding Intents slots in the Snips Console. In the above image the highlighted items are copied and imported to the `ir_control` intent, into the slot button (shown below).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i-L2IVsAiolxCQu2io77bw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JZjNNJECUdf27MxJ7UV5wA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4rbV0lTX-E0tzFeApEX5GA.jpeg" /></figure><p>Once all the slots for <em>ir_control</em> and <em>ir_action</em> have been imported, save your assistant, and install the newly updated assistant to your Snips setup.</p><p>In future, if you rename a remote, delete a remote, add or remove a remotes function buttons, created new actions — you will need to use the Intent Builder to gather the changes to import into the Snips assistant. You should remove all the current values in the Snips console intent slots before importing new items, as this will remove old items that may no longer be valid.</p><h3>Other Features</h3><p>IR Control is also able to start a sequence of button events. If you find the need to open the TV guide on the TV and you want to move around the listings of channels and shows if would be annoying to continuously have to repeat the wake word and say a command over and over. The sequence event solves this as you can just announce function after function.</p><p>“<em>Hey Snips, start a sequence for me</em>” — listening for your commands.<br>“<em>press the TV guide button</em>”<br>“press up button”<br>”up”<br>”up”<br>”select”</p><p>“ok stop listening for commands” — this ends listening. If you do not let the assistant know you want to stop announcing commands, it will just keep listening until you do.</p><p>You need to say either the device or the remote once to set a base of where to start. From then on you can just say the button commands to be completed which are mapped to that device or remote. If you want to then start interacting with a different remote, say that remotes name so that IR Control knows you now will be referring to a different remote to operate. When you want to stop using commands, just ask it to stop.</p><h3>In Action</h3><p>Quick demo in action. The video was made in a darkened room to demonstrate the IR emitters lightly light up as they transmit.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F55PoQgqN-Ko%3Ffeature%3Doembed&amp;url=http%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D55PoQgqN-Ko&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F55PoQgqN-Ko%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb380969a7525b10fb3dc3ba01575f9b/href">https://medium.com/media/bb380969a7525b10fb3dc3ba01575f9b/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YUr-MIAzReJP7-wHTp7lCg.png" /></figure><h3>What next</h3><p>Design and print a case to hold the RPi Zero and provide IR transmitter receiver mounts.</p><p>Start thinking about what you too could automate. The possibilities are endless, limited only by to your imagination. If you can think it, code it, make it, then use it with your own home assistant. Check out the Snips store in the <a href="https://console.snips.ai/">console</a> for many other applications designed by other Snips developers for you to use.</p><h4>Credits</h4><p>Thanks to <a href="https://snips.ai/">Snips</a> (https://snips.ai) | <a href="http://www.lirc.org/">LIRC team</a> (http://www.lirc.org) | <a href="https://icons8.com/">icons8</a> (https://icons8.com)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=613fde67e40d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/infrared-voice-controlled-with-snips-613fde67e40d">Infrared Voice Controlled With Snips</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Debunking the Unnecessary Compromise: Users Can Have a Voice Assistant and Their Privacy Too]]></title>
            <link>https://medium.com/snips-ai/debunking-the-unnecessary-compromise-users-can-have-a-voice-assistant-and-their-privacy-too-46c82eeabb0e?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/46c82eeabb0e</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[edge-computing]]></category>
            <category><![CDATA[voice-recognition]]></category>
            <category><![CDATA[privacy-by-design]]></category>
            <category><![CDATA[privacy]]></category>
            <dc:creator><![CDATA[Marion Bergeret]]></dc:creator>
            <pubDate>Fri, 26 Apr 2019 10:22:18 GMT</pubDate>
            <atom:updated>2019-05-14T12:48:06.738Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N4ilfsjNv8b-56MJcrnWfA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/mcbeJd_dLv4?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">inanc avadit</a> on <a href="https://unsplash.com/search/photos/through-blinds?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p><em>Snips VP of Legal </em><a href="https://medium.com/@la_berge"><em>Marion Bergeret</em></a><em> and CTO </em><a href="https://medium.com/@jodureau"><em>Joseph Dureau</em></a><em> untangle some of the most widely-made claims about voice assistants, privacy, performance, and security.</em></p><p>Nearly a year into the GDPR’s debut, we’re analyzing some of the foundational claims made by cloud-based voice assistant companies along four dimensions: performance, trust, security, and privacy. In so doing, we’ll arm you with the logical tools to dispel the most commonly held misconceptions about the need for cloud-based voice recognition technology, and to demonstrate the power of edge computing and value of Privacy by Design.</p><p>Read the full post on <a href="https://snips.ai/blog/voice-privacy-and-the-no-compromise-model/">the Snips Blog</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*qlDaZoPwp8ZhLpX17o_A8A.png" /></figure><p><em>If you liked this article and want to support Snips, </em><strong><em>please share it</em></strong><em>!</em></p><p><em>Follow us on Twitter: </em><strong><em>@</em></strong><a href="https://twitter.com/snips"><strong><em>Snips</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=46c82eeabb0e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/debunking-the-unnecessary-compromise-users-can-have-a-voice-assistant-and-their-privacy-too-46c82eeabb0e">Debunking the Unnecessary Compromise: Users Can Have a Voice Assistant and Their Privacy Too</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snips launches Partner Program to help OEMs bring voice-enabled products to market faster]]></title>
            <link>https://medium.com/snips-ai/snips-launches-partner-program-to-help-oems-bring-voice-enabled-products-to-market-faster-5295956ecf93?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/5295956ecf93</guid>
            <category><![CDATA[embedded-systems]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <category><![CDATA[solutions]]></category>
            <category><![CDATA[partner-program]]></category>
            <dc:creator><![CDATA[Genia Shipova]]></dc:creator>
            <pubDate>Thu, 14 Mar 2019 13:49:59 GMT</pubDate>
            <atom:updated>2019-05-07T13:37:41.207Z</atom:updated>
            <content:encoded><![CDATA[<p>We are proud to announce the launch of our <a href="https://snips.ai/partners/"><strong>Partner Program</strong></a><strong>!</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*f1i41-UqTr88r3XYLX0tAw.png" /></figure><p>We launched our Partner Program to bring voice-first technologies and products to a wide variety of consumer and industrial markets. The Snips Partner Program builds a network of key Technology and Solutions companies to provide clients with full access to building blocks and capabilities needed to integrate embedded, natural voice recognition into products and services. Read more about our launching partners Smile and DSP Group on the <a href="https://snips.ai/blog/snips-partner-program-innovation-voice"><strong>Snips blog</strong></a>, as well as how Snips is enabling access to groundbreaking voice technologies.</p><p>Find out more about this Program <a href="https://snips.ai/blog/snips-partner-program-innovation-voice"><strong>here</strong></a> and become a partner!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*qlDaZoPwp8ZhLpX17o_A8A.png" /></figure><p><em>If you liked this article and want to support Snips, </em><strong><em>please share it</em></strong><em>!</em></p><p><em>Follow us on Twitter: </em><strong><em>@</em></strong><a href="https://twitter.com/snips"><strong><em>Snips</em></strong></a></p><p><em>If you want to add </em><strong><em>offline and private voice recognition</em></strong><em> to your products, </em><a href="http://www.snips.ai/enterprise"><strong><em>Let’s Talk</em></strong></a><strong><em>!</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KFr-gxH42f57ILLOf2x3uA.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5295956ecf93" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/snips-launches-partner-program-to-help-oems-bring-voice-enabled-products-to-market-faster-5295956ecf93">Snips launches Partner Program to help OEMs bring voice-enabled products to market faster</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Inside Snips: Meet the team behind the private-by-design voice assistant]]></title>
            <link>https://medium.com/snips-ai/inside-snips-meet-the-team-behind-the-private-by-design-voice-assistant-3df302364b44?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/3df302364b44</guid>
            <category><![CDATA[teamwork]]></category>
            <category><![CDATA[privacy-by-design]]></category>
            <category><![CDATA[deeptech]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <dc:creator><![CDATA[Yann Lechelle]]></dc:creator>
            <pubDate>Mon, 11 Mar 2019 16:29:29 GMT</pubDate>
            <atom:updated>2019-05-07T13:41:59.056Z</atom:updated>
            <content:encoded><![CDATA[<p><em>by Yann Lechelle COO, Joseph Dureau CTO, Sébastien Maury CPO</em></p><p>Introducing the people building Snips, one of the largest AI voice companies in Europe.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*--RFgeHwt889heBjgb99Cg.jpeg" /><figcaption>The Snips team in our Paris Headquarters, March 2019</figcaption></figure><p>Let us reintroduce ourselves. Over the past year, Snips has more than doubled our team size and opened an additional office in Tokyo. Here’s what that momentum looks like in numbers:</p><p>— Over 60% of Snips employees are engineers; <br>— 15% hold PhDs; <br>— 8 patents filed for different bricks of our technology; <br>— 25% of our workforce is female.</p><p>Read more about each team and some of the rising stars making technology disappear on the <a href="https://snips.ai/blog/people-powering-edge-computing-company"><strong>Snips blo</strong></a><strong>g.</strong></p><h4>Interested in joining us in Paris?</h4><p>Check out our <a href="https://snips.welcomekit.co/">open roles</a> and <a href="https://snips.ai/enterprise/">explore our technologies</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*qlDaZoPwp8ZhLpX17o_A8A.png" /></figure><p><em>If you liked this article and want to support Snips, </em><strong><em>please share it</em></strong><em>!</em></p><p><em>Follow us on Twitter: </em><strong><em>@</em></strong><a href="https://twitter.com/snips"><strong><em>Snips</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3df302364b44" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/inside-snips-meet-the-team-behind-the-private-by-design-voice-assistant-3df302364b44">Inside Snips: Meet the team behind the private-by-design voice assistant</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Interview with Mickael Carvalho, CEO of Find&Order]]></title>
            <link>https://medium.com/snips-ai/interview-with-mickael-carvalho-ceo-of-find-order-ca15cea39d6f?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/ca15cea39d6f</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[retail]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <category><![CDATA[enterprise-technology]]></category>
            <dc:creator><![CDATA[Alexander Guy]]></dc:creator>
            <pubDate>Tue, 05 Mar 2019 12:54:42 GMT</pubDate>
            <atom:updated>2019-05-07T14:03:56.107Z</atom:updated>
            <content:encoded><![CDATA[<h4>Snips and Find &amp; Order have teamed up to help retailers offer innovative in-store shopping experiences</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JDra-lf8m1pzAnSKcmEpkw.jpeg" /></figure><p>Snips has partnered with <a href="https://findnorder.com/">Find &amp; Order</a>, a mobile intelligence company, to reinvent the the shopping experience with embedded in-store navigation. Soon you’ll be able to tick items off your shopping list simply by asking where your items are located, alleviating the hassle of searching endlessly for a product in a large store. We recently interviewed Find &amp; Order’s CEO Mickael Carvalho to get his take on the future of retail and why Snips was the best voice solutions partner. Read the full interview and watch our technology in action on the <a href="https://snips.ai/blog/snips-findorder-smart-retail-solutions"><strong>Snips blog</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*qlDaZoPwp8ZhLpX17o_A8A.png" /></figure><p><em>If you liked this article and want to support Snips, </em><strong><em>please share it</em></strong><em>!</em></p><p><em>Follow us on Twitter: </em><strong><em>@</em></strong><a href="https://twitter.com/snips"><strong><em>Snips</em></strong></a></p><p><em>If you want to add </em><strong><em>offline and private voice recognition</em></strong><em> to your products, </em><a href="http://www.snips.ai/enterprise"><strong><em>Let’s Talk</em></strong></a><strong><em>!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca15cea39d6f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/interview-with-mickael-carvalho-ceo-of-find-order-ca15cea39d6f">Interview with Mickael Carvalho, CEO of Find&amp;Order</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Snips Partners with DSP Group]]></title>
            <link>https://medium.com/snips-ai/snips-partners-with-dsp-group-20b36b16d782?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/20b36b16d782</guid>
            <category><![CDATA[partnerships]]></category>
            <category><![CDATA[internet-of-things]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <dc:creator><![CDATA[Alexander Guy]]></dc:creator>
            <pubDate>Tue, 26 Feb 2019 13:48:44 GMT</pubDate>
            <atom:updated>2019-05-07T14:06:41.988Z</atom:updated>
            <content:encoded><![CDATA[<h4>DSP Group and Snips will power Multi-Room Functionality for Smart Home and Buildings</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0MS4PAasOk77t4205fNdQA.png" /></figure><p>Snips is excited to announce our technology partnership with <a href="https://www.dspg.com/"><strong>DSP Group,</strong></a> a partnership that unlocks entirely new possibilities for voice recognition in the local environment and makes even more voice recognition functionality available on the edge. By combining our voice recognition software, running on-device and offline, together with DSP Group we give OEMs a new possibility to create a local grid of mutually-aware devices, lowering the BoM per device and giving opportunities to diversify their product offerings. As our COO Yann Lechelle puts it, “This new voice architecture will be applicable in smart home and smart building verticals where performance, cost effectiveness and data privacy play an important role for end consumers.”</p><p>Explore what this partnership unlocks on the <a href="https://snips.ai/blog/dsp-group-partnership-smart-homes"><strong>Snips blog</strong></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/80/1*qlDaZoPwp8ZhLpX17o_A8A.png" /></figure><p><em>If you liked this article and want to support Snips, </em><strong><em>please share it</em></strong><em>!</em></p><p><em>Follow us on Twitter: </em><strong><em>@</em></strong><a href="https://twitter.com/snips"><strong><em>Snips</em></strong></a></p><p><em>If you want to add </em><strong><em>offline and private voice recognition</em></strong><em> to your products, </em><a href="http://www.snips.ai/enterprise"><strong><em>Let’s Talk</em></strong></a><strong><em>!</em></strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20b36b16d782" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/snips-partners-with-dsp-group-20b36b16d782">Snips Partners with DSP Group</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Snips-Operated Home with Android Voice Panel]]></title>
            <link>https://medium.com/snips-ai/a-snips-operated-home-with-android-voice-panel-65cc4e5e698a?source=rss----16de5c9bea5a---4</link>
            <guid isPermaLink="false">https://medium.com/p/65cc4e5e698a</guid>
            <category><![CDATA[smart-home-automation]]></category>
            <category><![CDATA[iot]]></category>
            <category><![CDATA[voice-assistant]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[how-to]]></category>
            <dc:creator><![CDATA[Michael Ritchie]]></dc:creator>
            <pubDate>Fri, 22 Feb 2019 14:37:29 GMT</pubDate>
            <atom:updated>2019-02-22T14:37:29.747Z</atom:updated>
            <content:encoded><![CDATA[<h3>Voice Panel</h3><p><em>A guest blog post by </em><a href="https://medium.com/u/95f26c15d670"><em>Michael Ritchie</em></a><em>.</em></p><p>Voice Panel is an open source Android Voice Assistant for <a href="https://www.home-assistant.io/">Home Assistant</a> powered by the <a href="https://snips.ai/">Snips Voice Platform</a>. Snips provides a private, powerful, and customizable voice assistant technology that processes all language input on-device, with no data ever sent to the cloud.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LEkkGwKt9tBacfoK47rKNg.png" /><figcaption>Voice Panel User Interface which supports Darkmode</figcaption></figure><p>Voice Panel uses Snips to act as a voice interface for Home Assistant. You can control your alarm system, lights, windows, blinds, switches, check status, get the date/time, and retrieve the weather information. Here is a list of supported Snips apps:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*997R0pNODwKXgP9WkzJ7YA.png" /><figcaption>Supported Snips apps for Voice Panel</figcaption></figure><p>Currently the application has a few limitations. The Snips Android SDK does not work as a satellite, so all messages must be forwarded to Home Assistant using MQTT, and speech is processed on the Android device using TTS. The Snips Android SDK does not support custom wake-words at this time. To initiate a conversation, you must say “Hey, Snips” or you can try the face detection wake-word feature which starts listening when the device camera recognizes a face.</p><h3>Features</h3><ul><li>Face activated wake-word (no need to say “Hey, Snips”).</li><li>Control Home Assistant components using voice commands (“Turn on the kitchen lights”).</li><li>Stream video, detect motion, detect faces, and read QR Codes.</li><li>Support for MQTT Alarm Panel Control to control your alarm system.</li><li>MQTT commands to remotely control the application (speak text, play audio, send notifications, alerts, etc.).</li><li>Device sensor data reporting over MQTT (temperature, light, pressure, battery, etc.).</li><li>MQTT Day/Night mode based on the sun value reported from Home Assistant.</li><li>MQTT weather data to display weather reported from Home Assistant.</li></ul><h3>Installation &amp; Requirements</h3><ul><li>Android Device running Android OS 5.0.1 (SDK 21) or greater. Though performance on older devices may vary.</li><li>Google Play services may also be required, this may affect some Amazon Fire Tablet devices.</li><li>Ideally you want to keep your device unlocked and use Daydream as a screensaver, waking the device when you either say the wake-word or with motion or face detection.</li><li>You can download and install the latest release from Github project <a href="https://github.com/thanksmister/voice-panel-android/releases">release section</a> or if you prefer, install the application from the <a href="https://play.google.com/store/apps/details?id=com.thanksmister.iot.voicepanel">Google Play</a>.</li></ul><h3>Assistant Setup</h3><p>You first need to setup a <a href="https://www.home-assistant.io/addons/">MQTT Broker</a> in Home Assistant by adding the HASS MQTT Broker add-on to Home Assistant. This allows the two-way communication between Home Assistant and Voice Panel using the MQTT messaging protocol.</p><p>For the Voice Assistant to control Home Assistant components, you need to install either the <a href="https://www.home-assistant.io/components/snips/">Snips component</a> or the <a href="https://www.home-assistant.io/addons/snips/">Snips Add-On</a>.</p><p>Home Assistant already has <a href="https://developers.home-assistant.io/docs/en/intent_builtin.html">bundled scripts</a> included when you add the Snips platform to Home Assistant. These scripts will allow you to turn on/off components (lights, switches, etc.), open/close components (garage, blinds, etc.), set the color of lights, add items to your shopping list, and retrieve items from your shopping list. So you can say “Turn on the kitchen lights” to control a the component lights.kitchen.</p><p>For Snips you basically need to add snips: to you configuration.yaml file and then add the custom intents you want to work with. The basic intents bundled with Home Assistant will already allow you to work with your HA components.</p><h4>Custom Assistant Commands</h4><p>Voice Panel also has custom scripts that extend the basic functionality. Currently Voice Panel can control your MQTT alarm panel in Home Assistant, get the status for any component by name (“What’s the status of the front door?”), get the time/date, get the weather, and control the thermostat.</p><p>To use custom scripts you need to create a file to store your <a href="https://www.home-assistant.io/components/intent_script/">intent scripts</a> and customize the assistant’s behavior. Create an “intents.yaml” file in your configuration directory, then link this from the configuration.yaml file by adding this line at the bottom:</p><p>intent_script: !include intents.yaml</p><p>You will place intent scripts within the new “intents.yaml” file to work with the various components currently supported by application. Home Assistant already has <a href="https://github.com/tschmidty69/hass-snips-bundle-intents">bundled scripts</a> included when you add the Snips platform to Home Assistant. Voice Panel also has custom scripts to extend upon the basic functionality. The additional scripts can be added to your intents yaml file to use these features.</p><h3>HA Alarm Control</h3><p>To control a Home Assistant alarm control panel using voice, you need to add the alarm intents scripts to your “intents.yaml” file. This will allow you to set the alarm status, disarm the alarm, and set the alarm to “home” or “away” modes by voice. Here are some sample voice commands:</p><ul><li>“Set the alarm to home.”</li><li>“Disable the alarm.”</li><li>“Set the alarm to away mode.”</li><li>“What’s the status of the alarm?”</li></ul><h4>Alarm Panel Intents Scripts</h4><pre>HaAlarmStatus:<br>  speech:<br>    type: plain<br>    text: &gt;<br>      {% if is_state(&quot;alarm_control_panel.ha_alarm&quot;, &quot;disarmed&quot;) -%}<br>        The alarm is not active.<br>      {%- endif %}<br>      {% if is_state(&quot;alarm_control_panel.ha_alarm&quot;, &quot;armed_home&quot;) -%}<br>        The alarm is in home mode.<br>      {%- endif %}<br>      {% if is_state(&quot;alarm_control_panel.ha_alarm&quot;, &quot;armed_away&quot;) -%}<br>        The alarm is in away mode.<br>      {%- endif %}<br>HaAlarmHome:<br>  speech:<br>    type: plain<br>    text: &gt; <br>      OK, alarm set to home.<br>  action:<br>    - service: alarm_control_panel.alarm_arm_home<br>      data:<br>        entity_id: alarm_control_panel.ha_alarm<br>HaAlarmAway:<br>  speech:<br>    type: plain<br>    text: &gt;<br>      OK, the alarm set to away, you have 60 seconds to leave.<br>  action:<br>    - service: alarm_control_panel.alarm_arm_away<br>      data:<br>        entity_id: alarm_control_panel.ha_alarm<br>HaAlarmDisarm:<br>  speech:<br>    type: plain<br>    text: &gt;<br>      The alarm has been deactivated.<br>  action:<br>    - service: alarm_control_panel.alarm_disarm<br>      data:<br>        entity_id: alarm_control_panel.ha_alarm</pre><h3>Weather Updates</h3><p>If you would like to get weather updates, you will need to add a <a href="https://www.home-assistant.io/components/sensor.darksky/">weather component</a> to Home Assistant. Voice Panel can report the weather by adding a new intent that will speak the current weather conditions to your “intents.yaml” file. Here is a sample voice command:</p><ul><li>“What’s the weather today?”</li></ul><h4>Example Dark Sky Weather</h4><pre>searchWeatherForecast:<br>  speech:<br>    type: plain<br>    text: &gt;<br>      The weather is currently <br>      {{states(&#39;sensor.dark_sky_temperature&#39;) | round(0)}} <br>      degrees outside and <br>      {{states(&#39;sensor.dark_sky_daily_summary&#39;)}} <br>      The high today will be <br>      {{ states(&#39;sensor.dark_sky_daytime_high_temperature&#39;) | round(0)}}<br>      and <br>      {{ states(&#39;sensor.dark_sky_hourly_summary&#39;)}}</pre><h3>Status Updates</h3><p>You can get the status of Home Assistant components using voice commands. First you need to add the intent scripts to the “intents.yaml” file to handle script information. The status intent has two slots, one for the entity location (such as kitchen, living room, deck, upstairs, etc.) and one for entity id (door, camera, light, etc.). These slots can be used to provide a specific response for the item status.</p><ul><li>“What’s the status of the main door?”</li><li>“Main door state?”</li><li>“Are the doors secure?”</li></ul><h4>Example Status Intent Script</h4><pre>getStatus:<br>  speech:<br>    type: plain<br>    text: &gt;<br>      {% if entity_locale == &#39;main&#39; and  entity_id == &#39;door&#39;  %}<br>        The {{ entity_locale }} {{ entity_id }} is {{states(sensor.main_door)}}<br>      {% endif %}</pre><p>In the above example, “entity_locale” and “entity_id” are used to provide a specific sensor status. In this case we asked “what is the status of the main door?” and Snips responds with “The main door is closed”, which is the status of the sensor.main_door entity.</p><h3>Time/Date</h3><p>You can get the current time and date from Home Assistant components using voice commands. Add the following intent scripts to the “intents.yaml” file to handle intents for Time/Date.</p><ul><li>“What’s the date?”</li><li>“What day is it?”</li><li>“What time is it?”</li></ul><h4>Example Status Intent Script</h4><pre>getCurrentTime:<br>  speech:<br>    type: plain<br>    text: &gt; <br>      The time is {{ now().hour}}  {{ &quot;%0.02d&quot; | format(now().strftime(&quot;%-M&quot;) | int) }}<br>getCurrentDate:<br>  speech:<br>    type: plain<br>    text: &gt; <br>      It is {{ now().weekday }}, the {{ now().day }} of {{ now().month }}, {{ now().year }}<br>getCurrentDay:<br>  speech:<br>    type: plain<br>    text: &gt; <br>      Today is { {now().weekday }}</pre><h3>MQTT Alarm Panel Control</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/0*NkLhYdR30lOBfJVt.png" /></figure><p>The alarm panel can be controlled using only voice, however, it also comes included with a manual way to set and disable the alarm using MQTT messaging. To use this feature, you need to install the <a href="https://www.home-assistant.io/components/alarm_control_panel.manual_mqtt/">Manual Alarm Control Panel with MQTT Support</a>. This component allows for two-way control of the Home Assistant alarm panel component using MQTT messaging.</p><p>To enable the MQTT alarm feature, under settings (the gear icon) select Alarm Settings. Once active, you will see a lock icon at the bottom of the main screen which displays the current alarm mode and provide a manual means for arming and disarming the alarm in addition to the voice controls. The Alarm Settings has options to change the MQTT topic and commands if you do not wish to use the defaults.</p><h4>Supported Command and Publish States</h4><ul><li>Command topic: home/alarm/set</li><li>Command payloads: ARM_HOME, ARM_AWAY, DISARM</li><li>Publish topic: home/alarm</li><li>Publish payloads: disarmed, armed_away, armed_home, pending, triggered (armed_night not currently supported).</li></ul><h4>Example Home Assistant Setup</h4><pre>alarm_control_panel:<br>  - platform: manual_mqtt<br>    state_topic: home/alarm<br>    command_topic: home/alarm/set<br>    pending_time: 60<br>    trigger_time: 1800<br>    disarm_after_trigger: false<br>    delay_time: 30<br>    armed_home:<br>      pending_time: 0<br>      delay_time: 0<br>    armed_away:<br>      pending_time: 60<br>      delay_time: 30</pre><p>— If I set the the alarm mode home, the alarm will immediately be on without any pending time. If the alarm is triggered, there will be no pending time before the siren sounds. If the alarm mode is away, I have 60 seconds to leave before the alarm is active and 30 seconds to disarm the alarm when entering.</p><p>— Notice that my trigger_time is 1800 and disarm_after_trigger is false, this means the alarm runs for 1800 seconds until it stops and it doesn’t reset after it’s triggered.</p><h3>MQTT Weather</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/537/0*67i3QMliBqL8E-KQ.png" /><figcaption>Weather from Dark Sky</figcaption></figure><p>You can also use MQTT to publish the weather to the Voice Panel application, which it will then display on the main view. To do this you need to set up an automation that publishes a formatted MQTT message on an interval. Then in the application settings, enable the weather feature. Here is a sample automation that uses Dark Sky data to publish an MQTT message:</p><pre>- id: &#39;1538595661244&#39;<br>  alias: MQTT Weather<br>  trigger:<br>  - minutes: &#39;/15&#39;<br>    platform: time<br>  condition: []<br>  action:<br>  - data:<br>      payload_template: &#39;{&#39;&#39;weather&#39;&#39;:{&#39;&#39;summary&#39;&#39;:&#39;&#39;{{states(&#39;&#39;sensor.dark_sky_summary&#39;&#39;)}}&#39;&#39;,&#39;&#39;precipitation&#39;&#39;:&#39;&#39;{{states(&#39;&#39;sensor.dark_sky_precip_probability&#39;&#39;)}}&#39;&#39;,&#39;&#39;icon&#39;&#39;:&#39;&#39;{{states(&#39;&#39;sensor.dark_sky_icon&#39;&#39;)}}&#39;&#39;,&#39;&#39;temperature&#39;&#39;:&#39;&#39;{{states(&#39;&#39;sensor.dark_sky_apparent_temperature&#39;&#39;)}}&#39;&#39;,&#39;&#39;units&#39;&#39;:&#39;&#39;{{states.sensor.dark_sky_apparent_temperature.attributes.unit_of_measurement}}&#39;&#39;}}&#39;<br>      topic: voicepanel/command<br>      retain: true<br>    service: mqtt.publish</pre><p>The resulting payload will look like this:</p><pre>{&quot;topic&quot;: &quot;voicepanel/command&quot;,&quot;payload&quot;:&quot;{&#39;weather&#39;:{&#39;summary&#39;:&#39;Partly Cloudy&#39;,&#39;precipitation&#39;:&#39;0&#39;,&#39;icon&#39;:&#39;partly-cloudy-day&#39;,&#39;temperature&#39;:&#39;22.5&#39;,&#39;units&#39;:&#39;°C&#39;}}</pre><h3>MQTT Day/Night Mode</h3><p>Similar to how weather works, you can control the Voice Panel to display the day or night mode by sending a formatted MQTT message with the sun’s position (above or below the horizon). To do this add the <a href="https://www.home-assistant.io/components/sun/">sun component</a> to Home Assistant, then setup an automation to publish an MQTT message on an interval:</p><pre>- id: &#39;1539017708085&#39;<br>  alias: MQTT Sun<br>  trigger:<br>  - minutes: &#39;/5&#39;<br>    platform: time<br>  condition: []<br>  action:<br>  - data:<br>      payload_template: &#39;{&#39;&#39;sun&#39;&#39;:&#39;&#39;{{states(&#39;&#39;sun.sun&#39;&#39;)}}&#39;&#39;}&#39;<br>      retain: true<br>      topic: voicepanel/command<br>    service: mqtt.publish</pre><p>The resulting payload will look like this:</p><pre>{<br>  &quot;payload&quot;: &quot;{&#39;sun&#39;:&#39;below_horizon&#39;}&quot;,<br>  &quot;topic&quot;: &quot;alarmpanel/command&quot;<br>}</pre><p>You can also test this from the using the “mqtt.publish” service under the Home Assistant Developer Tools:</p><pre>{<br>  &quot;payload_template&quot;: &quot;{&#39;sun&#39;:&#39;{{states(&#39;sun.sun&#39;) }}&#39;}&quot;,<br>  &quot;topic&quot;: &quot;voicepanel/command&quot;<br>}</pre><p>If you wish, you can use an offset to change the day or night mode values or send a MQTT message at the desired time with “above_horizon” to show day mode or “below_horizon” to show night mode. If you wish to always be night, you need only send one MQTT message with “below_horizon” and the app will not switch back to day mode. Be sure to turn on the Day/Night mode under the Display settings in the application.</p><h3>MQTT Sensor and State Data</h3><p>If MQTT is properly configured, the application can publish data and states for various device sensors, camera detections, and application states. Each device requires a unique base topic which you set in the MQTT settings, with the default being“voicepanel”. This distinguishes your device if you are running multiple devices.</p><h4>Device Sensors</h4><p>The application will post device sensor data per the API description and Sensor Reading Frequency. Currently device sensors for Pressure, Temperature, Light, and Battery Level are published.</p><h4>Sensor Data</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WZXt4PS10yzPtfUPZEuHwQ.png" /><figcaption>Sensor Data Published</figcaption></figure><p>Sensor values are constructed as JSON per the above table and Voice Panel publishes all sensors to MQTT under voicepanel/sensor. Each sensor publishes to a subtopic based on the type of sensor. An example topic would be voicepanel/sensor/battery .</p><p><em>NOTE:</em> Sensor values are device-specific; not all devices will publish all sensor values.</p><h4>Home Assistant Examples</h4><pre>sensor:<br>  - platform: mqtt<br>    state_topic: &quot;voicepanel/sensor/battery&quot;<br>    name: &quot;Alarm Panel Battery Level&quot;<br>    unit_of_measurement: &quot;%&quot;<br>    value_template: &#39;{{ value_json.value }}&#39;<br>    <br> - platform: mqtt<br>    state_topic: &quot;voicepanel/sensor/temperature&quot;<br>    name: &quot;Voice Panel Temperature&quot;<br>    unit_of_measurement: &quot;°C&quot;<br>    value_template: &#39;{{ value_json.value }}&#39;</pre><pre>  - platform: mqtt<br>    state_topic: &quot;voicepanel/sensor/light&quot;<br>    name: &quot;Alarm Panel Light Level&quot;<br>    unit_of_measurement: &quot;lx&quot;<br>    value_template: &#39;{{ value_json.value }}&#39;<br>    <br>  - platform: mqtt<br>    state_topic: &quot;voicepanel/sensor/magneticField&quot;<br>    name: &quot;Alarm Panel Magnetic Field&quot;<br>    unit_of_measurement: &quot;uT&quot;<br>    value_template: &#39;{{ value_json.value }}&#39;</pre><pre>  - platform: mqtt<br>    state_topic: &quot;voicepanel/sensor/pressure&quot;<br>    name: &quot;Alarm Panel Pressure&quot;<br>    unit_of_measurement: &quot;hPa&quot;<br>    value_template: &#39;{{ value_json.value }}&#39;</pre><h3>Motion, Face, and QR Codes Detection</h3><p>In additional to device sensor data publishing, the application can also publish states for Motion Detection and Face Detection, as well as the data from QR Codes derived from the device camera.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bimcAk8H7riRmkmrCqvtlA.png" /><figcaption>Motion, Face, and QR Code Detection</figcaption></figure><p>Sensor values are constructed as JSON per the above table and Voice Panel publishes all sensors to MQTT under voicepanel/sensor. Each sensor publishes to a subtopic based on the type of sensor voicepanel/sensor/motion.</p><h4>Home Assistant Examples</h4><pre>binary_sensor:<br>  - platform: mqtt<br>    state_topic: &quot;voicepanel/sensor/motion&quot;<br>    name: &quot;Motion&quot;<br>    payload_on: &#39;{&quot;value&quot;:true}&#39;<br>    payload_off: &#39;{&quot;value&quot;:false}&#39;<br>    device_class: motion <br>    <br>binary_sensor:<br>  - platform: mqtt<br>    state_topic: &quot;voicepanel/sensor/face&quot;<br>    name: &quot;Face Detected&quot;<br>    payload_on: &#39;{&quot;value&quot;:true}&#39;<br>    payload_off: &#39;{&quot;value&quot;:false}&#39;<br>    device_class: motion <br>  <br>sensor:<br>  - platform: mqtt<br>    state_topic: &quot;voicepanel/sensor/qrcode&quot;<br>    name: &quot;QR Code&quot;<br>    value_template: &#39;{{ value_json.value }}&#39;</pre><h3>Application State Data</h3><p>The application can also publish state data about the application such as the current dashboard url loaded or the screen state.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hSHWGP9u9zgW2hADs_aJ4g.png" /><figcaption>Application States</figcaption></figure><p>State values are presented together as a JSON block {&quot;currentUrl&quot;:&quot;http://hasbian:8123/states&quot;,&quot;screenOn&quot;:true}.</p><p>Voice Panel publishes a state to topic with a default topic of voicepanel/state.</p><h3>MQTT Commands</h3><p>Interact and control the application and device remotely using either MQTT commands, including using your device as an announcer with Google Text-To-Speech. Each device required a unique base topic which you set in the MQTT settings. This distinguishes your device if you are running multiple devices.</p><h3>Commands</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jSzwyoqbUIhLJ55oRPV1Ug.png" /></figure><p>The base topic can be changed in the application settings. Commands are constructed via valid JSON. It is possible to string multiple commands together {&quot;clearCache&quot;:true, &quot;relaunch&quot;:true}. Voice Panel subscribes to default topic voicepanel/comma with a JSON payload.</p><h3>Google Text-To-Speach Command</h3><p>You can send a command using either HTTP or MQTT to have the device speak a message using Google’s Text-To-Speech. Note that the device must be running Android Lollipop or above.</p><p>Example format for the message topic and payload:</p><p>{&quot;topic&quot;:&quot;voicepanel/command&quot;, &quot;payload&quot;:&quot;{&#39;speak&#39;:&#39;Hello!&#39;}&quot;}</p><h3>MJPEG Video Streaming</h3><p>Use the device camera as a live MJPEG stream. Just connect to the stream using the device IP address and endpoint. Be sure to turn on the camera streaming options in the settings and set the number of allowed streams and HTTP port number. Note that performance depends upon your device (older devices will be slow).</p><p>Example format for browser URL:</p><p><a href="http://192.168.1.1:2971/camera/stream">http://192.168.1.1:2971/camera/stream</a></p><h4>Home Assistant Example:</h4><pre>camera:<br>  - platform: mjpeg<br>    mjpeg_url: <a href="http://192.168.1.1:2971/camera/stream">http://192.168.1.1:2971/camera/stream</a><br>    name: Voice Panel Camera</pre><h3>Additional Resources</h3><p><a href="https://www.google.com/url?q=https%3A%2F%2Fsnips.ai%2F&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNEEAbIHGBHVZMfUSO4i2vYcb-HTZg">Snips Voice Platform</a><br><a href="https://www.google.com/url?q=https%3A%2F%2Fhome-assistant.io&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNEkPtQ0R4kFhtyG-j_TgXb8AmM3Aw">Home Assistant</a><a href="https://www.google.com/url?q=https%3A%2F%2Fsnips.ai%2F&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNEEAbIHGBHVZMfUSO4i2vYcb-HTZg"><br></a><a href="https://www.google.com/url?q=https%3A%2F%2Fgithub.com%2Fthanksmister%2Fvoice-panel-android%2Fissues&amp;sa=D&amp;sntz=1&amp;usg=AFQjCNGteuQmwbW0p24W7jcv49GDSCuBvg">Issues</a></p><p>. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .</p><p><em>A version of this blog post originally appeared on Michael Ritchie’s GitHub Page, available </em><a href="https://thanksmister.com/voice-panel-android/"><em>here</em></a><em>. To learn about Voice Panel and other android hacks from Michael, </em><a href="https://github.com/thanksmister"><em>follow his GitHub</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=65cc4e5e698a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/snips-ai/a-snips-operated-home-with-android-voice-panel-65cc4e5e698a">A Snips-Operated Home with Android Voice Panel</a> was originally published in <a href="https://medium.com/snips-ai">Snips Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>