With the development of mobile technology, many traditional electronic products have also begun to add mobile functions. For example, watches that used to be able to view time can only be used to view time. Now they can also be connected to the Internet through smartphones or home networks to display incoming call information, emails, Photos, news, weather information and other content. Major technology giants have also launched their own smartwatches, such as:
Samsung: GALAXY Gear Smartwatch Apple: iwatch
Sony: SmartWatch
Epson: Pulsense series smartwatch PS-500
The main functions of smart watches in the market are similar to those of a reduced version of a smartphone, but this cannot exert the value of smart watches at all. Putting text and images on a smaller screen greatly reduces the user's experience , so if you want to make the smartwatch more convenient and smarter, you can only enable voice control and voice analysis. So what kind of technical support is needed to develop a smartwatch that supports voice control?
In fact, it is very simple. I recommend you a platform for technical support for smart watches - Turing Robot
According to the official introduction, the platform can perform semantic parsing capabilities and natural speech processing capabilities. For example, it provides smart watch with location query, route search, weather query, setting memo and other functions. The key is that the platform opens the API interface to everyone for free. After registration, you can edit and manage your own independent Q&A knowledge base, which is also very convenient to operate.
The code copy is as follows:
/** Calling the Turing robot platform interface
*/
public static void main(String[] args) throws IOException {
String APIKEY = "Developer registers an account and can be obtained after activation";
String INFO = URLEncoder.encode("Beijing Today's Weather", "utf-8");
String getURL = "http://www.tuling123.com/openapi/api?key=" + APIKEY + "&info=" + INFO;
URL getUrl = new URL(getURL);
HttpURLConnection connection = (HttpURLConnection) getUrl.openConnection();
connection.connect();
// Get the input stream and read it using Reader
BufferedReader reader = new BufferedReader(new InputStreamReader(connection.getInputStream(), "utf-8"));
StringBuffer sb = new StringBuffer();
String line = "";
while ((line = reader.readLine()) != null) {
sb.append(line);
}
reader.close();
// Disconnect
connection.disconnect();
System.out.println(sb);
}
The above is all the content of this article. I hope you like it and it will be helpful for you to learn Java development.