{"id":17590,"date":"2016-11-08T12:56:53","date_gmt":"2016-11-08T09:56:53","guid":{"rendered":"http:\/\/www.altoros.com\/blog\/?p=17590"},"modified":"2018-02-15T21:20:03","modified_gmt":"2018-02-15T18:20:03","slug":"smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi","status":"publish","type":"post","link":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/","title":{"rendered":"Smart Halloween: A Talking Pumpkin Created with IBM Watson and Raspberry PI"},"content":{"rendered":"<p>In this article, we describe how to assemble such a smart pumpkin and what issues you may face while having fun with a similar IoT project.<\/p>\n<p>&nbsp;<\/p>\n<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_79_2 counter-hierarchy ez-toc-counter ez-toc-transparent ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#Whats_in_the_pumpkin_brain\" >What\u2019s in the pumpkin brain?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#Data_workflow\" >Data workflow<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#Assembling_the_hardware\" >Assembling the hardware<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#Configuring_Raspberry_PI\" >Configuring Raspberry PI<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#Installation_instructions\" >Installation instructions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#Conclusions\" >Conclusions<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-3'><a class=\"ez-toc-link ez-toc-heading-7\" href=\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#Related_reading\" >Related reading<\/a><\/li><\/ul><\/nav><\/div>\n<h3><span class=\"ez-toc-section\" id=\"Whats_in_the_pumpkin_brain\"><\/span>What\u2019s in the pumpkin brain?<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>To make the pumpkin smarter, we used a Raspberry PI device (as a host) and a Logitech C270 webcam (as a microphone), as well as Node.js and text\/speech recognition services from IBM and Google.<\/p>\n<p><center><iframe loading=\"lazy\" width=\"640\" height=\"360\" src=\"https:\/\/www.youtube.com\/embed\/ZboFsQ1AyXw\" frameborder=\"0\" allowfullscreen><\/iframe><\/center><\/p>\n<p><strong>Speech to Text (STT)<\/strong>. For recognizing the English language, we tested IBM Watson\u2019s <a href=\"https:\/\/www.ibm.com\/watson\" target=\"_blank\">Speech to Text<\/a>. Even though the service failed to identify \u201cHello,\u201d it was pretty good at converting other words.<\/p>\n<p>While Speech to Text supports only eight languages, <a href=\"https:\/\/wit.ai\" target=\"_blank\">wit.ai<\/a> works with 50 languages. (We used Wit.ai for the Russian language.)<\/p>\n<p><strong>Chatbot<\/strong>. For generating answers, we chose the <a href=\"https:\/\/www.cleverbot.com\/\" target=\"_blank\">cleverbot.com<\/a> service that understands 39 languages. (Do not confuse it with <a href=\"https:\/\/cleverbot.io\/\" target=\"_blank\">cleverbot.io<\/a>.) You can play with the service in the browser and use voice, but its API supports only text messages. It looks like the service had been trained on teenager chats, so we sometimes got funny answers when we included slang in communication.<\/p>\n<p>If your goal is not just fun, you should consider creating your own chatbot and training it. The services like <a href=\"http:\/\/www.cleverscript.com\/about\/\" target=\"_blank\">cleverscript.com<\/a>, Wit.ai, and IBM Watson\u2019s <a href=\"https:\/\/conversation-demo.mybluemix.net\/\" target=\"_blank\">Conversation<\/a> enable you to do that. Read <a href=\"https:\/\/www.altoros.com\/blog\/automating-customer-interactions-with-ibm-watson-conversation-and-bluemix\/\">our article<\/a> about developing a five-minute \u201cHello, World\u201d chatbot with IBM Watson and Bluemix.<\/p>\n<p><strong>Text to Speech (TTS)<\/strong>. IBM Watson\u2019s <a href=\"https:\/\/www.ibm.com\/watson\/developercloud\/text-to-speech.html\" target=\"_blank\">Text to Speech<\/a> supports nine languages, and detects the language automatically. In addition, you can control voice expressiveness and customize the English voice using seven types of <a href=\"https:\/\/www.ibm.com\/watson\/#transformation\" target=\"_blank\">transformations<\/a>. However, these features are not available for other languages. The service returns files in <i>.ogg<\/i>, <i>.flac<\/i>, <i>.wav<\/i>, and <a href=\"https:\/\/www.ibm.com\/watson\/#format\" target=\"_blank\">several other formats<\/a>.<\/p>\n<p><p>Google\u2019s <a href=\"https:\/\/github.com\/zlargon\/google-tts\" target=\"_blank\">Text-to-Speech<\/a> supports 30 languages, but it sounds more robotic. You specify the language; it is possible to adjust the speed of speech. The service output is in the <i>.mp3<\/i> format.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Data_workflow\"><\/span>Data workflow<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>This project flow is completely asynchronous.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-architecture-v1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-architecture-v1.png\" alt=\"a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-architecture-v1\" width=\"640\" height=\"364\" class=\"aligncenter size-full wp-image-17598\" \/><\/a><\/p>\n<p>Depending on the API, you could get more than one response from STT, and <a href=\"http:\/\/sox.sourceforge.net\/\" target=\"_blank\">SoX<\/a> will try to play them simultaneously. It allows the chatbot to start talking with itself. Although it might sound funny, we wanted to prevent this and just skipped the responses that came while we were playing the first response. Creating a queue of responses is also an option.<\/p>\n<p>If you use Wi-Fi, you may experience some lags when working with audio formats that are not compressed. We selected the <i>.flac<\/i> output in IBM Watson, and Google uses <i>.mp3<\/i> by default.<\/p>\n<p>To save traffic and money, it also makes sense to either implement offline recognition for the wake-up word via <a href=\"https:\/\/github.com\/cmusphinx\/pocketsphinx\" target=\"_blank\">PocketSphinx<\/a> and then apply the online services of your choice to convert the rest of the speech or add a push-to-talk button.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Assembling_the_hardware\"><\/span>Assembling the hardware<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>We summarized the steps you need to follow when making your own smart pumpkin. Before you start, ensure that you have these supplies:<\/p>\n<ul>\n<li>a Raspberry PI device<\/li>\n<li>an SD card<\/li>\n<li>a USB microphone<\/li>\n<li>an external speaker<\/li>\n<li>Ethernet and power supply cables<\/li>\n<\/ul>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v1.png\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v1.png\" alt=\"a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v1\" width=\"640\" height=\"364\" class=\"aligncenter size-full wp-image-17599\" \/><\/a><\/p>\n<p>To prepare the hardware:<\/p>\n<ol>\n<li>Flash the SD card using <a href=\"https:\/\/www.raspberrypi.org\/downloads\/raspbian\/\" target=\"_blank\">Raspbian<\/a> and<a href=\"https:\/\/www.balena.io\/etcher\/\" target=\"_blank\"> Etcher<\/a>.<\/li>\n<li>Insert the SD card into your Raspberry PI.<\/li>\n<li>Connect the following components:\n<ul>\n<li style=\"margin-top: 10px;\">The USB microphone to the first USB port of the Raspberry PI device.<\/li>\n<li>The external speaker to the AUX port.<\/li>\n<li>The Ethernet cable to the Ethernet port. Your network must have a DHCP server.<\/li>\n<li>The power supply cable to the micro-USB port.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Configuring_Raspberry_PI\"><\/span>Configuring Raspberry PI<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>After you connect the hardware, configure the Raspberry PI device:<\/p>\n<ol>\n<li style=\"margin-bottom: 10px;\">\n<p>Find the device with the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">raspberrypi<\/code> hostname in your network:<\/p>\n<pre><code>arp -a | grep raspberrypi<\/code><\/pre>\n<\/li>\n<li style=\"margin-bottom: 10px;\">\n<p>SSH to the Raspberry PI using the default password\u2014<code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">raspberry<\/code>:<\/p>\n<pre><code>ssh pi@<em>ip_from_previous_step<\/em><\/code><\/pre>\n<\/li>\n<li style=\"margin-bottom: 10px;\">\n<p>(Optional) Enable VNC and change the password:<\/p>\n<pre><code>sudo raspi-config<\/code><\/pre>\n<p>To have VNC started on boot, add the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">nano ~\/.config\/autostart\/tightvnc.desktop<\/code> file with the following content:<\/p>\n<pre><code>[Desktop Entry]\nType=Application\nName=TightVNC\nExec=vncserver :1\nStartupNotify=false<\/code><\/pre>\n<\/li>\n<li style=\"margin-bottom: 10px;\">\n<p>(Optional) To get rid of the Ethernet cable, connect to your Wi-Fi.<\/p>\n<p>By default, channels 12 and 13 are not enabled, and PEAP-MS-CHAP v2 authentication is not supported. You might also want to use a power bank instead of the power supply cable.<\/p>\n<\/li>\n<li style=\"margin-bottom: 10px;\">\n<p>To set the USB microphone as the default input device, create the <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">nano ~\/.asoundrc<\/code> file with the following content:<\/p>\n<pre><code>pcm.!default {\n\ttype asym\n\tplayback.pcm {\n\t\ttype plug\n\t\tslave.pcm \"hw:0,0\"\n\t}\n\tcapture.pcm {\n\t\ttype plug\n\t\tslave.pcm \"hw:1,0\"\n\t}\n}<\/code><\/pre>\n<p>Here, <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">1<\/code> is the number of the Raspberry PI USB port.<\/p>\n<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Installation_instructions\"><\/span>Installation instructions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p><strong>Dependencies<\/strong><\/p>\n<p>To install the dependencies\u2014Node.js, SoX, and <a href=\"https:\/\/github.com\/foreversd\/forever\" target=\"_blank\">Forever<\/a>\u2014run the following commands:<\/p>\n<pre><code>curl -sL https:\/\/deb.nodesource.com\/setup_6.x -o nodesource_setup.sh\nsudo bash nodesource_setup.sh\nsudo apt-get update\nsudo apt-get upgrade\nsudo apt-get install sox libsox-fmt-all nodejs build-essential\nsudo npm install forever -g<\/code><\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Running the application<\/strong><\/p>\n<p>We created an application that uses the mentioned web services to recognize voice,  generate textual answers, and convert them to speech. Here are the instructions for running the app:<\/p>\n<ol>\n<li>\n<p>Clone the repository and change your current directory:<\/p>\n<pre><code>git clone https:\/\/github.com\/melnikaite\/pumpkin.git\ncd pumpkin<\/code><\/pre>\n<\/li>\n<li>\n<p>Create a Wit.ai application or IBM Watson services and export them using the corresponding command below:<\/p>\n<pre><code>export STT=WIT STT_TOKEN=XXX STT_DELAY=3000 TTS=GOOGLE TTS_LANG=ru<\/code><\/pre>\n<p>or<\/p>\n<pre><code>export STT=WATSON STT_USERNAME=XXX STT_PASSWORD=XXX TTS=WATSON TTS_USERNAME=XXX TTS_PASSWORD=XXX<\/code><\/pre>\n<\/li>\n<li>\n<p>Start your application:<\/p>\n<pre><code>forever start index.js<\/code><\/pre>\n<\/li>\n<\/ol>\n<p>To stop the application, run this command:<\/p>\n<pre><code>forever stop index.js<\/code><\/pre>\n<p>At this point, you can back up the SD card. First, shut down your Raspberry PI via <code style=\"color: #222222; background-color: #e6e6e6; padding: 1px 2px;\">sudo shutdown<\/code> or VNC. Then, insert the SD card into your card reader and follow <a href=\"https:\/\/thepihut.com\/blogs\/raspberry-pi-tutorials\/17789160-backing-up-and-restoring-your-raspberry-pis-sd-card\" target=\"_blank\">these<\/a> instructions.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Conclusions\"><\/span>Conclusions<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<p>Initially, we tried to use <a href=\"http:\/\/jasperproject.github.io\/\" target=\"_blank\">Jasper<\/a>, an open-source project that allows you to create your own <a href=\"https:\/\/en.wikipedia.org\/wiki\/Siri\" target=\"_blank\">Siri<\/a> offline or using service providers of your choice. It is possible to work with existing modules, which perform actions depending on your request, or make your own.<\/p>\n<p><p>We spent one day compiling dependencies, but the platform failed to recognize even a wake-up word. Most of the libraries are obsolete, and it is hard to use them for languages other than English. So, we decided to proceed with external services.<\/p>\n<p><p>However, in my opinion, using AI for a chatbot today can be beneficial only if it is trained for a specific case. Otherwise, it is just fun.<\/p>\n<p><p>IBM Watson\u2019s Text to Speech service is good enough to be used, but you still may notice that the voice is synthetic. The Speech to Text service did not perform very well, especially offline, and made a lot of mistakes. It is also quite expensive for full-time usage. If you need only English support, check out <a href=\"https:\/\/www.netguru.com\/blog\/voice-recognition-tools-review\" target=\"_blank\">this comparison<\/a> of voice recognition tools.<\/p>\n<p><a href=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/talking-pumpkin-raspberry-pi-ibm-watson.png\"><img decoding=\"async\" src=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/talking-pumpkin-raspberry-pi-ibm-watson.png\" alt=\"talking-pumpkin-raspberry-pi-ibm-watson\" width=\"640\" class=\"aligncenter size-full wp-image-17618\" \/><\/a><\/p>\n<p>Some services provide support for a huge number of languages, but quantity does not equal to quality. For pet projects, consider free Wit.ai as a means of converting speech to text and Google Text-to-Speech as a tool for the opposite task. For business cases, IBM Watson seems to be a more reasonable choice.<\/p>\n<p>&nbsp;<\/p>\n<h3><span class=\"ez-toc-section\" id=\"Related_reading\"><\/span>Related reading<span class=\"ez-toc-section-end\"><\/span><\/h3>\n<ul>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/automating-customer-interactions-with-ibm-watson-conversation-and-bluemix\/\">Automating Customer Interactions with IBM Watson Conversation and Bluemix<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/analyzing-customer-feedback-emotions-with-ibm-watson-and-bluemix-openwhisk\/\">Analyzing Customer Feedback Emotions with IBM Watson and Bluemix OpenWhisk<\/a><\/li>\n<li><a href=\"https:\/\/www.altoros.com\/blog\/using-the-dialog-service-in-ibm-watson-the-fox-goose-and-bag-of-beans-chatbot\/\">Using the Dialog Service in IBM Watson\u2014the Fox, Goose, and Bag of Beans Chatbot<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we describe how to assemble such a smart pumpkin and what issues you may face while having fun with a similar IoT project.<\/p>\n<p>&nbsp;<\/p>\n<p>What\u2019s in the pumpkin brain?<\/p>\n<p>To make the pumpkin smarter, we used a Raspberry PI device (as a host) and a Logitech C270 webcam (as a [&#8230;]<\/p>\n","protected":false},"author":62,"featured_media":17591,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":"","_links_to":"","_links_to_target":""},"categories":[214],"tags":[873,187,810,117,748],"class_list":["post-17590","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials","tag-cloud-native","tag-ibm-bluemix","tag-ibm-watson","tag-iot","tag-machine-learning"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Smart Halloween: A Talking Pumpkin Created with IBM Watson and Raspberry PI | Altoros<\/title>\n<meta name=\"description\" content=\"At Altoros, we enjoy celebrating Halloween. This year, our IoT team carved a talking pumpkin with a bit of artificial intelligence in its head.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Smart Halloween: A Talking Pumpkin Created with IBM Watson and Raspberry PI | Altoros\" \/>\n<meta property=\"og:description\" content=\"In this article, we describe how to assemble such a smart pumpkin and what issues you may face while having fun with a similar IoT project. &nbsp; What\u2019s in the pumpkin brain? To make the pumpkin smarter, we used a Raspberry PI device (as a host) and a Logitech C270 webcam (as a [...]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/\" \/>\n<meta property=\"og:site_name\" content=\"Altoros\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-08T09:56:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-15T18:20:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v11.gif\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"360\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/gif\" \/>\n<meta name=\"author\" content=\"Eugene Melnikov\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Eugene Melnikov\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/\",\"name\":\"Smart Halloween: A Talking Pumpkin Created with IBM Watson and Raspberry PI | Altoros\",\"isPartOf\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v11.gif\",\"datePublished\":\"2016-11-08T09:56:53+00:00\",\"dateModified\":\"2018-02-15T18:20:03+00:00\",\"author\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/2347aafc28e3658aea99b1b6671f7b70\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#primaryimage\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v11.gif\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v11.gif\",\"width\":640,\"height\":360},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.altoros.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Smart Halloween: A Talking Pumpkin Created with IBM Watson and Raspberry PI\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#website\",\"url\":\"https:\/\/www.altoros.com\/blog\/\",\"name\":\"Altoros\",\"description\":\"Insight\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.altoros.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/2347aafc28e3658aea99b1b6671f7b70\",\"name\":\"Eugene Melnikov\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2020\/03\/melnikov-96x96.jpg\",\"contentUrl\":\"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2020\/03\/melnikov-96x96.jpg\",\"caption\":\"Eugene Melnikov\"},\"description\":\"Eugene Melnikov is a senior software engineer at Altoros. He mainly specializes in Ruby and Ruby-based frameworks, as well as in JavaScript development, including Node.js, jQuery, and AngularJS. Working at Altoros, Eugene has also designed and implemented a variety of SQL and NoSQL database solutions. He recently became engaged in creating data-driven software for IoT applications. Check out Eugene's GitHub profile.\",\"url\":\"https:\/\/www.altoros.com\/blog\/author\/eugene-melnikov\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Smart Halloween: A Talking Pumpkin Created with IBM Watson and Raspberry PI | Altoros","description":"At Altoros, we enjoy celebrating Halloween. This year, our IoT team carved a talking pumpkin with a bit of artificial intelligence in its head.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/","og_locale":"en_US","og_type":"article","og_title":"Smart Halloween: A Talking Pumpkin Created with IBM Watson and Raspberry PI | Altoros","og_description":"In this article, we describe how to assemble such a smart pumpkin and what issues you may face while having fun with a similar IoT project. &nbsp; What\u2019s in the pumpkin brain? To make the pumpkin smarter, we used a Raspberry PI device (as a host) and a Logitech C270 webcam (as a [...]","og_url":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/","og_site_name":"Altoros","article_published_time":"2016-11-08T09:56:53+00:00","article_modified_time":"2018-02-15T18:20:03+00:00","og_image":[{"width":640,"height":360,"url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v11.gif","type":"image\/gif"}],"author":"Eugene Melnikov","twitter_misc":{"Written by":"Eugene Melnikov","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/","url":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/","name":"Smart Halloween: A Talking Pumpkin Created with IBM Watson and Raspberry PI | Altoros","isPartOf":{"@id":"https:\/\/www.altoros.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#primaryimage"},"image":{"@id":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#primaryimage"},"thumbnailUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v11.gif","datePublished":"2016-11-08T09:56:53+00:00","dateModified":"2018-02-15T18:20:03+00:00","author":{"@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/2347aafc28e3658aea99b1b6671f7b70"},"breadcrumb":{"@id":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#primaryimage","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v11.gif","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2016\/11\/a-smart-pumpkin-chatbot-with-ibm-watson-and-raspberry-pi-v11.gif","width":640,"height":360},{"@type":"BreadcrumbList","@id":"https:\/\/www.altoros.com\/blog\/smart-halloween-a-talking-pumpkin-created-with-ibm-watson-and-raspberry-pi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.altoros.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Smart Halloween: A Talking Pumpkin Created with IBM Watson and Raspberry PI"}]},{"@type":"WebSite","@id":"https:\/\/www.altoros.com\/blog\/#website","url":"https:\/\/www.altoros.com\/blog\/","name":"Altoros","description":"Insight","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.altoros.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/2347aafc28e3658aea99b1b6671f7b70","name":"Eugene Melnikov","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.altoros.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2020\/03\/melnikov-96x96.jpg","contentUrl":"https:\/\/www.altoros.com\/blog\/wp-content\/uploads\/2020\/03\/melnikov-96x96.jpg","caption":"Eugene Melnikov"},"description":"Eugene Melnikov is a senior software engineer at Altoros. He mainly specializes in Ruby and Ruby-based frameworks, as well as in JavaScript development, including Node.js, jQuery, and AngularJS. Working at Altoros, Eugene has also designed and implemented a variety of SQL and NoSQL database solutions. He recently became engaged in creating data-driven software for IoT applications. Check out Eugene's GitHub profile.","url":"https:\/\/www.altoros.com\/blog\/author\/eugene-melnikov\/"}]}},"_links":{"self":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/17590","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/users\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/comments?post=17590"}],"version-history":[{"count":27,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/17590\/revisions"}],"predecessor-version":[{"id":17640,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/posts\/17590\/revisions\/17640"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media\/17591"}],"wp:attachment":[{"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/media?parent=17590"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/categories?post=17590"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.altoros.com\/blog\/wp-json\/wp\/v2\/tags?post=17590"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}