AWS Machine Learning Blog

Create accessible training with Initiafy and Amazon Polly

This is a guest blog post by Ronan O’Sullivan and Conor McNally from Initiafy. In their own words, “Initiafy is a leading provider of contractor management software that helps companies on-board and train contractors, temporary, or seasonal staff before they begin work with over 300,000 users worldwide.”

We’ve become so accustomed to the existence of skyscrapers, road networks, oil rigs, hydroelectric dams, nuclear power plants, wind turbines, suspension bridges, and all the other incredible feats of human engineering populating our world, that some might overlook the remarkable effort that goes into their construction. These projects are not built by robots. A huge amount of human effort is required to bring them into existence, in addition to the technology used to design, streamline, and improve processes.

Initiafy makes the workforce element of projects more productive and efficient. Heavy industry projects rely on contractors, with related management challenges of handling documents, health and safety, and quality control. Initiafy provides contractor management on an online platform, giving workers training in a flexible way and ensuring standards are high across a contingent workforce. Initiafy operates in a number of countries, with workers coming from a number of nationalities so it is vital that training is accessible for all workers.

This blog post covers how Amazon Polly is fully integrated into the training courses companies build for their contractor workers on the Initiafy platform. We will show you how Amazon Polly adds flexibility in course building and course content, as well as how it allows courses to be more accessible to all kinds of contractors.

Challenges with onboarding contractors

Heavy industry presents a number of challenges for onboarding workers. Contractors need to receive dense technical information specific to their role, as well as training in vital health and safety practices. Initiafy provides companies the opportunity to design courses with multimedia content for their contractors.

Imparting crucial safety and technical information is a challenge because a heavy industry workforce commonly employs contractors of different nationalities and varying levels of literacy. Initiafy was looking for a tool to conquer language barriers across a workforce and to support workers who might be non-readers because of either disability or lack of education.

How we use Amazon Polly

Workers take online training course on the Initiafy platform. Our courses are broken up into slides containing text, video, images, and interactive content like quizzes, usually at the end of each course chapter. With Amazon Polly, the content that’s in text form is accessible to every worker. Extra voiced content, that is not in text form, can also be added.

The person who creates the course chooses the Amazon Polly voice and language. This is then saved into an audio file and stored in an Amazon S3 bucket. Course creators also control how much audio a worker will hear. For example, they can set it so a worker cannot move onto the next slide until 100% of the audio has played. This is a way to ensure that workers are engaging with the course content.

Course content in HTML is stripped away. The remaining stream of text is broken up by slide and uploaded in the background into Amazon Polly. Our course content comes in three different types:

  • HTML content, which is totally stripped away.
  • Text that is included in each slide, which is read out by Amazon Polly.
  • Hidden text, which is read out to the worker doing the training, but does not appear on the slide.

For each of the courses on the platform Initiafy users have the option of enabling the ‘Audio Reader’. Once they click on the Audio button they see the following pop-up:

  • From the pop-up, they can select after the period of time that should elapse before the user can move to the next slide on the course.
  • Default Delay (seconds), 100%, 80%, 60%, 40%, or 20% of audio length.
  • The user can select the language and the voice for the course. The preview allows the user to test the audio selected.
  • Users creating courses can also test the audio of each slide as they are creating it by clicking on the play button at the bottom of the slide editor.

Once the feature is enabled for a course the audio will automatically begin when the course starts and will read out the contents of each new slide.
The user has the option of pausing the audio at any time by clicking the green pause button at the top of the slide.

We use the ‘Managing Lexicons’ feature in Amazon Polly extensively in our online courses. A lot of our clients want to include detailed, technical information in their orientations and the lexicons feature ensures that these terms are pronounced correctly. In addition, many company names are complicated, or acronyms, and the lexicon means that these are pronounced correctly, which is important to our customers.

Integrating Amazon Polly into Initiafy

Customer admins use the Initiafy application to request that Amazon Polly read their course, at which point our Amazon EC2 instance requests an MP3 from Amazon Polly and stores it in Amazon S3. A reference to the MP3 is stored with the course in our database, ready to be played to the users taking training.

When a user chooses a voice and language for their content, we ask Amazon Polly to read it. We get the output as an MP3 and store that in an Amazon S3 bucket to be played later.

public async Task<byte[]> Speak(string[] content, string textType, string voiceId, bool applyLexicon, List<string> lexiconNames)
                string newVoice = MapIspeechVoice(voiceId);
            	var req = new SynthesizeSpeechRequest
                	OutputFormat = OutputFormat.Mp3,
                	TextType = TextType.FindValue(textType),
                	VoiceId = newVoice
            	if (applyLexicon)
                	req.LexiconNames = lexiconNames;
            	if (req.TextType == null)
                	req.TextType = TextType.Text;
  	          var data = new MemoryStream();
            	using (AmazonPollyClient _client = new AmazonPollyClient(RegionEndpoint.EUWest1))
                	foreach (var group in content)
                    	req.Text = group;
                    	var result = await _client.SynthesizeSpeechAsync(req);
                    	byte[] buffer = new byte[BUFFER_SIZE];
                    	int read;
                    	while ((read = result.AudioStream.Read(buffer, 0, buffer.Length)) > 0)
                        	data.Write(buffer, 0, read);
            	return data.ToArray();
        	catch (Exception ex)
            	throw ex;


Accessibility is a key value of the Initiafy platform, and Amazon Polly fits with this perfectly. It allows us to reach people of different nationalities and varying degrees of literacy. Our clients operate in heavy industry, and have linguistically diverse workforces, with a higher than average proportion of non-readers in the workforce.

Integrating Amazon Polly with Initiafy has been a seamless process. It’s made the lives of our users easier and gives our customers peace of mind that their training is accessible to all workers. Safety training is quite literally a life or death issue and it’s vitally important to us, and our customers, that this training is provided to all workers.

About the Authors

Ronan O’Sullivan is CTO of Initiafy and is responsible for the technical vision of the company and the platform.




Conor McNally is Initiafy’s Communications Managers and is responsible for the internal and external messaging at Initiafy.