Click here to Skip to main content
13,592,387 members
Click here to Skip to main content
Add your own
alternative version


10 bookmarked
Posted 19 Jan 2012
Licenced BSD

FliteEngine - Objective-C speech synthesizer

, 21 Jan 2012
Rate this:
Please Sign up or sign in to vote.
FliteEngine - An Objective-C speech synthesizer.


This is the second speech synthesizer wrapper as I wrote in my previous article ESpeakEngine. The following sections describe the Flite speech synthesizer wrapper - FliteEngine.


FliteEngine is an Objective-C static library project containing a very light wrapper for the Flite Open Source speech synthesizer. It does not add any new features to Flite, it only exposes its functionality as Objective-C class methods and combines this functionality with the iOS AVFoundation Framework (to see all available properties of the Flite synthesizer, please read the documentation on its homepage URL). It also uses the standard delegate pattern by defining FliteEngineDelegate.

Using the code

Usage of the FliteEngine is very easy. You have to only add a standard dependency on the FliteEngine static library project to your project and add a path to the folder Flite_1_0/Classes in the Target Build Settings: Header Search Paths.

Then import the FliteEngine header in the class which is holding the engine instance:

#import "FliteEngine.h"

In the init or the viewDidLoad method, create a new instance of the FliteEngine and set all parameters you want (volume, speed, variance, pitch):

- (void)viewDidLoad {
    [super viewDidLoad];
    engine = [[FliteEngine alloc] init];
    engine.volume = 1;

And finally, bind any button's touch event to the code which calls the FliteEngine speak method:

- (IBAction)speech {
    NSString * text = self.textView.text;
    [engine speak:text];

Points of Interest

No documentation is included in this up-to-date version. Anyhow, the source code is self-explanatory and has altogether only a few hundred lines. Also, the test application is a good start point to look for more properties.

Any questions will be answered, feel free to contact me.


  • 2010: Initial version.


This article, along with any associated source code and files, is licensed under The BSD License


About the Author

Jozef Bozek
CEO bring-it-together s.r.o.
Slovakia Slovakia
Jozef Božek is currently a software engineer at bring-it-together s.r.o. in area of large scale infomation systems and mobile applications development.
He has been developing in C++ nearly full time since 2000, in Java since 2004 and in Objective-C since 2009. He is programming using Java EE SDK, iOS SDK, COM/DCOM, MFC, ATL, STL and so on Smile | :)

You may also be interested in...

Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web03 | 2.8.180618.1 | Last Updated 21 Jan 2012
Article Copyright 2012 by Jozef Bozek
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid