Showing posts with label audio. Show all posts
Showing posts with label audio. Show all posts

2012-09-29

Devol Speaks!

I have made a new node for the filtergraph. This time it is a wrapper for the excellent open source eSpeak text to speech synthesis system, that basically allows my robot software to utter words and sentences in english. My test code for the new node looks like this:
void test_speech_synthesis() {
 cout << "allocin --------------------- \n";
 AudioSpeechSynth tts;
 AudioFileSink afs_mono("mono_tts.raw");
 cout << "buildin --------------------- \n";
 afs_mono.subscribeTo(tts);
 cout << "openin --------------------- \n";
 cout << "pumpin --------------------- \n";
 string s("hello devold");
 tts.speak(s);
 cout << "done pumpin, breaking --------------------- \n";
 afs_mono.unsubscribeFrom(tts);
 cout << "done breaking, closin --------------------- \n";
 cout << "done closin, COMPLETE!\n";
} 
  
I have yet to design a proper voice that matches the robot personality. More on that later.

2012-06-29

ALSA Source

I just implemented a rudimentary audio source in my filtergraph using ALSA capture directly. I also implemented a "n-channel to mono" node since for some reason ALSA refuses to capture in mono on my development computer. It simply discards all but the selected channel and extracts the interleaved samples into its own buffer before passing that on.