AWS Transcribe – Use cases

At the re:invent2017 AWS presented AWS Transcribe (read more about new AWS announcements here: AWS Comprehend, Translate and Transcribe).

Amazon Transcribe is an automatic speech recognition (ASR) service that makes it easy for developers to add speech to text capability to their applications. Using the Amazon Transcribe API, you can analyze audio files stored in Amazon S3 and have the service return a text file of the transcribed speech.

Use cases

Amazon Transcribe can be used for lots of common applications, for example:

  • transcription of customer service calls
  • generation of subtitles on audio and video content
  • conversion of audio file (for example podcast) to text
  • search for key words or not safe for work words within an audio file

The service is still in preview, watch the launch video here: AWS re:Invent 2017: Introducing Amazon Transcribe
You can read more about it here: Amazon Transcribe – Accurate Speech To Text At Scale.

Here how to use AWS Transcribe with the Python SDK. Please notice that the service is still in preview.
Here you can find the documentation: Boto3 AWS Transcribe.

Initialize the client:

Run the transcribe job:

Check the job status and print the result:

Here how the output looks like:

Soon I am going to use AWS transcribe to build a speech to text recognition system that will process customer care recordings in order to:

  • convert speech to text (using AWS Transcribe)
  • extract entites, sentiment and key phrases from the text (using AWS Comprehned)
  • index the result to Elasticsearch for fast search

Application Performance Monitoring (APM) with Elasticsearch 6.1.1

In June 2017 Elastic joined forces with Opbeat an application performance monitoring (APM) company. Read the official blog post here: Welcome Opbeat to the Elastic Family.

Adding APM (Application Performance Monitoring) to the Elastic Stack is a natural next step in providing our users with end-to-end monitoring, from logging, to server-level metrics, to application-level metrics, all the way to the end-user experience in the browser or client.

Elastic APM consists of three components:

  • Agents: libraries that run inside of your application process and automatically measure the duration of requests to your service and things like database queries, cache calls, external http requests and errors
  • The APM server (written in Golang) that processes data from agents and stores the data in Elasticsearch
  • Kibana UI: dashboards that gives you an instant overview of application response times, requests per minutes, error occurrences and more.

The APM server and the agents (right now available only for Python and NodeJS) are open source:

Read more about it here: Starting Down the Path of APM for the Elastic Stack

In this post we are not going to see how to install the APM server, you can find the instructions here: Open Source Application Performance Monitoring.

Once the APM Server is installed and started we can monitor the performance of our application. In this example we will see a Python Flask application.

Install the Python APM library:

Initialize the client:

Within the Flask route you can log some messages:

or exceptions:

Here is how the monitoring looks like in Kibana:

You can see the details of each request by clicking on it:

 

I really like the APM feature fully integrated with the Elastic Stack. I will integrate it within my Flask/Django applications.
If you want to read more about the new APM feature:

If you want to read more about this topic: Application Performance Monitoring with Elasticsearch 6.1, Kibana and Skedler Alerts.

How to combine Text Analytics and Search using AWS Comprehend and Elasticsearch 6.0 – Skedler Blog

I published a new blog post on the Skedler Blog.
In the post we are going to see how to combine text analytics and search using AWS Comprehend and Elasticsearch 6.0.

The components that we are going to use are the following:

  • Amazon S3 bucket and Amazon Simple Queue Service
  • Amazon Comprehend
  • Elasticsearch 6.0
  • Elasticsearch Ingest Attachment Processor Plugin
  • Elasticsearch Ingest Geoip Processor Plugin
  • Kibana
  • Skedler Reports and Alerts

System Architecture:


 
You can read the full post here: How to combine Text Analytics and Search using AWS Comprehend and Elasticsearch 6.0

Please share the post and let me know your feedbacks.

Get files ACLs with PowerShell

Recently I needed to get all the user permissions for all the files (with a specific extension) in a given folder (with subfolders). I had to get these information from a Windows Server machine, so I wrote a simple PowerShell script.

