Solved

Text to speech in Ubuntu and C/C++ to read text strings with voice

Posted on 2012-03-10
4
1,310 Views
Last Modified: 2016-05-20
I'm developing a mobile robot application and i'd like to add a text to speech function which let the robot "talk" with the humans by reading some text strings which i'll pass to it.

For example, since my robot has a sonar network, i'd like to let it signal an obstacle presence by diretcly speacking with the human operator.

Something like:

if(sonar_front_detect == ok){

speak_to_human("I found an object in front of me);

}

Open in new window


Is there any simple open-source library which i can use to accomplish this task?
I'm looking for something which is very easy to use because i am not an expert programmer; it would be fine to use a library which has a function which takes as parameter the string which the robot has to read.

I hope to find a solution to my problem.

Thanks to all!
0
Comment
Question by:ichigokurosaki
  • 3
4 Comments
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 500 total points
ID: 37706328
have you checked espeak?

https://help.ubuntu.com/community/TextToSpeech ?
http://www.thegeekstuff.com/2010/03/espeak-speech-synthesizer-for-ubuntu/

I didn't use it personally, but from the look of it it serves your needs.

Besides, there is Festival (http://www.cstr.ed.ac.uk/projects/festival/)
0
 

Author Comment

by:ichigokurosaki
ID: 37706604
I tried espeak and Festival and they work very well from the terminal.

Now, i'd like to include this functionality in my C program but i'd like to avoid to use system() to call an external program; i think i can't include espeak library in my C program, so i think i have to use Festival but i found no example on how to use it in C/C++ application.

Can you help me, please?
0
 

Author Comment

by:ichigokurosaki
ID: 37706630
Ok, i was able to solve my problem: i've found the API reference for festival :)

Thanks a lot!
0
 

Author Closing Comment

by:ichigokurosaki
ID: 37706631
Thanks for the tip!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The goal of this video is to provide viewers with basic examples to understand and use switch statements in the C programming language.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now