Synthesising Speech in Python

There’s a Scottish company called CereProc who do some of the best speech synthesis in the world. They excel in regional accents, especially difficult Scottish ones! I’ve been using their CereVoice Cloud SDK in some recent projects (like Speek). In this post I’m going to share a wee Python script and an Android class for using their cloud API to generate synthesised speech. To use these, you’ll need to create a (free) account over on CereProc’s developer site and then add your auth credentials to the code.

Downloading Speech in Python

Call the download() function with the message you wish to synthesise, optionally specifying which voice to use, which file format to use and what to name the file.

Downloading and Playing Speech in Android

Create a CereCloudPlayer object and use its play method to request, download, and play the message you wish to synthesise.

Speek Notifications

Speek Notifications is an Android application I made for fun which tells you about your notifications when you hold your hand over the proximity sensor. I use the CereCloud Voice service to synthesise speech in one of two voices. To prevent Speek running while your phone is in your pocket I also use the gravity sensor to check if the device is on a flat surface. Visit the project on github to download the source code.

Demo Video

Screenshot

A screenshot of Speek - an Android app which reads information about your notifications when you cover the proximity sensor.