Controlling Quartz Composer with Speech Commands
posted by ian grant on October 11, 2006 at 10:44 am | in creative code, digital art hacks, general, quartz composer, speech |First draft:
Here we go! I did this once then failed to remember how I did it - and I’m not surprised - because the functionality to attach a speech command to an application specific key-press can only be accessed by SPEAKING the command “Define a Keyboard Command” - highlighted below in the Speech Commands window.
After speaking the command - the interface below appears letting you assign a key press / key combination:
Then main “Define keyboard command” window lets you associated the key-press with a spoken phrase. An option lets you limit the Speech Command to a single application (the current frontmost application at the time the command was spoken) or to be available in all applications.
So: with Quartz Composer as the front-most application, invoke the “Define a Keyboard Command” Speech Command: I created speech commands for the words “Bored”, “Ecstasy”, “Frown”, “Smile” and “Wonder” and mapped them onto key-press “a” through to “e”. You can see them listed here in the “Speech Commands” window:
Then: I created a simple Quartz Composer composition attached here: with keyboard patch - that did stuff when letters “a” through to “e” were pressed: the demo presents text but you could easily set up commands to control video playback, switch between images, attempt interactive stories, etc… .
The Quartz Composer patch working:
Download: VoiceTest.qtz.zip VoiceTest.qtz.zip
Switching off all unnecessary speech “Command Sets” and calibrating the microphone (every-time) increases the reliabiliy of “Speech Commands”.
I intend to test how reliable ‘continuous listening’ is with a dedicated ‘line-in’ microphone with different voices speaking commands. I’ll report back.
*******************************
Ian Grant
Lecturer in Digital Art
*******************************
no comments yet
sorry, the comment form is now closed.
(cc) ian grant some rights reserved




