News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Translation and Text-to-Speech with Microsoft Translator
December 05, 2013 @ 09:19:29

On the SitePoint PHP blog today there's a new tutorial showing you how to combine the Microsoft Azure platform services with their Translator API to create a text-to-speech translation service with some simple curl calls.

Text to speech is a popular technique used by many websites to provide their content in an interactive way. The generation of artificial human voice is known as Speech Synthesis. Even though it's highly popular, there are very few speech synthesis services, especially when looking for those free of charge. Microsoft Translator is one of the services we can use to get a speech service with limited features. In this tutorial, we are going to look at how we can use Microsoft Translator API to translate content and then make audio files using said content.

He walks you through setting up an Azure application (you'll need an account for the marketplace already) and how to subscribe to the translation service. It's a paid service but there's a "try before you buy" level that allows 2,000,000 characters of translation before it's cut off - perfect for testing. He includes the PHP to make the requests to the Translation API via curl. Included is code to initialize the configuration for the request, get the correct tokens and a reusable method for making the actual translation request. Finally, an example of doing the actual text-to-speech conversion is shown, resulting in an mp3 file.

He also includes an example of a simple frontend UI. You can see a working demo of the script here.

0 comments voice your opinion now!
microsoft translator api texttospeech text speech tutorial azure service

Link: http://www.sitepoint.com/translation-text-speech-microsoft-translator/


Community Events





Don't see your event here?
Let us know!


language testing release laravel install developer community framework configure list introduction unittest refactor threedevsandamaybe wordpress series podcast code interview opinion

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework