![]() ![]() Optimist Prime also offers to save your location for future reference. An alternative (probably more updated and smarter with complex names) would be Google Maps Geocoding API. The Yelp Search API requires a coordinate for exact location search, so the reverse lookup from location-name to coordinate is handled by the the geocoding capability of the Geopy library. You can input either a text/voice-based location name or send your exact GPS location (with Facebook Messenger on mobile devices). To switch between IBM Watson and Google for speech recognition: Setting the environment variable as follow:įind me some fast food places in ohio city.įind me a brewery near downtown san francisco.Īfter receiving the command, Optimist Prime would ask for your location. As soon as you have got the Service Account key file (json) and exported GOOGLE_APPLICATION_CREDENTIALS environment variable to the key file's location, you're set to go. However, the whole process is well-documented by Google over here. To use Google Cloud Speech API, the process is a little bit more complicated as you'll need to export Google's credentials as a environment variable. Lastly, copy these credentials to Speech/credentials.py. To use IBM Watson's Speech-to-Text, you'll need to create a IBM Bluemix account and add the service to your account, then retrieve the API's username and password. Both are available for free at development-level use. The current implementation is based on their RESTful methods (both support real time processing with WebSocket and WebRTC, respectively). The Voice Recognition is implemented with both IBM Watson's Speech-to-Text API and Google Cloud Speech API (default to IBM Watson as Google Cloud Speech is still in Beta, and my tests showed Watson so be more accurate). ![]() For the purposes of Optimist Prime, I decided to go with Heroku instead, since it readily provides a https connections. However, if you want to use AWS, you'll need to go the extra mile of obtaining an SSL cert to have a secured webhook. ( More on Flask configurations)Īmazon Web Service: I'm a fan of AWS and have had great experience with Beanstalk. Define your own local config: create a folder called instance, and create another config.py file in it.Simsimi: Get one here (Free 7-day trial key).IBM Watson Speech-to-Text API username & password: Get one here (More details below).Yelp API key (Business/Restaurant Search feature): Get one here (More details below, as Yelp now has a stable v2 API and a developer preview v3).MongoDB database credentials (created above).It'll take you 10 minutes to get a Heroku account and set up a MongoDB database there. Create a MongoDB database (User management, Conversational Context management, Logging), a local MongoDB is fine ( Tutorial to set up a local instance).Create a Facebook App, get its Page Access Token (details at Facebook's Quick Start).Create a Facebook Page: A bare-bone Page to "assign" the Bot to will do.Install dependencies: pip install -r requirements.txt (preferably getting into your virtual environment virtualenv/ venv - read all about pip and venv here).In order to build your own bot with all features of Optimist Prime, you'll need a few set-ups: The echo bot is useful to get a quick glance of the fundamental ideas behind a Facebook Messenger Bot. For a more basic "echo bot" that responses to you whatever you say to it, use facebook-echobot.py, or head over to Facebook's own Messenger app Quick Start. ![]() Note: Optimist Prime is implemented with different APIs for features like user management, voice recognition, restaurant search, trending news search, so it takes some time to config & get it up and running. Speech-to-Text note taking (with Cloud access)ĭemo (click on Message to start chatting with it) Usage.Understanding commands with Natural Language Processing and contextual follow-up. ![]() The nitty-gritty detail of implementing voice recognition & scalability.(For a simpler "echo bot" proof-of-concept implementation of the Facebook Messenger Bot, check out this simplified project with a 10-minute tutorial) Good morning/Good evening) and entertaining responses, etc. It also save user data (with permissions, of course) such as favorite locations, can provide customized greetings (acknowledging user's time in any time zone, i.e. Optimist Prime is a Facebook Messenger Bot that supports Voice Recognition, Natural Language Processing and features such as: search nearby restaurants, search trending news, transcribe and save memos to the cloud. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |