Showing posts with label Text-To-Speech. Show all posts
Showing posts with label Text-To-Speech. Show all posts

Wednesday, April 20, 2016

Make the witch speak!

By Vasudev Ram



This was fun and popular, so I'm blogging it again (I rarely do this, first time in fact):

Make the TTS witch speak:

1. Here is How.

2. Tremble with fear and awe.

- Vasudev Ram - Online Python training and consulting

Signup to hear about my new products and services.

My Python posts     Subscribe to my blog by email

My ActiveState recipes


Saturday, March 1, 2014

Speech synthesis in Python with pyttsx

By Vasudev Ram

[ Click on the link below to hear a synthesized voice:
]

pyttsx is a library for cross-platform speech synthesis (a.k.a. text-to-speech) in Python. I saw it via this article on Dr. Dobbs Journal:

Voice Throwing with Python and Android.

I have an interest in speech synthesis and have tried out some tools for it in the past.

So I downloaded and installed pyttsx, and then tried it out a bit. Had to tweak the speech rate a bit, since the default "voice" was talking a bit too fast. Also, although going by its API, pyttsx seems to support more than one voice (if your underlying text-to-speech API supports that), the program only played the words in one voice (that of a woman), even though I ran it in a loop for all the voices. It could be that my OS doesn't support more than one voice, or maybe I need to use some other pyttsx option.

Here is the test program using pyttsx, test_pyttsx.py:
import pyttsx
engine = pyttsx.init()
engine.setProperty('rate', 70)

voices = engine.getProperty('voices')
for voice in voices:
    print "Using voice:", repr(voice)
    engine.setProperty('voice', voice.id)
    engine.say("Hi there, how's you ?")
    engine.say("A B C D E F G H I J K L M")
    engine.say("N O P Q R S T U V W X Y Z")
    engine.say("0 1 2 3 4 5 6 7 8 9")
    engine.say("Sunday Monday Tuesday Wednesday Thursday Friday Saturday")
    engine.say("Violet Indigo Blue Green Yellow Orange Red")
    engine.say("Apple Banana Cherry Date Guava")
engine.runAndWait()

You can run it with the command:
python test_pyttsx.py



- Vasudev Ram - Dancing Bison Enterprises

Contact Page



Saturday, January 26, 2013

PyTTSx: cross-platform Python speech synthesis wrapper

parente/pyttsx · GitHub

PyTTSx is a cross-platform Python wrapper for speech synthesis (a.k.a. text-to-speech) tools.

I've been interested in both speech synthesis and speech recognition for some time (as a user, for personal use as a productivity aid), and had tried out some tools for these areas earlier, including Java-based ones and others.

PyTTSx is by Peter Parente:

http://mindtrove.info/about.html

I found it via looking for PyTTS by the same developer, but that seems to be no longer maintained, and is only for Windows, while PyTTSx is supposed to work on Linux, Mac OS X and Windows.

http://en.m.wikipedia.org/wiki/Speech_synthesis

Also see:

http://freetts.sourceforge.net/docs/index.php

PyTTSx docs:

http://pyttsx.readthedocs.org/en/v1.1/

- Vasudev Ram
www.dancingbison.com

Wednesday, October 19, 2011

Text To Speech for Chrome Extensions, and Talking Alarm Clock

By Vasudev Ram - dancingbison.com | @vasudevram | jugad2.blogspot.com

Saw this recently on the Google Code blog

Tried it out some, it's quite cool and useful, IMO:

New Text-to-Speech API for Chrome extensions

http://googlecode.blogspot.com/2011/10/new-text-to-speech-api-for-chrome.html

As the title of the post indicates, this is about a new Text To Speech (TTS) API for Google Chrome extensions and apps.

Though the blog post title only mentions the API, the post also has links to TTS (i.e. talking) apps for Chrome. You can install them from the Chrome Web Store. There are also links to a couple of other "voices" that can be used for all such Chrome TTS (Text To Speech) apps or extensions. Even without installing the voices, you may be able to run TTS apps using the native voice support of your operating system

I tried out the TTS Demo and the Talking Alarm Clock - both were good.

The Talking Alarm Clock in particular can be useful. Apart from being useful, the audio alarm that goes off when the alarm time is reached, can be played in different ways - e.g., as a traditional ringing alarm clock, a digital alarm clock, a cuckoo clock, a grandfather clock, a "morning in the forest" tune, etc. Pretty cool ...

I had developed a simple utility something roughly like it in Delphi a while earlier

Posted via email

- Vasudev Ram @ Dancing Bison