With user permissions we refer to the FileSystemRights for example:

  • Full Control
  • Read
  • Write
  • Execute

You can find the complete FileSystemRights enumeration here: FileSystemRights Enumeration.

Given the root folder of our document, we are going to use the Get-ChildItem cmlet to get the items and child items in the specified locations.
For each item we are going to use the Get-Acl cmlet to get the security descriptor for the resource.

The Get-Act returns a System.Security.AccessControl.FileSystemSecurity object, we are interested to the Access property (a System.Collections.ReadOnlyCollectionBase object).

Each element of the collection contains the information that we need:

  • IdentityReference: Represents an identity (we are going to remove the machine name/domain from the value). System.Security.Principal.IdentityReference type
  • AccessControlType: Enumerative that Allow or Deny the system rights specified later
  • FileSystemRights: list of all the rights (enumerative of FileSystemRights)

Once we collected these information for each file, we are going to save them to a CSV file.

PowerShell script (set your root, CSV output file and extension):

This is how the output looks like:

AWS Comprehend, Translate and Transcribe

At the re:invent2017 AWS presented a lot of new services (read all the announcements here: re:Invent 2017 Product Announcements). In this post we are going to see three new services related to the language processing.

  • Amazon Comprehend
  • Amazon Translate
  • Amazon Transcribe

These new services are listed within the Machine Learning section.

Amazon Comprehend

Amazon Comprehend is a natural language processing (NLP) service that uses machine learning to find insights and relationships in text. Amazon Comprehend identifies the language of the text; extracts key phrases, places, people, brands, or events; understands how positive or negative the text is; and automatically organizes a collection of text files by topic.

You can use the Amazon Comprehend APIs to analyze text and use the results in a wide range of applications including voice of customer analysis, intelligent document search, and content personalization for web applications.

The service constantly learns and improves from a variety of information sources, including Amazon.com product descriptions and consumer reviews – one of the largest natural language data sets in the world – to keep pace with the evolution of language.

You can read more about it here: AWS Comprehend and here Amazon Comprehend – Continuously Trained Natural Language Processing.
Watch the video from the AWS re:Invent Launchpad: Amazon Comprehend.

This service is available, here you can find few examples (using Boto3 Python AWS SDK).

Instantiate a new client.

Detect the dominant language in your text.

Detect the entities in your text.

Detect the key phrases in your text.

Get the sentiment in your text.

Amazon Translate

Amazon Translate is a neural machine translation service that delivers fast, high-quality, and affordable language translation. Neural machine translation is a form of language translation automation that uses machine learning and deep learning models to deliver more accurate and more natural sounding translation than traditional statistical and rule-based translation algorithms. Amazon Translate allows you to easily translate large volumes of text efficiently, and to localize websites and applications for international users.

The service is still in preview, watch the launch video here: AWS re:Invent 2017: Introducing Amazon Translate

You can read more about it here: Introducing Amazon Translate – Real-time Language Translation.

Amazon Transcribe

Amazon Transcribe is an automatic speech recognition (ASR) service that makes it easy for developers to add speech to text capability to their applications. Using the Amazon Transcribe API, you can analyze audio files stored in Amazon S3 and have the service return a text file of the transcribed speech.

Amazon Transcribe can be used for lots of common applications, including the transcription of customer service calls and generating subtitles on audio and video content. The service can transcribe audio files stored in common formats, like WAV and MP3, with time stamps for every word so you can easily locate the audio in the original source by searching for the text. Amazon Transcribe is continually learning and improving to keep pace with the evolution of language.

The service is still in preview, watch the launch video here: AWS re:Invent 2017: Introducing Amazon Transcribe
You can read more about it here: Amazon Transcribe – Accurate Speech To Text At Scale.

This is an example of how to use this service (code written by @jrhunt and taken from here).
Note that the API for Transcribe (while in preview) is subject to change (this code may not be the final version of the API):

Output of the speech recognition:

I am looking forward to use these new services, they are easy to use, they easily integrate with the AWS world and they can add powerful features to your applications.