This was originally published on the Clarify blog on 18 September 2015.
In the US alone, there are over 50 million who speak Spanish as their first or second language. Unfortunately, when companies create training videos or record internal meetings, they only plan for English. While that works for internal scenarios where they have control, the second any of those 50 million people get involved, things get a little more complicated. That can include sales or support calls, user generated content, or even day to day operations.
Previously, the only way to identify languages in a call was to have someone listen and tag it accordingly.
Or worse, they just guess and hope for the best.
As a result, most organizations can only reliably analyze 1% of their calls. 99% of the data is simply lost and can’t be used to make processes better, influence customer satisfaction, or improve sales.
Using our new Multi-Language Support [Clarify multi-language docs], it’s trivially easy to detect, index, and search in Spanish and French as easily as English. In fact, the difference in supporting additional languages is a single configuration option which our API can provide to you.
How do I use Automatic Language Detection?
Just as before, you load your files with a single command:
curl --data "media_url=http://media.clarify.io.s3.amazonaws.com/video/speeches/je-vous-ai-compris-1958-06-04.mp4" \
--data "name=Je Vous ai Compris" https://api.clarify.io/v1/bundles \
--X POST --header "Authorization: Bearer myapikey" | jq '.'
# The jq portion is optional and just used to pretty print the resulting json
You’ll immediately receive a bundle id used in all of the following steps. In a few moments, you can use the bundle id to request the available insights:
curl https://api.clarify.io/v1/bundles/abcde12345/insights \
--header "Authorization: Bearer myapikey" | jq '.'
# The jq portion is optional and just used to pretty print the resulting json
which gives you a list of insights available:
{
"bundle_id": "abcde12345",
"created": "2015-03-04T05:03:04.292Z",
"updated": "2015-05-16T20:39:37.508Z",
"_class": "Insights",
"_links": {
"curies": [
{
"href": "/docs/insights/{rel}",
"name": "insight",
"templated": true
}
],
"insight:spoken_keywords": {
"href": "/v1/bundles/abcde12345/insights/54321edcba"
},
"insight:classification": {
"href": "/v1/bundles/abcde12345/insights/edcba56789"
},
"parent": {
"href": "/v1/bundles/abcde12345"
},
"self": {
"href": "/v1/bundles/abcde12345/insights"
}
}
}
Retrieve the insight:classification key and use that in the next request to get the results:
curl https://api.clarify.io/v1/bundles/abcde12345/insights/edcba56789 \
--header "Authorization: Bearer myapikey" | jq '.'
# The jq portion is optional and just used to pretty print the resulting json
And the results are available in the track_data field shown here:
{
"_class": "ClassificationInsight",
"bundle_id": "abcde12345",
"created": "2015-09-17T18:48:48.058Z",
"id": "edcba56789",
"name": "classification",
"status": "ready",
"updated": "2015-09-17T18:48:48.061Z",
"_links": {
"clarify:bundle": {
"href": "/v1/bundles/abcde12345"
},
"curies": [
{
"href": "/docs/rels/{rel}",
"name": "clarify",
"templated": true
}
],
"parent": {
"href": "/v1/bundles/abcde12345/insights"
},
"self": {
"href": "/v1/bundles/abcde12345/insights/edcba56789"
}
},
"track_data": [
{
"acoustics": [],
"spoken_languages": ["fr"]
}
]
}
Once you have the language information, you can choose the best search option automatically:
curl https://api.clarify.io/v1/search?query=compris \
--data "language=fr" \
--header "Authorization: Bearer myapikey"
While we primarily work with English, Spanish, and French, there are other languages on our roadmap. Which do you – or more importantly, your customers – care the most about?
You can explore this on your own in our Multi-Language Quickstart Guide [Clarify multi-language docs].
