{"id":2246,"date":"2018-02-23T20:36:45","date_gmt":"2018-02-23T11:36:45","guid":{"rendered":"http:\/\/bezelie.com\/blog\/?page_id=2246"},"modified":"2018-03-31T19:56:46","modified_gmt":"2018-03-31T10:56:46","slug":"google-voice-kit%e3%81%a7%e5%8b%95%e3%81%8b%e3%81%97%e3%81%a6%e3%81%bf%e3%82%8b","status":"publish","type":"page","link":"http:\/\/bezelie.com\/blog\/?page_id=2246","title":{"rendered":"google voice kit\u3067\u52d5\u304b\u3057\u3066\u307f\u308b"},"content":{"rendered":"<p>Google AIY Projects\u306e\u7b2c\uff11\u6bb5\u300cVoice Kit\u300d\u306f\u308f\u305a\u304b\uff13\uff15\uff10\uff10\u5186\u3067\u30de\u30a4\u30af\u30a2\u30ec\u30a4\u3001\u30b9\u30d4\u30fc\u30ab\u30fc\u30fb\u30a2\u30f3\u30d7\u3001\u30b9\u30a4\u30c3\u30c1\u306a\u3069\u304c\u30bb\u30c3\u30c8\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u5927\u5909\u304a\u8cb7\u3044\u5f97\u306a\u30ad\u30c3\u30c8\u3067\u3059\u3002\u30b5\u30fc\u30dc\u3082\u63a5\u7d9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u3079\u30bc\u30ea\u30fc\u3092\u52d5\u304b\u3057\u3066\u307f\u307e\u3057\u3087\u3046\u3002<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-03-11.22.01w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-1978\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-03-11.22.01w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-03-11.22.01w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-03-11.22.01w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-03-11.22.01w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<h5>\u7528\u610f\u3059\u308b\u3082\u306e<\/h5>\n<p style=\"padding-left: 30px;\">\u30fbGoogle AIY projetcts Voice Kit<\/p>\n<p style=\"padding-left: 60px;\">\u30fb<a href=\"https:\/\/raspberry-pi.ksyic.com\/news\/page\/nwp.id\/65\">KSY Raspberry Pi Shop<br \/>\n<\/a>\u30fb<a href=\"https:\/\/www.switch-science.com\/catalog\/3550\/\">\u30b9\u30a4\u30c3\u30c1\u30b5\u30a4\u30a8\u30f3\u30b9<\/a><\/p>\n<p style=\"padding-left: 30px;\">\u30fb\u30d4\u30f3\u30d8\u30c3\u30c0\u3068\u30cf\u30f3\u30c0\u3065\u3051\u6a5f\u6750<\/p>\n<h5>\u7d44\u307f\u7acb\u3066<\/h5>\n<p style=\"padding-left: 30px;\">\u30fbVoice HAT\u306b\u30b5\u30fc\u30dc\u3092\u3068\u308a\u3064\u3051\u308b\u306b\u306f\u3001\u30d4\u30f3\u30d8\u30c3\u30c0\u3092\u30cf\u30f3\u30c0\u3065\u3051\u3057\u306a\u3051\u308c\u3070\u306a\u308a\u307e\u305b\u3093\u3002\uff13\u5bfe\u306e\u30d4\u30f3\u30d8\u30c3\u30c0\u3092\uff13\u3064\u3001Servo0\u3001Servo1\u3001Servo2\u306b\u30cf\u30f3\u30c0\u3065\u3051\u3057\u307e\u3059\u3002\uff13\u5bfe\u306e\u30d4\u30f3\u30d8\u30c3\u30c0\u3092\u8cb7\u3046\u306e\u306f\u96e3\u3057\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u304c\u3001\u9577\u3044\u30d4\u30f3\u30d8\u30c3\u30c0\u3092\u8cb7\u3063\u3066\u304d\u3066\u30cb\u30c3\u30d1\u30fc\u3067\u5207\u308c\u3070\u4f7f\u3048\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.04.36w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2247\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.04.36w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.04.36w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.04.36w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.04.36w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\">\u30fbVoice HAT\u306b\u30d4\u30f3\u30d8\u30c3\u30c0\u3092\u5dee\u3057\u8fbc\u3093\u3060\u72b6\u614b\u3067\u3001\u3072\u3063\u304f\u308a\u304b\u3048\u3057\u3066\u88cf\u5074\u304b\u3089\u30cf\u30f3\u30c0\u3065\u3051\u3057\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.09.45w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2248\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.09.45w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.09.45w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.09.45w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.09.45w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\">\u30fb\u30b5\u30fc\u30dc\u3092\u3068\u308a\u3064\u3051\u307e\u3059\u3002Servo0\u306bStage\u30b5\u30fc\u30dc\u3001Servo1\u306bBack\u30b5\u30fc\u30dc\u3001Servo2\u306bHead\u30b5\u30fc\u30dc\u3092\u3068\u308a\u3064\u3051\u307e\u3059\u3002\u30b1\u30fc\u30d6\u30eb\u306e\u8272\u306b\u3054\u6ce8\u610f\u304f\u3060\u3055\u3044\u3002\u30aa\u30ec\u30f3\u30b8\u304c\u4fe1\u53f7\u7dda\u3001\u8d64\u304c\u96fb\u6e90\u3001\u8336\u304cGND\u3067\u3059\u3002<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.15.48w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2249\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.15.48w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.15.48w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.15.48w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.15.48w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<p style=\"padding-left: 30px;\">\u30fbVoice HAT\u3092\u30e9\u30ba\u30d1\u30a4\u306b\u5dee\u3057\u8fbc\u307f\u3001\u30b9\u30a4\u30c3\u30c1\u3001\u30b9\u30d4\u30fc\u30ab\u30fc\u3001\u30de\u30a4\u30af\u3092\u63a5\u7d9a\u3057\u307e\u3059\u3002\u30de\u30a4\u30af\u306f\u4e21\u9762\u30c6\u30fc\u30d7\u3067\u3079\u30bc\u30ea\u30fc\u306e\u53f0\u5ea7\u306e\u524d\u9762\u30d1\u30cd\u30eb\u306b\u5185\u5074\u304b\u3089\u8cbc\u308a\u4ed8\u3051\u307e\u3059\u3002<\/p>\n<p><a href=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.22.54w800.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium wp-image-2250\" src=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.22.54w800-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.22.54w800-300x225.jpg 300w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.22.54w800-768x576.jpg 768w, http:\/\/bezelie.com\/blog\/wp-content\/uploads\/2018\/02\/2018-02-23-15.22.54w800.jpg 800w\" sizes=\"auto, (max-width: 300px) 85vw, 300px\" \/><\/a><\/p>\n<h5>\u30bd\u30d5\u30c8\u30a6\u30a7\u30a2\u306e\u6e96\u5099<\/h5>\n<p style=\"padding-left: 30px;\">\u30fbVision Kit\u306e\u516c\u5f0f\u30de\u30cb\u30e5\u30a2\u30eb\u3092\u898b\u306a\u304c\u3089\u3001\u300ccloud_speech_demo.py\u300d\u304c\u52d5\u304b\u305b\u308b\u3068\u3053\u308d\u307e\u3067\u9032\u3081\u3066\u304f\u3060\u3055\u3044\u3002\u30dc\u30bf\u30f3\u3092\u62bc\u3057\u305f\u3042\u3068\u4e88\u3081\u8a2d\u5b9a\u3057\u305f\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u558b\u308b\u3068\u3001\u30e9\u30ba\u30d1\u30a4\u304c\u8a8d\u8b58\u3059\u308b\u3068\u3044\u3046\u30c7\u30e2\u3067\u3059\u3002<\/p>\n<p style=\"padding-left: 60px;\">\u30fb<a href=\"http:\/\/mag.switch-science.com\/2017\/12\/20\/aiy-projects-kit\/\">\u30b9\u30a4\u30c3\u30c1\u30b5\u30a4\u30a8\u30f3\u30b9\u306e\u8a18\u4e8b\uff08\u65e5\u672c\u8a9e\uff09<\/a><\/p>\n<p style=\"padding-left: 30px;\">\u30fb\u4ee5\u4e0b\u306e\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3092\u4fdd\u5b58\u3057\u3001cloud_speech_demo.py\u3068\u540c\u3058\u3088\u3046\u306b\u5b9f\u884c\u3057\u3066\u307f\u3066\u304f\u3060\u3055\u3044\u3002<\/p>\n<h5>\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0<\/h5>\n<pre class=\"lang:python decode:true \">#!\/usr\/bin\/env python3\n\nimport sys\nimport aiy.audio\nimport aiy.cloudspeech\nimport aiy.voicehat\nfrom time import sleep\nfrom gpiozero import Servo\n\nadj0=-0.05\nadj1=0\nadj2=0\nmax0=(2.0+adj0)\/1000\nmin0=(1.0+adj0)\/1000\nmax1=(2.0+adj1)\/1000\nmin1=(1.0+adj1)\/1000\nmax2=(2.0+adj2)\/1000\nmin2=(1.0+adj2)\/1000\n\nservo0 = Servo(26,min_pulse_width=min0,max_pulse_width=max0)\nservo1 = Servo(6,min_pulse_width=min1,max_pulse_width=max1)\nservo2 = Servo(13,min_pulse_width=min2,max_pulse_width=max2)\n\ndef main():\n    aiy.audio.say(\"hi there\")\n    recognizer = aiy.cloudspeech.get_recognizer()\n    recognizer.expect_phrase('hello')\n    recognizer.expect_phrase('what is your name')\n    recognizer.expect_phrase('how are you')\n    recognizer.expect_phrase('good bye')\n\n    button = aiy.voicehat.get_button()\n    aiy.audio.get_recorder().start()\n\n    aiy.audio.say(\"press the button and speak\")\n    while True:\n        servo0.value=None\n        servo1.value=None\n        servo2.value=None\n        print('Press the button, and speak')\n        button.wait_for_press()\n        print('Listening...')\n        text = recognizer.recognize()\n        if text is None:\n            print('Sorry, I did not hear you.')\n            aiy.audio.say(\"hmmm\")\n        else:\n            print('You said \"', text, '\"')\n            if 'hello' in text:\n                servo2.value=-0.5\n                aiy.audio.say(\"hi guys\")\n                servo2.value=0\n                sleep(1)\n            elif 'what is your name' in text:\n                servo2.value=0.5\n                aiy.audio.say(\"I am Bezelie\")\n                servo2.value=0\n                sleep(1)\n            elif 'how are you' in text:\n                servo0.value=0.5\n                aiy.audio.say(\"not bad\")\n                servo0.value=-0.5\n                aiy.audio.say(\"thank you\")\n                servo0.value=0\n                sleep(1)\n            elif 'goodbye' in text:\n                servo2.value=-0.5\n                aiy.audio.say(\"see you soon\")\n                servo2.value=0\n                sleep(1)\n                exit (0)\n            else:\n                servo1.value=0.5\n                aiy.audio.say(\"hmmm\")\n                servo1.value=0\n                sleep(1)\n\nif __name__ == '__main__':\n    main()<\/pre>\n<h5>\u89e3\u8aac<\/h5>\n<p style=\"padding-left: 30px;\">\u30fb\uff12\uff17~\uff13\uff10\u884c\u76ee\u3067\u8a8d\u8b58\u3059\u308b\u30ad\u30fc\u30ef\u30fc\u30c9\u3092\u5b9a\u7fa9\u3057\u3066\u3044\u307e\u3059\u3002<br \/>\n\u30fb\uff14\uff19\u884c\u76ee\u4ee5\u964d\u3067\u3001\u30ad\u30fc\u30ef\u30fc\u30c9\u304c\u8a8d\u8b58\u3055\u308c\u305f\u5834\u5408\u306e\u51e6\u7406\u3092\u8a18\u8ff0\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p style=\"text-align: center;\"><iframe loading=\"lazy\" width=\"560\" height=\"314\" src=\"\/\/www.youtube.com\/embed\/e7q9CZQ-xmU\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\" data-mce-fragment=\"1\"><\/iframe><\/p>\n<p style=\"padding-left: 30px;\">\u30fbVoice Kit\u306f\u30af\u30e9\u30a6\u30c9\u578b\u306a\u306e\u3067\u3001\u3084\u306f\u308a\u53cd\u5fdc\u304c\u3061\u3087\u3063\u3068\u9045\u3044\u3067\u3059\u306d\u3002<\/p>\n<hr \/>\n<p>tips<\/p>\n<p style=\"padding-left: 30px;\">\u30fb\u65e5\u672c\u8a9e\u5bfe\u5fdc\u306e\u97f3\u58f0AI\u30a2\u30b7\u30b9\u30bf\u30f3\u30c8<a href=\"http:\/\/bezelie.com\/blog\/?page_id=2393\">\u300cGoogle Assistant\u300d\u3068\u3057\u3066\u4f7f\u3046\u65b9\u6cd5\u306f\u3053\u3061\u3089<\/a>\u3092\u3054\u89a7\u304f\u3060\u3055\u3044\u3002\u73fe\u72b6\u3067\u306f\u97f3\u697d\u30fb\u30e9\u30b8\u30aa\u306e\u518d\u751f\u3084\u3001\u30cb\u30e5\u30fc\u30b9\u8aad\u307f\u4e0a\u3052\u6a5f\u80fd\u304c\u4f7f\u3048\u306a\u3044\u3088\u3046\u306a\u306e\u3067\u3001\u3061\u3087\u3063\u3068\u6b8b\u5ff5\u3067\u3059\u306d\u3002<\/p>\n<p style=\"padding-left: 30px;\">\u30fb\u4e0a\u8a18\u30b5\u30f3\u30d7\u30eb\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u4f7f\u7528\u3057\u3066\u3044\u308bGPIOZERO\u30e2\u30b8\u30e5\u30fc\u30eb\u306f\u3001\u30b5\u30fc\u30dc\u306e\u5236\u5fa1\u4ee5\u5916\u306b\u3082\u69d8\u3005\u306a\u6a5f\u80fd\u3092\u5099\u3048\u3066\u3044\u307e\u3059\u3002\uff08<a href=\"https:\/\/media.readthedocs.org\/pdf\/gpiozero\/latest\/gpiozero.pdf\">GPIOZERO\u306e\u30c9\u30ad\u30e5\u30e1\u30f3\u30c8\uff08\u82f1\u6587\uff09\uff09<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Google AIY Projects\u306e\u7b2c\uff11\u6bb5\u300cVoice Kit\u300d\u306f\u308f\u305a\u304b\uff13\uff15\uff10\uff10\u5186\u3067\u30de\u30a4\u30af\u30a2\u30ec\u30a4\u3001\u30b9\u30d4\u30fc\u30ab\u30fc\u30fb\u30a2\u30f3\u30d7\u3001\u30b9\u30a4\u30c3\u30c1\u306a\u3069\u304c\u30bb\u30c3\u30c8\u306b\u306a\u3063\u3066\u304a\u308a\u3001\u5927\u5909\u304a\u8cb7\u3044\u5f97\u306a\u30ad\u30c3\u30c8\u3067\u3059\u3002\u30b5\u30fc\u30dc\u3082\u63a5\u7d9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u3079\u30bc &hellip; <a href=\"http:\/\/bezelie.com\/blog\/?page_id=2246\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;google voice kit\u3067\u52d5\u304b\u3057\u3066\u307f\u308b&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2246","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/2246","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2246"}],"version-history":[{"count":6,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/2246\/revisions"}],"predecessor-version":[{"id":2447,"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=\/wp\/v2\/pages\/2246\/revisions\/2447"}],"wp:attachment":[{"href":"http:\/\/bezelie.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2246"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}