This module provides access to the Speech Recognizer component of OS X.
The speech recognizer functions and methods provide a way to add commands which may be issued to Hammerspoon through spoken words and phrases to trigger a callback.
Signature | hs.speech.listener.new([title]) -> recognizerObject |
---|---|
Type | Constructor |
Description | Creates a new speech recognizer object for use by Hammerspoon. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/speech/libspeech_listener.m line 62 |
Signature | hs.speech.listener:blocksOtherRecognizers([flag]) -> recognizerObject | current value |
---|---|
Type | Method |
Description | Get or set whether or not the speech recognizer should block other recognizers when it is active. |
Parameters |
|
Returns |
|
Source | extensions/speech/libspeech_listener.m line 187 |
Signature | hs.speech.listener:commands([commandsArray]) -> recognizerObject | current value |
---|---|
Type | Method |
Description | Get or set the commands this speech recognizer will listen for. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/speech/libspeech_listener.m line 97 |
Signature | hs.speech.listener:delete() -> recognizerObject |
---|---|
Type | Method |
Description | Disables the speech recognizer and removes it from the possible available speech recognizers. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/speech/libspeech_listener.m line 338 |
Signature | hs.speech.listener:foregroundOnly([flag]) -> recognizerObject | current value |
---|---|
Type | Method |
Description | Get or set whether or not the speech recognizer is active only when the Hammerspoon application is active. |
Parameters |
|
Returns |
|
Source | extensions/speech/libspeech_listener.m line 165 |
Signature | hs.speech.listener:isListening() -> boolean |
---|---|
Type | Method |
Description | Returns a boolean value indicating whether or not the recognizer is currently enabled (started). |
Parameters |
|
Returns |
|
Source | extensions/speech/libspeech_listener.m line 250 |
Signature | hs.speech.listener:setCallback(fn) -> recognizerObject |
---|---|
Type | Method |
Description | Sets or removes a callback function for the speech recognizer. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/speech/libspeech_listener.m line 267 |
Signature | hs.speech.listener:start() -> recognizerObject |
---|---|
Type | Method |
Description | Make the speech recognizer active. |
Parameters |
|
Returns |
|
Source | extensions/speech/libspeech_listener.m line 209 |
Signature | hs.speech.listener:stop() -> recognizerObject |
---|---|
Type | Method |
Description | Disables the speech recognizer. |
Parameters |
|
Returns |
|
Notes |
|
Source | extensions/speech/libspeech_listener.m line 228 |
Signature | hs.speech.listener:title([title]) -> recognizerObject | current value |
---|---|
Type | Method |
Description | Get or set the title for a speech recognizer. |
Parameters |
|
Returns |
|
Source | extensions/speech/libspeech_listener.m line 138 |