|
| 1 | +<!doctype html> |
| 2 | + <!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]--> |
| 3 | + <!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]--> |
| 4 | + <!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]--> |
| 5 | + <!--[if gt IE 8]><!--> <html> <!--<![endif]--> |
| 6 | + <head> |
| 7 | + <meta charset="utf-8"> |
| 8 | + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| 9 | + <title>Google Assistant - Home Assistant</title> |
| 10 | + <meta name="author" content="Home Assistant"> |
| 11 | + <meta name="description" content="Enhance your Hass.io installation with google assistant."> |
| 12 | + <meta name="viewport" content="width=device-width"> |
| 13 | + <link rel="canonical" href="https://home-assistant.io/addons/google_assistant/"> |
| 14 | + <meta property="fb:app_id" content="338291289691179"> |
| 15 | + <meta property="og:title" content="Google Assistant"> |
| 16 | + <meta property="og:site_name" content="Home Assistant"> |
| 17 | + <meta property="og:url" content="https://home-assistant.io/addons/google_assistant/"> |
| 18 | + <meta property="og:type" content="article"> |
| 19 | + <meta property="og:description" content="Enhance your Hass.io installation with google assistant."> |
| 20 | + <meta property="og:image" content="https://home-assistant.io/images/default-social.png"> |
| 21 | + <meta name="twitter:card" content="summary_large_image"> |
| 22 | + <meta name="twitter:site" content="@home_assistant"> |
| 23 | + <meta name="twitter:title" content="Google Assistant"> |
| 24 | + <meta name="twitter:description" content="Enhance your Hass.io installation with google assistant."> |
| 25 | + <meta name="twitter:image" content="https://home-assistant.io/images/default-social.png"> |
| 26 | + <link href="/stylesheets/screen.css" media="screen, projection" rel="stylesheet"> |
| 27 | + <link href="/atom.xml" rel="alternate" title="Home Assistant" type="application/atom+xml"> |
| 28 | + <link rel='shortcut icon' href='/images/favicon.ico' /> |
| 29 | + <link rel='icon' type='image/png' href='/images/favicon-192x192.png' sizes='192x192' /> |
| 30 | + </head> |
| 31 | + <body > |
| 32 | + <header class='site-header'> |
| 33 | + <div class="grid-wrapper"> |
| 34 | + <div class="grid"> |
| 35 | + <div class="grid__item three-tenths lap-two-sixths palm-one-whole ha-title"> |
| 36 | + <a href="/" class="site-title"> |
| 37 | + <img width='40' src='/demo/favicon-192x192.png'> |
| 38 | + <span>Home Assistant</span> |
| 39 | + </a> |
| 40 | +</div> |
| 41 | +<div class="grid__item seven-tenths lap-four-sixths palm-one-whole"> |
| 42 | + <nav> |
| 43 | + <input type="checkbox" id="toggle"> |
| 44 | +<label for="toggle" class="toggle" data-open="Main Menu" data-close="Close Menu"></label> |
| 45 | +<ul class="menu pull-right"> |
| 46 | + <li><a href="/getting-started/">Getting started</a></li> |
| 47 | + <li><a href="/components/">Components</a></li> |
| 48 | + <li><a href="/docs/">Docs</a></li> |
| 49 | + <li><a href="/cookbook/">Examples</a></li> |
| 50 | + <li><a href="/developers/">Developers</a></li> |
| 51 | + <li><a href="/blog/">Blog</a></li> |
| 52 | + <li><a href="/help/">Need help?</a></li> |
| 53 | + <li><a href='#' class='show-search'><i class="icon-search"></i></a></li> |
| 54 | +</ul> |
| 55 | + </nav> |
| 56 | + <div class='search-container' style='display: none'> |
| 57 | + <div class='search'> |
| 58 | + <i class="icon-search"></i> |
| 59 | + <input id='search' placeholder='Search the docs…'> |
| 60 | + <a href='#' class='close'><i class="icon-remove-sign"></i></a> |
| 61 | + </div> |
| 62 | + </div> |
| 63 | +</div> |
| 64 | + </div> |
| 65 | +</div> |
| 66 | + </header> |
| 67 | + <div class="grid-wrapper"> |
| 68 | + <div class="grid grid-center"> |
| 69 | + <div class="grid__item two-thirds lap-one-whole palm-one-whole"> |
| 70 | + <article class="page"> |
| 71 | + <div class='edit-github'><a href='https://github.com/home-assistant/home-assistant.github.io/tree/current/source/_addons/google_assistant.markdown'>Edit this page on GitHub</a></div> |
| 72 | + <header> |
| 73 | + <h1 class="title indent"> |
| 74 | + Google Assistant |
| 75 | + </h1> |
| 76 | + </header> |
| 77 | + <hr class="divider"> |
| 78 | + <p><a href="https://assistant.google.com/">Google Assistant</a> is an AI-powered voice assistant that runs on the Raspberry Pi and x86 platforms. It runs on-device and is Private by Design.</p> |
| 79 | +<p>To enable access to the Google Assistant API, do the following: |
| 80 | +1) In the Cloud Platform Console, go to the Projects page. Select an existing project or create a new <a href="https://console.cloud.google.com/project">project</a> |
| 81 | +2) Enable the Google Assistant <a href="https://console.developers.google.com/apis/api/embeddedassistant.googleapis.com/overview">API</a> on the project you selected |
| 82 | +3) Create a <a href="https://console.developers.google.com/apis/credentials/serviceaccountkey">service account</a> and download the json credentials.</p> |
| 83 | +<p>Now install and activate the <a href="/addons/samba/">Samba</a> add-on so you can upload your training data. Connect to the “share” Samba share and copy your training data over. Name the file <code class="highlighter-rouge">assistant.zip</code>.</p> |
| 84 | +<p>Now it’s time to start Snips for the first time. When the Snips add-on starts, it will output your audio devices:</p><pre><code class="language-plain">**** List of PLAYBACK Hardware Devices **** |
| 85 | +card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA] |
| 86 | + Subdevices: 8/8 |
| 87 | + Subdevice #0: subdevice #0 |
| 88 | + Subdevice #1: subdevice #1 |
| 89 | + Subdevice #2: subdevice #2 |
| 90 | + Subdevice #3: subdevice #3 |
| 91 | + Subdevice #4: subdevice #4 |
| 92 | + Subdevice #5: subdevice #5 |
| 93 | + Subdevice #6: subdevice #6 |
| 94 | + Subdevice #7: subdevice #7 |
| 95 | +card 0: ALSA [bcm2835 ALSA], device 1: bcm2835 ALSA [bcm2835 IEC958/HDMI] |
| 96 | + Subdevices: 1/1 |
| 97 | + Subdevice #0: subdevice #0 |
| 98 | +</code></pre> |
| 99 | +<p>You need to use this information to configure the <code class="highlighter-rouge">mic</code> and <code class="highlighter-rouge">speaker</code> configuration options. The format is <code class="highlighter-rouge"><card #>,<device #></code>. On a Raspberry Pi 3, <code class="highlighter-rouge">0,0</code> is the built-in headset port, <code class="highlighter-rouge">0,1</code> is the HDMI port.</p> |
| 100 | +<p>Now that you’ve found the microphone and speaker addresses, it’s time to configure Google Assistant and restart the add-on.</p> |
| 101 | +<h3>Add-On configuration</h3> |
| 102 | +<div class="language-json highlighter-rouge"><pre class="highlight"><code><span class="p">{</span><span class="w"> |
| 103 | + </span><span class="nt">"mic"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1,0"</span><span class="p">,</span><span class="w"> |
| 104 | + </span><span class="nt">"speaker"</span><span class="p">:</span><span class="w"> </span><span class="s2">"1,0"</span><span class="p">,</span><span class="w"> |
| 105 | + </span><span class="nt">"service_account"</span><span class="p">:</span><span class="w"> </span><span class="s2">"service_account.json"</span><span class="p">,</span><span class="w"> |
| 106 | +</span><span class="err">}</span><span class="w"> |
| 107 | +</span></code></pre> |
| 108 | +</div> |
| 109 | +<p>Configuration variables:</p> |
| 110 | +<ul> |
| 111 | + <li><strong>mqtt_bridge</strong> (<em>Optional</em>): Snips uses MQTT to communicate and defaults to their own broker. Use this config option to bridge their broker to your own.</li> |
| 112 | + <li><strong>mic</strong>: This is the hardware address of your microphone. Look at the Snips</li> |
| 113 | +</ul> |
| 114 | +<h3><a class="title-link" name="home-assistant-configuration" href="#home-assistant-configuration"></a> Home Assistant configuration</h3> |
| 115 | +<p>Use the Home Assistant <a href="/components/snips/">Snips.ai component</a> to integrate the add-on into Home Assistant.</p> |
| 116 | +<div class="language-yaml highlighter-rouge"><pre class="highlight"><code><span class="s">snips</span><span class="pi">:</span> |
| 117 | +</code></pre> |
| 118 | +</div> |
| 119 | +</article> |
| 120 | + </div> |
| 121 | + <aside id="sidebar" class="grid__item one-third lap-one-whole palm-one-whole"> |
| 122 | + <div class="grid"> |
| 123 | + <section class="aside-module grid__item one-whole lap-one-half"> |
| 124 | + <div class='section'> |
| 125 | + <h1 class="title delta">Topics</h1> |
| 126 | + <ul class='divided sidebar-menu'> |
| 127 | + <li> |
| 128 | + <a href='/hassio/'>Hass.io </a> |
| 129 | + <ul> |
| 130 | + <li><a href='/hassio/installation/'>Installation </a></li> |
| 131 | + <li><a href='/addons/'>Available add-ons </a></li> |
| 132 | + <li><a href='/hassio/installing_third_party_addons/'>Installing third-party add-ons </a></li> |
| 133 | + </ul> |
| 134 | + </li> |
| 135 | + </ul> |
| 136 | + <ul class='divided sidebar-menu'> |
| 137 | + <li> |
| 138 | + Advanced |
| 139 | + <ul> |
| 140 | + <li><a href='/hassio/zwave/'>Z-Wave </a></li> |
| 141 | + <li><a href='/hassio/external_storage/'>External storage </a></li> |
| 142 | + <li><a href='/hassio/run_local/'>Execute local things </a></li> |
| 143 | + </ul> |
| 144 | + </li> |
| 145 | + </ul> |
| 146 | + <ul class='divided sidebar-menu'> |
| 147 | + <li><a href='/developers/hassio/addon_development/'>Looking to create an add-on?</a></li> |
| 148 | + </ul> |
| 149 | + </div> |
| 150 | +</section> |
| 151 | +</div> |
| 152 | + </aside> |
| 153 | + </div> |
| 154 | + </div> |
| 155 | + <footer> |
| 156 | + <div class="grid-wrapper"> |
| 157 | + <div class="grid"> |
| 158 | + <div class="grid__item"> |
| 159 | + <div class="copyright"> |
| 160 | + <a rel="me" href='https://twitter.com/home_assistant'><i class="icon-twitter"></i></a> |
| 161 | + <a rel="me" href='https://facebook.com/homeassistantio'><i class="icon-facebook"></i></a> |
| 162 | + <a rel="me" href='https://plus.google.com/110560654828510104551'><i class="icon-google-plus"></i></a> |
| 163 | + <a rel="me" href='https://github.com/home-assistant/home-assistant'><i class="icon-github"></i></a> |
| 164 | + <div class="credit"> |
| 165 | + Contact us at <a href='mailto:hello@home-assistant.io'>hello@home-assistant.io</a> (no support!).<br> |
| 166 | + Website powered by <a href='http://jekyllrb.com/'>Jekyll</a> and the <a href='https://github.com/coogie/oscailte'>Oscalite theme</a>.<br /> |
| 167 | + Hosted by <a href='https://pages.github.com/'>GitHub</a> and served by <a href='https://cloudflare.com'>CloudFlare</a>. |
| 168 | + </div> |
| 169 | + <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/88x31.png" /></a><br /><span xmlns:dct="http://purl.org/dc/terms/" property="dct:title">home-assistant.io</span> is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>. |
| 170 | +</div> |
| 171 | + </div> |
| 172 | + </div> |
| 173 | +</div> |
| 174 | + </footer> |
| 175 | + <script> |
| 176 | + var _gaq=[['_setAccount','UA-57927901-1'],['_trackPageview']]; |
| 177 | + (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0]; |
| 178 | + g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js'; |
| 179 | + s.parentNode.insertBefore(g,s)}(document,'script')); |
| 180 | +</script> |
| 181 | +<link rel="stylesheet" href="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.css" /> |
| 182 | +<script type="text/javascript" src="https://cdn.jsdelivr.net/docsearch.js/2/docsearch.min.js"></script> |
| 183 | +<script type="text/javascript"> |
| 184 | +docsearch({ |
| 185 | + apiKey: 'ae96d94b201c5444c8a443093edf3efb', |
| 186 | + indexName: 'home-assistant', |
| 187 | + inputSelector: '#search', |
| 188 | + debug: false // Set debug to true if you want to inspect the dropdown |
| 189 | +}); |
| 190 | +document.querySelector('.search .close').addEventListener('click', function(ev) { |
| 191 | + ev.preventDefault(); |
| 192 | + document.querySelector('.search-container').style.display = 'none'; |
| 193 | +}); |
| 194 | +document.querySelector('.show-search').addEventListener('click', function(ev) { |
| 195 | + ev.preventDefault(); |
| 196 | + document.querySelector('.search-container').style.display = 'block'; |
| 197 | + document.getElementById('toggle').checked = false; |
| 198 | + document.querySelector('.search-container input').focus(); |
| 199 | +}); |
| 200 | +</script> |
| 201 | + </body> |
| 202 | +</html> |
0 commit comments