Houndify

Houndify (www.houndify.com) is a tool that enables adding voice interaction to devices. Their free account enables performing 44 different types of actions. Sign up for an account on their website and activate it (via your e-mail).

  1. Once your account is activated, go to your account dashboard to create a new client:
On creating a new account, a new client is automatically created. This client may not work properly. Delete it and create a new client from the dashboard.


Create new client
  1. Give a name to your application and select the platform to be Home Automation.
Name the application and select the platform
  1. The next step is selecting domains, that is, the nature of applications the assistant must support. Select Weather, Stock Market, Dictionary, and so on.
Enable domains
  1. Click on Save & Continue. Once you have created your new client, click on it (from the dashboard) to retrieve the following credentials: Client ID and Client Key.
Copy the Client id and the Client Key from the dashboard
  1. We also need to download the SDK for Python 3.x (latest version available at https://docs.houndify.com/sdks#python):
       wget 
https://static.houndify.com/sdks/python
/0.5.0/houndify_python3_sdk_0.5.0.tar.gz
  1. Extract the package as follows:
       tar -xvzf houndify_python3_sdk_0.5.0.tar.gzrm 
houndify_python3_sdk_0.5.0.tar.gz
  1. The SDK comes with plenty of examples to get started. Let's consider a scenario where you would like to find out the weather at your current location by interacting with the voice assistant:
  1. Get your current GPS coordinates from a tool such as Google Maps. For example, the GPS coordinates for a specific intersection in San Francisco, California is 37.778724, -122.414778. Let's try to find the weather at this specific location.
  1. Open the sample_wave.py file and modify line 39 of the file:
              client.setLocation(37.778724, -37.778724)
  1. Save the file and from the command-line terminal, change directories to the Houndify SDK folder:
              cd houndify_python3_sdk_0.5.0/ 
./sample_wave.py <client_id> <client_key>
test_audio/whatistheweatherthere_nb.wav
  1. After processing the request, it should print a detailed response:
              src="//static.midomi.com/corpus/H_Zk82fGHFX/build/js/
templates.min.js"></script>'}}, 'TemplateName':
'VerticalTemplateList', 'AutoListen': False,
'WeatherCommandKind': 'ShowWeatherCurrentConditions',
'SpokenResponseLong': 'The weather is 45 degrees and
mostly clear in San Francisco.',

We verified the function and setup of the Houndify SDK by testing the example. We uploaded an audio file to the Houndify server requesting the current weather information (play the audio file and find out). The sample_wave.py script takes the client_id, client_key, and the audio file as inputs. It prints out the output from the Houndify server.

You need to enable specific domains to retrieve specific information. For example, we enabled the weather domain to retrieve the weather information. It is also possible to add custom commands to the program.

In the next section, we will modify sample_wave.py to build our application.