Skip to content

Commit

Permalink
Improving script
Browse files Browse the repository at this point in the history
  • Loading branch information
mxro committed Sep 15, 2023
1 parent dfa54ef commit 9672fc8
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 3 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,14 @@ Use your voice to control Windows 📢
| Open Firefox | Opens Firefox |
| Search for cupcake recipes | Opens browser and searches for 'Cupcake Recipes' |
| Tell me the first 20 digits of Pi | Shows a window with the 20 first digits of Pi |
| Paste a poem | Pastes a poem |

⚠ WARNING ⚠ This is an experimental application. ChatGPT can end up doing random stuff. So please use with caution!

## How does this work?

Check out my blog post: TBD

## Install

- Download and install AutoHotKey V1 from [autohotkey.com](https://www.autohotkey.com/)
Expand All @@ -34,6 +39,16 @@ Use your voice to control Windows 📢

## Customise

### Trigger Hotkey

The hotkey to start/stop a voice command is defined in `watch.ahk`. You can replace the following with a hotkey of your choice:

```
F8::
```

### Prompt

Among the extracted files, there is a `prompt.txt`. You can edit this to customise it to yor own needs.

For instance, the current prompt file defaults to using the [DuckDuckGo](https://duckduckgo.com/) search engine. You can change this easily to any search engine you like, by modifying the following line in `prompt.txt`:
Expand Down
16 changes: 16 additions & 0 deletions mywatch.ahk
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Capslock::Esc

F8::
NotRecording := !NotRecording
If NotRecording
{
Run %A_WorkingDir%\bin\fmedia-1.31-windows-x64\fmedia\fmedia.exe --record --overwrite --out=rec.mp3 --globcmd=listen,, Hide
}
Else
{
Run %A_WorkingDir%\bin\fmedia-1.31-windows-x64\fmedia\fmedia.exe --globcmd=stop,, Hide
Sleep, 100
Run %A_WorkingDir%\bin\whisper-autohotkey\whisper-autohotkey.exe,, Hide
}
return

2 changes: 1 addition & 1 deletion script.ahk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Run, https://www.pexels.com/search/beautiful`%20flowers/
Run, "https://duckduckgo.com/?q=It's`%20a`%20poem`%20in`%20Latin"
return
3 changes: 1 addition & 2 deletions watch.ahk
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
Capslock::Esc


F8::
NotRecording := !NotRecording
If NotRecording
Expand Down

0 comments on commit 9672fc8

Please sign in to comment.