Are there any libraries in Python that does or allows Text To Speech Conversion using Mac Lion\'s built in text to speech engine? I did google but most are windows based. I
Wouldn't it be much simpler to do this?
from os import system
system('say Hello world!')
You can enter man say
to see other things you can do with the say
command.
However, if you want some more advanced features, importing AppKit
would also be a possibility, although some Cocoa/Objective C knowledge is needed.
from AppKit import NSSpeechSynthesizer
speechSynthesizer = NSSpeechSynthesizer.alloc().initWithVoice_("com.apple.speech.synthesis.voice.Bruce")
speechSynthesizer.startSpeakingString_('Hi! Nice to meet you!')
If you would like to see more things you can do with NSSpeechSynthesizer take a look at Apple's documentation: https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/ApplicationKit/Classes/NSSpeechSynthesizer_Class/Reference/Reference.html