Amazon Polly – Text to Speech in 47 Voices and 24 Languages

Amazon announced a new service – Amazon Polly – text to speech in 47 voices and 24 languages.  This part got me intrigued:

Polly was designed to address many of the more challenging aspects of speech generation. For example, consider the difference in pronunciation of the word “live” in the phrases “I live in Seattle” and “Live from New York.” Polly knows that this pair of homographs are spelled the same but are pronounced quite differently. Or, what about the “St.” Depending on the language and the context, this could mean (and should be pronounced) as either “street” or “saint.” Again, Polly knows what to do here. Polly can also deal with units, fractions, abbreviations, currencies, dates, times, and other speech components in sophisticated, language-specific fashion.

I am not much involved with text to speech these days, but I did experiments in this area a few years ago.  Simple text to simple English has been around for a long time.  But support for other languages was always limited, and even with English, the voices always sounded very robotic, and often failed to understand the simplest of native language constructs.

I tried Amazon Polly and was blown away by the quality of the synthesis.  Here are the English samples of the text from this blog post:

US English, Kendra, female:

British English, Bryan, male:

Welsh English, Geraint, male:

With that, I wanted to see what happens with other languages.  The only other language I speak is Russian, so I pasted the Russian category description into the converter, selected the Russian language, and got this:

Russian, Maxim, male:

That is pretty good!  Going further, I pasted the content of this blog post, which is a quoted story that somebody else wrote.  It has a very informal flow to it and some weird punctuation.  Listen to what it turned into:

Russian, Maxim, male:

You can still make out that it’s a robot and not a human, but it’s way better than anything else I’ve heard so far.  By far!

So, how affordable is this technology now?  The pricing page answer is very simple:

Pay-as-you-go $4.00 per 1 million characters (when outside the free tier).

It also provides some examples of how this pricing converts to real-life scenarios:

polly-pricing-examples

I don’t know about you, but my mind is blown…

PHP 7.1.0 Released!

PHP 7.1.0 release is out, bringing quite a bit of new features and improvements.  Here are some of the new things:

I guess I’ll wait for Fedora 26 or something to get a silent upgrade. :)

Internet users in Cyprus

7 years ago, to the day, I’ve published this post, containing the Google screenshot for the graph of the Internet users in Cyprus.  It used to be 38% of the population.

Today I decided to check exactly the same Google query and see how that number has changed.  Here is how:

internet-users-in-cyprus

Yup.  We went from 38% to 65.5% in 7 years.  Considering the fact that the population grew as well, in the absolute numbers the statistics will be even more staggering.

Migrating to PHP 7

PHP 7.0.0 has been released for a year now.  I wasn’t in a rush to migrate to it, but with all the cool features and performance optimization, it’s definitely something I wanted to look into rather sooner than later.

It turns out that I’ve done my first PHP 7 migration a week ago, when I upgraded my laptop to Fedora 25.  Yup, that’s right.  It’s a bit embarrassing, but I have been developing on PHP 7 for a week without even noticing it.

$ php --version
PHP 7.0.13 (cli) (built: Nov 9 2016 07:29:28) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans

I think that was due to a few things:

  • It’s been quite a busy week, so my attention was all over the place.
  • PHP 7 backward compatibility is pretty awesome.  There are only a few things that need fixing in the older code bases, but if you haven’t been living under a rock for the last few years, you probably have nothing to change or worry about.
  • Most of the code I’m working on runs through TravisCI builds, which are executed on both PHP 5.6 and PHP 7.  Since we had this for a while now, most, if not all, of our code is PHP 7 compatible.

The absolute lack of any issues for the last week, related to this upgrade, is encouraging.  Now I will probably try to upgrade our servers sooner than later.

With that, I’ll go back to the wonderful and exciting world of PHP, leaving you to decide whether I’m very serious or very sarcastic…

 

Things to avoid when writing application logs

DaedTech runs the blog post “Avoid these Things When Logging from Your Application“.  It sounds trivial, but it’s not.  There are quite a few good reminders for best logging practices.  Here’s the summary list:

  • Forgetting Context
  • Cryptic Codes
  • Spamming the Log File
  • Unsafe Logging Calls
  • Mixing Application Logic with Logging
  • Sensible Logging

Read the whole thing for examples and details.