Monday, September 10, 2012

Gambas2 with "espeak"(Text to Speech in Linux)

Introduction:

Hello folks and all there in the community, its quite a long time since my last post here.Anyway,I will introduce you something  interesting to spice Gambas2.We've been discussing a lot of extra functions and features about  this compiler, but this one ,will surely get your attentions.Why? Let me give you some idea ,its all about inserting our Gambas2 applications with a text to speech engine (CLI SDK).Yep, we we'll let our application to have the speaking capabilities -and that is possible by using "espeak".


Requirements:
Fedora 17 or latest
espeak , espeak-devel
Gambas2

Methodology:
1)Installation
Installing linux sound drivers
root@localhost# yum install alsa*
root@localhost# yum install *pcm*

Installing espeak
root@localhost# yum install espeak*

2) CLI testing
root@localhost# espeak "H-Techno Barrio"
root@localhost # espeak -f "Hi-Techno Barrio"

3)  Interfacing espeak
3.1) Shell scripting

3.2) C interfacing

3.3) Gambas2 interfacing
DIM soundChannel as String
EXEC [ "espeak","-g","14","-s","145", words] TO soundChannel



Summary:


Conclusion: