UXDE dot Net
Advertisement

Text To Speech Conversion using Espeak Engine for Iphone Application Development

By -

For More Source codes  visit Image Cropping Application Source Code for iOS .

See Practicle implemented vidoes Iphone Application, links given below

Optical character recognition

Object Recognition using Surf Detection iPhone Application 

PDF to Text then Text to speach Iphone App 

Introduction :

There are some 3rd party libraries and API which are used to convert TTS ( TEXT TO SPEECH ) in iphone

1) Sphinix                        ( Not Efficeint  )

2) Open-Ear                    ( Do not Required Internet Connectivity offline  TTS )

3) Google TTS             (Requires Internet Connection)

4) Acapela                      (Not Free You Have to pay to get SDK)

5) Objectuve C Speech Synthesizer Speak Engine (Do Not Required Internet Connectivity One of the Good offline TTS )

 

–What Is Open-Ear ?

Open-Ear is a shared and open source iOS frame Work for iphone text to speech conversion (TTS Synthesis).This Technology is used to convert English Text Into Speech for iphone .

–What is the best part in Open-Ear ?

This source is best because there’s no connectivity issue all processing takes place locally in the device mean you don’t need’s to connect to the internet.

Key Basic Concepts and Tips :

1 ) FliteController creates synthesized speech text to speech (TTS).

–Now what is Flite Controller ?

Its an class which controls speech Sysnthesis that is text to speech in Open-Ears.

Recommended not to use Open-Ear?

Becuase app using Open-Ear library had not reached to Apple Store yet.

                                                                                 Espeak Engine (Text to Speech Combing Its functionality with iOS Av Foundation Frame Work)

 Friends my focus is on Espeak Synthesized speech.

–Now What is Espeak Engine ?

Espeak Engine is a Synthesized speech library which allows conversion of text into speech on iOS Device Just Like on Iphone.

Espeak Engine is static library of Objective-C  which is an OPEN SOURCE Synthesizer.

NOTE : Espeak has not been ported to iOS officially and Google has integrated some aspects like Google voice and translated for iPhone and iPad Apps.

–Features (Espeak ):

NOTE: You have to study and understand the code to implement all this i will provide you just initial and basic code which will speak text.If you want to use and get application source code just comment and enter your email address i will mail you the whole project of TTS ( For Iphone Xcode Latest Compiler)

  • Good Quality Sound and Many Voices are Available like male or female voice.
  • This Is Written in C-Language so its very easy to understand.
  • Espeak Support many Human Languages.
  • You can Change speed of voices by changing inside code.
  • You can also enable or disable voice pronunciation .
  • Copy and Paste text anywhere in application.
  • You can also open mulitiple windows.

Sample Code:
I am Pasting here sample small part of code to get introduced to it.

I will Explain the main basic code

First what you have to do is import libraries that is header file.

#import “EspeakEngine.h”

Now in main a  method is viewDidLoad.Here what you have to do is

  • Create a New Instance of speak engine
  • And Set All parameter u like to add like speed,volume,gender’s voice weather its male or female depends at you and etc other parameters.

-(Void viewDidLoad)

{[super viewDidLoad];

engine = [[ESpeakEngine alloc] init];

engine.volume=2;

engine setLanguage :@”en”;

}

Now What Happens when you write text in a text box and press speak button.Following Code is Executed now whats happening here.

  •  Here SpeakEngine method is call and a string is passed which is written in text box

-(IBAction)speech

{

NSString *text = self.textView.text;

[engine speak:text];

}

Now this main function call functions from implementation .m file and and header .h file contains definition,variables of that fuction

Source Code

Like , share this post on Facebook , Twitter by using left moving Social Sharing block and follow us on Facebook Page , Twitter and do comment and enter your email. After you have done you will automatically get source code in your mail. Note : This will be auto generated mail you can’t get until you follow above method.

text to speech

 

For More Source codes  visit Image Cropping Application Source Code for iOS .

Farheen Bibi

You can find Farheen on , and .

