diff options
| author | LLLL Colonq <llll@colonq> | 2024-04-26 01:53:24 -0400 |
|---|---|---|
| committer | LLLL Colonq <llll@colonq> | 2024-04-26 01:53:24 -0400 |
| commit | 6fa49e57f7313aad8852ce2721c2fcf7d0cec030 (patch) | |
| tree | 34a2e4a851c663bc6d71d148e59b59ba345a5fdb /src/wasp-audio.el | |
| parent | 782c667e824d426b5443591afeefc37d0ae17785 (diff) | |
Updates
Diffstat (limited to 'src/wasp-audio.el')
| -rw-r--r-- | src/wasp-audio.el | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/wasp-audio.el b/src/wasp-audio.el index 56c85e70..59b8f07c 100644 --- a/src/wasp-audio.el +++ b/src/wasp-audio.el @@ -37,6 +37,7 @@ (defvar w/current-stream-transcribe-process nil) (defvar w/last-stream-transcription "") (defvar w/stream-keep-transcribing t) +(defvar w/stream-transcribe-voice-commands nil) (defun w/tts (msg) "Use TTS to say MSG." @@ -105,7 +106,10 @@ If VOLUME is specified, use it to adjust the volume (100 is default)." (lambda (_ _) (setq w/current-stream-transcribe-process nil) (with-current-buffer (get-buffer-create w/stream-transcribe-buffer) - (setq w/last-stream-transcription (buffer-string))) + (setq w/last-stream-transcription (buffer-string)) + (--each w/stream-transcribe-voice-commands + (when (s-contains? (car it) (s-downcase w/last-stream-transcription)) + (funcall (cdr it))))) (when w/stream-keep-transcribing (w/handle-stream-transcribe))))))) |
