I'm creating a voice input only ES5 application using a free speech to text service. The service will send user's speech transcript in their native language to my application.
How can i localize keywords in my application so that the user can use those keywords in their native language. I'm aware of the UI based localization where strings that are visible to user are localized but the underlying value for those ui elements have english values. But obviously this does not work for voice transcript where values are in user's native language.
Is there a way to achieve this without using a paid dynamic translation service?
Related
I am trying to understand how a jump between skills should be handled in Botium Box. I am testing the dialogues of my Watson Assistant skills and I am noticing something weird.
Differently from the jumps within one skill, where each row of my input test file (in my case excel file) contains the text of a different node, when I do a jump between skills, it seems like the text of the nodes is concatenated, and therefore to make the test case passing I should write all the text in one row of my excel file (very difficult to maintain)
If that is the case, how do I concatenate normal text and utterances variables? Is there a command for that? Or am I missing something in the configuration of my botium box?
While I don't know where the described behaviour is coming from, here are some comments:
Usually, one Watson Assistant is linked to one Dialog skill (and, for Plus plans, optionally a search skill). Botium can either connect to
an assistant by using the Watson Assistant V2 SDK
or a skill by using the Watson Assistant V1 SDK with the Skill legacy mode
If you plan to use multiple skills in your chatbot, then you have to develop some code to switch between the assistants - this is called an Orchestrator in IBM terms, and you can find example code by IBM here.
In this case, the best option you have in Botium is to use the Generic HTTP/JSON Connector to connect to the API of the Orchestrator, instead of going directly to Watson APIs.
I wrote about a similar topic - how to choose a Botium connector - in my blog.
Florian, thanks for your reply. It is clear to me the concept of the orchestrator and I am actually using it as well as the HTTP/JSON Connector.
My question is more about how to write test cases in excel files that include both normal text and Utterances variables. For example, if I have in the utterances files:
utterance file
Can I have in my test case something like:
test case with text and utterance variable
If that is the case, what is the key word needed to concatenate the text ("hello") and the utterance variable (GREETING)?
Google Clouds Text-To-Speech API has a WaveNet model whose output in my opinion sounds way better than the standard speech. This model can be used in Dialogflow agents (Settings > Speech > Text To Speech), which results in the generated speech being included in the DetectIntentResponse. However, I can find no way to use this speech with the Actions-On-Google integration, i.e. in an actual Google Assistant app. Have I overlooked this, or is this really not possible, and if so, does anyone know when they plan to enable this?
In the Actions console, going to the Invocation page lets you select a TTS voice.
All of the voices can be demoed on the Languages & Locales page of the docs, and the vast majority of them use WaveNet voices.
I have built multiple actions on Google Assistant using the JSON request and response V2 but I have heard that using Actions SDK for building actions specifically for Google Assistant should be preferred. I am confused whether to use Actions SDK or JSON request response?
For example - On this link, for every sample code there are two tabs, Node.js using Actions SDK and JSON using the JSON request response.
Which one should be preferred and in which scenarios?
Thanks!
Let's first look at what those tabs mean, and then discuss what your best approach should be.
node.js vs JSON tabs
The "node.js" tab shows what the code looks like using the actions-on-google library. For the most part, this library uses the same code if you're using either the Action SDK or using Dialogflow to implement. Where there are differences, the documentation does note how you have to handle them - this is particularly true when it comes to how you have to handle responses.
The "JSON" tab shows what the JSON would look like if you are not using the actions-on-google library and need to send JSON yourself. You might do this because you're using a language besides node.js, or you just want to know what the underlying protocol looks like.
The catch is that the JSON illustrated here is what would be used by the Action on Google JSON protocol. If you're using Dialogflow, then this JSON would be wrapped inside the payload.google field and there are a couple of other differences documented. So when generating JSON for a Dialogflow response, you should use this as a guide, but need to be aware of how it might differ.
What should you use?
What you use depends on what your needs are and what your goals are for developing.
If you are trying to develop something you intend to release, or might do so someday, and you are new to voice or bot interfaces, then you'll probably want to use Dialogflow - no matter what other choices you may make.
If you have your own Natural Language Processing (NLP) system, then you will want to use the Action SDK instead of Dialogflow. How you handle it (using the actions-on-google library or using JSON) will depend on how you need to integrate with that NLP.
If you're familiar with node.js, or want to learn it, then using the actions-on-google library is a good choice and that first tab will help you. (There are other choices. Dialogflow also has a dialogflow-fulfillment library, which is good if you want to be able to support the bot platforms it supports as well. The multivocal library has a more configuration-driven template approach to building a conversational backend that was designed to work with the Assistant and Dialogflow. Both of these illustrate how to do the same things that Google's documentation does.)
If you would rather use another language, you'll need to reference the JSON documentation because there are few complete libraries for these platforms. Your best bet would be to use Dialogflow with JSON. Dialogflow has some example JSON for how to apply the Google documentation you cite to their fulfillment protocol.
Summary
You should probably use Dialogflow.
If you can, use actions-on-google or another library.
If you have a need to use another language or want to use the JSON, be aware of the possible differences.
I created a web application using JSF framework. My application needs some text areas for convert the content into regional language. How it is possible to done by using google input?. or is there is any other scenario for typing with regional language?
Use unicode.js which is a small and easy to use javascript library to enable native input support in textfields. It uses Google Transliteration API combined with some javascript to enable unicode support in text input fields and textareas or anything where user can type in.
i want a java library, to search a text on Google and returns some pages based on text and semantic similarity. is there any API doing this job?
i wrote a crawler myself and search to specific depth from a root page, but i dont know how to input a text as a search query for Google.
Google provides the Custom Search API which you can use to search Google from code.
You'll need to create a google account if you don't already have one, create a custom search engine, generate an API key, and then use that as part of your request. You can get the results as JSON or as an Atom XML.
The documentation for this is available at https://developers.google.com/custom-search/v1/overview
There's no java library, as such, so to actually call the API, you'll need to either use java.net.URL and java.net.URLConnection, or a REST client library like the one that jersey ships with.