174 Comments to Text To Speech Conversion using Espeak Engine for Iphone Application Development

  1. Hasan Parves

    Hi,

    i got a clang error when compiling..

    clang: error: no such file or directory: ‘/Users/macosx/Library/Developer/Xcode/DerivedData/ESpeakTest-dcutvgftlwexyecbeutlsnhxrhwt/Build/Products/Debug-iphoneos/libeSpeak.a’

    then

    i close xocode and run again then got this error:

    Undefined symbols for architecture armv7:
    “_OBJC_CLASS_$_ESpeakEngine”, referenced from:
    objc-class-ref in ViewController.o
    ld: symbol(s) not found for architecture armv7
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    please provide some solution.

  2. We Mailed you two zip files you must extract both folders Named
    EspeakTest
    espeak-1.0
    place them in the project folder and then run both project in the same xCode project
    EspeakTest is using Libraries from espeak_1.0 Project

    Still if you are facing problem then we will provide you step by step tutorial to run that project Thankyou

  3. Rindra Ndrantotiana RASOLOFONIRINA

    Hello. Thank you for this article, could you send me the source code? What are the languages supported?

  4. Hi, thanks for useful post! Could you send me the sample source code? I want to try Turkish language.

    Thanks
    Utku

  5. Is there any reason why you don’t post this to GitHub or BitBucket? If you are giving away source code anyway, that’s the easiest way to share it.

    • i want people to share their thoughts about this post so don’t mind it i just need is all your thoughts and discussion so that i can also learn new things from you people i appreciate your question AV

  6. Thank for your article, please send me a source code that I can run on device and docs if needed,

    Regards,

  7. Abhimanyu Please check your mail if you have any problem relating to this project please feel free to contact @Crunchmodo Team

  8. hi, can you pls send me the source, im very interested in this after not having much luck with Open Ears

    also has anyone got this approved with the app store yet?

    thanks

    • @spriggsy I have not yet researched about approval but i am working on this i am also using this in my OCR application and soon i will contact apple store to publish my application which is using espeak engine.

        • your email address has got some problem following error i am receiving from my mail please make a new gmail id and provide us
          Technical details of permanent failure:
          Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 552 552 Session size exceeds fixed maximum session size (state 17).

  9. Hello,

    Can you please email me that project files for TTS. as I am researching about it since last 3 months.

    I would be grateful to you if you send me TTS project files. It will help me to achieve my task easily.

    Thanks

  10. I just want it. I want to have some research on english study which will use TTS. I can’t afford the commercial LIB.

    • Please check your email if you have any problems regarding this project please let us know thanks @crunchmodo

    • Yalamandarao Please check your mail and also please share with us in which kind of application you want to use and if you have any problem regarding compiling this please contact us thanks @crunchmodo

    • Please Check there out i sent you source code have you made any application related to image processing for iphone ?

    • Source will be mailed to you please discuss with us in which kind of application you want to use it in short what’s the purpose of usage

    • Give Us gmail ID there are some files which can’t be shared to msn server there was something problem with that mail i am getting following error
      Delivery to the following recipient failed permanently:

      idevelops@me.com

      Technical details of permanent failure:
      Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 5.7.0

  11. kamalpreet kaur

    can u please send me the sample code regarding espeak……..Please send me Text To Speech Conversion using Espeak Engine for Iphone Application Development.

  12. Hai khan

    i’m not interested on speaking i want playing you tube urls in to ipad application….
    this is our requirement..
    please send if u have any update codes..

    thanks

    • You have to wait for that kind of application our team has reviewed your question wait until they work on that kind of application keep visiting to remain up to date to your query @Crunchmodo

  13. hey can you please mail me the library i.e. libeSpeak.a i m getting the following error Can’t read data file: ‘/var/mobile/Applications/myProject/espeak-data/phontab’
    Failed to load espeak-data

    • In the Download zip file there are two more zip files named EspeakTest.zip and Espeak_1.0.zip extract them in the same folder and run the project file from EspeakTest.zip folder your error will be solved

  14. hey can you please send the source code, i have integrated it in my project but i m getting following error Can’t read data file: ‘/Users/tasnim/Library/Application Support/iPhone Simulator/6.1/Applications/EC21980D-2AD7-44D0-ABDE-FB0885CCD516/eSpeakTest.app/espeak-data/phontab’
    Failed to load espeak-data

  15. hey m getting the same problem as mentioned in the above comments, when i m running the demo it works great…but when i integrate eSpeak code to my project it gives me the error…any help would be greatly appreciated..! Thanks.

  16. Hi. I would like to make an app based on this TTS. I have two questions:

    1. If it is possible to publish an app in appstore with this code, is there any licensing or royalty fee? First I would like to “play” with the code for personal project, but I would like to check this before thinking on using it as the basis for commercial products.

    2. Is there Spanish voice available?

    Could you please provide me the code? It is difficult to work in iOS as not much offline fast TTS engines are available for Spanish voices. Congratulations for your article and thank you!

    • This demo is only for english version how ever you can include many things do research on Espeak tts documentation you can find here http://espeak.sourceforge.net/

      You can change voice and speed just write commands in viewDIdload Method
      engine.volume =1;

      you can change language accent [engine setLanguage:@"en"];

      and you can also change male to female voice [engine setGender :ESpeakEngineGenderMale]

      • Ok. It is just that when studying flite as possible option for TTS, I found out from other comments that is far from easy to add Spanish voices available for Festival, as they are not in “flite format”. http://www.politepix.com/forums/topic/openears-spanish-2/

        There are sp voices in eSpeak but not quite sure if they can be easily included. It would be great if is as easy as including the voice and setting the accent!

          • Thanks for the code! Really fast answer! I’ll work on it and send you back the results. I’ll be on traveling during these day so I guess I will provide some feedback next week. Regarding royalties, and publishing the release in appStore, do you have any info?

          • You can publish this in apple store also in paid applications. An app using Espeak engine is already running , rocking and earning in apple store i can show you on demand. I am interested in changes you can to this demo and i will for your response for results.

          • hi ammad,
            i spent a lot of time trying to create an app using openears. The problem is that the newly added words are not recognized by the app.I edited the language array in the sample code.Should i do anything more??

  17. Please can you send me the tutorial and source code and required library… Does it support dutch language?

  18. shivaganeshgupta sunkari

    hi sir,
    could you please send me source code and
    i want speech to text also sir
    please help me

  19. Hi,

    I want to work with Text-To-Speech in iOS project..But I am facing this error::

    Can’t read data file: ‘/Users/macmini/Library/Application Support/iPhone Simulator/6.0/Applications/EBC2EDC4-1029-48A0-9E1D-FA3EE59B1AF7/SpeakTest.app/espeak-data/phontab’

    Can u please guide me what is the problem..I am working with new compiler..So,Can u please send me how can i proceed now…Here is the mail-id…

    • There are two zip files you must extract both folders Named
      EspeakTest
      espeak-1.0
      Do you have both files ?
      place them in the project folder and then run both project in the same xCode project
      EspeakTest is using Libraries from espeak_1.0 Project

  20. please give me the source code for image encryption using modified AES in matlab.here i want to use permutation instead using mixcolumn.

  21. Please send the source code. Does it support danish language? I want to get the voice of selected text , does this library supports.

  22. hi,
    thanks for giving a good idea on online/offfline speech synthesizers. please send me the code to know more about it.
    Also i would be thankful if you let me know whether there is any APPLE library available to do this TTS or one has to go for a 3rd party library for sure to implement TTS?. As far i searched i couldn’t find any APPLE library to do this and if there is one available, please let me know the name of that library…

    Thanks in advance

  23. hi,
    i got your 2 zip files. I added both in one directory as you explained and run the ‘test’ one. it is building but nothing else. I am using Xcode . Why I can’t get the test running with Iphone Windows? May be the code I got is wrong. Can yu resent me the latest version?

    thank you
    fred

  24. Can you please send me the Source Code..
    Previously i worked with OpenEars , Now i want female voice and male voice too is there any possibility ?

    Thanks

    • Adnan Jilani

      Please check your email address if you have any query regarding this please feel free to ask, Thanks for visiting us

Leave a Reply