Solved

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

Posted on 2012-03-10
4
1,370 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Examines three attack vectors, specifically, the different types of malware used in malicious attacks, web application attacks, and finally, network based attacks.  Concludes by examining the means of securing and protecting critical systems and inf…
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

860 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