How to turn off the profanity filter for the voice to text service - ibm-watson

I'm simply trying to turn off the profanity filter for the voice to text service. I'm using a phone number to call into the service and need to keep profanity filter turned off.

As per the API docs - https://cloud.ibm.com/apidocs/speech-to-text#recognize-audio
set profanity_filter to false. How you do it will depend on your coding language. The API docs show how for each value.

Related

Query Gmail by internalDate in API?

I am attempting to use the Gmail API to download all the messages inside of an account. I would like to be able to allow this process to pick up where it left off in the event that it stops or has to be run again in order to find newer messages.
At first glance it looks like what I need to do is keep track of the internalDate on the messages that I am retrieving and then use that in the q variable when I call the users.messages.list endpoint. However, I am having trouble finding a way to use that when I query the API.
Does anyone know of a way to query Gmail for all messages that have an internalDate greater or less than a specific value? Or is there a better way to download all messages inside of a Gmail account?

Google Calendar API get events in a specific language

I'm trying to get the brazilian holidays using Google Calendar through this URL:
https://www.googleapis.com/calendar/v3/calendars/en.brazilian%23holiday%40group.v.calendar.google.com/events?key=MyKey&timeMin=2017-01-01T09:11:13.562Z&timeMax=2017-12-31T09:11:13.562Z
This works fine, but I'm getting the holidays in English language, and I need to get it in Portuguese. There is some parameter which I can use to get JSON in another language? Or that is not possible?
You may want to add locale in your Events: list request while setting with an allowed value given in Google Calendar API - Settings. Note that locale refers to user's locale. So, if you do wish to get list of events in Portuguese, add locale with value pt_BR or pt_PT. If your HTTP request is done successfully, this will return events on the specified calendar.
For the complete list of the supported languages and their corresponding code, see Language Support documentation.

Maintaining the state of conversation in Facebook Messenger

I am building a facebook messenger bot which needs to take multiple inputs from the user. One way of storing all the inputs is to store them in database. However, I found a field "metadata" in the Send API request. The description of this field is also very promising - "Custom string that will be re-delivered to webhook listeners". However, when I fill this field with user inputs, I don't get them back with the next call.I used the sample app provided by Facebook to do this test.
Has anyone found a use for metadata property? Is it working?

Getting history events for just new messages?

I'd like to monitor a users gmail account for new messages and take an appropriate action. Is there a way to fetch the history events for just new messages but NOT for things like starring an email or changing its labels, etc.?
So I ended up using messages.list and storing the timestamp of the most recent message. Then on subsequent calls to messages.list I'd supply a query of "after:theMostRecentTimestampIKnowOf" to find new messages since the last time we synced.
Another route I've seen done, is if you have the ability to add a filter (e.g. user's can do that, or use the Google Admin SDK for Google Apps users, or do it through HTML/DOM hacking) then you can simply setup a filter to apply a label to all new messages. Then just messages.list(labelId=THAT_LABEL) when you do your polling (and remove it after you process them).
There is not any ability now to filter history based on change type, though it's something that would be nice to provide at some point.

Is it better to process auto-complete/suggestions on the client or server?

I am building a web app that will use an auto-complete/suggestions for the end user as they type their information in. This will be specifically for entering Country, Province, City information.
Do a wild card search on the database on each keystroke:
SELECT CityName
FROM City
WHERE CityName LIKE '%#CityName%'
Return a list of all Cities to a given Province to the client and have the client do the matching:
SELECT CityName
FROM City
WHERE ProvinceID = #ProvinceID
These would be returned to the client as a JSON string via an ajax call to a web service. My thoughts are that javascript would be able to handle the list of 100+ entries via JSON faster than the database would be able to do a wildcard search, but I'd like the communities input.
In the past, I have used both techniques. If you are talking about 100 or so entries, and assuming each entry is very small, it will likely be faster to do the autocomplete filter on the client side. That will provide you with better response time (although probably negligible) and will reduce the load on your server.
Google actually does a live search while the user is typing, and it seems to be pretty responsive from the user's point of view. This is an example where the query must be executed server-side because the dataset is far too large to transfer to the client.
One thing you might do is wait until the user types two keystrokes before fetching the list from the server, thus narrowing down the results initially. Of course, that adds complexity - you would then need to refresh the list if the user changes either of the first two keystrokes.
We have implemented same functionality using ajax auto complete control we wait the user type three keystroke before fetching the list from server we have not done any coding at client side we just assigned web services method which return list to ajax control and its start working
In the end user's interest, it is always better to handle this client-side.
The Telerik Autocomplete controller allows for both ways.
Of course under load client-side autocomplete is likely to make the application crawl.

Resources